diff options
Diffstat (limited to 'src/spriteloader')
-rw-r--r-- | src/spriteloader/grf.cpp | 2 | ||||
-rw-r--r-- | src/spriteloader/grf.hpp | 2 | ||||
-rw-r--r-- | src/spriteloader/png.cpp | 3 | ||||
-rw-r--r-- | src/spriteloader/png.hpp | 2 | ||||
-rw-r--r-- | src/spriteloader/spriteloader.hpp | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp index d0bc0e334..bbc9d3f8f 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, const char *filename, uint8 file_slot, uint32 file_pos) +bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, uint32 file_pos) { /* 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 fe9405339..65b5f6233 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, const char *filename, uint8 file_slot, uint32 file_pos); + bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, uint32 file_pos); }; #endif /* SPRITELOADER_GRF_HPP */ diff --git a/src/spriteloader/png.cpp b/src/spriteloader/png.cpp index abfce00fa..2af9d0253 100644 --- a/src/spriteloader/png.cpp +++ b/src/spriteloader/png.cpp @@ -181,8 +181,9 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i return true; } -bool SpriteLoaderPNG::LoadSprite(SpriteLoader::Sprite *sprite, const char *filename, uint8 file_slot, uint32 file_pos) +bool SpriteLoaderPNG::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, uint32 file_pos) { + const char *filename = FioGetFilename(file_slot); if (!LoadPNG(sprite, filename, file_pos, false)) return false; if (!LoadPNG(sprite, filename, file_pos, true)) return false; return true; diff --git a/src/spriteloader/png.hpp b/src/spriteloader/png.hpp index eb3719180..7d821dc71 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, const char *filename, uint8 file_slot, uint32 file_pos); + bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, uint32 file_pos); }; #endif /* SPRITELOADER_PNG_HPP */ diff --git a/src/spriteloader/spriteloader.hpp b/src/spriteloader/spriteloader.hpp index 47d1b7d40..09ad505a8 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, const char *filename, uint8 file_slot, uint32 file_pos) = 0; + virtual bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, uint32 file_pos) = 0; virtual ~SpriteLoader() { } }; |