From 86c900239b8ea0893e5889ec58ce77ec875d637a Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Tue, 10 Mar 2026 23:26:35 +1100 Subject: [PATCH] Remove Win32 index types from skin select menu --- .../Common/UI/UIScene_SkinSelectMenu.cpp | 26 +++++++++---------- .../Common/UI/UIScene_SkinSelectMenu.h | 16 +++++++----- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp index 2bd8866bf..b5b18d24d 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp @@ -442,7 +442,7 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr { ui.AnimateKeyPress(iPad, key, repeat, pressed, released); ui.PlayUISFX(eSFX_Scroll); - DWORD startingIndex = m_packIndex; + int startingIndex = m_packIndex; m_packIndex = getPreviousPackIndex(m_packIndex); if(startingIndex != m_packIndex) { @@ -477,7 +477,7 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr { ui.AnimateKeyPress(iPad, key, repeat, pressed, released); ui.PlayUISFX(eSFX_Scroll); - DWORD startingIndex = m_packIndex; + int startingIndex = m_packIndex; m_packIndex = getNextPackIndex(m_packIndex); if(startingIndex != m_packIndex) { @@ -1113,7 +1113,7 @@ TEXTURE_NAME UIScene_SkinSelectMenu::getTextureId(int skinIndex) return texture; } -int UIScene_SkinSelectMenu::getNextSkinIndex(DWORD sourceIndex) +int UIScene_SkinSelectMenu::getNextSkinIndex(int sourceIndex) { int nextSkin = sourceIndex; @@ -1147,7 +1147,7 @@ int UIScene_SkinSelectMenu::getNextSkinIndex(DWORD sourceIndex) return nextSkin; } -int UIScene_SkinSelectMenu::getPreviousSkinIndex(DWORD sourceIndex) +int UIScene_SkinSelectMenu::getPreviousSkinIndex(int sourceIndex) { int previousSkin = sourceIndex; switch(m_packIndex) @@ -1200,7 +1200,7 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged() if(m_currentPack != NULL) { bool found; - DWORD currentSkinIndex = m_currentPack->getSkinIndexAt(m_currentSkinPath, found); + int currentSkinIndex = m_currentPack->getSkinIndexAt(m_currentSkinPath, found); if(found) m_skinIndex = currentSkinIndex; } else @@ -1210,8 +1210,8 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged() case SKIN_SELECT_PACK_DEFAULT: if( !GET_IS_DLC_SKIN_FROM_BITMASK(m_originalSkinId) ) { - DWORD ugcSkinIndex = GET_UGC_SKIN_ID_FROM_BITMASK(m_originalSkinId); - DWORD defaultSkinIndex = GET_DEFAULT_SKIN_ID_FROM_BITMASK(m_originalSkinId); + std::uint32_t ugcSkinIndex = GET_UGC_SKIN_ID_FROM_BITMASK(m_originalSkinId); + std::uint32_t defaultSkinIndex = GET_DEFAULT_SKIN_ID_FROM_BITMASK(m_originalSkinId); if( ugcSkinIndex == 0 ) { m_skinIndex = (EDefaultSkins) defaultSkinIndex; @@ -1229,7 +1229,7 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged() DLCPack *Pack=app.m_dlcManager.getPackContainingSkin(chars); if(Pack) { - DWORD currentSkinIndex = Pack->getSkinIndexAt(m_currentSkinPath, found); + int currentSkinIndex = Pack->getSkinIndexAt(m_currentSkinPath, found); if(found) m_skinIndex = app.GetPlayerFavoriteSkinsPos(m_iPad); } } @@ -1304,7 +1304,7 @@ void UIScene_SkinSelectMenu::updatePackDisplay() } -int UIScene_SkinSelectMenu::getNextPackIndex(DWORD sourceIndex) +int UIScene_SkinSelectMenu::getNextPackIndex(int sourceIndex) { int nextPack = sourceIndex; ++nextPack; @@ -1316,12 +1316,12 @@ int UIScene_SkinSelectMenu::getNextPackIndex(DWORD sourceIndex) return nextPack; } -int UIScene_SkinSelectMenu::getPreviousPackIndex(DWORD sourceIndex) +int UIScene_SkinSelectMenu::getPreviousPackIndex(int sourceIndex) { int previousPack = sourceIndex; if (previousPack == SKIN_SELECT_PACK_DEFAULT) { - DWORD packCount = app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin); + int packCount = app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin); if (packCount > 0) { @@ -1523,7 +1523,7 @@ void UIScene_SkinSelectMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, i if( m_currentNavigation == eSkinNavigation_Pack ) { ui.PlayUISFX(eSFX_Scroll); - DWORD startingIndex = m_packIndex; + int startingIndex = m_packIndex; m_packIndex = getPreviousPackIndex(m_packIndex); if(startingIndex != m_packIndex) { @@ -1535,7 +1535,7 @@ void UIScene_SkinSelectMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, i if( m_currentNavigation == eSkinNavigation_Pack ) { ui.PlayUISFX(eSFX_Scroll); - DWORD startingIndex = m_packIndex; + int startingIndex = m_packIndex; m_packIndex = getNextPackIndex(m_packIndex); if(startingIndex != m_packIndex) { diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.h index f4215fc50..3bd9b74b0 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.h @@ -1,4 +1,6 @@ #pragma once +#include + #include "../../Minecraft.World/Util/Definitions.h" #include "UIScene.h" #include "UIControl_PlayerSkinPreview.h" @@ -100,8 +102,8 @@ private: UI_END_MAP_ELEMENTS_AND_NAMES() DLCPack *m_currentPack; - DWORD m_packIndex, m_skinIndex; - DWORD m_originalSkinId; + int m_packIndex, m_skinIndex; + std::uint32_t m_originalSkinId; std::wstring m_currentSkinPath, m_selectedSkinPath, m_selectedCapePath; std::vector *m_vAdditionalSkinBoxes; @@ -109,7 +111,7 @@ private: ESkinSelectNavigation m_currentNavigation; bool m_bNoSkinsToShow; - DWORD m_currentPackCount; + int m_currentPackCount; bool m_bIgnoreInput; bool m_bSkinIndexChanged; std::wstring m_leftLabel, m_centreLabel, m_rightLabel; @@ -144,15 +146,15 @@ public: private: void handleSkinIndexChanged(); - int getNextSkinIndex(DWORD sourceIndex); - int getPreviousSkinIndex(DWORD sourceIndex); + int getNextSkinIndex(int sourceIndex); + int getPreviousSkinIndex(int sourceIndex); TEXTURE_NAME getTextureId(int skinIndex); void handlePackIndexChanged(); void updatePackDisplay(); - int getNextPackIndex(DWORD sourceIndex); - int getPreviousPackIndex(DWORD sourceIndex); + int getNextPackIndex(int sourceIndex); + int getPreviousPackIndex(int sourceIndex); void setCharacterSelected(bool selected); void setCharacterLocked(bool locked);