diff --git a/Minecraft.Client/Network/ClientConnection.cpp b/Minecraft.Client/Network/ClientConnection.cpp index d8d07f091..963fb8d35 100644 --- a/Minecraft.Client/Network/ClientConnection.cpp +++ b/Minecraft.Client/Network/ClientConnection.cpp @@ -2241,8 +2241,8 @@ void ClientConnection::handleTexture(std::shared_ptr packet) #ifndef _CONTENT_PACKAGE wprintf(L"Client received request for custom texture %ls\n",packet->textureName.c_str()); #endif - PBYTE pbData=NULL; - DWORD dwBytes=0; + std::uint8_t *pbData=NULL; + unsigned int dwBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes); if(dwBytes!=0) @@ -2273,8 +2273,8 @@ void ClientConnection::handleTextureAndGeometry(std::shared_ptrtextureName.c_str()); #endif - PBYTE pbData=NULL; - DWORD dwBytes=0; + std::uint8_t *pbData=NULL; + unsigned int dwBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes); DLCSkinFile *pDLCSkinFile = app.m_dlcManager.getSkinFile(packet->textureName); diff --git a/Minecraft.Client/Network/PlayerConnection.cpp b/Minecraft.Client/Network/PlayerConnection.cpp index 8669e1b91..1a4d8721e 100644 --- a/Minecraft.Client/Network/PlayerConnection.cpp +++ b/Minecraft.Client/Network/PlayerConnection.cpp @@ -802,8 +802,8 @@ void PlayerConnection::handleTexture(std::shared_ptr packet) #ifndef _CONTENT_PACKAGE wprintf(L"Server received request for custom texture %ls\n",packet->textureName.c_str()); #endif - PBYTE pbData=NULL; - DWORD dwBytes=0; + std::uint8_t *pbData=NULL; + unsigned int dwBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes); if(dwBytes!=0) @@ -836,8 +836,8 @@ void PlayerConnection::handleTextureAndGeometry(std::shared_ptrtextureName.c_str()); #endif - PBYTE pbData=NULL; - DWORD dwTextureBytes=0; + std::uint8_t *pbData=NULL; + unsigned int dwTextureBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwTextureBytes); DLCSkinFile *pDLCSkinFile = app.m_dlcManager.getSkinFile(packet->textureName); @@ -900,8 +900,8 @@ void PlayerConnection::handleTextureReceived(const std::wstring &textureName) AUTO_VAR(it, find( m_texturesRequested.begin(), m_texturesRequested.end(), textureName )); if( it != m_texturesRequested.end() ) { - PBYTE pbData=NULL; - DWORD dwBytes=0; + std::uint8_t *pbData=NULL; + unsigned int dwBytes=0; app.GetMemFileDetails(textureName,&pbData,&dwBytes); if(dwBytes!=0) @@ -918,8 +918,8 @@ void PlayerConnection::handleTextureAndGeometryReceived(const std::wstring &text AUTO_VAR(it, find( m_texturesRequested.begin(), m_texturesRequested.end(), textureName )); if( it != m_texturesRequested.end() ) { - PBYTE pbData=NULL; - DWORD dwTextureBytes=0; + std::uint8_t *pbData=NULL; + unsigned int dwTextureBytes=0; app.GetMemFileDetails(textureName,&pbData,&dwTextureBytes); DLCSkinFile *pDLCSkinFile=app.m_dlcManager.getSkinFile(textureName); diff --git a/Minecraft.Client/Platform/Common/App_structs.h b/Minecraft.Client/Platform/Common/App_structs.h index 47cc5167c..437a96e08 100644 --- a/Minecraft.Client/Platform/Common/App_structs.h +++ b/Minecraft.Client/Platform/Common/App_structs.h @@ -1,5 +1,7 @@ #pragma once +#include + typedef struct { wchar_t *wchFilename; @@ -13,9 +15,9 @@ TMS_FILE; typedef struct { - PBYTE pbData; - DWORD dwBytes; - BYTE ucRefCount; + std::uint8_t *pbData; + unsigned int dwBytes; + std::uint8_t ucRefCount; } MEMDATA,*PMEMDATA; diff --git a/Minecraft.Client/Platform/Common/Consoles_App.cpp b/Minecraft.Client/Platform/Common/Consoles_App.cpp index a8f7f1bc1..bc5d223ab 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.cpp +++ b/Minecraft.Client/Platform/Common/Consoles_App.cpp @@ -5318,7 +5318,7 @@ bool CMinecraftApp::isXuidDeadmau5(PlayerUID xuid) return false; } -void CMinecraftApp::AddMemoryTextureFile(const std::wstring &wName,PBYTE pbData,DWORD dwBytes) +void CMinecraftApp::AddMemoryTextureFile(const std::wstring &wName, std::uint8_t *pbData, unsigned int dwBytes) { EnterCriticalSection(&csMemFilesLock); // check it's not already in @@ -5413,7 +5413,7 @@ bool CMinecraftApp::IsFileInMemoryTextures(const std::wstring &wName) return val; } -void CMinecraftApp::GetMemFileDetails(const std::wstring &wName,PBYTE *ppbData,DWORD *pdwBytes) +void CMinecraftApp::GetMemFileDetails(const std::wstring &wName, std::uint8_t **ppbData, unsigned int *pdwBytes) { EnterCriticalSection(&csMemFilesLock); AUTO_VAR(it, m_MEM_Files.find(wName)); diff --git a/Minecraft.Client/Platform/Common/Consoles_App.h b/Minecraft.Client/Platform/Common/Consoles_App.h index 4914e95c1..c71b45687 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.h +++ b/Minecraft.Client/Platform/Common/Consoles_App.h @@ -1,5 +1,7 @@ #pragma once +#include + //using namespace std; #include "Audio/Consoles_SoundEngine.h" @@ -339,9 +341,9 @@ public: bool isXuidNotch(PlayerUID xuid); bool isXuidDeadmau5(PlayerUID xuid); - void AddMemoryTextureFile(const std::wstring &wName, PBYTE pbData, DWORD dwBytes); + void AddMemoryTextureFile(const std::wstring &wName, std::uint8_t *pbData, unsigned int dwBytes); void RemoveMemoryTextureFile(const std::wstring &wName); - void GetMemFileDetails(const std::wstring &wName,PBYTE *ppbData,DWORD *pdwBytes); + void GetMemFileDetails(const std::wstring &wName, std::uint8_t **ppbData, unsigned int *pdwBytes); bool IsFileInMemoryTextures(const std::wstring &wName); // Texture Pack Data files (icon, banner, comparison shot & text) diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp index 5f9d3c78e..30f84df2b 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp @@ -855,8 +855,8 @@ bool UIScene_DLCOffersMenu::UpdateDisplay(MARKETPLACE_CONTENTOFFER_INFO& xOffer) { if(hasRegisteredSubstitutionTexture(cString)==false) { - BYTE *pData=NULL; - DWORD dwSize=0; + std::uint8_t *pData=NULL; + unsigned int dwSize=0; app.GetMemFileDetails(cString,&pData,&dwSize); // set the image #ifdef _XBOX_ONE @@ -920,4 +920,4 @@ void UIScene_DLCOffersMenu::HandleDLCInstalled() //} -#endif \ No newline at end of file +#endif diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp index 1db284ac4..b41d5835f 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp @@ -449,9 +449,9 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly ) DLC_INFO *dlc = app.GetDLCInfoForFullOfferID(xOffer.qwOfferID); if (dlc != NULL) { - BYTE *pData=NULL; + std::uint8_t *pData=NULL; UINT uiSize=0; - DWORD dwSize=0; + unsigned int dwSize=0; WCHAR *cString = dlc->wchBanner; // is the file in the TMS XZP? @@ -702,9 +702,9 @@ HRESULT CScene_DLCOffers::OnNotifySelChanged(HXUIOBJ hObjSource, XUINotifySelCha if (dlc != NULL) { - BYTE *pImage=NULL; + std::uint8_t *pImage=NULL; UINT uiSize=0; - DWORD dwSize=0; + unsigned int dwSize=0; WCHAR *cString = dlc->wchBanner; @@ -811,8 +811,8 @@ HRESULT CScene_DLCOffers::OnTimer(XUIMessageTimer *pData,BOOL& rfHandled) if(bPresent) { - BYTE *pImage=NULL; - DWORD dwSize=0; + std::uint8_t *pImage=NULL; + unsigned int dwSize=0; if(m_hXuiBrush!=NULL) { diff --git a/Minecraft.Client/Textures/Textures.cpp b/Minecraft.Client/Textures/Textures.cpp index 0974a3f66..4ad245265 100644 --- a/Minecraft.Client/Textures/Textures.cpp +++ b/Minecraft.Client/Textures/Textures.cpp @@ -1014,8 +1014,8 @@ MemTexture *Textures::addMemTexture(const std::wstring& name,MemTextureProcessor if(texture == NULL) { // can we find it in the app mem files? - PBYTE pbData=NULL; - DWORD dwBytes=0; + std::uint8_t *pbData=NULL; + unsigned int dwBytes=0; app.GetMemFileDetails(name,&pbData,&dwBytes); if(dwBytes!=0)