summaryrefslogtreecommitdiff
path: root/src/spriteloader
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-09-02 15:20:38 +0000
committerrubidium <rubidium@openttd.org>2008-09-02 15:20:38 +0000
commitc8e8911ef676f503ac5789d3fefac1278cdef971 (patch)
treee7050537d14303dbc6bc9a461ff38931861cc4aa /src/spriteloader
parentcbe397388f0ef537b61095b05ee4edfe9dd92202 (diff)
downloadopenttd-c8e8911ef676f503ac5789d3fefac1278cdef971.tar.xz
(svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites.
Diffstat (limited to 'src/spriteloader')
-rw-r--r--src/spriteloader/grf.cpp2
-rw-r--r--src/spriteloader/grf.hpp2
-rw-r--r--src/spriteloader/png.cpp2
-rw-r--r--src/spriteloader/png.hpp2
-rw-r--r--src/spriteloader/spriteloader.hpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp
index 871a9fa0a..17510027e 100644
--- a/src/spriteloader/grf.cpp
+++ b/src/spriteloader/grf.cpp
@@ -9,7 +9,7 @@
#include "../core/alloc_func.hpp"
#include "grf.hpp"
-bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos)
+bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos, SpriteType sprite_type)
{
/* Open the right file and go to the correct position */
FioSeekToFile(file_slot, file_pos);
diff --git a/src/spriteloader/grf.hpp b/src/spriteloader/grf.hpp
index aff4c57cb..fc1e7ddb6 100644
--- a/src/spriteloader/grf.hpp
+++ b/src/spriteloader/grf.hpp
@@ -12,7 +12,7 @@ public:
/**
* Load a sprite from the disk and return a sprite struct which is the same for all loaders.
*/
- bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos);
+ bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos, SpriteType sprite_type);
};
#endif /* SPRITELOADER_GRF_HPP */
diff --git a/src/spriteloader/png.cpp b/src/spriteloader/png.cpp
index 4ccc502aa..43a188fbf 100644
--- a/src/spriteloader/png.cpp
+++ b/src/spriteloader/png.cpp
@@ -170,7 +170,7 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i
return true;
}
-bool SpriteLoaderPNG::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos)
+bool SpriteLoaderPNG::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos, SpriteType sprite_type)
{
const char *filename = FioGetFilename(file_slot);
if (!LoadPNG(sprite, filename, (uint32)file_pos, false)) return false;
diff --git a/src/spriteloader/png.hpp b/src/spriteloader/png.hpp
index 62c30db75..bb96ec3aa 100644
--- a/src/spriteloader/png.hpp
+++ b/src/spriteloader/png.hpp
@@ -12,7 +12,7 @@ public:
/**
* Load a sprite from the disk and return a sprite struct which is the same for all loaders.
*/
- bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos);
+ bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos, SpriteType sprite_type);
};
#endif /* SPRITELOADER_PNG_HPP */
diff --git a/src/spriteloader/spriteloader.hpp b/src/spriteloader/spriteloader.hpp
index 69b51c2f0..34e668e22 100644
--- a/src/spriteloader/spriteloader.hpp
+++ b/src/spriteloader/spriteloader.hpp
@@ -26,7 +26,7 @@ public:
/**
* Load a sprite from the disk and return a sprite struct which is the same for all loaders.
*/
- virtual bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos) = 0;
+ virtual bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos, SpriteType sprite_type) = 0;
virtual ~SpriteLoader() { }
};