From ff3cba9cee61b327854b1fefde989a5fd5b50534 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 5 Apr 2021 00:54:32 -0700 Subject: [PATCH] Replace asset load calls with loadAssetToMemory() All assets now use FILESYSTEM_loadAssetToMemory() instead of FILESYSTEM_loadFileToMemory(). --- desktop_version/src/Graphics.cpp | 2 +- desktop_version/src/GraphicsResources.cpp | 2 +- desktop_version/src/Screen.cpp | 2 +- desktop_version/src/SoundSystem.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 8d6df4d0..aa44a66a 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -364,7 +364,7 @@ void Graphics::Makebfont(void) unsigned char* charmap = NULL; size_t length; - FILESYSTEM_loadFileToMemory("graphics/font.txt", &charmap, &length, false); + FILESYSTEM_loadAssetToMemory("graphics/font.txt", &charmap, &length, false); if (charmap != NULL) { unsigned char* current = charmap; diff --git a/desktop_version/src/GraphicsResources.cpp b/desktop_version/src/GraphicsResources.cpp index b338a598..3558e391 100644 --- a/desktop_version/src/GraphicsResources.cpp +++ b/desktop_version/src/GraphicsResources.cpp @@ -36,7 +36,7 @@ static SDL_Surface* LoadImage(const char *filename, bool noBlend = true, bool no unsigned char *fileIn = NULL; size_t length = 0; - FILESYSTEM_loadFileToMemory(filename, &fileIn, &length, false); + FILESYSTEM_loadAssetToMemory(filename, &fileIn, &length, false); if (noAlpha) { lodepng_decode24(&data, &width, &height, fileIn, length); diff --git a/desktop_version/src/Screen.cpp b/desktop_version/src/Screen.cpp index f81ede47..d32c394d 100644 --- a/desktop_version/src/Screen.cpp +++ b/desktop_version/src/Screen.cpp @@ -131,7 +131,7 @@ void Screen::LoadIcon(void) size_t length = 0; unsigned char *data; 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); FILESYSTEM_freeMemory(&fileIn); SDL_Surface *icon = SDL_CreateRGBSurfaceFrom( diff --git a/desktop_version/src/SoundSystem.cpp b/desktop_version/src/SoundSystem.cpp index 32e7ebf4..f0be16ab 100644 --- a/desktop_version/src/SoundSystem.cpp +++ b/desktop_version/src/SoundSystem.cpp @@ -33,7 +33,7 @@ SoundTrack::SoundTrack(const char* fileName) unsigned char *mem; size_t length = 0; - FILESYSTEM_loadFileToMemory(fileName, &mem, &length, false); + FILESYSTEM_loadAssetToMemory(fileName, &mem, &length, false); if (mem == NULL) { fprintf(stderr, "Unable to load WAV file %s\n", fileName);