mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 01:29:43 +01:00
Place GraphicsResources functions in header file
These are functions used in other files that are not on the GraphicsResources class but are implemented inside the GraphicsResources.cpp file. For some reason they were never put in the GraphicsResources.h file until now, even though it's a perfectly good header file to put them in.
This commit is contained in:
parent
10030a4340
commit
b3b001c2a8
4 changed files with 10 additions and 7 deletions
|
@ -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 <c-hashmap/map.h>
|
||||
}
|
||||
|
||||
// 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
|
||||
{
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue