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

(cherry picked from commit fdc11a9f94)
This commit is contained in:
Rubidium
2021-04-14 17:20:39 +02:00
committed by Jonathan G Rennison
parent 04b38dbfca
commit 6bd12e24d7
16 changed files with 335 additions and 237 deletions

View File

@@ -23,10 +23,10 @@ byte FioReadByte();
uint16 FioReadWord();
uint32 FioReadDword();
void FioCloseAll();
void FioOpenFile(int slot, const std::string &filename, Subdirectory subdir, std::string *output_filename = nullptr);
class SpriteFile &FioOpenFile(int slot, const std::string &filename, Subdirectory subdir, bool palette_remap = false);
void FioReadBlock(void *ptr, size_t size);
void FioSkipBytes(int n);
class RandomAccessFile *FioGetRandomAccessFile(int slot);
class SpriteFile *FioGetSpriteFile(int slot);
void FioFCloseFile(FILE *f);
FILE *FioFOpenFile(const std::string &filename, const char *mode, Subdirectory subdir, size_t *filesize = nullptr, std::string *output_filename = nullptr);