Remove Win32 types from UI substitution textures

This commit is contained in:
notmatthewbeshay 2026-03-10 21:30:58 +11:00
parent e83cf9a2f3
commit ca72052b4c
4 changed files with 9 additions and 5 deletions

View file

@ -1383,7 +1383,7 @@ void RADLINK UIController::TextureSubstitutionDestroyCallback ( void * user_call
t->releaseTexture( id ); 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 // Remove it if it already exists
unregisterSubstitutionTexture(textureName,false); unregisterSubstitutionTexture(textureName,false);

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
//using namespace std; //using namespace std;
#include <cstdint>
#include "IUIController.h" #include "IUIController.h"
#include "UIEnums.h" #include "UIEnums.h"
#include "UIGroup.h" #include "UIGroup.h"
@ -256,7 +258,7 @@ protected:
virtual void destroySubstitutionTexture(void *destroyCallBackData, GDrawTexture *handle) {} virtual void destroySubstitutionTexture(void *destroyCallBackData, GDrawTexture *handle) {}
public: 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); void unregisterSubstitutionTexture(const std::wstring &textureName, bool deleteData);
public: public:

View file

@ -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;; m_registeredTextures[textureName] = deleteData;;
ui.registerSubstitutionTexture(textureName, pbData, dwLength); ui.registerSubstitutionTexture(textureName, pbData, dwLength);
@ -1245,4 +1245,4 @@ size_t UIScene::GetCallbackUniqueId()
bool UIScene::isReadyToDelete() bool UIScene::isReadyToDelete()
{ {
return true; return true;
} }

View file

@ -4,6 +4,8 @@
//using namespace std; //using namespace std;
// A scene map directly to an Iggy movie (or more accurately a collection of different sized movies) // A scene map directly to an Iggy movie (or more accurately a collection of different sized movies)
#include <cstdint>
#include "UIEnums.h" #include "UIEnums.h"
#include "UIControl_Base.h" #include "UIControl_Base.h"
@ -251,7 +253,7 @@ public:
#ifdef _XBOX_ONE #ifdef _XBOX_ONE
virtual void HandleDLCLicenseChange() {} virtual void HandleDLCLicenseChange() {}
#endif #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); bool hasRegisteredSubstitutionTexture(const std::wstring &textureName);
virtual void handleUnlockFullVersion() {} virtual void handleUnlockFullVersion() {}