From 491783c301efcf8be8a8e1745bf44e717285448c Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Wed, 11 Mar 2026 03:04:59 +1100 Subject: [PATCH] Use fixed-width skin IDs in DLC files --- Minecraft.Client/Platform/Common/DLC/DLCFile.cpp | 2 +- Minecraft.Client/Platform/Common/DLC/DLCFile.h | 4 ++-- Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Minecraft.Client/Platform/Common/DLC/DLCFile.cpp b/Minecraft.Client/Platform/Common/DLC/DLCFile.cpp index 56bfc4fb1..5ae3551bc 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCFile.cpp +++ b/Minecraft.Client/Platform/Common/DLC/DLCFile.cpp @@ -23,4 +23,4 @@ DLCFile::DLCFile(DLCManager::EDLCType type, const std::wstring &path) { m_dwSkinId=0; } -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/DLC/DLCFile.h b/Minecraft.Client/Platform/Common/DLC/DLCFile.h index 3c0da1855..cb472a77c 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCFile.h +++ b/Minecraft.Client/Platform/Common/DLC/DLCFile.h @@ -7,7 +7,7 @@ class DLCFile protected: DLCManager::EDLCType m_type; std::wstring m_path; - DWORD m_dwSkinId; + std::uint32_t m_dwSkinId; public: DLCFile(DLCManager::EDLCType type, const std::wstring &path); @@ -15,7 +15,7 @@ public: DLCManager::EDLCType getType() { return m_type; } std::wstring getPath() { return m_path; } - DWORD getSkinID() { return m_dwSkinId; } + std::uint32_t getSkinID() { return m_dwSkinId; } virtual void addData(std::uint8_t *pbData, std::uint32_t dataBytes) {} virtual std::uint8_t *getData(std::uint32_t &dataBytes) { dataBytes = 0; return NULL; } diff --git a/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp b/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp index a965b64d5..e15fd55a4 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp +++ b/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp @@ -157,7 +157,7 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, const std::ws case DLCManager::e_DLCParamType_Anim: // 4J Stu - The Xbox version used swscanf_s which isn't available in GCC. swscanf(value.c_str(), L"%X", &m_uiAnimOverrideBitmask); - DWORD skinId = app.getSkinIdFromPath(m_path); + std::uint32_t skinId = app.getSkinIdFromPath(m_path); app.SetAnimOverrideBitmask(skinId, m_uiAnimOverrideBitmask); break; }