Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality

This commit is contained in:
Rubidium
2021-04-14 17:20:39 +02:00
committed by rubidium42
parent 0dd339ecd8
commit fdc11a9f94
15 changed files with 317 additions and 220 deletions

View File

@@ -13,6 +13,7 @@
#include "../core/alloc_type.hpp"
#include "../core/enum_type.hpp"
#include "../gfx_type.h"
#include "sprite_file_type.hpp"
struct Sprite;
typedef void *AllocatorProc(size_t size);
@@ -73,7 +74,7 @@ public:
* @param load_32bpp True if 32bpp sprites should be loaded, false for a 8bpp sprite.
* @return Bit mask of the zoom levels successfully loaded or 0 if no sprite could be loaded.
*/
virtual uint8 LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos, SpriteType sprite_type, bool load_32bpp) = 0;
virtual uint8 LoadSprite(SpriteLoader::Sprite *sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp) = 0;
virtual ~SpriteLoader() { }
};