the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 41 lines 1.2 kB view raw
1#pragma once 2 3class Texture; 4class Stitcher; 5class TexturePack; 6 7class TextureManager 8{ 9private: 10 static TextureManager *instance; 11 12 int nextID; 13 typedef unordered_map<wstring, int> stringIntMap; 14 typedef unordered_map<int, Texture *> intTextureMap; 15 intTextureMap idToTextureMap; 16 stringIntMap stringToIDMap; 17 18public: 19 static void createInstance(); 20 static TextureManager *getInstance(); 21 22private: 23 TextureManager(); 24 25public: 26 int createTextureID(); 27 Texture *getTexture(const wstring &name); 28 void registerName(const wstring &name, Texture *texture); 29 void registerTexture(Texture *texture); 30 void unregisterTexture(const wstring &name, Texture *texture); 31 Stitcher *createStitcher(const wstring &name); 32 vector<Texture *> *createTextures(const wstring &filename, bool mipmap); // 4J added mipmap param 33 34private: 35 wstring getTextureNameFromPath(const wstring &filename); 36 bool isAnimation(const wstring &filename, TexturePack *texturePack); 37 38public: 39 Texture *createTexture(const wstring &name, int mode, int width, int height, int wrap, int format, int minFilter, int magFilter, bool mipmap, BufferedImage *image); 40 Texture *createTexture(const wstring &name, int mode, int width, int height, int format, bool mipmap); // 4J Added mipmap param 41};