9 #ifndef _TEXTURE_MANAGER_H
10 #define _TEXTURE_MANAGER_H
17 #define TEXTURE_WHITE 0
18 #define TEXTURE_SPLASH 1
35 glm::vec2
getUV(
unsigned int i);
98 unsigned int width = 256,
unsigned int height = 256,
101 int slot = -1,
bool filter =
true);
120 static void setPalette(
int index, glm::vec4 color);
123 static void addIndexedTexture(
unsigned char* image,
unsigned int width,
unsigned int height);
135 static std::vector<TextureTile*>
tiles;
146 static std::vector<std::tuple<unsigned char*, unsigned int, unsigned int>>
indexedTextures;
static std::vector< unsigned int > mTextureIdsSystem
static int initializeSplash()
static std::vector< unsigned int > mTextureIdsGame
BufferManager(int t, TextureStorage s)
static int numAnimatedTiles()
std::vector< TextureTileVertex > vertices
static std::vector< std::vector< int > > animations
static void addAnimatedTile(int index, int tile)
static TextureTile & getTile(int index)
static std::vector< TextureTile * > tiles
static void addTile(TextureTile *t)
TextureTileVertex(int xc, int xp, int yc, int yp)
static std::vector< BufferManager > systemBuffers
static std::vector< int > gameUnits
TextureTile(unsigned int a, unsigned int t)
static std::array< glm::vec4, 256 > colorPalette
static int loadImage(std::string filename, TextureStorage s=TextureStorage::GAME, int slot=-1)
static int getFirstTileAnimation(int index)
static std::vector< unsigned int > & getIds(TextureStorage s)
static int numTextures(TextureStorage s=TextureStorage::GAME)
static void addIndexedTexture(unsigned char *image, unsigned int width, unsigned int height)
static int bindTexture(unsigned int n, TextureStorage s)
Bind texture to next free texture unit.
TextureStorage getTextureStorage()
unsigned int getTexture()
static unsigned int getTextureID(int n, TextureStorage s)
static BufferManager * getBufferManager(int tex, TextureStorage store)
static unsigned int nextFreeTextureUnit
static std::vector< int > systemUnits
static std::vector< int > & getUnits(TextureStorage s)
void add(TextureTileVertex t)
glm::vec2 getUV(unsigned int i)
static void setPalette(int index, glm::vec4 color)
static int loadPCX(std::string filename, TextureStorage s, int slot)
static glm::vec4 getPalette(int index)
static int getNextTileAnimation(int index, int tile)
static std::vector< BufferManager > gameBuffers
static int loadBufferSlot(unsigned char *image=nullptr, unsigned int width=256, unsigned int height=256, ColorMode mode=ColorMode::RGBA, unsigned int bpp=32, TextureStorage s=TextureStorage::GAME, int slot=-1, bool filter=true)
Loads Buffer as texture.
static std::vector< std::tuple< unsigned char *, unsigned int, unsigned int > > indexedTextures
static void bindTextureId(unsigned int n, TextureStorage s, unsigned int unit)