From ca72052b4cbf2039c117f0ffc25f47a6be1611fa Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Tue, 10 Mar 2026 21:30:58 +1100 Subject: [PATCH] Remove Win32 types from UI substitution textures --- Minecraft.Client/Platform/Common/UI/UIController.cpp | 2 +- Minecraft.Client/Platform/Common/UI/UIController.h | 4 +++- Minecraft.Client/Platform/Common/UI/UIScene.cpp | 4 ++-- Minecraft.Client/Platform/Common/UI/UIScene.h | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Minecraft.Client/Platform/Common/UI/UIController.cpp b/Minecraft.Client/Platform/Common/UI/UIController.cpp index e697b6369..e43f4043e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIController.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIController.cpp @@ -1383,7 +1383,7 @@ void RADLINK UIController::TextureSubstitutionDestroyCallback ( void * user_call t->releaseTexture( id ); } -void UIController::registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength) +void UIController::registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength) { // Remove it if it already exists unregisterSubstitutionTexture(textureName,false); diff --git a/Minecraft.Client/Platform/Common/UI/UIController.h b/Minecraft.Client/Platform/Common/UI/UIController.h index 4ba7eaefd..41778da78 100644 --- a/Minecraft.Client/Platform/Common/UI/UIController.h +++ b/Minecraft.Client/Platform/Common/UI/UIController.h @@ -1,5 +1,7 @@ #pragma once //using namespace std; +#include + #include "IUIController.h" #include "UIEnums.h" #include "UIGroup.h" @@ -256,7 +258,7 @@ protected: virtual void destroySubstitutionTexture(void *destroyCallBackData, GDrawTexture *handle) {} public: - void registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength); + void registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength); void unregisterSubstitutionTexture(const std::wstring &textureName, bool deleteData); public: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene.cpp b/Minecraft.Client/Platform/Common/UI/UIScene.cpp index 338e5eee1..e7c35404e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene.cpp @@ -1161,7 +1161,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16 * call) } } -void UIScene::registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength, bool deleteData) +void UIScene::registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength, bool deleteData) { m_registeredTextures[textureName] = deleteData;; ui.registerSubstitutionTexture(textureName, pbData, dwLength); @@ -1245,4 +1245,4 @@ size_t UIScene::GetCallbackUniqueId() bool UIScene::isReadyToDelete() { return true; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/UI/UIScene.h b/Minecraft.Client/Platform/Common/UI/UIScene.h index 315229390..a9171ed33 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene.h @@ -4,6 +4,8 @@ //using namespace std; // A scene map directly to an Iggy movie (or more accurately a collection of different sized movies) +#include + #include "UIEnums.h" #include "UIControl_Base.h" @@ -251,7 +253,7 @@ public: #ifdef _XBOX_ONE virtual void HandleDLCLicenseChange() {} #endif - void registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength, bool deleteData = false); + void registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength, bool deleteData = false); bool hasRegisteredSubstitutionTexture(const std::wstring &textureName); virtual void handleUnlockFullVersion() {}