diff --git a/Minecraft.Client/Textures/Packs/AbstractTexturePack.cpp b/Minecraft.Client/Textures/Packs/AbstractTexturePack.cpp index 3605c4254..f2c92fa20 100644 --- a/Minecraft.Client/Textures/Packs/AbstractTexturePack.cpp +++ b/Minecraft.Client/Textures/Packs/AbstractTexturePack.cpp @@ -40,13 +40,13 @@ void AbstractTexturePack::loadIcon() { #ifdef _XBOX // 4J Stu - Temporary only - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); swprintf(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/TexturePackIcon.png"); - UINT size = 0; + unsigned int size = 0; HRESULT hr = XuiResourceLoadAllNoLoc(szResourceLocator, &m_iconData, &size); m_iconSize = static_cast(size); #endif @@ -56,13 +56,13 @@ void AbstractTexturePack::loadComparison() { #ifdef _XBOX // 4J Stu - Temporary only - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); swprintf(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/DefaultPack_Comparison.png"); - UINT size = 0; + unsigned int size = 0; HRESULT hr = XuiResourceLoadAllNoLoc(szResourceLocator, &m_comparisonData, &size); m_comparisonSize = static_cast(size); #endif @@ -232,7 +232,7 @@ void AbstractTexturePack::loadDefaultUI() const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); // Load new skin - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; swprintf(szResourceLocator, LOCATOR_SIZE,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/skin_Minecraft.xur"); @@ -291,13 +291,13 @@ void AbstractTexturePack::loadDefaultHTMLColourTable() // load from the .xzp file const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; // Try and load the HTMLColours.col based off the common XML first, before the deprecated xuiscene_colourtable wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/HTMLColours.col"); - BYTE *data; - UINT dataLength; + std::uint8_t *data; + unsigned int dataLength; if(XuiResourceLoadAll(szResourceLocator, &data, &dataLength) == S_OK) { m_colourTable->loadColoursFromData(data,dataLength); @@ -376,7 +376,7 @@ std::wstring AbstractTexturePack::getXuiRootPath() const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); // Load new skin - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; swprintf(szResourceLocator, LOCATOR_SIZE,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/"); diff --git a/Minecraft.Client/Textures/Packs/DLCTexturePack.cpp b/Minecraft.Client/Textures/Packs/DLCTexturePack.cpp index fed7cbf75..c68e11384 100644 --- a/Minecraft.Client/Textures/Packs/DLCTexturePack.cpp +++ b/Minecraft.Client/Textures/Packs/DLCTexturePack.cpp @@ -225,13 +225,13 @@ void DLCTexturePack::loadColourTable() std::uint32_t dwSize = 0; std::uint8_t *pbData = dataFile->getData(dwSize); - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; // Try and load the HTMLColours.col based off the common XML first, before the deprecated xuiscene_colourtable swprintf(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#HTMLColours.col",pbData, dwSize); - BYTE *data; - UINT dataLength; + std::uint8_t *data; + unsigned int dataLength; if(XuiResourceLoadAll(szResourceLocator, &data, &dataLength) == S_OK) { m_colourTable->loadColoursFromData(data,dataLength); @@ -483,7 +483,7 @@ void DLCTexturePack::loadUI() std::uint32_t dwSize = 0; std::uint8_t *pbData = dataFile->getData(dwSize); - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; swprintf(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#skin_Minecraft.xur",pbData, dwSize); @@ -557,7 +557,7 @@ std::wstring DLCTexturePack::getXuiRootPath() std::uint32_t dwSize = 0; std::uint8_t *pbData = dataFile->getData(dwSize); - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; swprintf(szResourceLocator, LOCATOR_SIZE,L"memory://%08X,%04X#",pbData, dwSize); path = szResourceLocator; diff --git a/Minecraft.Client/Textures/Packs/DefaultTexturePack.cpp b/Minecraft.Client/Textures/Packs/DefaultTexturePack.cpp index 7f49ed7cd..08a4064ce 100644 --- a/Minecraft.Client/Textures/Packs/DefaultTexturePack.cpp +++ b/Minecraft.Client/Textures/Packs/DefaultTexturePack.cpp @@ -17,13 +17,13 @@ void DefaultTexturePack::loadIcon() { #ifdef _XBOX // 4J Stu - Temporary only - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); swprintf(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/TexturePackIcon.png"); - UINT size = 0; + unsigned int size = 0; HRESULT hr = XuiResourceLoadAllNoLoc(szResourceLocator, &m_iconData, &size); m_iconSize = size; #else diff --git a/Minecraft.Client/Textures/Packs/FolderTexturePack.cpp b/Minecraft.Client/Textures/Packs/FolderTexturePack.cpp index 39bdd88ec..da6a514a4 100644 --- a/Minecraft.Client/Textures/Packs/FolderTexturePack.cpp +++ b/Minecraft.Client/Textures/Packs/FolderTexturePack.cpp @@ -79,7 +79,7 @@ void FolderTexturePack::loadUI() // Load new skin if(hasFile(L"TexturePack.xzp")) { - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + static const int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; swprintf(szResourceLocator, LOCATOR_SIZE,L"file://%lsTexturePack.xzp#skin_Minecraft.xur",getPath().c_str());