diff --git a/desktop_version/src/Font.cpp b/desktop_version/src/Font.cpp index cf47a176..da2d2b65 100644 --- a/desktop_version/src/Font.cpp +++ b/desktop_version/src/Font.cpp @@ -8,6 +8,7 @@ #include "FileSystemUtils.h" #include "FontBidi.h" #include "Graphics.h" +#include "GraphicsResources.h" #include "GraphicsUtil.h" #include "Localization.h" #include "UTF8.h" @@ -20,10 +21,6 @@ extern "C" #include } -// Sigh... This is the second forward-declaration, we need to put this in a header file -SDL_Texture* LoadImage(const char *filename, TextureLoadType loadtype); -SDL_Surface* LoadImageSurface(const char* filename); - namespace font { diff --git a/desktop_version/src/GraphicsResources.cpp b/desktop_version/src/GraphicsResources.cpp index 4410085f..c1f23ff0 100644 --- a/desktop_version/src/GraphicsResources.cpp +++ b/desktop_version/src/GraphicsResources.cpp @@ -82,7 +82,6 @@ static SDL_Surface* LoadSurfaceFromRaw(SDL_Surface* loadedImage) return optimizedImage; } -/* Can't be static, used in Screen.h */ SDL_Surface* LoadImageSurface(const char* filename) { unsigned char* data; diff --git a/desktop_version/src/GraphicsResources.h b/desktop_version/src/GraphicsResources.h index 20ba116d..f7973c68 100644 --- a/desktop_version/src/GraphicsResources.h +++ b/desktop_version/src/GraphicsResources.h @@ -50,4 +50,10 @@ public: SDL_Texture* im_flipsprites_translated; }; +SDL_Surface* LoadImageSurface(const char* filename); +SDL_Texture* LoadImage(const char *filename, TextureLoadType loadtype); + +bool SaveImage(const SDL_Surface* surface, const char* filename); +bool SaveScreenshot(void); + #endif /* GRAPHICSRESOURCES_H */ diff --git a/desktop_version/src/Screen.cpp b/desktop_version/src/Screen.cpp index c77c9998..8284ea86 100644 --- a/desktop_version/src/Screen.cpp +++ b/desktop_version/src/Screen.cpp @@ -10,6 +10,9 @@ #include "Game.h" #include "Graphics.h" #include "GraphicsUtil.h" +#ifndef __APPLE__ +#include "GraphicsResources.h" +#endif #include "InterimVersion.h" #include "Render.h" #include "Vlogging.h" @@ -118,8 +121,6 @@ void Screen::LoadIcon(void) } #else -SDL_Surface* LoadImageSurface(const char* filename); - void Screen::LoadIcon(void) { SDL_Surface* icon = LoadImageSurface("VVVVVV.png");