1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-09 18:39:45 +01:00

Replace asset load calls with loadAssetToMemory()

All assets now use FILESYSTEM_loadAssetToMemory() instead of
FILESYSTEM_loadFileToMemory().
This commit is contained in:
Misa 2021-04-05 00:54:32 -07:00 committed by Ethan Lee
parent 72ae6921ea
commit ff3cba9cee
4 changed files with 4 additions and 4 deletions

View file

@ -364,7 +364,7 @@ void Graphics::Makebfont(void)
unsigned char* charmap = NULL; unsigned char* charmap = NULL;
size_t length; size_t length;
FILESYSTEM_loadFileToMemory("graphics/font.txt", &charmap, &length, false); FILESYSTEM_loadAssetToMemory("graphics/font.txt", &charmap, &length, false);
if (charmap != NULL) if (charmap != NULL)
{ {
unsigned char* current = charmap; unsigned char* current = charmap;

View file

@ -36,7 +36,7 @@ static SDL_Surface* LoadImage(const char *filename, bool noBlend = true, bool no
unsigned char *fileIn = NULL; unsigned char *fileIn = NULL;
size_t length = 0; size_t length = 0;
FILESYSTEM_loadFileToMemory(filename, &fileIn, &length, false); FILESYSTEM_loadAssetToMemory(filename, &fileIn, &length, false);
if (noAlpha) if (noAlpha)
{ {
lodepng_decode24(&data, &width, &height, fileIn, length); lodepng_decode24(&data, &width, &height, fileIn, length);

View file

@ -131,7 +131,7 @@ void Screen::LoadIcon(void)
size_t length = 0; size_t length = 0;
unsigned char *data; unsigned char *data;
unsigned int width, height; unsigned int width, height;
FILESYSTEM_loadFileToMemory("VVVVVV.png", &fileIn, &length, false); FILESYSTEM_loadAssetToMemory("VVVVVV.png", &fileIn, &length, false);
lodepng_decode24(&data, &width, &height, fileIn, length); lodepng_decode24(&data, &width, &height, fileIn, length);
FILESYSTEM_freeMemory(&fileIn); FILESYSTEM_freeMemory(&fileIn);
SDL_Surface *icon = SDL_CreateRGBSurfaceFrom( SDL_Surface *icon = SDL_CreateRGBSurfaceFrom(

View file

@ -33,7 +33,7 @@ SoundTrack::SoundTrack(const char* fileName)
unsigned char *mem; unsigned char *mem;
size_t length = 0; size_t length = 0;
FILESYSTEM_loadFileToMemory(fileName, &mem, &length, false); FILESYSTEM_loadAssetToMemory(fileName, &mem, &length, false);
if (mem == NULL) if (mem == NULL)
{ {
fprintf(stderr, "Unable to load WAV file %s\n", fileName); fprintf(stderr, "Unable to load WAV file %s\n", fileName);