the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 71 lines 1.0 kB view raw
1#pragma once 2#include "Textures.h" 3 4typedef arrayWithLength<_TEXTURE_NAME> textureNameArray; 5class ResourceLocation 6{ 7private: 8 textureNameArray m_texture; 9 wstring m_path; 10 bool m_preloaded; 11 12public: 13 ResourceLocation() 14 { 15 m_preloaded = false; 16 m_path = L""; 17 } 18 19 ResourceLocation(_TEXTURE_NAME texture) 20 { 21 m_texture = textureNameArray(1); 22 m_texture[0] = texture; 23 m_preloaded = true; 24 } 25 26 ResourceLocation(wstring path) 27 { 28 m_path = path; 29 m_preloaded = false; 30 } 31 32 ResourceLocation(intArray textures) 33 { 34 m_texture = textureNameArray(textures.length); 35 for(unsigned int i = 0; i < textures.length; ++i) 36 { 37 m_texture[i] = (_TEXTURE_NAME)textures[i]; 38 } 39 m_preloaded = true; 40 } 41 42 ~ResourceLocation() 43 { 44 delete m_texture.data; 45 } 46 47 _TEXTURE_NAME getTexture() 48 { 49 return m_texture[0]; 50 } 51 52 _TEXTURE_NAME getTexture(int idx) 53 { 54 return m_texture[idx]; 55 } 56 57 int getTextureCount() 58 { 59 return m_texture.length; 60 } 61 62 wstring getPath() 63 { 64 return m_path; 65 } 66 67 bool isPreloaded() 68 { 69 return m_preloaded; 70 } 71};