Remove Win32 byte counts from texture pack images

This commit is contained in:
notmatthewbeshay
2026-03-10 00:42:17 +11:00
parent 65dc775e84
commit 7bdf4c8ced
12 changed files with 113 additions and 105 deletions

View File

@@ -173,14 +173,14 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
// retrieve the save icon from the texture pack, if there is one
TexturePack *tp = Minecraft::GetInstance()->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
DWORD dwImageBytes;
PBYTE pbImageData = tp->getPackIcon(dwImageBytes);
std::uint32_t imageBytes = 0;
uint8_t *imageData = tp->getPackIcon(imageBytes);
if(dwImageBytes > 0 && pbImageData)
if(imageBytes > 0 && imageData)
{
wchar_t textureName[64];
swprintf(textureName,64,L"loadsave");
registerSubstitutionTexture(textureName,pbImageData,dwImageBytes);
registerSubstitutionTexture(textureName,imageData,imageBytes);
m_bitmapIcon.setTextureName( textureName );
}
}
@@ -259,14 +259,14 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
{
TexturePack *tp = pMinecraft->skins->getTexturePackByIndex(i);
DWORD dwImageBytes;
PBYTE pbImageData = tp->getPackIcon(dwImageBytes);
std::uint32_t imageBytes = 0;
uint8_t *imageData = tp->getPackIcon(imageBytes);
if(dwImageBytes > 0 && pbImageData)
if(imageBytes > 0 && imageData)
{
wchar_t imageName[64];
swprintf(imageName,64,L"tpack%08x",tp->getId());
registerSubstitutionTexture(imageName, pbImageData, dwImageBytes);
registerSubstitutionTexture(imageName, imageData, imageBytes);
m_texturePackList.addPack(i,imageName);
}
}
@@ -1801,4 +1801,4 @@ int UIScene_LoadMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EM
// pClass->m_bIgnoreInput=false;
// return 0;
// }
#endif
#endif