34 lines
697 B
C++
34 lines
697 B
C++
// GFX FRAMEWORK SINGLETON
|
|
|
|
#ifndef GFXFRAMEWORK_H
|
|
#define GFXFRAMEWORK_H
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
class GFXframework
|
|
{
|
|
// Singleton mechanics
|
|
protected:
|
|
GFXframework();
|
|
static GFXframework* m_GFXframework;
|
|
|
|
public:
|
|
static GFXframework* GetInstance();
|
|
static void ResetInstance(); // we don't want any leaks!
|
|
|
|
// GFX system methods and member variables
|
|
protected:
|
|
sf::RenderWindow* m_Window;
|
|
|
|
public:
|
|
~GFXframework();
|
|
bool InitWindow(int sizeX, int sizeY, char* name);
|
|
sf::RenderWindow* GetWindow();
|
|
|
|
sf::Texture m_TileTexture[13];
|
|
sf::Sprite m_Sprite[13];
|
|
void LoadSprites();
|
|
void DisplaySpriteAt(int spriteType, int x, int y);
|
|
};
|
|
|
|
#endif |