From 2180aaa4bcc21883e0e00c5d87169d348e7d6a6a Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:28:46 +1100 Subject: [PATCH 01/24] Remove DWORD from shared TLS keys --- Minecraft.World/Blocks/PistonBaseTile.cpp | 8 ++++---- Minecraft.World/Blocks/PistonBaseTile.h | 13 ++++++++----- Minecraft.World/Blocks/TheEndPortalTile.cpp | 8 ++++---- Minecraft.World/Blocks/TheEndPortalTile.h | 7 +++++-- Minecraft.World/Blocks/Tile.cpp | 9 ++++----- Minecraft.World/Blocks/Tile.h | 14 +++++++++----- Minecraft.World/Entities/Entity.cpp | 8 ++++---- Minecraft.World/Entities/Entity.h | 13 ++++++++----- Minecraft.World/Level/Level.cpp | 12 ++++++------ Minecraft.World/Level/Level.h | 16 +++++++++------- .../Level/Storage/OldChunkStorage.cpp | 8 ++++---- Minecraft.World/Level/Storage/OldChunkStorage.h | 14 +++++++++----- 12 files changed, 74 insertions(+), 56 deletions(-) diff --git a/Minecraft.World/Blocks/PistonBaseTile.cpp b/Minecraft.World/Blocks/PistonBaseTile.cpp index 1aa424c43..d64bc06ae 100644 --- a/Minecraft.World/Blocks/PistonBaseTile.cpp +++ b/Minecraft.World/Blocks/PistonBaseTile.cpp @@ -23,12 +23,12 @@ const float PistonBaseTile::PLATFORM_THICKNESS = 4.0f; namespace { #if defined(_WIN32) - inline void *PistonTlsGetValue(DWORD key) + inline void *PistonTlsGetValue(PistonBaseTile::TlsKey key) { return TlsGetValue(key); } - inline void PistonTlsSetValue(DWORD key, void *value) + inline void PistonTlsSetValue(PistonBaseTile::TlsKey key, void *value) { TlsSetValue(key, value); } @@ -53,9 +53,9 @@ namespace } #if defined(_WIN32) -DWORD PistonBaseTile::tlsIdx = TlsAlloc(); +PistonBaseTile::TlsKey PistonBaseTile::tlsIdx = TlsAlloc(); #else -pthread_key_t PistonBaseTile::tlsIdx = CreatePistonTlsKey(); +PistonBaseTile::TlsKey PistonBaseTile::tlsIdx = CreatePistonTlsKey(); #endif // 4J - NOTE - this ignoreUpdate stuff has been removed from the java version, but I'm not currently sure how the java version does without it... there must be diff --git a/Minecraft.World/Blocks/PistonBaseTile.h b/Minecraft.World/Blocks/PistonBaseTile.h index 4e844a7e2..37841a5bd 100644 --- a/Minecraft.World/Blocks/PistonBaseTile.h +++ b/Minecraft.World/Blocks/PistonBaseTile.h @@ -1,5 +1,6 @@ #pragma once #include "Tile.h" +#include #if !defined(_WIN32) #include @@ -8,6 +9,12 @@ class PistonBaseTile : public Tile { public: +#if defined(_WIN32) + using TlsKey = std::uint32_t; +#else + using TlsKey = pthread_key_t; +#endif + static const int EXTENDED_BIT = 8; static const int UNDEFINED_FACING = 7; @@ -29,11 +36,7 @@ private: Icon *iconBack; Icon *iconPlatform; -#if defined(_WIN32) - static DWORD tlsIdx; -#else - static pthread_key_t tlsIdx; -#endif + static TlsKey tlsIdx; // 4J - was just a static but implemented with TLS for our version static bool ignoreUpdate(); static void ignoreUpdate(bool set); diff --git a/Minecraft.World/Blocks/TheEndPortalTile.cpp b/Minecraft.World/Blocks/TheEndPortalTile.cpp index a2fbaf308..8d43bb1eb 100644 --- a/Minecraft.World/Blocks/TheEndPortalTile.cpp +++ b/Minecraft.World/Blocks/TheEndPortalTile.cpp @@ -12,12 +12,12 @@ namespace { #if defined(_WIN32) - inline void *TheEndPortalTlsGetValue(DWORD key) + inline void *TheEndPortalTlsGetValue(TheEndPortal::TlsKey key) { return TlsGetValue(key); } - inline void TheEndPortalTlsSetValue(DWORD key, void *value) + inline void TheEndPortalTlsSetValue(TheEndPortal::TlsKey key, void *value) { TlsSetValue(key, value); } @@ -42,9 +42,9 @@ namespace } #if defined(_WIN32) -DWORD TheEndPortal::tlsIdx = TlsAlloc(); +TheEndPortal::TlsKey TheEndPortal::tlsIdx = TlsAlloc(); #else -pthread_key_t TheEndPortal::tlsIdx = CreateTheEndPortalTlsKey(); +TheEndPortal::TlsKey TheEndPortal::tlsIdx = CreateTheEndPortalTlsKey(); #endif // 4J - allowAnywhere is a static in java, implementing as TLS here to make thread safe diff --git a/Minecraft.World/Blocks/TheEndPortalTile.h b/Minecraft.World/Blocks/TheEndPortalTile.h index 130a4232b..762f1299f 100644 --- a/Minecraft.World/Blocks/TheEndPortalTile.h +++ b/Minecraft.World/Blocks/TheEndPortalTile.h @@ -1,5 +1,6 @@ #pragma once #include "TileEntities/EntityTile.h" +#include #if !defined(_WIN32) #include @@ -9,10 +10,12 @@ class TheEndPortal : public EntityTile { public: #if defined(_WIN32) - static DWORD tlsIdx; + using TlsKey = std::uint32_t; #else - static pthread_key_t tlsIdx; + using TlsKey = pthread_key_t; #endif + + static TlsKey tlsIdx; // 4J - was just a static but implemented with TLS for our version static bool allowAnywhere(); static void allowAnywhere(bool set); diff --git a/Minecraft.World/Blocks/Tile.cpp b/Minecraft.World/Blocks/Tile.cpp index 209b76272..77d06c68e 100644 --- a/Minecraft.World/Blocks/Tile.cpp +++ b/Minecraft.World/Blocks/Tile.cpp @@ -19,12 +19,12 @@ namespace { #if defined(_WIN32) - inline void *TileTlsGetValue(DWORD key) + inline void *TileTlsGetValue(Tile::TlsKey key) { return TlsGetValue(key); } - inline void TileTlsSetValue(DWORD key, void *value) + inline void TileTlsSetValue(Tile::TlsKey key, void *value) { TlsSetValue(key, value); } @@ -235,9 +235,9 @@ Tile *Tile::stairs_quartz = NULL; Tile *Tile::woolCarpet = NULL; #if defined(_WIN32) -DWORD Tile::tlsIdxShape = TlsAlloc(); +Tile::TlsKey Tile::tlsIdxShape = TlsAlloc(); #else -pthread_key_t Tile::tlsIdxShape = CreateTileTlsKey(); +Tile::TlsKey Tile::tlsIdxShape = CreateTileTlsKey(); #endif Tile::ThreadStorage::ThreadStorage() @@ -1667,4 +1667,3 @@ const int Tile::quartzBlock_Id; const int Tile::stairs_quartz_Id; const int Tile::woolCarpet_Id; #endif - diff --git a/Minecraft.World/Blocks/Tile.h b/Minecraft.World/Blocks/Tile.h index ea4421fc0..fc757c61c 100644 --- a/Minecraft.World/Blocks/Tile.h +++ b/Minecraft.World/Blocks/Tile.h @@ -3,6 +3,7 @@ #include "../Util/Vec3.h" #include "../Util/Definitions.h" #include "../Util/SoundTypes.h" +#include #if !defined(_WIN32) #include #endif @@ -49,6 +50,13 @@ class Tile friend class ChunkRebuildData; friend class WallTile; +public: +#if defined(_WIN32) + using TlsKey = std::uint32_t; +#else + using TlsKey = pthread_key_t; +#endif + protected: // 4J added so we can have separate shapes for different threads class ThreadStorage @@ -58,11 +66,7 @@ protected: int tileId; ThreadStorage(); }; -#if defined(_WIN32) - static DWORD tlsIdxShape; -#else - static pthread_key_t tlsIdxShape; -#endif + static TlsKey tlsIdxShape; public: // Each new thread that needs to use Vec3 pools will need to call one of the following 2 functions, to either create its own // local storage, or share the default storage already allocated by the main thread diff --git a/Minecraft.World/Entities/Entity.cpp b/Minecraft.World/Entities/Entity.cpp index 1a9a927da..3f4b77f17 100644 --- a/Minecraft.World/Entities/Entity.cpp +++ b/Minecraft.World/Entities/Entity.cpp @@ -26,12 +26,12 @@ namespace { #if defined(_WIN32) - inline void *EntityTlsGetValue(DWORD key) + inline void *EntityTlsGetValue(Entity::TlsKey key) { return TlsGetValue(key); } - inline void EntityTlsSetValue(DWORD key, void *value) + inline void EntityTlsSetValue(Entity::TlsKey key, void *value) { TlsSetValue(key, value); } @@ -59,9 +59,9 @@ namespace int Entity::entityCounter = 2048; // 4J - changed initialiser to 2048, as we are using range 0 - 2047 as special unique smaller ids for things that need network tracked #if defined(_WIN32) -DWORD Entity::tlsIdx = TlsAlloc(); +Entity::TlsKey Entity::tlsIdx = TlsAlloc(); #else -pthread_key_t Entity::tlsIdx = CreateEntityTlsKey(); +Entity::TlsKey Entity::tlsIdx = CreateEntityTlsKey(); #endif // 4J - added getSmallId & freeSmallId methods diff --git a/Minecraft.World/Entities/Entity.h b/Minecraft.World/Entities/Entity.h index 10cc1553c..c62a17391 100644 --- a/Minecraft.World/Entities/Entity.h +++ b/Minecraft.World/Entities/Entity.h @@ -5,6 +5,7 @@ #include "../IO/NBT/FloatTag.h" #include "../Util/Vec3.h" #include "../Util/Definitions.h" +#include #if !defined(_WIN32) #include #endif @@ -38,6 +39,12 @@ class Entity : public std::enable_shared_from_this { friend class Gui; // 4J Stu - Added to be able to access the shared flag functions and constants, without making them publicly available to everything public: +#if defined(_WIN32) + using TlsKey = std::uint32_t; +#else + using TlsKey = pthread_key_t; +#endif + // 4J-PB - added to replace (e instanceof Type), avoiding dynamic casts virtual eINSTANCEOF GetType() = 0; @@ -368,11 +375,7 @@ private: static int extraWanderIds[EXTRA_WANDER_MAX]; static int extraWanderCount; static int extraWanderTicks; -#if defined(_WIN32) - static DWORD tlsIdx; -#else - static pthread_key_t tlsIdx; -#endif + static TlsKey tlsIdx; public: static void tickExtraWandering(); static void countFlagsForPIX(); diff --git a/Minecraft.World/Level/Level.cpp b/Minecraft.World/Level/Level.cpp index b4026d890..2ebe42e00 100644 --- a/Minecraft.World/Level/Level.cpp +++ b/Minecraft.World/Level/Level.cpp @@ -47,12 +47,12 @@ namespace { #if defined(_WIN32) - inline void *LevelTlsGetValue(DWORD key) + inline void *LevelTlsGetValue(Level::TlsKey key) { return TlsGetValue(key); } - inline void LevelTlsSetValue(DWORD key, void *value) + inline void LevelTlsSetValue(Level::TlsKey key, void *value) { TlsSetValue(key, value); } @@ -77,11 +77,11 @@ namespace } #if defined(_WIN32) -DWORD Level::tlsIdx = TlsAlloc(); -DWORD Level::tlsIdxLightCache = TlsAlloc(); +Level::TlsKey Level::tlsIdx = TlsAlloc(); +Level::TlsKey Level::tlsIdxLightCache = TlsAlloc(); #else -pthread_key_t Level::tlsIdx = CreateLevelTlsKey(); -pthread_key_t Level::tlsIdxLightCache = CreateLevelTlsKey(); +Level::TlsKey Level::tlsIdx = CreateLevelTlsKey(); +Level::TlsKey Level::tlsIdxLightCache = CreateLevelTlsKey(); #endif // 4J : WESTY : Added for time played stats. diff --git a/Minecraft.World/Level/Level.h b/Minecraft.World/Level/Level.h index f6b60ec6f..4f77a9ff4 100644 --- a/Minecraft.World/Level/Level.h +++ b/Minecraft.World/Level/Level.h @@ -9,6 +9,7 @@ #include "../Util/ParticleTypes.h" #include "../WorldGen/Biomes/Biome.h" #include "../Util/C4JThread.h" +#include #if !defined(_WIN32) #include #endif @@ -48,6 +49,12 @@ class VillageSiege; class Level : public LevelSource { public: +#if defined(_WIN32) + using TlsKey = std::uint32_t; +#else + using TlsKey = pthread_key_t; +#endif + static const int MAX_TICK_TILES_PER_TICK = 1000; // 4J Added @@ -80,13 +87,8 @@ public: int seaLevel; // 4J - added, making instaTick flag use TLS so we can set it in the chunk rebuilding thread without upsetting the main game thread -#if defined(_WIN32) - static DWORD tlsIdx; - static DWORD tlsIdxLightCache; -#else - static pthread_key_t tlsIdx; - static pthread_key_t tlsIdxLightCache; -#endif + static TlsKey tlsIdx; + static TlsKey tlsIdxLightCache; static void enableLightingCache(); static void destroyLightingCache(); static bool getCacheTestEnabled(); diff --git a/Minecraft.World/Level/Storage/OldChunkStorage.cpp b/Minecraft.World/Level/Storage/OldChunkStorage.cpp index 14523a624..c8eae025a 100644 --- a/Minecraft.World/Level/Storage/OldChunkStorage.cpp +++ b/Minecraft.World/Level/Storage/OldChunkStorage.cpp @@ -11,18 +11,18 @@ #if defined(_WIN32) namespace { - inline void *OldChunkStorageTlsGetValue(DWORD key) + inline void *OldChunkStorageTlsGetValue(OldChunkStorage::TlsKey key) { return TlsGetValue(key); } - inline void OldChunkStorageTlsSetValue(DWORD key, void *value) + inline void OldChunkStorageTlsSetValue(OldChunkStorage::TlsKey key, void *value) { TlsSetValue(key, value); } } -DWORD OldChunkStorage::tlsIdx = TlsAlloc(); +OldChunkStorage::TlsKey OldChunkStorage::tlsIdx = TlsAlloc(); #else namespace { @@ -45,7 +45,7 @@ namespace } } -pthread_key_t OldChunkStorage::tlsIdx = CreateOldChunkStorageTlsKey(); +OldChunkStorage::TlsKey OldChunkStorage::tlsIdx = CreateOldChunkStorageTlsKey(); #endif OldChunkStorage::ThreadStorage *OldChunkStorage::tlsDefault = NULL; diff --git a/Minecraft.World/Level/Storage/OldChunkStorage.h b/Minecraft.World/Level/Storage/OldChunkStorage.h index 34d100720..58b298142 100644 --- a/Minecraft.World/Level/Storage/OldChunkStorage.h +++ b/Minecraft.World/Level/Storage/OldChunkStorage.h @@ -4,6 +4,7 @@ #include "../../IO/Files/File.h" #include "../../IO/NBT/CompoundTag.h" #include "../../Headers/com.mojang.nbt.h" +#include #if !defined(_WIN32) #include #endif @@ -12,6 +13,13 @@ class Level; class OldChunkStorage : public ChunkStorage { +public: +#if defined(_WIN32) + using TlsKey = std::uint32_t; +#else + using TlsKey = pthread_key_t; +#endif + private: // 4J added so we can have separate storage arrays for different threads class ThreadStorage @@ -25,11 +33,7 @@ private: ThreadStorage(); ~ThreadStorage(); }; -#if defined(_WIN32) - static DWORD tlsIdx; -#else - static pthread_key_t tlsIdx; -#endif + static TlsKey tlsIdx; static ThreadStorage *tlsDefault; public: // Each new thread that needs to use Compression will need to call one of the following 2 functions, to either create its own From 123877d88798430de6e9d8c2f7773217e511cfab Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:32:13 +1100 Subject: [PATCH 02/24] Remove WinAPI types from thread naming --- Minecraft.World/Util/C4JThread.h | 4 ++-- Minecraft.World/Util/ThreadName.cpp | 19 ++++++++++--------- Minecraft.World/Util/ThreadName.h | 3 ++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Minecraft.World/Util/C4JThread.h b/Minecraft.World/Util/C4JThread.h index 9a303c7b5..022222744 100644 --- a/Minecraft.World/Util/C4JThread.h +++ b/Minecraft.World/Util/C4JThread.h @@ -1,4 +1,5 @@ #pragma once +#include #include typedef int (C4JThreadStartFunc)(void* lpThreadParameter); @@ -221,5 +222,4 @@ private: static DWORD WINAPI entryPoint(LPVOID lpParam); #endif }; -void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName ); - +void SetThreadName(std::uint32_t threadId, const char *threadName); diff --git a/Minecraft.World/Util/ThreadName.cpp b/Minecraft.World/Util/ThreadName.cpp index 9cd372c96..03f71ffe1 100644 --- a/Minecraft.World/Util/ThreadName.cpp +++ b/Minecraft.World/Util/ThreadName.cpp @@ -1,28 +1,29 @@ #include "../Platform/stdafx.h" +#include // From Xbox documentation typedef struct tagTHREADNAME_INFO { - DWORD dwType; // Must be 0x1000 - LPCSTR szName; // Pointer to name (in user address space) - DWORD dwThreadID; // Thread ID (-1 for caller thread) - DWORD dwFlags; // Reserved for future use; must be zero + std::uint32_t dwType; // Must be 0x1000 + const char *szName; // Pointer to name (in user address space) + std::uint32_t dwThreadID; // Thread ID (-1 for caller thread) + std::uint32_t dwFlags; // Reserved for future use; must be zero } THREADNAME_INFO; -void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName ) +void SetThreadName(std::uint32_t threadId, const char *threadName) { #ifndef __PS3__ THREADNAME_INFO info; info.dwType = 0x1000; - info.szName = szThreadName; - info.dwThreadID = dwThreadID; + info.szName = threadName; + info.dwThreadID = threadId; info.dwFlags = 0; #if ( defined _WINDOWS64 | defined _DURANGO ) __try { - RaiseException( 0x406D1388, 0, sizeof(info)/sizeof(DWORD), (ULONG_PTR *)&info ); + RaiseException(0x406D1388, 0, sizeof(info) / sizeof(std::uint32_t), reinterpret_cast(&info)); } __except( GetExceptionCode()==0x406D1388 ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER ) { @@ -31,7 +32,7 @@ void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName ) #ifdef _XBOX __try { - RaiseException( 0x406D1388, 0, sizeof(info)/sizeof(DWORD), (DWORD *)&info ); + RaiseException(0x406D1388, 0, sizeof(info) / sizeof(std::uint32_t), reinterpret_cast(&info)); } __except( GetExceptionCode()==0x406D1388 ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER ) { diff --git a/Minecraft.World/Util/ThreadName.h b/Minecraft.World/Util/ThreadName.h index e7afe594d..e054fe9a9 100644 --- a/Minecraft.World/Util/ThreadName.h +++ b/Minecraft.World/Util/ThreadName.h @@ -1,3 +1,4 @@ #pragma once +#include -void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName ); \ No newline at end of file +void SetThreadName(std::uint32_t threadId, const char *threadName); From 8a66847c6578392ff38a8d09864af2f50ab861d0 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:33:33 +1100 Subject: [PATCH 03/24] Remove UINT from common resource ID arrays --- .../Platform/Common/Consoles_App.cpp | 4 +- .../Common/Network/Sony/SonyCommerce.cpp | 4 +- .../Platform/Common/UI/IUIScene_PauseMenu.cpp | 20 ++--- .../Platform/Common/UI/IUIScene_StartGame.cpp | 4 +- .../Common/UI/UIScene_CreateWorldMenu.cpp | 42 +++++----- .../Platform/Common/UI/UIScene_DeathMenu.cpp | 4 +- .../Common/UI/UIScene_InGameInfoMenu.cpp | 4 +- .../UI/UIScene_InGameSaveManagementMenu.cpp | 2 +- .../Platform/Common/UI/UIScene_JoinMenu.cpp | 10 +-- .../Platform/Common/UI/UIScene_LoadMenu.cpp | 50 +++++------ .../Common/UI/UIScene_LoadOrJoinMenu.cpp | 44 +++++----- .../Platform/Common/UI/UIScene_MainMenu.cpp | 82 +++++++++---------- .../Platform/Common/UI/UIScene_PauseMenu.cpp | 74 ++++++++--------- .../Common/UI/UIScene_SkinSelectMenu.cpp | 14 ++-- .../Common/XUI/XUI_ConnectingProgress.cpp | 2 +- .../Platform/Common/XUI/XUI_DLCOffers.cpp | 4 +- .../Platform/Common/XUI/XUI_Death.cpp | 4 +- .../Common/XUI/XUI_FullscreenProgress.cpp | 2 +- .../Platform/Common/XUI/XUI_InGameInfo.cpp | 2 +- .../Common/XUI/XUI_InGamePlayerOptions.cpp | 2 +- .../Platform/Common/XUI/XUI_LoadSettings.cpp | 28 +++---- .../Platform/Common/XUI/XUI_MainMenu.cpp | 26 +++--- .../Common/XUI/XUI_MultiGameCreate.cpp | 20 ++--- .../Platform/Common/XUI/XUI_MultiGameInfo.cpp | 6 +- .../Common/XUI/XUI_MultiGameJoinLoad.cpp | 22 ++--- .../Platform/Common/XUI/XUI_PauseMenu.cpp | 30 +++---- .../Platform/Common/XUI/XUI_SettingsAll.cpp | 2 +- .../Platform/Common/XUI/XUI_SkinSelect.cpp | 4 +- 28 files changed, 256 insertions(+), 256 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Consoles_App.cpp b/Minecraft.Client/Platform/Common/Consoles_App.cpp index 304e1aa0a..26aa0419e 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.cpp +++ b/Minecraft.Client/Platform/Common/Consoles_App.cpp @@ -1,4 +1,4 @@ - + #include "../Minecraft.World/Platform/stdafx.h" #include "../Minecraft.World/Recipes/Recipy.h" @@ -3129,7 +3129,7 @@ void CMinecraftApp::HandleXuiActions(void) pStats->clear(); // 4J-PB - the libs will display the Returned to Title screen -// UINT uiIDA[1]; +// unsigned int uiIDA[1]; // uiIDA[0]=IDS_CONFIRM_OK; // // ui.RequestMessageBox(IDS_RETURNEDTOMENU_TITLE, IDS_RETURNEDTOTITLESCREEN_TEXT, uiIDA, 1, i,&CMinecraftApp::PrimaryPlayerSignedOutReturned,this,app.GetStringTable()); diff --git a/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.cpp b/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.cpp index 13dcd707a..669c4c59e 100644 --- a/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.cpp +++ b/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.cpp @@ -804,7 +804,7 @@ void SonyCommerce::UpgradeTrialCallback2(LPVOID lpParam,int err) SonyCommerce::CheckForTrialUpgradeKey(); if(err != CELL_OK) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; C4JStorage::EMessageResult result = ui.RequestMessageBox( IDS_PRO_UNLOCKGAME_TITLE, IDS_NO_DLCOFFERS, uiIDA,1,ProfileManager.GetPrimaryPad()); } @@ -831,7 +831,7 @@ void SonyCommerce::UpgradeTrialCallback1(LPVOID lpParam,int err) } else { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; C4JStorage::EMessageResult result = ui.RequestMessageBox( IDS_PRO_UNLOCKGAME_TITLE, IDS_NO_DLCOFFERS, uiIDA,1,ProfileManager.GetPrimaryPad()); m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode); diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_PauseMenu.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_PauseMenu.cpp index bfb77504a..c6daed5e5 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_PauseMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_PauseMenu.cpp @@ -57,7 +57,7 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStor TelemetryManager->RecordUpsellPresented(iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); #endif - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -75,7 +75,7 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStor // we need to ask if they are sure they want to overwrite the existing game if(bSaveExists) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(), &IUIScene_PauseMenu::ExitGameAndSaveReturned, scene, app.GetStringTable(), NULL, 0, false); @@ -92,7 +92,7 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStor else { // been a few requests for a confirm on exit without saving - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_DECLINE_SAVE_GAME, IDS_CONFIRM_DECLINE_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(), &IUIScene_PauseMenu::ExitGameDeclineSaveReturned, scene, app.GetStringTable(), NULL, 0, false); @@ -131,7 +131,7 @@ int IUIScene_PauseMenu::ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage // has someone disconnected the ethernet here, causing the pause menu to shut? if(ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad())) { - UINT uiIDA[3]; + unsigned int uiIDA[3]; // you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then. uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_EXIT_GAME_SAVE; @@ -173,7 +173,7 @@ int IUIScene_PauseMenu::ExitGameDeclineSaveReturned(void *pParam,int iPad,C4JSto // has someone disconnected the ethernet here, causing the pause menu to shut? if(ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad())) { - UINT uiIDA[3]; + unsigned int uiIDA[3]; // you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then. uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_EXIT_GAME_SAVE; @@ -212,7 +212,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4 ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL); if(bContentRestricted) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad,NULL,&app, app.GetStringTable(), NULL, 0, false); } @@ -287,7 +287,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4 else { // 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no active network connection user is unable to convert from Trial to Full texture pack and is not messaged why. - UINT uiIDA[1] = { IDS_CONFIRM_OK }; + unsigned int uiIDA[1] = { IDS_CONFIRM_OK }; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } } @@ -494,7 +494,7 @@ void IUIScene_PauseMenu::_ExitWorld(void *lpParameter) } //pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; // 4J Stu - Fix for #48669 - TU5: Code: Compliance: TCR #15: Incorrect/misleading messages after signing out a profile during online game session. // If the primary player is signed out, then that is most likely the cause of the disconnection so don't display a message box. This will allow the message box requested by the libraries to be brought up @@ -594,7 +594,7 @@ void IUIScene_PauseMenu::_ExitWorld(void *lpParameter) } //pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( exitReasonTitleId, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); exitReasonStringId = -1; @@ -641,7 +641,7 @@ int IUIScene_PauseMenu::SaveGameDialogReturned(void *pParam,int iPad,C4JStorage: if(result==C4JStorage::EMessage_ResultDecline) { #if defined(_XBOX_ONE) || defined(__ORBIS__) - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_ENABLE_AUTOSAVE, IDS_CONFIRM_ENABLE_AUTOSAVE, uiIDA, 2, iPad,&IUIScene_PauseMenu::EnableAutosaveDialogReturned,pParam, app.GetStringTable(), NULL, 0, false); diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp index 18eeccd99..798c249ef 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp @@ -233,7 +233,7 @@ void IUIScene_StartGame::UpdateCurrentTexturePack(int iSlot) TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[3]; + unsigned int uiIDA[3]; uiIDA[0]=IDS_TEXTUREPACK_FULLVERSION; uiIDA[1]=IDS_TEXTURE_PACK_TRIALVERSION; @@ -369,7 +369,7 @@ int IUIScene_StartGame::TexturePackDialogReturned(void *pParam,int iPad,C4JStora else { // 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no active network connection user is unable to convert from Trial to Full texture pack and is not messaged why. - UINT uiIDA[1] = { IDS_CONFIRM_OK }; + unsigned int uiIDA[1] = { IDS_CONFIRM_OK }; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp index 59dd6e35c..c02f2ed02 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp @@ -319,7 +319,7 @@ void UIScene_CreateWorldMenu::tick() else { // continue offline? - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE; // Give the player a warning about the texture pack missing @@ -373,7 +373,7 @@ void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool p #if defined _XBOX_ONE if ( pressed && controlHasFocus(m_checkboxOnline.getId()) && !m_checkboxOnline.IsEnabled() ) { - UINT uiIDA[1] = { IDS_CONFIRM_OK }; + unsigned int uiIDA[1] = { IDS_CONFIRM_OK }; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } #endif @@ -526,7 +526,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow() TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); #endif - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_TEXTUREPACK_FULLVERSION; //uiIDA[1]=IDS_TEXTURE_PACK_TRIALVERSION; @@ -569,7 +569,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow() // We need to allow people to use a trial texture pack if they are offline - we only need them online if they want to buy it. /* - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; if(!ProfileManager.IsSignedInLive(m_iPad)) @@ -601,12 +601,12 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow() #if defined(_DURANGO) || defined(_WINDOWS64) // trial pack warning - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 1, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false); #elif defined __PS3__ || defined __ORBIS__ || defined(__PSVITA__) // trial pack warning - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false); @@ -830,14 +830,14 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() { m_bIgnoreInput = false; // 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable()); } else { m_bIgnoreInput = true; - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1] = IDS_CANCEL; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_CreateWorldMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false); @@ -850,21 +850,21 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() if (ProfileManager.IsSignedInPSN(ProfileManager.GetPrimaryPad())) { // Signed in to PSN but not connected (no internet access) - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL,NULL, app.GetStringTable()); } else { // Not signed in to PSN - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL,NULL, app.GetStringTable()); return; }*/ #else m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); return; @@ -906,7 +906,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() iResult=sceNpCommerceDialogOpen(¶m); -// UINT uiIDA[2]; +// unsigned int uiIDA[2]; // uiIDA[0]=IDS_PLAY_OFFLINE; // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; // ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false); @@ -917,7 +917,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() if(m_bGameModeSurvival != true || m_MoreOptionsParams.bHostPrivileges) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; if(m_bGameModeSurvival != true) @@ -984,7 +984,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus); iResult=sceNpCommerceDialogOpen(¶m); -// UINT uiIDA[2]; +// unsigned int uiIDA[2]; // uiIDA[0]=IDS_PLAY_OFFLINE; // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; // ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false); @@ -1033,7 +1033,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() iResult=sceNpCommerceDialogOpen(¶m); -// UINT uiIDA[2]; +// unsigned int uiIDA[2]; // uiIDA[0]=IDS_PLAY_OFFLINE; // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; // ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false); @@ -1276,14 +1276,14 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu { pClass->m_bIgnoreInput = false; // 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable()); } else { pClass->m_bIgnoreInput=true; - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1] = IDS_CANCEL; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_CreateWorldMenu::MustSignInReturnedPSN, pClass, app.GetStringTable(), NULL, 0, false); @@ -1291,7 +1291,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu return 0; #else pClass->m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); return 0; @@ -1311,14 +1311,14 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu if( noUGC ) { pClass->m_bIgnoreInput = false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); } else { pClass->m_bIgnoreInput = false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_HOST_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); } @@ -1376,7 +1376,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor if(isClientSide && noUGC ) { pClass->m_bIgnoreInput = false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp index fd5ff4d0f..227222406 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp @@ -102,7 +102,7 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) // is it the primary player exiting? if(m_iPad==ProfileManager.GetPrimaryPad()) { - UINT uiIDA[3]; + unsigned int uiIDA[3]; int playTime = -1; if( pMinecraft->localplayers[m_iPad] != NULL ) { @@ -172,7 +172,7 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) ui.ReduceTrialTimerValue(); // exit the level - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::ExitGameDialogReturned,this, app.GetStringTable(), 0, 0, false); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp index 32df02920..4ed273e4e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp @@ -354,7 +354,7 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr if(!ProfileManager.IsSignedInLive(iPad)) { // get them to sign in to online - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_InGameInfoMenu::MustSignInReturnedPSN,this, app.GetStringTable()); @@ -457,7 +457,7 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId) // Only ops will hit this, can kick anyone not local and not local to the host std::uint8_t *smallId = new std::uint8_t(); *smallId = m_players[currentSelection]; - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.cpp index 6ffc1903c..ec03738b5 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.cpp @@ -453,7 +453,7 @@ void UIScene_InGameSaveManagementMenu::handlePress(F64 controlId, F64 childId) // delete the save game // Have to ask the player if they are sure they want to delete this game - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2,m_iPad,&UIScene_InGameSaveManagementMenu::DeleteSaveDialogReturned,this, app.GetStringTable(),NULL,0,true); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp index 6050dbbea..63f42f2d0 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp @@ -206,7 +206,7 @@ void UIScene_JoinMenu::tick() // Show a generic network error message, not always safe to assume the error was host quitting // without bubbling more info up from the network manager so this is the best we can do - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; #ifdef _XBOX_ONE ui.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_DISCONNECTED_SERVER_QUIT, uiIDA,1,m_iPad,ErrorDialogReturned,this, app.GetStringTable()); @@ -442,7 +442,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) { pClass->m_bIgnoreInput = false; // 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable()); } @@ -450,7 +450,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) #endif { pClass->m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -495,7 +495,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) { pClass->setVisible( true ); pClass->m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -532,7 +532,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) } else { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_CONNECTION_FAILED, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); exitReasonStringId = -1; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp index c231e047c..db9c7c796 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp @@ -549,7 +549,7 @@ void UIScene_LoadMenu::tick() else { // continue offline? - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE; // Give the player a warning about the texture pack missing @@ -606,7 +606,7 @@ void UIScene_LoadMenu::handleInput(int iPad, int key, bool repeat, bool pressed, #if defined _XBOX_ONE if ( pressed && controlHasFocus(m_checkboxOnline.getId()) && !m_checkboxOnline.IsEnabled() ) { - UINT uiIDA[1] = { IDS_CONFIRM_OK }; + unsigned int uiIDA[1] = { IDS_CONFIRM_OK }; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } #endif @@ -730,7 +730,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow() TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); #endif - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_TEXTUREPACK_FULLVERSION; //uiIDA[1]=IDS_TEXTURE_PACK_TRIALVERSION; @@ -773,7 +773,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow() // We need to allow people to use a trial texture pack if they are offline - we only need them online if they want to buy it. /* - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; if(!ProfileManager.IsSignedInLive(m_iPad)) @@ -805,12 +805,12 @@ void UIScene_LoadMenu::StartSharedLaunchFlow() #if defined(_WINDOWS64) || defined(_DURANGO) // trial pack warning - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 1, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false); #elif defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) // trial pack warning - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false); @@ -838,7 +838,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow() // Check if they have the Reset Nether flag set, and confirm they want to do this if(m_MoreOptionsParams.bResetNether) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_DONT_RESET_NETHER; uiIDA[1]=IDS_RESET_NETHER; @@ -998,7 +998,7 @@ void UIScene_LoadMenu::LaunchGame(void) if( (m_bGameModeSurvival != true || m_bHasBeenInCreative) || m_MoreOptionsParams.bHostPrivileges) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; if(m_bGameModeSurvival != true || m_bHasBeenInCreative) @@ -1038,7 +1038,7 @@ void UIScene_LoadMenu::LaunchGame(void) // disable saving StorageManager.SetSaveDisabled(true); StorageManager.SetSaveDeviceSelected(m_iPad,false); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this); @@ -1079,7 +1079,7 @@ void UIScene_LoadMenu::LaunchGame(void) // disable saving StorageManager.SetSaveDisabled(true); StorageManager.SetSaveDeviceSelected(m_iPad,false); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this); } @@ -1138,7 +1138,7 @@ int UIScene_LoadMenu::ConfirmLoadReturned(void *pParam,int iPad,C4JStorage::EMes // disable saving StorageManager.SetSaveDisabled(true); StorageManager.SetSaveDeviceSelected(m_iPad,false); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this); } @@ -1189,14 +1189,14 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam) { pClass->m_bIgnoreInput = false; // 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable()); } else { pClass->m_bIgnoreInput=true; - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1] = IDS_CANCEL; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_LoadMenu::MustSignInReturnedPSN, pClass, app.GetStringTable(), NULL, 0, false); @@ -1204,7 +1204,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam) return 0; #else pClass->m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); return 0; @@ -1277,7 +1277,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam) iResult=sceNpCommerceDialogOpen(¶m); -// UINT uiIDA[2]; +// unsigned int uiIDA[2]; // uiIDA[0]=IDS_PLAY_OFFLINE; // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; // ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),NULL,0,false); @@ -1337,7 +1337,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam) iResult=sceNpCommerceDialogOpen(¶m); -// UINT uiIDA[2]; +// unsigned int uiIDA[2]; // uiIDA[0]=IDS_PLAY_OFFLINE; // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; // ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),NULL,0,false); @@ -1355,7 +1355,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam) pClass->m_bIgnoreInput=false; // give the option to delete the save - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2, pClass->m_iPad,&UIScene_LoadMenu::DeleteSaveDialogReturned,pClass, app.GetStringTable(),NULL,0,false); @@ -1381,7 +1381,7 @@ int UIScene_LoadMenu::LoadSaveDataReturned(void *pParam,bool bIsCorrupt, bool bI #if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) // show the message that trophies are disabled - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_SAVEDATA_COPIED_TITLE, IDS_SAVEDATA_COPIED_TEXT, uiIDA, 1, pClass->m_iPad,&UIScene_LoadMenu::TrophyDialogReturned,pClass, app.GetStringTable()); @@ -1505,7 +1505,7 @@ void UIScene_LoadMenu::checkStateAndStartGame() // Check if they have the Reset Nether flag set, and confirm they want to do this if(m_MoreOptionsParams.bResetNether) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_DONT_RESET_NETHER; uiIDA[1]=IDS_RESET_NETHER; @@ -1542,7 +1542,7 @@ void UIScene_LoadMenu::LoadLevelGen(LevelGenerationOptions *levelGen) if(isClientSide && noUGC ) { m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); return; @@ -1669,14 +1669,14 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int { pClass->m_bIgnoreInput = false; // 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable()); } else { pClass->m_bIgnoreInput=true; - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1] = IDS_CANCEL; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_LoadMenu::MustSignInReturnedPSN, pClass, app.GetStringTable(), NULL, 0, false); @@ -1684,7 +1684,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int return 0; #else pClass->m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); return 0; @@ -1705,7 +1705,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int { pClass->m_bIgnoreInput = false; pClass->setVisible( true ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); } @@ -1713,7 +1713,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int { pClass->m_bIgnoreInput = false; pClass->setVisible( true ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_HOST_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp index a5cea82fb..7adf6c1ce 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp @@ -782,7 +782,7 @@ void UIScene_LoadOrJoinMenu::tick() #ifdef _XBOX_ONE if(g_NetworkManager.ShouldMessageForFullSession()) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_IN_PARTY_SESSION_FULL, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -1012,7 +1012,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr int npAvailability = ProfileManager.getNPAvailability(iPad); if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); @@ -1024,7 +1024,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr if(!ProfileManager.IsSignedInLive(iPad)) { // get them to sign in to online - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(), &UIScene_LoadOrJoinMenu::MustSignInReturnedPSN, this, app.GetStringTable(),NULL,0,false); @@ -1067,7 +1067,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr { // delete the save game // Have to ask the player if they are sure they want to delete this game - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, iPad,&UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned,this, app.GetStringTable(),NULL,0,false); @@ -1076,7 +1076,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr { if(StorageManager.EnoughSpaceForAMinSaveGame()) { - UINT uiIDA[4]; + unsigned int uiIDA[4]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_TITLE_RENAMESAVE; uiIDA[2]=IDS_TOOLTIPS_DELETESAVE; @@ -1098,7 +1098,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr { // delete the save game // Have to ask the player if they are sure they want to delete this game - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2,iPad,&UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned,this, app.GetStringTable(),NULL,0,false); @@ -1299,7 +1299,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId) if(pSaveInfo->thumbnailData == NULL && pSaveInfo->modifiedTime == 0) // no thumbnail data and time of zero and zero blocks useset for corrupt files { // give the option to delete the save - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned,this, app.GetStringTable(),NULL,0,false); @@ -1417,7 +1417,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex) { // not allowed to join #ifndef __PSVITA__ - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; // Not allowed to play online ui.RequestMessageBox(IDS_ONLINE_GAME, IDS_CHAT_RESTRICTION_UGC, uiIDA, 1, m_iPad,NULL,this,app.GetStringTable(),NULL,0,false); @@ -1440,7 +1440,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex) // If this is an online game but not all players are signed in to Live, stop! else if (!isSignedInLive) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; // Check if PSN is unavailable because of age restriction @@ -1472,7 +1472,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex) iResult=sceNpCommerceDialogOpen(¶m); - // UINT uiIDA[2]; + // unsigned int uiIDA[2]; // uiIDA[0]=IDS_CONFIRM_OK; // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; // ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadOrJoinMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false); @@ -1515,7 +1515,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex) TelemetryManager->RecordUpsellPresented(m_iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); #endif - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_TEXTUREPACK_FULLVERSION; //uiIDA[1]=IDS_TEXTURE_PACK_TRIALVERSION; @@ -2133,7 +2133,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(void *pParam,int iPad,C4JS { // delete the save game // Have to ask the player if they are sure they want to delete this game - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, iPad,&UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned,pClass, app.GetStringTable(),NULL,0,false); @@ -2143,7 +2143,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(void *pParam,int iPad,C4JS #ifdef SONY_REMOTE_STORAGE_UPLOAD case C4JStorage::EMessage_ResultFourthOption: // upload to cloud { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -2154,7 +2154,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(void *pParam,int iPad,C4JS #if defined _XBOX_ONE || defined __ORBIS__ case C4JStorage::EMessage_ResultFourthOption: // copy save { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -2218,7 +2218,7 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS else { // 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no active network connection user is unable to convert from Trial to Full texture pack and is not messaged why. - UINT uiIDA[1] = { IDS_CONFIRM_OK }; + unsigned int uiIDA[1] = { IDS_CONFIRM_OK }; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } } @@ -2432,7 +2432,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void *lpParameter) else { // no save available, inform the user about the functionality - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_NOT_AVAILABLE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),RemoteSaveNotFoundCallback,pClass, app.GetStringTable(),NULL,0,false); } @@ -2676,7 +2676,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void *lpParameter) // if we've arrived here, the save has been created successfully pClass->m_iState=e_SavesRepopulate; pClass->updateTooltips(); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; app.getRemoteStorage()->waitForStorageManagerIdle(); // wait for everything to complete before we hand control back to the player ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable()); @@ -2752,7 +2752,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void *lpParameter) } else { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable()); pClass->m_eSaveTransferState = eSaveTransfer_Finished; @@ -2896,7 +2896,7 @@ int UIScene_LoadOrJoinMenu::UploadSonyCrossSaveThreadProc(void *lpParameter) break; case eSaveUpload_FileDataUploaded: { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable()); pClass->m_eSaveUploadState = esaveUpload_Finished; @@ -2913,7 +2913,7 @@ int UIScene_LoadOrJoinMenu::UploadSonyCrossSaveThreadProc(void *lpParameter) } else { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable()); pClass->m_eSaveUploadState = esaveUpload_Finished; @@ -2937,7 +2937,7 @@ void UIScene_LoadOrJoinMenu::SaveUploadReturned(void *lpParam, SonyRemoteStorage if(pClass->m_saveTransferUploadCancelled) { - UINT uiIDA[1] = { IDS_CONFIRM_OK }; + unsigned int uiIDA[1] = { IDS_CONFIRM_OK }; ui.RequestMessageBox( IDS_CANCEL_UPLOAD_TITLE, IDS_CANCEL_UPLOAD_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), CrossSaveUploadFinishedCallback, pClass, app.GetStringTable() ); pClass->m_eSaveUploadState=esaveUpload_Finished; } @@ -3479,7 +3479,7 @@ int UIScene_LoadOrJoinMenu::CopySaveDataReturned(void *lpParam, bool success, C4 else { #ifdef __ORBIS__ - UINT uiIDA[1]; + unsigned int uiIDA[1]; // you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then. uiIDA[0]=IDS_OK; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp index 87b9fefac..817118937 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp @@ -262,7 +262,7 @@ void UIScene_MainMenu::handleInput(int iPad, int key, bool repeat, bool pressed, case ACTION_MENU_X: if(pressed && ProfileManager.IsFullVersion()) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS__NETWORK_PSN; uiIDA[1]=IDS_NETWORK_ADHOC; ui.RequestMessageBox(IDS_SELECT_NETWORK_MODE_TITLE, IDS_SELECT_NETWORK_MODE_TEXT, uiIDA, 2, XUSER_INDEX_ANY, &UIScene_MainMenu::SelectNetworkModeReturned,this); @@ -338,7 +338,7 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId) case eControl_Exit: if( ProfileManager.IsFullVersion() ) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CANCEL; uiIDA[1]=IDS_OK; ui.RequestMessageBox(IDS_WARNING_ARCADE_TITLE, IDS_WARNING_ARCADE_TEXT, uiIDA, 2, XUSER_INDEX_ANY,&UIScene_MainMenu::ExitGameReturned,this); @@ -384,7 +384,7 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId) else { // Ask user to sign in - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; ui.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, primaryPad, &UIScene_MainMenu::MustSignInReturned, this, app.GetStringTable()); @@ -681,7 +681,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, in // 4J-JEV: We only need to update rich-presence if the sign-in status changes. ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false); - UINT uiIDA[1] = { IDS_OK }; + unsigned int uiIDA[1] = { IDS_OK }; if(ProfileManager.IsGuest(ProfileManager.GetPrimaryPad())) { @@ -879,7 +879,7 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,in // 4J-JEV: We only need to update rich-presence if the sign-in status changes. ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false); - UINT uiIDA[1] = { IDS_OK }; + unsigned int uiIDA[1] = { IDS_OK }; // guests can't look at leaderboards if(ProfileManager.IsGuest(ProfileManager.GetPrimaryPad())) @@ -903,7 +903,7 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,in pClass->m_bIgnorePress=false; #if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms // you can't see leaderboards - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); #endif @@ -1087,7 +1087,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void * return; } -// UINT uiIDA[1]; +// unsigned int uiIDA[1]; // uiIDA[0]=IDS_OK; // ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,pClass); } @@ -1095,7 +1095,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void * // Check if PSN is unavailable because of age restriction if (pClass->m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::PlayOfflineReturned, pClass, app.GetStringTable()); @@ -1121,7 +1121,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void * else { // Ask user to sign in - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; ui.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, primaryPad, &UIScene_MainMenu::MustSignInReturned, pClass, app.GetStringTable()); @@ -1174,7 +1174,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards(vo } } -// UINT uiIDA[1]; +// unsigned int uiIDA[1]; // uiIDA[0]=IDS_OK; // ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,pClass); } @@ -1187,7 +1187,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards(vo // Check if PSN is unavailable because of age restriction if (pClass->m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, pClass, app.GetStringTable()); @@ -1211,7 +1211,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards(vo else { // Ask user to sign in - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; ui.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, primaryPad, &UIScene_MainMenu::MustSignInReturned, pClass, app.GetStringTable()); @@ -1254,7 +1254,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad) if(ProfileManager.IsGuest(iPad)) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; m_bIgnorePress=false; @@ -1300,7 +1300,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad) m_eAction=eAction_RunGamePSN; // get them to sign in to online - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE; @@ -1320,7 +1320,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad) m_eAction=eAction_RunGame; // Signed in to PSN but not connected (no internet access) - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, UIScene_MainMenu::PlayOfflineReturned, this, app.GetStringTable()); } @@ -1348,7 +1348,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad) // Signed in to PSN but not connected (no internet access) assert(!ProfileManager.isConnectedToPSN(iPad)); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, UIScene_MainMenu::PlayOfflineReturned, this, app.GetStringTable()); } @@ -1356,7 +1356,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad) { m_eAction=eAction_RunGamePSN; // Not signed in to PSN - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPad, &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false); @@ -1477,7 +1477,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad) void UIScene_MainMenu::RunLeaderboards(int iPad) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; // guests can't look at leaderboards @@ -1490,7 +1490,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad) #if defined __PS3__ || defined __PSVITA__ m_eAction=eAction_RunLeaderboardsPSN; // get them to sign in to online - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_MainMenu::MustSignInReturnedPSN,this, app.GetStringTable()); @@ -1501,14 +1501,14 @@ void UIScene_MainMenu::RunLeaderboards(int iPad) if (ProfileManager.IsSignedInPSN(iPad)) { // Signed in to PSN but not connected (no internet access) - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable()); } else { // Not signed in to PSN - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable()); return; @@ -1521,14 +1521,14 @@ void UIScene_MainMenu::RunLeaderboards(int iPad) // Signed in to PSN but not connected (no internet access) assert(!ProfileManager.isConnectedToPSN(iPad)); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } else { // Not signed in to PSN - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable()); return; @@ -1554,7 +1554,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad) { #if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms // you can't see leaderboards - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this, app.GetStringTable()); #endif @@ -1574,7 +1574,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad) } void UIScene_MainMenu::RunUnlockOrDLC(int iPad) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; // Check if this means downloadable content @@ -1615,7 +1615,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) } } -// UINT uiIDA[1]; +// unsigned int uiIDA[1]; // uiIDA[0]=IDS_OK; // ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,this); return; @@ -1625,7 +1625,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) if (m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION) { m_bIgnorePress=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, this, app.GetStringTable()); @@ -1659,7 +1659,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) m_bIgnorePress=false; #if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms // you can't see the store - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this, app.GetStringTable()); #endif @@ -1708,7 +1708,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) #if defined(__PS3__) || defined(__PSVITA__) m_eAction=eAction_RunUnlockOrDLCPSN; // get them to sign in to online - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT; //uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_MainMenu::MustSignInReturnedPSN,this, app.GetStringTable()); @@ -1721,20 +1721,20 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) // Signed in to PSN but not connected (no internet access) assert(!ProfileManager.isConnectedToPSN(iPad)); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } else { // Not signed in to PSN - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable()); return; } #else - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1); #endif @@ -1753,7 +1753,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) #if defined(__PS3__) || defined(__PSVITA__) m_eAction=eAction_RunUnlockOrDLCPSN; // get them to sign in to online - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_MainMenu::MustSignInReturnedPSN,this, app.GetStringTable()); #elif defined __ORBIS__ @@ -1765,20 +1765,20 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) // Signed in to PSN but not connected (no internet access) assert(!ProfileManager.isConnectedToPSN(iPad)); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } else { // Not signed in to PSN - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable()); return; } #else - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1); #endif @@ -1836,7 +1836,7 @@ void UIScene_MainMenu::tick() ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL); if(bContentRestricted) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this, app.GetStringTable()); } @@ -1872,7 +1872,7 @@ void UIScene_MainMenu::tick() if(g_NetworkManager.ShouldMessageForFullSession()) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_IN_PARTY_SESSION_FULL, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -1895,7 +1895,7 @@ void UIScene_MainMenu::tick() m_eAction = eAction_RunGame; // give the option of continuing offline - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION_PATCH_AVAILABLE, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::PlayOfflineReturned, this, app.GetStringTable()); @@ -1916,7 +1916,7 @@ void UIScene_MainMenu::tick() void UIScene_MainMenu::RunAchievements(int iPad) { #if TO_BE_IMPLEMENTED - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; // guests can't look at achievements @@ -1935,7 +1935,7 @@ void UIScene_MainMenu::RunHelpAndOptions(int iPad) { if(ProfileManager.IsGuest(iPad)) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp index 804275724..1ba87c37e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp @@ -426,7 +426,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { // 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } @@ -437,20 +437,20 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed // Signed in to PSN but not connected (no internet access) assert(!ProfileManager.isConnectedToPSN(iPad)); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } else { // Not signed in to PSN - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false); } #else // __PS3__ // get them to sign in to online - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false); #endif @@ -490,7 +490,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed case ACTION_MENU_RIGHT_SCROLL: if( bDisplayBanTip ) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ACTION_BAN_LEVEL_TITLE, IDS_ACTION_BAN_LEVEL_DESCRIPTION, uiIDA, 2, iPad,&UIScene_PauseMenu::BanGameDialogReturned,this, app.GetStringTable(), NULL, 0, false); @@ -517,7 +517,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) break; case BUTTON_PAUSE_LEADERBOARDS: { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; //4J Gordon: Being used for the leaderboards proper now @@ -539,7 +539,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) // Check if PSN is unavailable because of age restriction if (errorCode == SCE_NP_ERROR_AGE_RESTRICTION) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable()); @@ -551,7 +551,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) #if defined __PS3__ || __PSVITA__ // get them to sign in to online m_eAction=eAction_ViewLeaderboardsPSN; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_PauseMenu::MustSignInReturnedPSN,this, app.GetStringTable(), NULL, 0, false); #elif defined(__ORBIS__) @@ -560,7 +560,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { // 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable()); } @@ -573,19 +573,19 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) // Id assert(!ProfileManager.isConnectedToPSN(m_iPad)); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable()); } else { // Not signed in to PSN - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, m_iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false); } #else - UINT uiIDA[1] = { IDS_OK }; + unsigned int uiIDA[1] = { IDS_OK }; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, m_iPad); #endif } @@ -599,7 +599,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) { #if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms // you can't see leaderboards - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad,NULL,this, app.GetStringTable(), NULL, 0, false); #endif @@ -625,7 +625,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) // guests can't look at achievements if(ProfileManager.IsGuest(pNotifyPressData->UserIndex)) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(), NULL, 0, false); } @@ -648,7 +648,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) // Check if it's the trial version if(ProfileManager.IsFullVersion()) { - UINT uiIDA[3]; + unsigned int uiIDA[3]; // is it the primary player exiting? if(m_iPad==ProfileManager.GetPrimaryPad()) @@ -750,7 +750,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) ui.ReduceTrialTimerValue(); // exit the level - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::ExitGameDialogReturned, dynamic_cast(this), app.GetStringTable(), NULL, 0, false); @@ -790,7 +790,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() { #if defined(__PS3__) m_eAction=eAction_SaveGamePSN; - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_PauseMenu::MustSignInReturnedPSN,this, app.GetStringTable(), NULL, 0, false); @@ -800,7 +800,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { // 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable()); } @@ -811,14 +811,14 @@ void UIScene_PauseMenu::PerformActionSaveGame() // Signed in to PSN but not connected (no internet access) assert(!ProfileManager.isConnectedToPSN(m_iPad)); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable()); } else { // Not signed in to PSN - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, m_iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false); } @@ -826,7 +826,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() } else { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; ui.RequestMessageBox(IDS_UNLOCK_TITLE, IDS_UNLOCK_TOSAVE_TEXT, uiIDA, 2,m_iPad,&UIScene_PauseMenu::UnlockFullSaveReturned,this,app.GetStringTable(), NULL, 0, false); @@ -856,7 +856,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() // tell sentient about the upsell of the full version of the texture pack TelemetryManager->RecordUpsellPresented(m_iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); #endif - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -884,7 +884,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() if(result == C4JStorage::ELoadGame_DeviceRemoved) { // this will be a tester trying to be clever - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_SELECTANEWDEVICE; uiIDA[1]=IDS_NODEVICE_DECLINE; @@ -896,7 +896,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() #if defined(_XBOX_ONE) || defined(__ORBIS__) if(!m_savesDisabled) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_DISABLE_AUTOSAVE, IDS_CONFIRM_DISABLE_AUTOSAVE, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::DisableAutosaveDialogReturned,this, app.GetStringTable(), NULL, 0, false); @@ -906,7 +906,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() // we need to ask if they are sure they want to overwrite the existing game if(bSaveExists) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::SaveGameDialogReturned,this, app.GetStringTable(), NULL, 0, false); @@ -914,7 +914,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() else { #if defined(_XBOX_ONE) || defined(__ORBIS__) - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_ENABLE_AUTOSAVE, IDS_CONFIRM_ENABLE_AUTOSAVE, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::EnableAutosaveDialogReturned,this, app.GetStringTable(), NULL, 0, false); @@ -983,7 +983,7 @@ int UIScene_PauseMenu::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage:: ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL); if(bContentRestricted) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,pClass, app.GetStringTable(), NULL, 0, false); } @@ -1099,7 +1099,7 @@ int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContin if(bContinue==true) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; // guests can't look at leaderboards @@ -1148,7 +1148,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { // 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } @@ -1159,19 +1159,19 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J // Signed in to PSN but not connected (no internet access) assert(!ProfileManager.isConnectedToPSN(iPad)); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable()); } else { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, pClass, app.GetStringTable(), NULL, 0, false); } #else // __PS3__ // You're not signed in to PSN! - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT; uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 2, iPad,&UIScene_PauseMenu::MustSignInReturnedPSN,pClass, app.GetStringTable(), NULL, 0, false); @@ -1185,7 +1185,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL); if(bContentRestricted) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad,NULL,pClass, app.GetStringTable(), NULL, 0, false); } @@ -1264,7 +1264,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL); if(bContentRestricted) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad,NULL,pClass, app.GetStringTable(), NULL, 0, false); } @@ -1378,7 +1378,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora TelemetryManager->RecordUpsellPresented(iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); #endif - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -1396,7 +1396,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora // we need to ask if they are sure they want to overwrite the existing game if(bSaveExists) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&IUIScene_PauseMenu::ExitGameAndSaveReturned, dynamic_cast(pClass), app.GetStringTable(), NULL, 0, false); @@ -1413,7 +1413,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora else { // been a few requests for a confirm on exit without saving - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_DECLINE_SAVE_GAME, IDS_CONFIRM_DECLINE_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&IUIScene_PauseMenu::ExitGameDeclineSaveReturned, dynamic_cast(pClass), app.GetStringTable(), NULL, 0, false); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp index 8c5cb78d4..611db2e93 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp @@ -303,7 +303,7 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr #endif // no - UINT uiIDA[1] = { IDS_OK }; + unsigned int uiIDA[1] = { IDS_OK }; #ifdef __ORBIS__ // Check if PSN is unavailable because of age restriction int npAvailability = ProfileManager.getNPAvailability(iPad); @@ -351,7 +351,7 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr { #if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms // you can't see the store - UINT uiIDA[1] = { IDS_CONFIRM_OK }; + unsigned int uiIDA[1] = { IDS_CONFIRM_OK }; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad,NULL,this, app.GetStringTable(),NULL,0,false); #endif } @@ -364,7 +364,7 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr { this->m_bIgnoreInput = true; - UINT uiIDA[2] = { IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL }; + unsigned int uiIDA[2] = { IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL }; ui.RequestMessageBox(IDS_UNLOCK_DLC_TITLE, IDS_UNLOCK_DLC_SKIN, uiIDA, 2, iPad,&UIScene_SkinSelectMenu::UnlockSkinReturned,this,app.GetStringTable(),NULL,0,false); } } @@ -617,7 +617,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) if(!m_currentPack->hasPurchasedFile( DLCManager::e_DLCType_Skin, skinFile->getPath() )) { // no - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; // We need to upsell the full version @@ -660,7 +660,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) { #if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms // you can't see the store - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this, app.GetStringTable(),NULL,0,false); #endif @@ -675,7 +675,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) m_bIgnoreInput = true; renableInputAfterOperation = false; - UINT uiIDA[2] = { IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL }; + unsigned int uiIDA[2] = { IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL }; ui.RequestMessageBox(IDS_UNLOCK_DLC_TITLE, IDS_UNLOCK_DLC_SKIN, uiIDA, 2, iPad,&UIScene_SkinSelectMenu::UnlockSkinReturned,this,app.GetStringTable(),NULL,0,false); } } @@ -1646,7 +1646,7 @@ void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad) #elif defined(_DURANGO) - UINT uiIDA[1] = { IDS_CONFIRM_OK }; + unsigned int uiIDA[1] = { IDS_CONFIRM_OK }; ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable() ); #endif diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_ConnectingProgress.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_ConnectingProgress.cpp index df25cd598..1f564d0cd 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_ConnectingProgress.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_ConnectingProgress.cpp @@ -200,7 +200,7 @@ HRESULT CScene_ConnectingProgress::OnTimer( XUIMessageTimer *pTimer, BOOL& bHand } else { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; #ifdef _XBOX StorageManager.RequestMessageBox( IDS_CONNECTION_FAILED, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp index b41d5835f..459c2562d 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp @@ -102,7 +102,7 @@ HRESULT CScene_DLCMain::OnTimer(XUIMessageTimer *pData,BOOL& rfHandled) { if(ProfileManager.GetLiveConnectionStatus()!=XONLINE_S_LOGON_CONNECTION_ESTABLISHED) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.ClearDLCOffers(); @@ -777,7 +777,7 @@ HRESULT CScene_DLCOffers::OnTimer(XUIMessageTimer *pData,BOOL& rfHandled) if(ProfileManager.GetLiveConnectionStatus()!=XONLINE_S_LOGON_CONNECTION_ESTABLISHED) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; m_pOffersList->RemoveAllData(); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Death.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Death.cpp index ff53c83ee..85846cbf9 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Death.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Death.cpp @@ -99,7 +99,7 @@ HRESULT CScene_Death::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNoti // Check if it's the trial version if(ProfileManager.IsFullVersion()) { - UINT uiIDA[3]; + unsigned int uiIDA[3]; // is it the primary player exiting? if(pNotifyPressData->UserIndex==ProfileManager.GetPrimaryPad()) @@ -155,7 +155,7 @@ HRESULT CScene_Death::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNoti CXuiSceneBase::ReduceTrialTimerValue(); // exit the level - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, pNotifyPressData->UserIndex,&UIScene_PauseMenu::ExitGameDialogReturned,this, app.GetStringTable()); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_FullscreenProgress.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_FullscreenProgress.cpp index 303a47bac..b489dfe15 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_FullscreenProgress.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_FullscreenProgress.cpp @@ -242,7 +242,7 @@ HRESULT CScene_FullscreenProgress::OnTimer( XUIMessageTimer *pTimer, BOOL& bHand pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId );*/ //app.NavigateBack(m_CompletionData->iPad); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_CONNECTION_LOST_SERVER, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.cpp index d1356bb06..4ccc70b92 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.cpp @@ -211,7 +211,7 @@ HRESULT CScene_InGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* // Only ops will hit this, can kick anyone not local and not local to the host BYTE *smallId = new BYTE(); *smallId = m_players[playersList.GetCurSel()]; - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp index e7a896e68..77359391a 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp @@ -302,7 +302,7 @@ HRESULT CScene_InGamePlayerOptions::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINoti { BYTE *smallId = new BYTE(); *smallId = m_networkSmallId; - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp index a55bef5eb..f3bee23ca 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp @@ -391,7 +391,7 @@ HRESULT CScene_LoadGameSettings::LaunchGame(void) if( (m_bGameModeSurvival != true || m_bHasBeenInCreative) || m_MoreOptionsParams.bHostPrivileges) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; if(m_bGameModeSurvival != true || m_bHasBeenInCreative) @@ -424,7 +424,7 @@ HRESULT CScene_LoadGameSettings::LaunchGame(void) // disable saving StorageManager.SetSaveDisabled(true); StorageManager.SetSaveDeviceSelected(m_iPad,false); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; StorageManager.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this); @@ -458,7 +458,7 @@ HRESULT CScene_LoadGameSettings::LaunchGame(void) // disable saving StorageManager.SetSaveDisabled(true); StorageManager.SetSaveDeviceSelected(m_iPad,false); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; StorageManager.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this); } @@ -523,7 +523,7 @@ HRESULT CScene_LoadGameSettings::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyP // tell sentient about the upsell of the full version of the skin pack TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[3]; + unsigned int uiIDA[3]; // Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full); @@ -584,7 +584,7 @@ HRESULT CScene_LoadGameSettings::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyP if(m_pDLCPack && !m_pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" )) { // no - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; if(!ProfileManager.IsSignedInLive(pNotifyPressData->UserIndex)) @@ -612,7 +612,7 @@ HRESULT CScene_LoadGameSettings::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyP // tell sentient about the upsell of the full version of the texture pack TelemetryManager->RecordUpsellPresented(pNotifyPressData->UserIndex, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -630,7 +630,7 @@ HRESULT CScene_LoadGameSettings::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyP // Check if they have the Reset Nether flag set, and confirm they want to do this if(m_MoreOptionsParams.bResetNether) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_DONT_RESET_NETHER; uiIDA[1]=IDS_RESET_NETHER; @@ -720,7 +720,7 @@ int CScene_LoadGameSettings::ConfirmLoadReturned(void *pParam,int iPad,C4JStorag // disable saving StorageManager.SetSaveDisabled(true); StorageManager.SetSaveDeviceSelected(pClass->m_iPad,false); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; StorageManager.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, pClass->m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,pClass); } @@ -866,7 +866,7 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue) { pClass->SetShow( TRUE ); pClass->m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -891,7 +891,7 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue) pClass->m_bIgnoreInput=false; // give the option to delete the save - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2, @@ -1034,7 +1034,7 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu pClass->SetShow( TRUE ); pClass->m_bIgnoreInput=false; //pClass->m_bAbortSearch=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -1043,7 +1043,7 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu pClass->SetShow( TRUE ); pClass->m_bIgnoreInput=false; //pClass->m_bAbortSearch=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_HOST_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -1340,7 +1340,7 @@ void CScene_LoadGameSettings::UpdateCurrentTexturePack() TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[3]; + unsigned int uiIDA[3]; // Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full); @@ -1416,7 +1416,7 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen) { SetShow( TRUE ); m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); return; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MainMenu.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MainMenu.cpp index 6419e7ff3..03643d023 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MainMenu.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MainMenu.cpp @@ -173,7 +173,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif else { // get them to sign in - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable()); @@ -192,7 +192,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif // get them to sign in //ProfileManager.RequestSignInUI(false, false, true,false,true, &CScene_Main::Leaderboards_SignInReturned, this); // get them to sign in - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable()); @@ -210,7 +210,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif // get them to sign in //ProfileManager.RequestSignInUI(false, false, true,false,true,&CScene_Main::Achievements_SignInReturned,this ); // get them to sign in - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable()); @@ -232,7 +232,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif // get them to sign in //ProfileManager.RequestSignInUI(false, false, true,false,true,&CScene_Main::HelpAndOptions_SignInReturned,this ); // get them to sign in - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable()); @@ -254,7 +254,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif else { // get them to sign in - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable()); @@ -264,7 +264,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif case BUTTON_EXITGAME: if( ProfileManager.IsFullVersion() ) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CANCEL; uiIDA[1]=IDS_OK; StorageManager.RequestMessageBox(IDS_WARNING_ARCADE_TITLE, IDS_WARNING_ARCADE_TEXT, uiIDA, 2, XUSER_INDEX_ANY,&CScene_Main::ExitGameReturned,this); @@ -559,7 +559,7 @@ int CScene_Main::CreateLoad_SignInReturned(void *pParam,bool bContinue, int iPad if(bContinue==true) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; if(ProfileManager.IsGuest(ProfileManager.GetPrimaryPad())) @@ -727,7 +727,7 @@ int CScene_Main::Leaderboards_SignInReturned(void *pParam,bool bContinue,int iPa if(bContinue==true) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; // guests can't look at leaderboards if(ProfileManager.IsGuest(ProfileManager.GetPrimaryPad())) @@ -945,7 +945,7 @@ void CScene_Main::RunPlayGame(int iPad) if(ProfileManager.IsGuest(iPad)) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; StorageManager.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1); @@ -1061,7 +1061,7 @@ HRESULT CScene_Main::OnTMSBanFileRetrieved() void CScene_Main::RunLeaderboards(int iPad) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; // guests can't look at leaderboards @@ -1084,7 +1084,7 @@ void CScene_Main::RunLeaderboards(int iPad) } void CScene_Main::RunAchievements(int iPad) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; // guests can't look at achievements @@ -1101,7 +1101,7 @@ void CScene_Main::RunHelpAndOptions(int iPad) { if(ProfileManager.IsGuest(iPad)) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; StorageManager.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1); } @@ -1155,7 +1155,7 @@ HRESULT CScene_Main::OnTMSDLCFileRetrieved( ) void CScene_Main::RunUnlockOrDLC(int iPad) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; // Check if this means downloadable content diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameCreate.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameCreate.cpp index bf17a2978..d1da94594 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameCreate.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameCreate.cpp @@ -341,7 +341,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr { TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[3]; + unsigned int uiIDA[3]; // Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full); @@ -403,7 +403,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr if(m_pDLCPack && !m_pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" )) { // no - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; if(!ProfileManager.IsSignedInLive(pNotifyPressData->UserIndex)) @@ -431,7 +431,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr // tell sentient about the upsell of the full version of the skin pack TelemetryManager->RecordUpsellPresented(pNotifyPressData->UserIndex, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; // Give the player a warning about the trial version of the texture pack @@ -444,7 +444,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr if(m_bGameModeSurvival != true || m_MoreOptionsParams.bHostPrivileges) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; if(m_bGameModeSurvival != true) @@ -483,7 +483,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr { m_bIgnoreInput = false; SetShow( TRUE ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -586,7 +586,7 @@ int CScene_MultiGameCreate::WarningTrialTexturePackReturned(void *pParam,int iPa if(isClientSide && noUGC ) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -785,7 +785,7 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora { pClass->m_bIgnoreInput = false; pClass->SetShow( TRUE ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -842,7 +842,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue { pClass->m_bIgnoreInput = false; pClass->SetShow( TRUE ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -850,7 +850,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue { pClass->m_bIgnoreInput = false; pClass->SetShow( TRUE ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_HOST_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -1186,7 +1186,7 @@ void CScene_MultiGameCreate::UpdateCurrentTexturePack() TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[3]; + unsigned int uiIDA[3]; // Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameInfo.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameInfo.cpp index 5e5f662a6..987467514 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameInfo.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameInfo.cpp @@ -296,7 +296,7 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass) { pClass->SetShow( TRUE ); pClass->m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; int messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL; @@ -309,7 +309,7 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass) { pClass->SetShow( TRUE ); pClass->m_bIgnoreInput=false; - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); } @@ -336,7 +336,7 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass) } else { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox( IDS_CONNECTION_FAILED, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); exitReasonStringId = -1; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp index 9e11420a4..68b0eee10 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp @@ -489,7 +489,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify TelemetryManager->RecordUpsellPresented(pNotifyPressData->UserIndex, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[3]; + unsigned int uiIDA[3]; // Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full); @@ -576,7 +576,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify if(m_pSavesList->GetData(iIndex).bIsDamaged) { // give the option to delete the save - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,this, app.GetStringTable()); @@ -662,7 +662,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r DWORD nIndex = m_pSavesList->GetCurSel(); m_iChangingSaveGameInfoIndex=m_pSavesList->GetData(nIndex).iIndex; - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_UPLOAD_SAVE; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -683,7 +683,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r { // delete the save game // Have to ask the player if they are sure they want to delete this game - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, pInputData->UserIndex,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,this, app.GetStringTable()); @@ -692,7 +692,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r { if(StorageManager.EnoughSpaceForAMinSaveGame()) { - UINT uiIDA[3]; + unsigned int uiIDA[3]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_TITLE_RENAMESAVE; uiIDA[2]=IDS_TOOLTIPS_DELETESAVE; @@ -702,7 +702,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r { // delete the save game // Have to ask the player if they are sure they want to delete this game - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, pInputData->UserIndex,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,this, app.GetStringTable()); @@ -2249,7 +2249,7 @@ int CScene_MultiGameJoinLoad::SaveOptionsDialogReturned(void *pParam,int iPad,C4 { // delete the save game // Have to ask the player if they are sure they want to delete this game - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, iPad,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,pClass, app.GetStringTable()); @@ -2301,7 +2301,7 @@ int CScene_MultiGameJoinLoad::LoadSaveDataReturned(void *pParam,bool bContinue) pClass->m_bIgnoreInput=false; // give the option to delete the save - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2, @@ -2331,7 +2331,7 @@ int CScene_MultiGameJoinLoad::TransferComplete(void *pParam,int iPad, int iResul { // There was a transfer fail // Display a dialog - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_SAVE_TRANSFER_TITLE, IDS_SAVE_TRANSFER_UPLOADFAILED, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,NULL,app.GetStringTable()); pClass->m_bTransferFail=true; @@ -2371,7 +2371,7 @@ int CScene_MultiGameJoinLoad::KeyboardReturned(void *pParam,bool bSet) // disable saving StorageManager.SetSaveDisabled(true); StorageManager.SetSaveDeviceSelected(ProfileManager.GetPrimaryPad(),false); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; StorageManager.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&CScene_MultiGameJoinLoad::DeviceRemovedDialogReturned,pClass); } @@ -2753,7 +2753,7 @@ void CScene_MultiGameJoinLoad::CancelSaveUploadCallback(LPVOID lpParam) // app.getRemoteStorage()->abort(); // pClass->m_eSaveUploadState = eSaveUpload_Idle; - UINT uiIDA[1] = { IDS_CONFIRM_OK }; + unsigned int uiIDA[1] = { IDS_CONFIRM_OK }; ui.RequestMessageBox(IDS_XBONE_CANCEL_UPLOAD_TITLE, IDS_XBONE_CANCEL_UPLOAD_TEXT, uiIDA, 1, pClass->m_iPad, NULL, NULL, app.GetStringTable()); } diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_PauseMenu.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_PauseMenu.cpp index 584ace9fc..c2461ace2 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_PauseMenu.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_PauseMenu.cpp @@ -197,7 +197,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* case BUTTON_PAUSE_LEADERBOARDS: { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; //4J Gordon: Being used for the leaderboards proper now @@ -220,7 +220,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* // guests can't look at achievements if(ProfileManager.IsGuest(pNotifyPressData->UserIndex)) { - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; StorageManager.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1); } @@ -263,7 +263,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* // tell sentient about the upsell of the full version of the texture pack TelemetryManager->RecordUpsellPresented(pNotifyPressData->UserIndex, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -281,7 +281,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* if(result == C4JStorage::ELoadGame_DeviceRemoved) { // this will be a tester trying to be clever - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_SELECTANEWDEVICE; uiIDA[1]=IDS_NODEVICE_DECLINE; @@ -292,7 +292,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* // we need to ask if they are sure they want to overwrite the existing game if(bSaveExists) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, pNotifyPressData->UserIndex,&UIScene_PauseMenu::SaveGameDialogReturned,this, app.GetStringTable()); @@ -311,7 +311,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* // Check if it's the trial version if(ProfileManager.IsFullVersion()) { - UINT uiIDA[3]; + unsigned int uiIDA[3]; // is it the primary player exiting? if(pNotifyPressData->UserIndex==ProfileManager.GetPrimaryPad()) @@ -384,7 +384,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* CXuiSceneBase::ReduceTrialTimerValue(); // exit the level - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, pNotifyPressData->UserIndex,&UIScene_PauseMenu::ExitGameDialogReturned,this, app.GetStringTable()); @@ -492,7 +492,7 @@ HRESULT UIScene_PauseMenu::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle case VK_PAD_RSHOULDER: if( bDisplayBanTip ) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; StorageManager.RequestMessageBox(IDS_ACTION_BAN_LEVEL_TITLE, IDS_ACTION_BAN_LEVEL_DESCRIPTION, uiIDA, 2, pInputData->UserIndex,&UIScene_PauseMenu::BanGameDialogReturned,this, app.GetStringTable()); @@ -832,7 +832,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora TelemetryManager->RecordUpsellPresented(iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF); #endif - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; @@ -850,7 +850,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora // we need to ask if they are sure they want to overwrite the existing game if(bSaveExists) { - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_PauseMenu::ExitGameAndSaveReturned,pClass, app.GetStringTable()); @@ -864,7 +864,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora else { // been a few requests for a confirm on exit without saving - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; ui.RequestMessageBox(IDS_TITLE_DECLINE_SAVE_GAME, IDS_CONFIRM_DECLINE_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_PauseMenu::ExitGameDeclineSaveReturned, dynamic_cast(pClass), app.GetStringTable()); @@ -891,7 +891,7 @@ int UIScene_PauseMenu::ExitGameDeclineSaveReturned(void *pParam,int iPad,C4JStor if(ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad())) { IUIScene_PauseMenu* pClass = (IUIScene_PauseMenu*)pParam; - UINT uiIDA[3]; + unsigned int uiIDA[3]; // you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then. uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_EXIT_GAME_SAVE; @@ -928,7 +928,7 @@ int UIScene_PauseMenu::ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage: if(ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad())) { UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)pParam; - UINT uiIDA[3]; + unsigned int uiIDA[3]; // you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then. uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_EXIT_GAME_SAVE; @@ -1100,7 +1100,7 @@ void UIScene_PauseMenu::_ExitWorld(LPVOID lpParameter) } //pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; // 4J Stu - Fix for #48669 - TU5: Code: Compliance: TCR #15: Incorrect/misleading messages after signing out a profile during online game session. // If the primary player is signed out, then that is most likely the cause of the disconnection so don't display a message box. This will allow the message box requested by the libraries to be brought up @@ -1178,7 +1178,7 @@ void UIScene_PauseMenu::_ExitWorld(LPVOID lpParameter) } //pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId ); - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_CONFIRM_OK; ui.RequestMessageBox( exitReasonTitleId, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable()); exitReasonStringId = -1; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_SettingsAll.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_SettingsAll.cpp index 6c2808ab1..2999f8bcc 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_SettingsAll.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_SettingsAll.cpp @@ -165,7 +165,7 @@ HRESULT CScene_SettingsAll::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* case BUTTON_ALL_RESETTODEFAULTS: { // check they really want to do this - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_CANCEL; uiIDA[1]=IDS_CONFIRM_OK; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp index 189b3bb89..319345e0d 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp @@ -244,7 +244,7 @@ HRESULT CScene_SkinSelect::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle if(!m_currentPack->hasPurchasedFile( DLCManager::e_DLCType_Skin, skinFile->getPath() )) { // no - UINT uiIDA[1]; + unsigned int uiIDA[1]; uiIDA[0]=IDS_OK; // We need to upsell the full version @@ -278,7 +278,7 @@ HRESULT CScene_SkinSelect::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle // tell sentient about the upsell of the full version of the skin pack TelemetryManager->RecordUpsellPresented(pInputData->UserIndex, eSet_UpsellID_Skin_DLC, ullOfferID_Full & 0xFFFFFFFF); - UINT uiIDA[2]; + unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; uiIDA[1]=IDS_CONFIRM_CANCEL; From d3ce6b3334616cd8c46f84d79fd9772e6563dfff Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:38:11 +1100 Subject: [PATCH 04/24] Remove LPVOID from Sony remote storage callbacks --- .../Common/Network/Sony/SonyRemoteStorage.cpp | 14 +++++++------- .../Common/Network/Sony/SonyRemoteStorage.h | 13 ++++++------- .../Orbis/Network/SonyRemoteStorage_Orbis.cpp | 8 ++++---- .../Orbis/Network/SonyRemoteStorage_Orbis.h | 9 ++++----- .../Platform/PS3/Network/SonyRemoteStorage_PS3.cpp | 9 ++++----- .../Platform/PS3/Network/SonyRemoteStorage_PS3.h | 9 ++++----- .../PSVita/Network/SonyRemoteStorage_Vita.cpp | 6 +++--- .../PSVita/Network/SonyRemoteStorage_Vita.h | 7 +++---- 8 files changed, 35 insertions(+), 40 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Network/Sony/SonyRemoteStorage.cpp b/Minecraft.Client/Platform/Common/Network/Sony/SonyRemoteStorage.cpp index a1e6d3e1d..db885e5ea 100644 --- a/Minecraft.Client/Platform/Common/Network/Sony/SonyRemoteStorage.cpp +++ b/Minecraft.Client/Platform/Common/Network/Sony/SonyRemoteStorage.cpp @@ -21,12 +21,12 @@ static SceRemoteStorageStatus statParams; -// void remoteStorageGetCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code) +// void remoteStorageGetCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code) // { // app.DebugPrintf("remoteStorageGetCallback err : 0x%08x\n"); // } // -// void remoteStorageCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code) +// void remoteStorageCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code) // { // app.DebugPrintf("remoteStorageCallback err : 0x%08x\n"); // @@ -40,7 +40,7 @@ static SceRemoteStorageStatus statParams; -void getSaveInfoReturnCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code) +void getSaveInfoReturnCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code) { SonyRemoteStorage* pRemoteStorage = (SonyRemoteStorage*)lpParam; app.DebugPrintf("remoteStorageGetInfoCallback err : 0x%08x\n", error_code); @@ -65,7 +65,7 @@ void getSaveInfoReturnCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int -static void getSaveInfoInitCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code) +static void getSaveInfoInitCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code) { SonyRemoteStorage* pRemoteStorage = (SonyRemoteStorage*)lpParam; if(error_code != 0) @@ -101,7 +101,7 @@ void SonyRemoteStorage::getSaveInfo() m_getInfoStatus = e_noInfoFound; } -bool SonyRemoteStorage::getSaveData( const char* localDirname, CallbackFunc cb, LPVOID lpParam ) +bool SonyRemoteStorage::getSaveData( const char* localDirname, CallbackFunc cb, void* lpParam ) { m_startTime = System::currentTimeMillis(); m_dataProgress = 0; @@ -109,7 +109,7 @@ bool SonyRemoteStorage::getSaveData( const char* localDirname, CallbackFunc cb, } -static void setSaveDataInitCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code) +static void setSaveDataInitCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code) { SonyRemoteStorage* pRemoteStorage = (SonyRemoteStorage*)lpParam; if(error_code != 0) @@ -227,7 +227,7 @@ int SonyRemoteStorage::getSaveFilesize() } -bool SonyRemoteStorage::setData( PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam ) +bool SonyRemoteStorage::setData( PSAVE_INFO info, CallbackFunc cb, void* lpParam ) { m_setDataSaveInfo = info; m_callbackFunc = cb; diff --git a/Minecraft.Client/Platform/Common/Network/Sony/SonyRemoteStorage.h b/Minecraft.Client/Platform/Common/Network/Sony/SonyRemoteStorage.h index 087b4d484..dccb52949 100644 --- a/Minecraft.Client/Platform/Common/Network/Sony/SonyRemoteStorage.h +++ b/Minecraft.Client/Platform/Common/Network/Sony/SonyRemoteStorage.h @@ -22,7 +22,7 @@ public: e_getStatusInProgress, e_getStatusSucceeded }; - typedef void (*CallbackFunc)(LPVOID lpParam, Status s, int error_code); + typedef void (*CallbackFunc)(void* lpParam, Status s, int error_code); enum GetInfoStatus { @@ -66,7 +66,7 @@ public: bool saveIsAvailable(); int getSaveFilesize(); - bool getSaveData(const char* localDirname, CallbackFunc cb, LPVOID lpParam); + bool getSaveData(const char* localDirname, CallbackFunc cb, void* lpParam); bool setSaveData(PSAVE_INFO info, CallbackFunc cb, void* lpParam); bool waitingForSetData() { return (m_setDataStatus == e_settingData); } @@ -80,9 +80,9 @@ public: void SetServiceID(char *pchServiceID) { m_pchServiceID=pchServiceID; } - virtual bool init(CallbackFunc cb, LPVOID lpParam) = 0; - virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam) = 0; - virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam) = 0; + virtual bool init(CallbackFunc cb, void* lpParam) = 0; + virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam) = 0; + virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam) = 0; virtual void abort() = 0; virtual bool shutdown(); virtual bool setDataInternal() = 0; @@ -95,7 +95,7 @@ public: - bool setData( PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam ); + bool setData( PSAVE_INFO info, CallbackFunc cb, void* lpParam ); static int LoadSaveDataThumbnailReturned(void *lpParam,std::uint8_t *thumbnailData,unsigned int thumbnailBytes); static int setDataThread(void* lpParam); @@ -119,4 +119,3 @@ protected: bool m_bTransferStarted; }; - diff --git a/Minecraft.Client/Platform/Orbis/Network/SonyRemoteStorage_Orbis.cpp b/Minecraft.Client/Platform/Orbis/Network/SonyRemoteStorage_Orbis.cpp index 699911c84..cf34cfc65 100644 --- a/Minecraft.Client/Platform/Orbis/Network/SonyRemoteStorage_Orbis.cpp +++ b/Minecraft.Client/Platform/Orbis/Network/SonyRemoteStorage_Orbis.cpp @@ -141,7 +141,7 @@ void SonyRemoteStorage_Orbis::internalCallback(const SceRemoteStorageEvent event } } -bool SonyRemoteStorage_Orbis::init(CallbackFunc cb, LPVOID lpParam) +bool SonyRemoteStorage_Orbis::init(CallbackFunc cb, void* lpParam) { int ret = 0; @@ -248,7 +248,7 @@ bool SonyRemoteStorage_Orbis::init(CallbackFunc cb, LPVOID lpParam) -bool SonyRemoteStorage_Orbis::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam) +bool SonyRemoteStorage_Orbis::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam) { m_callbackFunc = cb; m_callbackParam = lpParam; @@ -287,7 +287,7 @@ void SonyRemoteStorage_Orbis::abort() } -bool SonyRemoteStorage_Orbis::setData( PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam ) +bool SonyRemoteStorage_Orbis::setData( PSAVE_INFO info, CallbackFunc cb, void* lpParam ) { assert(0); return false; @@ -328,7 +328,7 @@ bool SonyRemoteStorage_Orbis::setData( PSAVE_INFO info, CallbackFunc cb, LPVOID // } } -bool SonyRemoteStorage_Orbis::getData( const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam ) +bool SonyRemoteStorage_Orbis::getData( const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam ) { m_callbackFunc = cb; m_callbackParam = lpParam; diff --git a/Minecraft.Client/Platform/Orbis/Network/SonyRemoteStorage_Orbis.h b/Minecraft.Client/Platform/Orbis/Network/SonyRemoteStorage_Orbis.h index 8b42f58f2..a2a6346a4 100644 --- a/Minecraft.Client/Platform/Orbis/Network/SonyRemoteStorage_Orbis.h +++ b/Minecraft.Client/Platform/Orbis/Network/SonyRemoteStorage_Orbis.h @@ -8,11 +8,11 @@ class SonyRemoteStorage_Orbis : public SonyRemoteStorage public: - virtual bool init(CallbackFunc cb, LPVOID lpParam); - virtual bool setData(PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam); + virtual bool init(CallbackFunc cb, void* lpParam); + virtual bool setData(PSAVE_INFO info, CallbackFunc cb, void* lpParam); - virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam); - virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam); + virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam); + virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam); virtual void abort(); virtual bool setDataInternal(){ assert(0); } @@ -39,4 +39,3 @@ private: void runCallback(); }; - diff --git a/Minecraft.Client/Platform/PS3/Network/SonyRemoteStorage_PS3.cpp b/Minecraft.Client/Platform/PS3/Network/SonyRemoteStorage_PS3.cpp index ab16c7b71..18fbf4bfb 100644 --- a/Minecraft.Client/Platform/PS3/Network/SonyRemoteStorage_PS3.cpp +++ b/Minecraft.Client/Platform/PS3/Network/SonyRemoteStorage_PS3.cpp @@ -200,7 +200,7 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event, } } -bool SonyRemoteStorage_PS3::init(CallbackFunc cb, LPVOID lpParam) +bool SonyRemoteStorage_PS3::init(CallbackFunc cb, void* lpParam) { m_callbackFunc = cb; m_callbackParam = lpParam; @@ -270,7 +270,7 @@ bool SonyRemoteStorage_PS3::init(CallbackFunc cb, LPVOID lpParam) -bool SonyRemoteStorage_PS3::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam) +bool SonyRemoteStorage_PS3::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam) { m_callbackFunc = cb; m_callbackParam = lpParam; @@ -392,7 +392,7 @@ bool SonyRemoteStorage_PS3::setDataInternal() } } -bool SonyRemoteStorage_PS3::getData( const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam ) +bool SonyRemoteStorage_PS3::getData( const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam ) { m_callbackFunc = cb; m_callbackParam = lpParam; @@ -429,7 +429,7 @@ void SonyRemoteStorage_PS3::runCallback() m_lastErrorCode = ERROR_SUCCESS; } -int SonyRemoteStorage_PS3::SaveCompressCallback(LPVOID lpParam,bool bRes) +int SonyRemoteStorage_PS3::SaveCompressCallback(void* lpParam,bool bRes) { SonyRemoteStorage_PS3* pRS = (SonyRemoteStorage_PS3*)lpParam; pRS->m_compressedSaveState = e_state_Idle; @@ -516,4 +516,3 @@ void SonyRemoteStorage_PS3::CompressSaveData() app.DebugPrintf("done\n"); assert(m_compressedSaveState == e_state_Idle); } - diff --git a/Minecraft.Client/Platform/PS3/Network/SonyRemoteStorage_PS3.h b/Minecraft.Client/Platform/PS3/Network/SonyRemoteStorage_PS3.h index 2385b6516..081aea344 100644 --- a/Minecraft.Client/Platform/PS3/Network/SonyRemoteStorage_PS3.h +++ b/Minecraft.Client/Platform/PS3/Network/SonyRemoteStorage_PS3.h @@ -8,10 +8,10 @@ class SonyRemoteStorage_PS3 : public SonyRemoteStorage public: - virtual bool init(CallbackFunc cb, LPVOID lpParam); + virtual bool init(CallbackFunc cb, void* lpParam); - virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam); - virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam); + virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam); + virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam); virtual void abort(); virtual bool setDataInternal(); @@ -56,9 +56,8 @@ private: virtual void runCallback(); - static int SaveCompressCallback(LPVOID lpParam,bool bRes); + static int SaveCompressCallback(void* lpParam,bool bRes); static int LoadCompressCallback(void *pParam,bool bIsCorrupt, bool bIsOwner); }; - diff --git a/Minecraft.Client/Platform/PSVita/Network/SonyRemoteStorage_Vita.cpp b/Minecraft.Client/Platform/PSVita/Network/SonyRemoteStorage_Vita.cpp index 70117ffce..2c79a16ae 100644 --- a/Minecraft.Client/Platform/PSVita/Network/SonyRemoteStorage_Vita.cpp +++ b/Minecraft.Client/Platform/PSVita/Network/SonyRemoteStorage_Vita.cpp @@ -140,7 +140,7 @@ void SonyRemoteStorage_Vita::internalCallback(const SceRemoteStorageEvent event, } } -bool SonyRemoteStorage_Vita::init(CallbackFunc cb, LPVOID lpParam) +bool SonyRemoteStorage_Vita::init(CallbackFunc cb, void* lpParam) { int ret = 0; int reqId = 0; @@ -242,7 +242,7 @@ bool SonyRemoteStorage_Vita::init(CallbackFunc cb, LPVOID lpParam) -bool SonyRemoteStorage_Vita::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam) +bool SonyRemoteStorage_Vita::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam) { m_callbackFunc = cb; m_callbackParam = lpParam; @@ -360,7 +360,7 @@ bool SonyRemoteStorage_Vita::setDataInternal() } -bool SonyRemoteStorage_Vita::getData( const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam ) +bool SonyRemoteStorage_Vita::getData( const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam ) { m_callbackFunc = cb; m_callbackParam = lpParam; diff --git a/Minecraft.Client/Platform/PSVita/Network/SonyRemoteStorage_Vita.h b/Minecraft.Client/Platform/PSVita/Network/SonyRemoteStorage_Vita.h index 408eb11cc..bcb2be98e 100644 --- a/Minecraft.Client/Platform/PSVita/Network/SonyRemoteStorage_Vita.h +++ b/Minecraft.Client/Platform/PSVita/Network/SonyRemoteStorage_Vita.h @@ -8,10 +8,10 @@ class SonyRemoteStorage_Vita : public SonyRemoteStorage public: - virtual bool init(CallbackFunc cb, LPVOID lpParam); + virtual bool init(CallbackFunc cb, void* lpParam); - virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam); - virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam); + virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam); + virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam); virtual void abort(); virtual bool setDataInternal(); @@ -40,4 +40,3 @@ private: }; - From 6e2f40f5814221887a0d08249393d0fede1ada7d Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:41:42 +1100 Subject: [PATCH 05/24] Remove LPVOID from Sony commerce callbacks --- .../Common/Network/Sony/SonyCommerce.cpp | 27 ++++++------- .../Common/Network/Sony/SonyCommerce.h | 22 +++++----- .../Orbis/Network/SonyCommerce_Orbis.cpp | 34 ++++++++-------- .../Orbis/Network/SonyCommerce_Orbis.h | 32 +++++++-------- .../Platform/PS3/Network/SonyCommerce_PS3.cpp | 27 ++++++------- .../Platform/PS3/Network/SonyCommerce_PS3.h | 28 ++++++------- .../PSVita/Network/SonyCommerce_Vita.cpp | 40 +++++++++---------- .../PSVita/Network/SonyCommerce_Vita.h | 38 +++++++++--------- 8 files changed, 123 insertions(+), 125 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.cpp b/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.cpp index 669c4c59e..1beafa953 100644 --- a/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.cpp +++ b/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.cpp @@ -9,7 +9,7 @@ bool SonyCommerce::m_bCommerceInitialised = false; SceNpCommerce2SessionInfo SonyCommerce::m_sessionInfo; SonyCommerce::State SonyCommerce::m_state = e_state_noSession; int SonyCommerce::m_errorCode = 0; -LPVOID SonyCommerce::m_callbackParam = NULL; +void* SonyCommerce::m_callbackParam = NULL; void* SonyCommerce::m_receiveBuffer = NULL; SonyCommerce::Event SonyCommerce::m_event; @@ -29,7 +29,7 @@ sys_memory_container_t SonyCommerce::m_memContainer = SYS_MEMORY_CONTAINER_I bool SonyCommerce::m_bUpgradingTrial = false; SonyCommerce::CallbackFunc SonyCommerce::m_trialUpgradeCallbackFunc; -LPVOID SonyCommerce::m_trialUpgradeCallbackParam; +void* SonyCommerce::m_trialUpgradeCallbackParam; CRITICAL_SECTION SonyCommerce::m_queueLock; @@ -81,7 +81,7 @@ void SonyCommerce::Init() -void SonyCommerce::CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion) +void SonyCommerce::CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion) { ProfileManager.SetFullVersion(bFullVersion); if(ProfileManager.IsFullVersion()) @@ -798,7 +798,7 @@ int SonyCommerce::downloadList(DownloadListInputParams ¶ms) return CELL_OK; } -void SonyCommerce::UpgradeTrialCallback2(LPVOID lpParam,int err) +void SonyCommerce::UpgradeTrialCallback2(void* lpParam,int err) { app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback2 : err : 0x%08x\n", err); SonyCommerce::CheckForTrialUpgradeKey(); @@ -811,7 +811,7 @@ void SonyCommerce::UpgradeTrialCallback2(LPVOID lpParam,int err) m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode); } -void SonyCommerce::UpgradeTrialCallback1(LPVOID lpParam,int err) +void SonyCommerce::UpgradeTrialCallback1(void* lpParam,int err) { app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback1 : err : 0x%08x\n", err); @@ -847,7 +847,7 @@ void SonyCommerce_UpgradeTrial() app.UpgradeTrial(); } -void SonyCommerce::UpgradeTrial(CallbackFunc cb, LPVOID lpParam) +void SonyCommerce::UpgradeTrial(CallbackFunc cb, void* lpParam) { m_trialUpgradeCallbackFunc = cb; m_trialUpgradeCallbackParam = lpParam; @@ -1383,7 +1383,7 @@ int SonyCommerce::commerceEnd() return ret; } -void SonyCommerce::CreateSession( CallbackFunc cb, LPVOID lpParam ) +void SonyCommerce::CreateSession( CallbackFunc cb, void* lpParam ) { Init(); EnterCriticalSection(&m_queueLock); @@ -1406,7 +1406,7 @@ void SonyCommerce::CloseSession() Shutdown(); } -void SonyCommerce::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector* productList, const char *categoryId) +void SonyCommerce::GetProductList( CallbackFunc cb, void* lpParam, std::vector* productList, const char *categoryId) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1416,7 +1416,7 @@ void SonyCommerce::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector< LeaveCriticalSection(&m_queueLock); } -void SonyCommerce::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId ) +void SonyCommerce::GetDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1428,7 +1428,7 @@ void SonyCommerce::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, Prod } // 4J-PB - fill out the long description and the price for the product -void SonyCommerce::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) +void SonyCommerce::AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1438,7 +1438,7 @@ void SonyCommerce::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, Prod m_messageQueue.push(e_message_commerceAddDetailedProductInfo); LeaveCriticalSection(&m_queueLock); } -void SonyCommerce::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId ) +void SonyCommerce::GetCategoryInfo( CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1448,7 +1448,7 @@ void SonyCommerce::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInf LeaveCriticalSection(&m_queueLock); } -void SonyCommerce::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce::Checkout( CallbackFunc cb, void* lpParam, const char* skuID ) { if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID) { @@ -1469,7 +1469,7 @@ void SonyCommerce::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID LeaveCriticalSection(&m_queueLock); } -void SonyCommerce::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce::DownloadAlreadyPurchased( CallbackFunc cb, void* lpParam, const char* skuID ) { if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID) return; @@ -1489,4 +1489,3 @@ void SonyCommerce::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, co } - diff --git a/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.h b/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.h index 6df04947a..8b0e2e4dd 100644 --- a/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.h +++ b/Minecraft.Client/Platform/Common/Network/Sony/SonyCommerce.h @@ -43,7 +43,7 @@ class SonyCommerce { public: - typedef void (*CallbackFunc)(LPVOID lpParam, int error_code); + typedef void (*CallbackFunc)(void* lpParam, int error_code); /// @brief @@ -153,20 +153,20 @@ public: public: - virtual void CreateSession(CallbackFunc cb, LPVOID lpParam) = 0; + virtual void CreateSession(CallbackFunc cb, void* lpParam) = 0; virtual void CloseSession() = 0; - virtual void GetCategoryInfo(CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId) = 0; - virtual void GetProductList(CallbackFunc cb, LPVOID lpParam, std::vector* productList, const char *categoryId) = 0; - virtual void GetDetailedProductInfo(CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId) = 0; - virtual void AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) = 0; - virtual void Checkout(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0; - virtual void DownloadAlreadyPurchased(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0; + virtual void GetCategoryInfo(CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId) = 0; + virtual void GetProductList(CallbackFunc cb, void* lpParam, std::vector* productList, const char *categoryId) = 0; + virtual void GetDetailedProductInfo(CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId) = 0; + virtual void AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) = 0; + virtual void Checkout(CallbackFunc cb, void* lpParam, const char* skuID) = 0; + virtual void DownloadAlreadyPurchased(CallbackFunc cb, void* lpParam, const char* skuID) = 0; #if defined(__ORBIS__) || defined( __PSVITA__) - virtual void Checkout_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0; - virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0; + virtual void Checkout_Game(CallbackFunc cb, void* lpParam, const char* skuID) = 0; + virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, void* lpParam, const char* skuID) = 0; #endif - virtual void UpgradeTrial(CallbackFunc cb, LPVOID lpParam) = 0; + virtual void UpgradeTrial(CallbackFunc cb, void* lpParam) = 0; virtual void CheckForTrialUpgradeKey() = 0; virtual bool LicenseChecked() = 0; diff --git a/Minecraft.Client/Platform/Orbis/Network/SonyCommerce_Orbis.cpp b/Minecraft.Client/Platform/Orbis/Network/SonyCommerce_Orbis.cpp index 6e3da0598..ce426c08f 100644 --- a/Minecraft.Client/Platform/Orbis/Network/SonyCommerce_Orbis.cpp +++ b/Minecraft.Client/Platform/Orbis/Network/SonyCommerce_Orbis.cpp @@ -9,7 +9,7 @@ bool SonyCommerce_Orbis::m_bCommerceInitialised = false; // SceNpCommerce2SessionInfo SonyCommerce_Orbis::m_sessionInfo; SonyCommerce_Orbis::State SonyCommerce_Orbis::m_state = e_state_noSession; int SonyCommerce_Orbis::m_errorCode = 0; -LPVOID SonyCommerce_Orbis::m_callbackParam = NULL; +void* SonyCommerce_Orbis::m_callbackParam = NULL; void* SonyCommerce_Orbis::m_receiveBuffer = NULL; SonyCommerce_Orbis::Event SonyCommerce_Orbis::m_event; @@ -29,7 +29,7 @@ SonyCommerce_Orbis::CallbackFunc SonyCommerce_Orbis::m_callbackFunc = NULL; bool SonyCommerce_Orbis::m_bUpgradingTrial = false; SonyCommerce_Orbis::CallbackFunc SonyCommerce_Orbis::m_trialUpgradeCallbackFunc; -LPVOID SonyCommerce_Orbis::m_trialUpgradeCallbackParam; +void* SonyCommerce_Orbis::m_trialUpgradeCallbackParam; CRITICAL_SECTION SonyCommerce_Orbis::m_queueLock; @@ -73,7 +73,7 @@ void SonyCommerce_Orbis::Init() -void SonyCommerce_Orbis::CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion) +void SonyCommerce_Orbis::CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion) { ProfileManager.SetFullVersion(bFullVersion); if(ProfileManager.IsFullVersion()) @@ -498,7 +498,7 @@ int SonyCommerce_Orbis::downloadList_game(DownloadListInputParams ¶ms) return ret; } -void SonyCommerce_Orbis::UpgradeTrialCallback2(LPVOID lpParam,int err) +void SonyCommerce_Orbis::UpgradeTrialCallback2(void* lpParam,int err) { SonyCommerce* pCommerce = (SonyCommerce*)lpParam; app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback2 : err : 0x%08x\n", err); @@ -512,7 +512,7 @@ void SonyCommerce_Orbis::UpgradeTrialCallback2(LPVOID lpParam,int err) m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode); } -void SonyCommerce_Orbis::UpgradeTrialCallback1(LPVOID lpParam,int err) +void SonyCommerce_Orbis::UpgradeTrialCallback1(void* lpParam,int err) { SonyCommerce* pCommerce = (SonyCommerce*)lpParam; app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback1 : err : 0x%08x\n", err); @@ -551,7 +551,7 @@ void SonyCommerce_UpgradeTrial() app.UpgradeTrial(); } -void SonyCommerce_Orbis::UpgradeTrial(CallbackFunc cb, LPVOID lpParam) +void SonyCommerce_Orbis::UpgradeTrial(CallbackFunc cb, void* lpParam) { m_trialUpgradeCallbackFunc = cb; m_trialUpgradeCallbackParam = lpParam; @@ -1130,7 +1130,7 @@ int SonyCommerce_Orbis::commerceEnd() return ret; } -void SonyCommerce_Orbis::CreateSession( CallbackFunc cb, LPVOID lpParam ) +void SonyCommerce_Orbis::CreateSession( CallbackFunc cb, void* lpParam ) { // 4J-PB - reset any previous error code // I had this happen when I was offline on Vita, and accepted the PSN sign-in @@ -1172,7 +1172,7 @@ void SonyCommerce_Orbis::CloseSession() //Shutdown(); } -void SonyCommerce_Orbis::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector* productList, const char *categoryId) +void SonyCommerce_Orbis::GetProductList( CallbackFunc cb, void* lpParam, std::vector* productList, const char *categoryId) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1182,7 +1182,7 @@ void SonyCommerce_Orbis::GetProductList( CallbackFunc cb, LPVOID lpParam, std::v LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Orbis::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId ) +void SonyCommerce_Orbis::GetDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1194,7 +1194,7 @@ void SonyCommerce_Orbis::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam } // 4J-PB - fill out the long description and the price for the product -void SonyCommerce_Orbis::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) +void SonyCommerce_Orbis::AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1204,7 +1204,7 @@ void SonyCommerce_Orbis::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam m_messageQueue.push(e_message_commerceAddDetailedProductInfo); LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Orbis::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId ) +void SonyCommerce_Orbis::GetCategoryInfo( CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1214,7 +1214,7 @@ void SonyCommerce_Orbis::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, Categ LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Orbis::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_Orbis::Checkout( CallbackFunc cb, void* lpParam, const char* skuID ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1224,7 +1224,7 @@ void SonyCommerce_Orbis::Checkout( CallbackFunc cb, LPVOID lpParam, const char* LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Orbis::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_Orbis::DownloadAlreadyPurchased( CallbackFunc cb, void* lpParam, const char* skuID ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1234,7 +1234,7 @@ void SonyCommerce_Orbis::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpPar LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Orbis::Checkout_Game( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_Orbis::Checkout_Game( CallbackFunc cb, void* lpParam, const char* skuID ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1243,7 +1243,7 @@ void SonyCommerce_Orbis::Checkout_Game( CallbackFunc cb, LPVOID lpParam, const c m_messageQueue.push(e_message_commerceCheckout_Game); LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Orbis::DownloadAlreadyPurchased_Game( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_Orbis::DownloadAlreadyPurchased_Game( CallbackFunc cb, void* lpParam, const char* skuID ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1267,7 +1267,7 @@ std::vector g_productInfo; SonyCommerce::CategoryInfo g_categoryInfo2; SonyCommerce::ProductInfoDetailed g_productInfoDetailed; -void testCallback(LPVOID lpParam, int error_code) +void testCallback(void* lpParam, int error_code) { app.DebugPrintf("Callback hit, error 0x%08x\n", error_code); } @@ -1311,4 +1311,4 @@ void SonyCommerce_Orbis::Test() } } -*/ \ No newline at end of file +*/ diff --git a/Minecraft.Client/Platform/Orbis/Network/SonyCommerce_Orbis.h b/Minecraft.Client/Platform/Orbis/Network/SonyCommerce_Orbis.h index fc824a7e2..7c24f2793 100644 --- a/Minecraft.Client/Platform/Orbis/Network/SonyCommerce_Orbis.h +++ b/Minecraft.Client/Platform/Orbis/Network/SonyCommerce_Orbis.h @@ -81,7 +81,7 @@ class SonyCommerce_Orbis : public SonyCommerce // static SceNpCommerce2SessionInfo m_sessionInfo; static State m_state; static int m_errorCode; - static LPVOID m_callbackParam; + static void* m_callbackParam; static Event m_event; static Message m_message; // static uint32_t m_requestID; @@ -100,7 +100,7 @@ class SonyCommerce_Orbis : public SonyCommerce static bool m_bUpgradingTrial; static C4JThread* m_tickThread; static CallbackFunc m_trialUpgradeCallbackFunc; - static LPVOID m_trialUpgradeCallbackParam; + static void* m_trialUpgradeCallbackParam; static CRITICAL_SECTION m_queueLock; static void runCallback() @@ -112,7 +112,7 @@ class SonyCommerce_Orbis : public SonyCommerce func(m_callbackParam, m_errorCode); m_errorCode = SCE_OK; } - static void setCallback(CallbackFunc cb,LPVOID lpParam) + static void setCallback(CallbackFunc cb, void* lpParam) { assert(m_callbackFunc == NULL); m_callbackFunc = cb; @@ -142,8 +142,8 @@ class SonyCommerce_Orbis : public SonyCommerce static int downloadList(DownloadListInputParams ¶ms); static int checkout_game(CheckoutInputParams ¶ms); static int downloadList_game(DownloadListInputParams ¶ms); - static void UpgradeTrialCallback1(LPVOID lpParam,int err); - static void UpgradeTrialCallback2(LPVOID lpParam,int err); + static void UpgradeTrialCallback1(void* lpParam,int err); + static void UpgradeTrialCallback2(void* lpParam,int err); static void Delete(); static void copyCategoryInfo(CategoryInfo *pInfo, sce::Toolkit::NP::CategoryInfo *pNPInfo); static void copyProductList(std::vector* pProductList, std::vector* pNPProductList); @@ -160,22 +160,22 @@ class SonyCommerce_Orbis : public SonyCommerce static void Init(); static int Shutdown(); - static void CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion); + static void CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion); public: - virtual void CreateSession(CallbackFunc cb, LPVOID lpParam); + virtual void CreateSession(CallbackFunc cb, void* lpParam); virtual void CloseSession(); - virtual void GetCategoryInfo(CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId); - virtual void GetProductList(CallbackFunc cb, LPVOID lpParam, std::vector* productList, const char *categoryId); - virtual void GetDetailedProductInfo(CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId); - virtual void AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ); - virtual void Checkout(CallbackFunc cb, LPVOID lpParam, const char* skuID); - virtual void DownloadAlreadyPurchased(CallbackFunc cb, LPVOID lpParam, const char* skuID); - virtual void Checkout_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID); - virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID); - virtual void UpgradeTrial(CallbackFunc cb, LPVOID lpParam); + virtual void GetCategoryInfo(CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId); + virtual void GetProductList(CallbackFunc cb, void* lpParam, std::vector* productList, const char *categoryId); + virtual void GetDetailedProductInfo(CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId); + virtual void AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ); + virtual void Checkout(CallbackFunc cb, void* lpParam, const char* skuID); + virtual void DownloadAlreadyPurchased(CallbackFunc cb, void* lpParam, const char* skuID); + virtual void Checkout_Game(CallbackFunc cb, void* lpParam, const char* skuID); + virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, void* lpParam, const char* skuID); + virtual void UpgradeTrial(CallbackFunc cb, void* lpParam); virtual void CheckForTrialUpgradeKey(); virtual bool LicenseChecked(); diff --git a/Minecraft.Client/Platform/PS3/Network/SonyCommerce_PS3.cpp b/Minecraft.Client/Platform/PS3/Network/SonyCommerce_PS3.cpp index e24a4bc07..97cb47980 100644 --- a/Minecraft.Client/Platform/PS3/Network/SonyCommerce_PS3.cpp +++ b/Minecraft.Client/Platform/PS3/Network/SonyCommerce_PS3.cpp @@ -9,7 +9,7 @@ bool SonyCommerce_PS3::m_bCommerceInitialised = false; SceNpCommerce2SessionInfo SonyCommerce_PS3::m_sessionInfo; SonyCommerce_PS3::State SonyCommerce_PS3::m_state = e_state_noSession; int SonyCommerce_PS3::m_errorCode = 0; -LPVOID SonyCommerce_PS3::m_callbackParam = NULL; +void* SonyCommerce_PS3::m_callbackParam = NULL; void* SonyCommerce_PS3::m_receiveBuffer = NULL; SonyCommerce_PS3::Event SonyCommerce_PS3::m_event; @@ -29,7 +29,7 @@ sys_memory_container_t SonyCommerce_PS3::m_memContainer = SYS_MEMORY_CONTAIN bool SonyCommerce_PS3::m_bUpgradingTrial = false; SonyCommerce_PS3::CallbackFunc SonyCommerce_PS3::m_trialUpgradeCallbackFunc; -LPVOID SonyCommerce_PS3::m_trialUpgradeCallbackParam; +void* SonyCommerce_PS3::m_trialUpgradeCallbackParam; CRITICAL_SECTION SonyCommerce_PS3::m_queueLock; @@ -81,7 +81,7 @@ void SonyCommerce_PS3::Init() -void SonyCommerce_PS3::CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion) +void SonyCommerce_PS3::CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion) { ProfileManager.SetFullVersion(bFullVersion); if(ProfileManager.IsFullVersion()) @@ -806,7 +806,7 @@ int SonyCommerce_PS3::downloadList(DownloadListInputParams ¶ms) return CELL_OK; } -void SonyCommerce_PS3::UpgradeTrialCallback2(LPVOID lpParam,int err) +void SonyCommerce_PS3::UpgradeTrialCallback2(void* lpParam,int err) { SonyCommerce* pCommerce = (SonyCommerce*)lpParam; app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback2 : err : 0x%08x\n", err); @@ -820,7 +820,7 @@ void SonyCommerce_PS3::UpgradeTrialCallback2(LPVOID lpParam,int err) m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode); } -void SonyCommerce_PS3::UpgradeTrialCallback1(LPVOID lpParam,int err) +void SonyCommerce_PS3::UpgradeTrialCallback1(void* lpParam,int err) { SonyCommerce* pCommerce = (SonyCommerce*)lpParam; app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback1 : err : 0x%08x\n", err); @@ -856,7 +856,7 @@ void SonyCommerce_UpgradeTrial() app.UpgradeTrial(); } -void SonyCommerce_PS3::UpgradeTrial(CallbackFunc cb, LPVOID lpParam) +void SonyCommerce_PS3::UpgradeTrial(CallbackFunc cb, void* lpParam) { m_trialUpgradeCallbackFunc = cb; m_trialUpgradeCallbackParam = lpParam; @@ -1396,7 +1396,7 @@ int SonyCommerce_PS3::commerceEnd() return ret; } -void SonyCommerce_PS3::CreateSession( CallbackFunc cb, LPVOID lpParam ) +void SonyCommerce_PS3::CreateSession( CallbackFunc cb, void* lpParam ) { // 4J-PB - reset any previous error code // I had this happen when I was offline on Vita, and accepted the PSN sign-in @@ -1427,7 +1427,7 @@ void SonyCommerce_PS3::CloseSession() Shutdown(); } -void SonyCommerce_PS3::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector* productList, const char *categoryId) +void SonyCommerce_PS3::GetProductList( CallbackFunc cb, void* lpParam, std::vector* productList, const char *categoryId) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1437,7 +1437,7 @@ void SonyCommerce_PS3::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vec LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_PS3::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId ) +void SonyCommerce_PS3::GetDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1449,7 +1449,7 @@ void SonyCommerce_PS3::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, } // 4J-PB - fill out the long description and the price for the product -void SonyCommerce_PS3::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) +void SonyCommerce_PS3::AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1459,7 +1459,7 @@ void SonyCommerce_PS3::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, m_messageQueue.push(e_message_commerceAddDetailedProductInfo); LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_PS3::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId ) +void SonyCommerce_PS3::GetCategoryInfo( CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1469,7 +1469,7 @@ void SonyCommerce_PS3::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, Categor LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_PS3::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_PS3::Checkout( CallbackFunc cb, void* lpParam, const char* skuID ) { if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID) { @@ -1490,7 +1490,7 @@ void SonyCommerce_PS3::Checkout( CallbackFunc cb, LPVOID lpParam, const char* sk LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_PS3::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_PS3::DownloadAlreadyPurchased( CallbackFunc cb, void* lpParam, const char* skuID ) { if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID) return; @@ -1510,4 +1510,3 @@ void SonyCommerce_PS3::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam } - diff --git a/Minecraft.Client/Platform/PS3/Network/SonyCommerce_PS3.h b/Minecraft.Client/Platform/PS3/Network/SonyCommerce_PS3.h index a39efafb6..f9f74150a 100644 --- a/Minecraft.Client/Platform/PS3/Network/SonyCommerce_PS3.h +++ b/Minecraft.Client/Platform/PS3/Network/SonyCommerce_PS3.h @@ -88,7 +88,7 @@ class SonyCommerce_PS3 : public SonyCommerce static SceNpCommerce2SessionInfo m_sessionInfo; static State m_state; static int m_errorCode; - static LPVOID m_callbackParam; + static void* m_callbackParam; static Event m_event; static Message m_message; // static uint32_t m_requestID; @@ -107,7 +107,7 @@ class SonyCommerce_PS3 : public SonyCommerce static bool m_bUpgradingTrial; static C4JThread* m_tickThread; static CallbackFunc m_trialUpgradeCallbackFunc; - static LPVOID m_trialUpgradeCallbackParam; + static void* m_trialUpgradeCallbackParam; static CRITICAL_SECTION m_queueLock; static void runCallback() @@ -119,7 +119,7 @@ class SonyCommerce_PS3 : public SonyCommerce func(m_callbackParam, m_errorCode); m_errorCode = CELL_OK; } - static void setCallback(CallbackFunc cb,LPVOID lpParam) + static void setCallback(CallbackFunc cb, void* lpParam) { assert(m_callbackFunc == NULL); m_callbackFunc = cb; @@ -147,8 +147,8 @@ class SonyCommerce_PS3 : public SonyCommerce static int addDetailedProductInfo(ProductInfo *info, const char *productId, char *categoryId); static int checkout(CheckoutInputParams ¶ms); static int downloadList(DownloadListInputParams ¶ms); - static void UpgradeTrialCallback1(LPVOID lpParam,int err); - static void UpgradeTrialCallback2(LPVOID lpParam,int err); + static void UpgradeTrialCallback1(void* lpParam,int err); + static void UpgradeTrialCallback2(void* lpParam,int err); static void Delete(); @@ -160,20 +160,20 @@ class SonyCommerce_PS3 : public SonyCommerce static void Init(); static int Shutdown(); - static void CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion); + static void CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion); public: - virtual void CreateSession(CallbackFunc cb, LPVOID lpParam); + virtual void CreateSession(CallbackFunc cb, void* lpParam); virtual void CloseSession(); - virtual void GetCategoryInfo(CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId); - virtual void GetProductList(CallbackFunc cb, LPVOID lpParam, std::vector* productList, const char *categoryId); - virtual void GetDetailedProductInfo(CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId); - virtual void AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ); - virtual void Checkout(CallbackFunc cb, LPVOID lpParam, const char* skuID); - virtual void DownloadAlreadyPurchased(CallbackFunc cb, LPVOID lpParam, const char* skuID); - virtual void UpgradeTrial(CallbackFunc cb, LPVOID lpParam); + virtual void GetCategoryInfo(CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId); + virtual void GetProductList(CallbackFunc cb, void* lpParam, std::vector* productList, const char *categoryId); + virtual void GetDetailedProductInfo(CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId); + virtual void AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ); + virtual void Checkout(CallbackFunc cb, void* lpParam, const char* skuID); + virtual void DownloadAlreadyPurchased(CallbackFunc cb, void* lpParam, const char* skuID); + virtual void UpgradeTrial(CallbackFunc cb, void* lpParam); virtual void CheckForTrialUpgradeKey(); virtual bool LicenseChecked(); diff --git a/Minecraft.Client/Platform/PSVita/Network/SonyCommerce_Vita.cpp b/Minecraft.Client/Platform/PSVita/Network/SonyCommerce_Vita.cpp index 62d894309..e3ac197fa 100644 --- a/Minecraft.Client/Platform/PSVita/Network/SonyCommerce_Vita.cpp +++ b/Minecraft.Client/Platform/PSVita/Network/SonyCommerce_Vita.cpp @@ -10,7 +10,7 @@ bool SonyCommerce_Vita::m_bCommerceInitialised = false; // SceNpCommerce2SessionInfo SonyCommerce_Vita::m_sessionInfo; SonyCommerce_Vita::State SonyCommerce_Vita::m_state = e_state_noSession; int SonyCommerce_Vita::m_errorCode = 0; -LPVOID SonyCommerce_Vita::m_callbackParam = NULL; +void* SonyCommerce_Vita::m_callbackParam = NULL; void* SonyCommerce_Vita::m_receiveBuffer = NULL; SonyCommerce_Vita::Event SonyCommerce_Vita::m_event; @@ -30,7 +30,7 @@ SonyCommerce_Vita::CallbackFunc SonyCommerce_Vita::m_callbackFunc = NULL; bool SonyCommerce_Vita::m_bUpgradingTrial = false; SonyCommerce_Vita::CallbackFunc SonyCommerce_Vita::m_trialUpgradeCallbackFunc; -LPVOID SonyCommerce_Vita::m_trialUpgradeCallbackParam; +void* SonyCommerce_Vita::m_trialUpgradeCallbackParam; CRITICAL_SECTION SonyCommerce_Vita::m_queueLock; @@ -84,7 +84,7 @@ void SonyCommerce_Vita::Init() -void SonyCommerce_Vita::CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion) +void SonyCommerce_Vita::CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion) { ProfileManager.SetFullVersion(bFullVersion); if(ProfileManager.IsFullVersion()) @@ -126,7 +126,7 @@ int SonyCommerce_Vita::Shutdown() return ret; } -void SonyCommerce_Vita::InstallContentCallback(LPVOID lpParam,int err) +void SonyCommerce_Vita::InstallContentCallback(void* lpParam,int err) { m_iClearDLCCountdown = 30; m_bInstallingContent = false; @@ -582,7 +582,7 @@ int SonyCommerce_Vita::installContent() } -void SonyCommerce_Vita::UpgradeTrialCallback2(LPVOID lpParam,int err) +void SonyCommerce_Vita::UpgradeTrialCallback2(void* lpParam,int err) { SonyCommerce* pCommerce = (SonyCommerce*)lpParam; app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback2 : err : 0x%08x\n", err); @@ -596,7 +596,7 @@ void SonyCommerce_Vita::UpgradeTrialCallback2(LPVOID lpParam,int err) m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode); } -void SonyCommerce_Vita::UpgradeTrialCallback1(LPVOID lpParam,int err) +void SonyCommerce_Vita::UpgradeTrialCallback1(void* lpParam,int err) { SonyCommerce* pCommerce = (SonyCommerce*)lpParam; app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback1 : err : 0x%08x\n", err); @@ -632,7 +632,7 @@ void SonyCommerce_UpgradeTrial() app.UpgradeTrial(); } -void SonyCommerce_Vita::UpgradeTrial(CallbackFunc cb, LPVOID lpParam) +void SonyCommerce_Vita::UpgradeTrial(CallbackFunc cb, void* lpParam) { m_trialUpgradeCallbackFunc = cb; m_trialUpgradeCallbackParam = lpParam; @@ -1304,7 +1304,7 @@ int SonyCommerce_Vita::commerceEnd() return ret; } -void SonyCommerce_Vita::CreateSession( CallbackFunc cb, LPVOID lpParam ) +void SonyCommerce_Vita::CreateSession( CallbackFunc cb, void* lpParam ) { // 4J-PB - reset any previous error code // I had this happen when I was offline on Vita, and accepted the PSN sign-in @@ -1343,7 +1343,7 @@ void SonyCommerce_Vita::CloseSession() Shutdown(); } -void SonyCommerce_Vita::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector* productList, const char *categoryId) +void SonyCommerce_Vita::GetProductList( CallbackFunc cb, void* lpParam, std::vector* productList, const char *categoryId) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1353,7 +1353,7 @@ void SonyCommerce_Vita::GetProductList( CallbackFunc cb, LPVOID lpParam, std::ve LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Vita::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId ) +void SonyCommerce_Vita::GetDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1365,7 +1365,7 @@ void SonyCommerce_Vita::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, } // 4J-PB - fill out the long description and the price for the product -void SonyCommerce_Vita::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) +void SonyCommerce_Vita::AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1375,7 +1375,7 @@ void SonyCommerce_Vita::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, m_messageQueue.push(e_message_commerceAddDetailedProductInfo); LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Vita::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId ) +void SonyCommerce_Vita::GetCategoryInfo( CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1385,7 +1385,7 @@ void SonyCommerce_Vita::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, Catego LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Vita::Checkout( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo ) +void SonyCommerce_Vita::Checkout( CallbackFunc cb, void* lpParam, ProductInfo* productInfo ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1399,12 +1399,12 @@ void SonyCommerce_Vita::Checkout( CallbackFunc cb, LPVOID lpParam, ProductInfo* LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Vita::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_Vita::Checkout( CallbackFunc cb, void* lpParam, const char* skuID ) { assert(0); } -void SonyCommerce_Vita::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_Vita::DownloadAlreadyPurchased( CallbackFunc cb, void* lpParam, const char* skuID ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1414,7 +1414,7 @@ void SonyCommerce_Vita::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpPara LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Vita::Checkout_Game( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_Vita::Checkout_Game( CallbackFunc cb, void* lpParam, const char* skuID ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1423,7 +1423,7 @@ void SonyCommerce_Vita::Checkout_Game( CallbackFunc cb, LPVOID lpParam, const ch m_messageQueue.push(e_message_commerceCheckout_Game); LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Vita::DownloadAlreadyPurchased_Game( CallbackFunc cb, LPVOID lpParam, const char* skuID ) +void SonyCommerce_Vita::DownloadAlreadyPurchased_Game( CallbackFunc cb, void* lpParam, const char* skuID ) { EnterCriticalSection(&m_queueLock); setCallback(cb,lpParam); @@ -1433,7 +1433,7 @@ void SonyCommerce_Vita::DownloadAlreadyPurchased_Game( CallbackFunc cb, LPVOID l LeaveCriticalSection(&m_queueLock); } -void SonyCommerce_Vita::InstallContent( CallbackFunc cb, LPVOID lpParam ) +void SonyCommerce_Vita::InstallContent( CallbackFunc cb, void* lpParam ) { if(m_callbackFunc == NULL && m_messageQueue.size() == 0) // wait till other processes have finished { @@ -1472,7 +1472,7 @@ std::vector g_productInfo; SonyCommerce::CategoryInfo g_categoryInfo2; SonyCommerce::ProductInfoDetailed g_productInfoDetailed; -void testCallback(LPVOID lpParam, int error_code) +void testCallback(void* lpParam, int error_code) { app.DebugPrintf("Callback hit, error 0x%08x\n", error_code); } @@ -1516,4 +1516,4 @@ void SonyCommerce_Vita::Test() } } -*/ \ No newline at end of file +*/ diff --git a/Minecraft.Client/Platform/PSVita/Network/SonyCommerce_Vita.h b/Minecraft.Client/Platform/PSVita/Network/SonyCommerce_Vita.h index 64b1d6a46..835f7fef9 100644 --- a/Minecraft.Client/Platform/PSVita/Network/SonyCommerce_Vita.h +++ b/Minecraft.Client/Platform/PSVita/Network/SonyCommerce_Vita.h @@ -88,7 +88,7 @@ class SonyCommerce_Vita : public SonyCommerce // static SceNpCommerce2SessionInfo m_sessionInfo; static State m_state; static int m_errorCode; - static LPVOID m_callbackParam; + static void* m_callbackParam; static Event m_event; static Message m_message; // static uint32_t m_requestID; @@ -107,7 +107,7 @@ class SonyCommerce_Vita : public SonyCommerce static bool m_bUpgradingTrial; static C4JThread* m_tickThread; static CallbackFunc m_trialUpgradeCallbackFunc; - static LPVOID m_trialUpgradeCallbackParam; + static void* m_trialUpgradeCallbackParam; static CRITICAL_SECTION m_queueLock; static bool m_bLicenseInstalled; static bool m_bDownloadsPending; @@ -126,7 +126,7 @@ class SonyCommerce_Vita : public SonyCommerce func(m_callbackParam, m_errorCode); m_errorCode = SCE_OK; } - static void setCallback(CallbackFunc cb,LPVOID lpParam) + static void setCallback(CallbackFunc cb, void* lpParam) { assert(m_callbackFunc == NULL); m_callbackFunc = cb; @@ -158,14 +158,14 @@ class SonyCommerce_Vita : public SonyCommerce static int checkout_game(CheckoutInputParams ¶ms); static int downloadList_game(DownloadListInputParams ¶ms); static int installContent(); - static void UpgradeTrialCallback1(LPVOID lpParam,int err); - static void UpgradeTrialCallback2(LPVOID lpParam,int err); + static void UpgradeTrialCallback1(void* lpParam,int err); + static void UpgradeTrialCallback2(void* lpParam,int err); static void Delete(); static void copyCategoryInfo(CategoryInfo *pInfo, sce::Toolkit::NP::CategoryInfo *pNPInfo); static void copyProductList(std::vector* pProductList, std::vector* pNPProductList); static void copyDetailedProductInfo(ProductInfoDetailed *pInfo, sce::Toolkit::NP::ProductInfoDetailed* pNPInfo); static void copyAddDetailedProductInfo(ProductInfo *pInfo, sce::Toolkit::NP::ProductInfoDetailed* pNPInfo); - static void InstallContentCallback(LPVOID lpParam,int err); + static void InstallContentCallback(void* lpParam,int err); static int commerceEnd(); // static int upgradeTrial(); @@ -176,25 +176,25 @@ class SonyCommerce_Vita : public SonyCommerce static void Init(); static int Shutdown(); - static void CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion); + static void CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion); public: static void checkBackgroundDownloadStatus(); - virtual void CreateSession(CallbackFunc cb, LPVOID lpParam); + virtual void CreateSession(CallbackFunc cb, void* lpParam); virtual void CloseSession(); - virtual void GetCategoryInfo(CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId); - virtual void GetProductList(CallbackFunc cb, LPVOID lpParam, std::vector* productList, const char *categoryId); - virtual void GetDetailedProductInfo(CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId); - virtual void AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ); - virtual void Checkout(CallbackFunc cb, LPVOID lpParam, const char* skuID); - virtual void Checkout(CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo); - virtual void DownloadAlreadyPurchased(CallbackFunc cb, LPVOID lpParam, const char* skuID); - virtual void Checkout_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID); - virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID); - static void InstallContent(CallbackFunc cb, LPVOID lpParam); - virtual void UpgradeTrial(CallbackFunc cb, LPVOID lpParam); + virtual void GetCategoryInfo(CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId); + virtual void GetProductList(CallbackFunc cb, void* lpParam, std::vector* productList, const char *categoryId); + virtual void GetDetailedProductInfo(CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId); + virtual void AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ); + virtual void Checkout(CallbackFunc cb, void* lpParam, const char* skuID); + virtual void Checkout(CallbackFunc cb, void* lpParam, ProductInfo* productInfo); + virtual void DownloadAlreadyPurchased(CallbackFunc cb, void* lpParam, const char* skuID); + virtual void Checkout_Game(CallbackFunc cb, void* lpParam, const char* skuID); + virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, void* lpParam, const char* skuID); + static void InstallContent(CallbackFunc cb, void* lpParam); + virtual void UpgradeTrial(CallbackFunc cb, void* lpParam); virtual void CheckForTrialUpgradeKey(); virtual bool LicenseChecked(); From ff592ca6a16a55882426670448455d56e0207f0d Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:44:08 +1100 Subject: [PATCH 06/24] Remove WinAPI types from tutorial helpers --- .../Common/Tutorial/ChangeStateConstraint.cpp | 4 ++-- .../Common/Tutorial/ChangeStateConstraint.h | 8 +++++--- .../Platform/Common/Tutorial/Tutorial.h | 6 ++++-- .../Platform/Common/Tutorial/TutorialEnum.h | 14 ++++++++------ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp index f528f3ef6..ea49e929a 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp +++ b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp @@ -9,7 +9,7 @@ #include "../../Minecraft.Client/Network/ClientConnection.h" #include "../../Minecraft.World/Headers/net.minecraft.network.packet.h" -ChangeStateConstraint::ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], DWORD sourceStatesCount, +ChangeStateConstraint::ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], std::size_t sourceStatesCount, double x0, double y0, double z0, double x1, double y1, double z1, bool contains /*= true*/, bool changeGameMode /*= false*/, GameType *targetGameMode /*= 0*/ ) : TutorialConstraint( -1 ) { @@ -73,7 +73,7 @@ void ChangeStateConstraint::tick(int iPad) bool inASourceState = false; Minecraft *minecraft = Minecraft::GetInstance(); - for(DWORD i = 0; i < m_sourceStatesCount; ++i) + for(std::size_t i = 0; i < m_sourceStatesCount; ++i) { if(m_sourceStates[i] == m_tutorial->getCurrentState()) { diff --git a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.h b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.h index 2156870d4..9388210c9 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.h +++ b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.h @@ -3,6 +3,8 @@ #include "TutorialEnum.h" #include "TutorialConstraint.h" +#include + class AABB; class Tutorial; class GameType; @@ -18,7 +20,7 @@ private: eTutorial_State m_targetState; eTutorial_State *m_sourceStates; - DWORD m_sourceStatesCount; + std::size_t m_sourceStatesCount; bool m_bHasChanged; eTutorial_State m_changedFromState; @@ -30,8 +32,8 @@ private: public: virtual ConstraintType getType() { return e_ConstraintChangeState; } - ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], DWORD sourceStatesCount, double x0, double y0, double z0, double x1, double y1, double z1, bool contains = true, bool changeGameMode = false, GameType *targetGameMode = NULL ); + ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], std::size_t sourceStatesCount, double x0, double y0, double z0, double x1, double y1, double z1, bool contains = true, bool changeGameMode = false, GameType *targetGameMode = NULL ); ~ChangeStateConstraint(); virtual void tick(int iPad); -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h b/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h index 5e9aaaad1..af0fdca19 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h +++ b/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h @@ -6,6 +6,8 @@ #include "TutorialMessage.h" #include "TutorialEnum.h" +#include + // #define TUTORIAL_HINT_DELAY_TIME 14000 // How long we should wait from displaying one hint to the next // #define TUTORIAL_DISPLAY_MESSAGE_TIME 7000 // #define TUTORIAL_MINIMUM_DISPLAY_MESSAGE_TIME 2000 @@ -93,8 +95,8 @@ protected: //D3DXVECTOR3 m_OriginalPosition; public: - DWORD lastMessageTime; - DWORD m_lastHintDisplayedTime; + std::uint32_t lastMessageTime; + std::uint32_t m_lastHintDisplayedTime; private: PopupMessageDetails *m_lastMessage; diff --git a/Minecraft.Client/Platform/Common/Tutorial/TutorialEnum.h b/Minecraft.Client/Platform/Common/Tutorial/TutorialEnum.h index 33f2e67d4..69497ef02 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/TutorialEnum.h +++ b/Minecraft.Client/Platform/Common/Tutorial/TutorialEnum.h @@ -1,14 +1,16 @@ #pragma once +#include + typedef struct { - WORD index; - DWORD diffsSize; - BYTE *diffs; - DWORD lastByteChanged; + std::uint16_t index; + std::uint32_t diffsSize; + std::uint8_t *diffs; + std::uint32_t lastByteChanged; } TutorialDiff_Chunk; typedef struct { - DWORD diffCount; + std::uint32_t diffCount; TutorialDiff_Chunk *diffs; } TutorialDiff_File; @@ -326,4 +328,4 @@ enum eTutorial_CompletionAction e_Tutorial_Completion_Complete_State, // This will make the current tutorial state complete e_Tutorial_Completion_Complete_State_Gameplay_Constraints, // This will make the current tutorial state complete, and move the delayed constraints to the gameplay state e_Tutorial_Completion_Jump_To_Last_Task, -}; \ No newline at end of file +}; From 9abfbb0c670693b3a6e6c35f6e1c8d0d36c45c3a Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:46:51 +1100 Subject: [PATCH 07/24] Remove WinAPI types from common telemetry helpers --- .../Common/Telemetry/TelemetryManager.cpp | 116 +++++++++--------- .../Common/Telemetry/TelemetryManager.h | 32 ++--- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.cpp b/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.cpp index 058bf9fc9..b89193002 100644 --- a/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.cpp +++ b/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.cpp @@ -146,9 +146,9 @@ Title needs to track this and report it as a property. These times will be used to create timelines and understand durations. This should be tracked independently of saved games (restoring a save should not reset the seconds since initialize) */ -INT CTelemetryManager::GetSecondsSinceInitialize() +int CTelemetryManager::GetSecondsSinceInitialize() { - return (INT)(app.getAppTime() - m_initialiseTime); + return static_cast(app.getAppTime() - m_initialiseTime); } /* @@ -159,27 +159,27 @@ The intent is to allow teams to capture data on the highest level categories of For example, a game mode could be the name of the specific mini game (eg: golf vs darts) or a specific multiplayer mode (eg: hoard vs beast.) ModeID = 0 means undefined or unknown. The intent is to answer the question "How are players playing your game?" */ -INT CTelemetryManager::GetMode(DWORD dwUserId) +int CTelemetryManager::GetMode(int userId) { - INT mode = (INT)eTelem_ModeId_Undefined; + int mode = static_cast(eTelem_ModeId_Undefined); Minecraft *pMinecraft = Minecraft::GetInstance(); - if( pMinecraft->localplayers[dwUserId] != NULL && pMinecraft->localplayers[dwUserId]->level != NULL && pMinecraft->localplayers[dwUserId]->level->getLevelData() != NULL ) + if( pMinecraft->localplayers[userId] != NULL && pMinecraft->localplayers[userId]->level != NULL && pMinecraft->localplayers[userId]->level->getLevelData() != NULL ) { - GameType *gameType = pMinecraft->localplayers[dwUserId]->level->getLevelData()->getGameType(); + GameType *gameType = pMinecraft->localplayers[userId]->level->getLevelData()->getGameType(); if (gameType->isSurvival()) { - mode = (INT)eTelem_ModeId_Survival; + mode = static_cast(eTelem_ModeId_Survival); } else if (gameType->isCreative()) { - mode = (INT)eTelem_ModeId_Creative; + mode = static_cast(eTelem_ModeId_Creative); } else { - mode = (INT)eTelem_ModeId_Undefined; + mode = static_cast(eTelem_ModeId_Undefined); } } return mode; @@ -192,17 +192,17 @@ For titles that have sub-modes (Sports/Football). Mode is always an indicator of "How is the player choosing to play my game?" so these do not have to be consecutive. LevelIDs and SubLevelIDs can be reused as they will always be paired with a Mode/SubModeID, Mode should be unique - SubMode can be shared between modes. */ -INT CTelemetryManager::GetSubMode(DWORD dwUserId) +int CTelemetryManager::GetSubMode(int userId) { - INT subMode = (INT)eTelem_SubModeId_Undefined; + int subMode = static_cast(eTelem_SubModeId_Undefined); if(Minecraft::GetInstance()->isTutorial()) { - subMode = (INT)eTelem_SubModeId_Tutorial; + subMode = static_cast(eTelem_SubModeId_Tutorial); } else { - subMode = (INT)eTelem_SubModeId_Normal; + subMode = static_cast(eTelem_SubModeId_Normal); } return subMode; @@ -216,11 +216,11 @@ The intent is that level start and ends do not occur more than every 2 minutes o Levels are unique only within a given modeID - so you can have a ModeID =1, LevelID =1 and a different ModeID=2, LevelID = 1 indicate two completely different levels. LevelID = 0 means undefined or unknown. */ -INT CTelemetryManager::GetLevelId(DWORD dwUserId) +int CTelemetryManager::GetLevelId(int userId) { - INT levelId = (INT)eTelem_LevelId_Undefined; + int levelId = static_cast(eTelem_LevelId_Undefined); - levelId = (INT)eTelem_LevelId_PlayerGeneratedLevel; + levelId = static_cast(eTelem_LevelId_PlayerGeneratedLevel); return levelId; } @@ -231,24 +231,24 @@ For titles that have sub-levels. Level is always an indicator of "How far has the player progressed." so when possible these should be consecutive or at least monotonically increasing. LevelIDs and SubLevelIDs can be reused as they will always be paired with a Mode/SubModeID */ -INT CTelemetryManager::GetSubLevelId(DWORD dwUserId) +int CTelemetryManager::GetSubLevelId(int userId) { - INT subLevelId = (INT)eTelem_SubLevelId_Undefined; + int subLevelId = static_cast(eTelem_SubLevelId_Undefined); Minecraft *pMinecraft = Minecraft::GetInstance(); - if(pMinecraft->localplayers[dwUserId] != NULL) + if(pMinecraft->localplayers[userId] != NULL) { - switch(pMinecraft->localplayers[dwUserId]->dimension) + switch(pMinecraft->localplayers[userId]->dimension) { case 0: - subLevelId = (INT)eTelem_SubLevelId_Overworld; + subLevelId = static_cast(eTelem_SubLevelId_Overworld); break; case -1: - subLevelId = (INT)eTelem_SubLevelId_Nether; + subLevelId = static_cast(eTelem_SubLevelId_Nether); break; case 1: - subLevelId = (INT)eTelem_SubLevelId_End; + subLevelId = static_cast(eTelem_SubLevelId_End); break; }; } @@ -260,9 +260,9 @@ INT CTelemetryManager::GetSubLevelId(DWORD dwUserId) Build version of the title, used to track changes in development as well as patches/title updates Allows developer to separate out stats from different builds */ -INT CTelemetryManager::GetTitleBuildId() +int CTelemetryManager::GetTitleBuildId() { - return (INT)VER_PRODUCTBUILD; + return static_cast(VER_PRODUCTBUILD); } /* @@ -270,32 +270,32 @@ Generated by the game every time LevelStart or LevelResume is called. This should be a unique ID (can be sequential) within a session. Helps differentiate level attempts when a play plays the same mode/level - especially with aggregated stats */ -INT CTelemetryManager::GetLevelInstanceID() +int CTelemetryManager::GetLevelInstanceID() { - return (INT)m_levelInstanceID; + return m_levelInstanceID; } /* MultiplayerinstanceID is a title-generated value that is the same for all players in the same multiplayer session. Link up players into a single multiplayer session ID. */ -INT CTelemetryManager::GetMultiplayerInstanceID() +int CTelemetryManager::GetMultiplayerInstanceID() { return m_multiplayerInstanceID; } -INT CTelemetryManager::GenerateMultiplayerInstanceId() +int CTelemetryManager::GenerateMultiplayerInstanceId() { #if defined(_DURANGO) || defined(_XBOX) FILETIME SystemTimeAsFileTime; GetSystemTimeAsFileTime( &SystemTimeAsFileTime ); - return *((INT *)&SystemTimeAsFileTime.dwLowDateTime); + return static_cast(SystemTimeAsFileTime.dwLowDateTime); #else return 0; #endif } -void CTelemetryManager::SetMultiplayerInstanceId(INT value) +void CTelemetryManager::SetMultiplayerInstanceId(int value) { m_multiplayerInstanceID = value; } @@ -304,9 +304,9 @@ void CTelemetryManager::SetMultiplayerInstanceId(INT value) Indicates whether the game is being played in single or multiplayer mode and whether multiplayer is being played locally or over live. How social is your game? How do people play it? */ -INT CTelemetryManager::GetSingleOrMultiplayer() +int CTelemetryManager::GetSingleOrMultiplayer() { - INT singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Undefined; + int singleOrMultiplayer = static_cast(eSen_SingleOrMultiplayer_Undefined); // Unused //eSen_SingleOrMultiplayer_Single_Player @@ -314,19 +314,19 @@ INT CTelemetryManager::GetSingleOrMultiplayer() if(app.GetLocalPlayerCount() == 1 && g_NetworkManager.GetOnlinePlayerCount() == 0) { - singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Single_Player; + singleOrMultiplayer = static_cast(eSen_SingleOrMultiplayer_Single_Player); } else if(app.GetLocalPlayerCount() > 1 && g_NetworkManager.GetOnlinePlayerCount() == 0) { - singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Local; + singleOrMultiplayer = static_cast(eSen_SingleOrMultiplayer_Multiplayer_Local); } else if(app.GetLocalPlayerCount() == 1 && g_NetworkManager.GetOnlinePlayerCount() > 0) { - singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Live; + singleOrMultiplayer = static_cast(eSen_SingleOrMultiplayer_Multiplayer_Live); } else if(app.GetLocalPlayerCount() > 1 && g_NetworkManager.GetOnlinePlayerCount() > 0) { - singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Both_Local_and_Live; + singleOrMultiplayer = static_cast(eSen_SingleOrMultiplayer_Multiplayer_Both_Local_and_Live); } return singleOrMultiplayer; @@ -336,23 +336,23 @@ INT CTelemetryManager::GetSingleOrMultiplayer() An in-game setting that differentiates the challenge imposed on the user. Normalized to a standard 5-point scale. Are players changing the difficulty? */ -INT CTelemetryManager::GetDifficultyLevel(INT diff) +int CTelemetryManager::GetDifficultyLevel(int diff) { - INT difficultyLevel = (INT)eSen_DifficultyLevel_Undefined; + int difficultyLevel = static_cast(eSen_DifficultyLevel_Undefined); switch(diff) { case 0: - difficultyLevel = (INT)eSen_DifficultyLevel_Easiest; + difficultyLevel = static_cast(eSen_DifficultyLevel_Easiest); break; case 1: - difficultyLevel = (INT)eSen_DifficultyLevel_Easier; + difficultyLevel = static_cast(eSen_DifficultyLevel_Easier); break; case 2: - difficultyLevel = (INT)eSen_DifficultyLevel_Normal; + difficultyLevel = static_cast(eSen_DifficultyLevel_Normal); break; case 3: - difficultyLevel = (INT)eSen_DifficultyLevel_Harder; + difficultyLevel = static_cast(eSen_DifficultyLevel_Harder); break; } @@ -366,17 +366,17 @@ INT CTelemetryManager::GetDifficultyLevel(INT diff) Differentiates trial/demo from full purchased titles Is this a full title or demo? */ -INT CTelemetryManager::GetLicense() +int CTelemetryManager::GetLicense() { - INT license = eSen_License_Undefined; + int license = eSen_License_Undefined; if(ProfileManager.IsFullVersion()) { - license = (INT)eSen_License_Full_Purchased_Title; + license = static_cast(eSen_License_Full_Purchased_Title); } else { - license = (INT)eSen_License_Trial_or_Demo; + license = static_cast(eSen_License_Trial_or_Demo); } return license; } @@ -385,9 +385,9 @@ INT CTelemetryManager::GetLicense() This is intended to capture whether players played using default control scheme or customized the control scheme. Are players customizing your controls? */ -INT CTelemetryManager::GetDefaultGameControls() +int CTelemetryManager::GetDefaultGameControls() { - INT defaultGameControls = eSen_DefaultGameControls_Undefined; + int defaultGameControls = eSen_DefaultGameControls_Undefined; // Unused //eSen_DefaultGameControls_Custom_controls @@ -401,25 +401,25 @@ INT CTelemetryManager::GetDefaultGameControls() Are players changing default audio settings? This is intended to capture whether players are playing with or without volume and whether they make changes from the default audio settings. */ -INT CTelemetryManager::GetAudioSettings(DWORD dwUserId) +int CTelemetryManager::GetAudioSettings(int userId) { - INT audioSettings = (INT)eSen_AudioSettings_Undefined; + int audioSettings = static_cast(eSen_AudioSettings_Undefined); - if(dwUserId == ProfileManager.GetPrimaryPad()) + if(userId == ProfileManager.GetPrimaryPad()) { - BYTE volume = app.GetGameSettings(dwUserId,eGameSetting_SoundFXVolume); + unsigned char volume = app.GetGameSettings(userId, eGameSetting_SoundFXVolume); if(volume == 0) { - audioSettings = (INT)eSen_AudioSettings_Off; + audioSettings = static_cast(eSen_AudioSettings_Off); } else if(volume == DEFAULT_VOLUME_LEVEL) { - audioSettings = (INT)eSen_AudioSettings_On_Default; + audioSettings = static_cast(eSen_AudioSettings_On_Default); } else { - audioSettings = (INT)eSen_AudioSettings_On_CustomSetting; + audioSettings = static_cast(eSen_AudioSettings_On_CustomSetting); } } return audioSettings; @@ -431,7 +431,7 @@ For example, a performance metric could points earned, race time, total kills, e This is entirely up to you and will help us understand how well the player performed, or how far the player progressed  in the level before exiting. How far did users progress before failing/exiting the level? */ -INT CTelemetryManager::GetLevelExitProgressStat1() +int CTelemetryManager::GetLevelExitProgressStat1() { // 4J Stu - Unused return 0; @@ -443,7 +443,7 @@ For example, a performance metric could points earned, race time, total kills, e This is entirely up to you and will help us understand how well the player performed, or how far the player progressed  in the level before exiting. How far did users progress before failing/exiting the level? */ -INT CTelemetryManager::GetLevelExitProgressStat2() +int CTelemetryManager::GetLevelExitProgressStat2() { // 4J Stu - Unused return 0; diff --git a/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.h b/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.h index 8c7cee1c5..03d21cfa6 100644 --- a/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.h +++ b/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.h @@ -50,24 +50,24 @@ protected: float m_fLevelStartTime[XUSER_MAX_COUNT]; - INT m_multiplayerInstanceID; - DWORD m_levelInstanceID; + int m_multiplayerInstanceID; + int m_levelInstanceID; // Helper functions to get the various common settings - INT GetSecondsSinceInitialize(); - INT GetMode(DWORD dwUserId); - INT GetSubMode(DWORD dwUserId); - INT GetLevelId(DWORD dwUserId); - INT GetSubLevelId(DWORD dwUserId); - INT GetTitleBuildId(); - INT GetLevelInstanceID(); - INT GetSingleOrMultiplayer(); - INT GetDifficultyLevel(INT diff); - INT GetLicense(); - INT GetDefaultGameControls(); - INT GetAudioSettings(DWORD dwUserId); - INT GetLevelExitProgressStat1(); - INT GetLevelExitProgressStat2(); + int GetSecondsSinceInitialize(); + int GetMode(int userId); + int GetSubMode(int userId); + int GetLevelId(int userId); + int GetSubLevelId(int userId); + int GetTitleBuildId(); + int GetLevelInstanceID(); + int GetSingleOrMultiplayer(); + int GetDifficultyLevel(int diff); + int GetLicense(); + int GetDefaultGameControls(); + int GetAudioSettings(int userId); + int GetLevelExitProgressStat1(); + int GetLevelExitProgressStat2(); }; extern CTelemetryManager *TelemetryManager; From a2ddb7c2f085704d50e91fbcf2cc2fc557bfea6d Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:52:03 +1100 Subject: [PATCH 08/24] Remove WinAPI ints from network and save helpers --- .../Platform/Common/Consoles_App.cpp | 2 +- .../Common/Network/GameNetworkManager.cpp | 2 +- .../Network/PlatformNetworkManagerInterface.h | 2 +- .../Platform/Common/UI/UIScene_LoadMenu.cpp | 2 +- .../Platform/Common/XUI/XUI_LoadSettings.cpp | 2 +- .../Xbox/Network/PlatformNetworkManagerXbox.cpp | 16 +++++++++------- .../IO/Files/ConsoleSaveFileOriginal.cpp | 2 +- .../IO/Files/ConsoleSaveFileSplit.cpp | 2 +- .../Network/Packets/AddPlayerPacket.cpp | 2 +- 9 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Consoles_App.cpp b/Minecraft.Client/Platform/Common/Consoles_App.cpp index 26aa0419e..33d0f34f5 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.cpp +++ b/Minecraft.Client/Platform/Common/Consoles_App.cpp @@ -5709,7 +5709,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4 // results switched for this dialog if(result==C4JStorage::EMessage_ResultDecline) { - INT saveOrCheckpointId = 0; + int saveOrCheckpointId = 0; // Check they have the full texture pack if they are using one // 4J-PB - Is the player trying to save but they are using a trial texturepack ? diff --git a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp index 84cdf7740..2948e1297 100644 --- a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp @@ -342,7 +342,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, void *lpParamet else { // 4J Stu - Host needs to generate a unique multiplayer id for sentient telemetry reporting - INT multiplayerInstanceId = TelemetryManager->GenerateMultiplayerInstanceId(); + int multiplayerInstanceId = TelemetryManager->GenerateMultiplayerInstanceId(); TelemetryManager->SetMultiplayerInstanceId(multiplayerInstanceId); } TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected(); diff --git a/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerInterface.h b/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerInterface.h index e5987b525..6b9aa04bb 100644 --- a/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerInterface.h +++ b/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerInterface.h @@ -21,7 +21,7 @@ class CGameNetworkManager; typedef struct _SearchForGamesData { - DWORD sessionIDCount; + unsigned int sessionIDCount; XSESSION_SEARCHRESULT_HEADER *searchBuffer; XNQOS **ppQos; SessionID *sessionIDList; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp index db9c7c796..845d4b98f 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp @@ -1428,7 +1428,7 @@ int UIScene_LoadMenu::DeleteSaveDataReturned(void *pParam,bool bSuccess) // 4J Stu - Shared functionality that is the same whether we needed a quadrant sign-in or not void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, int localUsersMask) { - INT saveOrCheckpointId = 0; + int saveOrCheckpointId = 0; bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); TelemetryManager->RecordLevelResume(pClass->m_iPad, eSen_FriendOrMatch_Playing_With_Invited_Friends, eSen_CompeteOrCoop_Coop_and_Competitive, app.GetGameSettings(pClass->m_iPad,eGameSetting_Difficulty), app.GetLocalPlayerCount(), g_NetworkManager.GetOnlinePlayerCount(), saveOrCheckpointId); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp index f3bee23ca..b082709f5 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp @@ -940,7 +940,7 @@ int CScene_LoadGameSettings::DeviceRemovedDialogReturned(void *pParam,int iPad,C // 4J Stu - Shared functionality that is the same whether we needed a quadrant sign-in or not void CScene_LoadGameSettings::StartGameFromSave(CScene_LoadGameSettings* pClass, DWORD dwLocalUsersMask) { - INT saveOrCheckpointId = 0; + int saveOrCheckpointId = 0; bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); TelemetryManager->RecordLevelResume(pClass->m_iPad, eSen_FriendOrMatch_Playing_With_Invited_Friends, eSen_CompeteOrCoop_Coop_and_Competitive, app.GetGameSettings(pClass->m_iPad,eGameSetting_Difficulty), app.GetLocalPlayerCount(), g_NetworkManager.GetOnlinePlayerCount(), saveOrCheckpointId); diff --git a/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.cpp b/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.cpp index 58598cf17..158cbfe8c 100644 --- a/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.cpp +++ b/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.cpp @@ -1298,10 +1298,11 @@ void CPlatformNetworkManagerXbox::SearchForGames() return; } - DWORD sessionIDCount = std::min( XSESSION_SEARCH_MAX_IDS, friendsSessions[m_lastSearchPad].size() ); + unsigned int sessionIDCount = static_cast(std::min(XSESSION_SEARCH_MAX_IDS, friendsSessions[m_lastSearchPad].size())); + DWORD xboxSessionIDCount = sessionIDCount; SessionID *sessionIDList = new SessionID[sessionIDCount]; - for(DWORD i = 0; i < sessionIDCount; ++i) + for(unsigned int i = 0; i < sessionIDCount; ++i) { sessionIDList[i] = friendsSessions[m_lastSearchPad].at(i)->sessionId; } @@ -1313,7 +1314,7 @@ void CPlatformNetworkManagerXbox::SearchForGames() // size. dwStatus = XSessionSearchByIds( - sessionIDCount, + xboxSessionIDCount, sessionIDList, g_NetworkManager.GetPrimaryPad(), &cbResults, // Pass in the address of the size variable @@ -1344,7 +1345,7 @@ void CPlatformNetworkManagerXbox::SearchForGames() // this time use the modified buffer size and a pointer to a buffer that // matches it. dwStatus = XSessionSearchByIds( - sessionIDCount, + xboxSessionIDCount, sessionIDList, g_NetworkManager.GetPrimaryPad(), &cbResults, // Pass in the address of the size variable @@ -1388,12 +1389,13 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter ) { SearchForGamesData *threadData = (SearchForGamesData *)lpParameter; - DWORD sessionIDCount = threadData->sessionIDCount; + unsigned int sessionIDCount = threadData->sessionIDCount; + DWORD xboxSessionIDCount = sessionIDCount; XOVERLAPPED *pOverlapped = threadData->pOverlapped; DWORD dwStatus = ERROR_SUCCESS; - DWORD cbResults = sessionIDCount; + DWORD cbResults = xboxSessionIDCount; XSESSION_SEARCHRESULT_HEADER *pSearchResults = (XSESSION_SEARCHRESULT_HEADER *)threadData->searchBuffer; while( !XHasOverlappedIoCompleted(pOverlapped) ) @@ -1415,7 +1417,7 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter ) const XNKEY *QoSxnkey[XSESSION_SEARCH_MAX_IDS];// = new XNKEY*[sessionIDCount]; - for(DWORD i = 0; i < pSearchResults->dwSearchResults; ++i) + for(unsigned int i = 0; i < pSearchResults->dwSearchResults; ++i) { QoSxnaddr[i] = &pSearchResults->pResults[i].info.hostAddress; QoSxnkid[i] = &pSearchResults->pResults[i].info.sessionID; diff --git a/Minecraft.World/IO/Files/ConsoleSaveFileOriginal.cpp b/Minecraft.World/IO/Files/ConsoleSaveFileOriginal.cpp index d3030fdd4..e01f7d66a 100644 --- a/Minecraft.World/IO/Files/ConsoleSaveFileOriginal.cpp +++ b/Minecraft.World/IO/Files/ConsoleSaveFileOriginal.cpp @@ -775,7 +775,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail ) int iTextMetadataBytes = app.CreateImageTextData(bTextMetadata, seed, hasSeed, app.GetGameHostOption(eGameHostOption_All), Minecraft::GetInstance()->getCurrentTexturePackId()); - INT saveOrCheckpointId = 0; + int saveOrCheckpointId = 0; bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); TelemetryManager->RecordLevelSaveOrCheckpoint(ProfileManager.GetPrimaryPad(), saveOrCheckpointId, compLength+8); diff --git a/Minecraft.World/IO/Files/ConsoleSaveFileSplit.cpp b/Minecraft.World/IO/Files/ConsoleSaveFileSplit.cpp index 1c363bb48..9c0968ef9 100644 --- a/Minecraft.World/IO/Files/ConsoleSaveFileSplit.cpp +++ b/Minecraft.World/IO/Files/ConsoleSaveFileSplit.cpp @@ -1455,7 +1455,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) } - INT saveOrCheckpointId = 0; + int saveOrCheckpointId = 0; bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); TelemetryManager->RecordLevelSaveOrCheckpoint(ProfileManager.GetPrimaryPad(), saveOrCheckpointId, compLength+8); diff --git a/Minecraft.World/Network/Packets/AddPlayerPacket.cpp b/Minecraft.World/Network/Packets/AddPlayerPacket.cpp index 57c3a5214..8f28fca56 100644 --- a/Minecraft.World/Network/Packets/AddPlayerPacket.cpp +++ b/Minecraft.World/Network/Packets/AddPlayerPacket.cpp @@ -81,7 +81,7 @@ void AddPlayerPacket::read(DataInputStream *dis) //throws IOException m_playerIndex = dis->readByte(); m_skinId = static_cast(dis->readInt()); m_capeId = static_cast(dis->readInt()); - INT privileges = dis->readInt(); + int privileges = dis->readInt(); m_uiGamePrivileges = static_cast(privileges); MemSect(1); unpack = SynchedEntityData::unpack(dis); From 3e7a72c9d39f8dec2d0c60d2bd82dc75ec71e4b2 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:54:39 +1100 Subject: [PATCH 09/24] Remove remaining primitive locals from system helpers --- .../Common/Network/Sony/PlatformNetworkManagerSony.cpp | 8 ++++---- Minecraft.World/Platform/System.h | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Network/Sony/PlatformNetworkManagerSony.cpp b/Minecraft.Client/Platform/Common/Network/Sony/PlatformNetworkManagerSony.cpp index 27ef1cf7e..abb1116fb 100644 --- a/Minecraft.Client/Platform/Common/Network/Sony/PlatformNetworkManagerSony.cpp +++ b/Minecraft.Client/Platform/Common/Network/Sony/PlatformNetworkManagerSony.cpp @@ -712,7 +712,7 @@ bool CPlatformNetworkManagerSony::LeaveGame(bool bMigrateHost) if( socket != NULL ) { //printf("Waiting for socket closed event\n"); - DWORD result = socket->m_socketClosedEvent->WaitForSignal(INFINITE); + socket->m_socketClosedEvent->WaitForSignal(INFINITE); // The session might be gone once the socket releases if( IsInSession() ) @@ -1185,9 +1185,9 @@ bool CPlatformNetworkManagerSony::GetGameSessionInfo(int iPad, SessionID session if( m_currentSearchResultsCount[iPad] > 0 ) { // Loop through all the results. - for( DWORD dwResult = 0; dwResult < m_currentSearchResultsCount[iPad]; dwResult++ ) + for( int resultIndex = 0; resultIndex < m_currentSearchResultsCount[iPad]; ++resultIndex ) { - pSearchResult = &m_pCurrentSearchResults[iPad]->pResults[dwResult]; + pSearchResult = &m_pCurrentSearchResults[iPad]->pResults[resultIndex]; if(memcmp( &pSearchResult->info.sessionID, &sessionId, sizeof(SessionID) ) != 0) continue; @@ -1211,7 +1211,7 @@ bool CPlatformNetworkManagerSony::GetGameSessionInfo(int iPad, SessionID session if(!foundSession) break; // See if this result was contacted successfully via QoS probes. - pxnqi = &m_pCurrentQoSResult[iPad]->axnqosinfo[dwResult]; + pxnqi = &m_pCurrentQoSResult[iPad]->axnqosinfo[resultIndex]; if( pxnqi->bFlags & XNET_XNQOSINFO_TARGET_CONTACTED ) { diff --git a/Minecraft.World/Platform/System.h b/Minecraft.World/Platform/System.h index 5fc24dd51..b42b94682 100644 --- a/Minecraft.World/Platform/System.h +++ b/Minecraft.World/Platform/System.h @@ -1,5 +1,6 @@ #pragma once +#include #include "../Util/ArrayWithLength.h" @@ -35,5 +36,5 @@ public: }; #define MAKE_FOURCC(ch0, ch1, ch2, ch3) \ - ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ - ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) + (static_cast(static_cast(ch0)) | (static_cast(static_cast(ch1)) << 8) | \ + (static_cast(static_cast(ch2)) << 16) | (static_cast(static_cast(ch3)) << 24)) From 3e25aa58e5958735a68579ceddb8ba6fb55b58a3 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:58:33 +1100 Subject: [PATCH 10/24] Remove WinAPI types from XUI teleport --- Minecraft.Client/Platform/Common/XUI/XUI_Teleport.cpp | 6 +++--- Minecraft.Client/Platform/Common/XUI/XUI_Teleport.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Teleport.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Teleport.cpp index fc1a5195d..82b082008 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Teleport.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Teleport.cpp @@ -44,10 +44,10 @@ HRESULT CScene_Teleport::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } - DWORD playerCount = g_NetworkManager.GetPlayerCount(); + int playerCount = g_NetworkManager.GetPlayerCount(); m_playersCount = 0; - for(DWORD i = 0; i < playerCount; ++i) + for(int i = 0; i < playerCount; ++i) { INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i ); @@ -309,4 +309,4 @@ HRESULT CScene_Teleport::OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& { bHandled=true; return app.AdjustSplitscreenScene_PlayerChanged(m_hObj,&m_OriginalPosition,m_iPad,bJoining); -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Teleport.h b/Minecraft.Client/Platform/Common/XUI/XUI_Teleport.h index 49543af61..a3916723c 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Teleport.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Teleport.h @@ -1,5 +1,7 @@ #pragma once //using namespace std; +#include + #include "../media/xuiscene_teleportmenu.h" #include "XUI_CustomMessages.h" @@ -60,5 +62,5 @@ private: bool m_teleportToPlayer; int m_playersCount; - BYTE m_players[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's + std::uint8_t m_players[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's }; From 1e789f55a5f0a5db267c517e5c5ca415c21dfbed Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:00:17 +1100 Subject: [PATCH 11/24] Remove WinAPI index types from XUI skin select --- .../Platform/Common/XUI/XUI_SkinSelect.cpp | 30 +++++++++---------- .../Platform/Common/XUI/XUI_SkinSelect.h | 18 ++++++----- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp index 319345e0d..cdc88e27b 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp @@ -58,7 +58,7 @@ HRESULT CScene_SkinSelect::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) m_packRight.SetEnable(FALSE); - for(BYTE i = 0; i < sidePreviewControls; ++i) + for(int i = 0; i < sidePreviewControls; ++i) { //m_previewNextControl->SetAutoRotate(true); m_previewNextControls[i]->SetFacing(CXuiCtrlMinecraftSkinPreview::e_SkinPreviewFacing_Left); @@ -403,7 +403,7 @@ HRESULT CScene_SkinSelect::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle { ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode); CXuiSceneBase::PlayUISFX(eSFX_Scroll); - DWORD startingIndex = m_packIndex; + int startingIndex = m_packIndex; m_packIndex = getPreviousPackIndex(m_packIndex); if(startingIndex != m_packIndex) { @@ -440,7 +440,7 @@ HRESULT CScene_SkinSelect::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle { ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode); CXuiSceneBase::PlayUISFX(eSFX_Scroll); - DWORD startingIndex = m_packIndex; + int startingIndex = m_packIndex; m_packIndex = getNextPackIndex(m_packIndex); if(startingIndex != m_packIndex) { @@ -621,14 +621,14 @@ HRESULT CScene_SkinSelect::OnBasePositionChanged() void CScene_SkinSelect::handleSkinIndexChanged() { BOOL showPrevious = FALSE, showNext = FALSE; - DWORD previousIndex = 0, nextIndex = 0; + int previousIndex = 0, nextIndex = 0; std::wstring skinName = L""; std::wstring skinOrigin = L""; bool bSkinIsFree=false; bool bLicensed=false; DLCSkinFile *skinFile=NULL; DLCPack *Pack=NULL; - BYTE sidePreviewControlsL,sidePreviewControlsR; + int sidePreviewControlsL,sidePreviewControlsR; bool bNoSkinsToShow=false; TEXTURE_NAME backupTexture = TN_MOB_CHAR; @@ -778,7 +778,7 @@ void CScene_SkinSelect::handleSkinIndexChanged() wchar_t chars[256]; // turn off all displays - for(BYTE i = 0; i < sidePreviewControls; ++i) + for(int i = 0; i < sidePreviewControls; ++i) { m_previewNextControls[i]->SetShow(FALSE); m_previewPreviousControls[i]->SetShow(FALSE); @@ -816,7 +816,7 @@ void CScene_SkinSelect::handleSkinIndexChanged() sidePreviewControlsL=sidePreviewControlsR=sidePreviewControls; } - for(BYTE i = 0; i < sidePreviewControlsR; ++i) + for(int i = 0; i < sidePreviewControlsR; ++i) { if(showNext) { @@ -888,7 +888,7 @@ void CScene_SkinSelect::handleSkinIndexChanged() - for(BYTE i = 0; i < sidePreviewControlsL; ++i) + for(int i = 0; i < sidePreviewControlsL; ++i) { if(showPrevious) { @@ -1017,11 +1017,11 @@ void CScene_SkinSelect::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); + unsigned int ugcSkinIndex = GET_UGC_SKIN_ID_FROM_BITMASK(m_originalSkinId); + unsigned int defaultSkinIndex = GET_DEFAULT_SKIN_ID_FROM_BITMASK(m_originalSkinId); if( ugcSkinIndex == 0 ) { - m_skinIndex = (EDefaultSkins) defaultSkinIndex; + m_skinIndex = static_cast(defaultSkinIndex); } } break; @@ -1176,7 +1176,7 @@ TEXTURE_NAME CScene_SkinSelect::getTextureId(int skinIndex) return texture; } -int CScene_SkinSelect::getNextSkinIndex(DWORD sourceIndex) +int CScene_SkinSelect::getNextSkinIndex(int sourceIndex) { int nextSkin = sourceIndex; @@ -1210,7 +1210,7 @@ int CScene_SkinSelect::getNextSkinIndex(DWORD sourceIndex) return nextSkin; } -int CScene_SkinSelect::getPreviousSkinIndex(DWORD sourceIndex) +int CScene_SkinSelect::getPreviousSkinIndex(int sourceIndex) { int previousSkin = sourceIndex; switch(m_packIndex) @@ -1249,7 +1249,7 @@ int CScene_SkinSelect::getPreviousSkinIndex(DWORD sourceIndex) return previousSkin; } -int CScene_SkinSelect::getNextPackIndex(DWORD sourceIndex) +int CScene_SkinSelect::getNextPackIndex(int sourceIndex) { int nextPack = sourceIndex; ++nextPack; @@ -1261,7 +1261,7 @@ int CScene_SkinSelect::getNextPackIndex(DWORD sourceIndex) return nextPack; } -int CScene_SkinSelect::getPreviousPackIndex(DWORD sourceIndex) +int CScene_SkinSelect::getPreviousPackIndex(int sourceIndex) { int previousPack = sourceIndex; if(previousPack == SKIN_SELECT_PACK_DEFAULT) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.h b/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.h index acb6f435a..eb34733c2 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "../media/xuiscene_skinselect.h" #include "XUI_CustomMessages.h" #include "../../Minecraft.World/Util/Definitions.h" @@ -15,7 +17,7 @@ private: static WCHAR *wchDefaultNamesA[eDefaultSkins_Count]; // 4J Stu - How many to show on each side of the main control - static const BYTE sidePreviewControls = 4; + static constexpr int sidePreviewControls = 4; enum ESkinSelectNavigation { @@ -112,10 +114,10 @@ protected: std::wstring m_currentSkinPath, m_selectedSkinPath, m_selectedCapePath; std::vector *m_vAdditionalSkinBoxes; //std::vector *m_vAdditionalModelParts; - DWORD m_originalSkinId; + std::uint32_t m_originalSkinId; DLCPack *m_currentPack; - DWORD m_packIndex, m_skinIndex; + int m_packIndex, m_skinIndex; public: // Define the class. The class name must match the ClassOverride property @@ -129,11 +131,11 @@ private: void updateCurrentFocus(); TEXTURE_NAME getTextureId(int skinIndex); - int getNextSkinIndex(DWORD sourceIndex); - int getPreviousSkinIndex(DWORD sourceIndex); + int getNextSkinIndex(int sourceIndex); + int getPreviousSkinIndex(int sourceIndex); - int getNextPackIndex(DWORD sourceIndex); - int getPreviousPackIndex(DWORD sourceIndex); + int getNextPackIndex(int sourceIndex); + int getPreviousPackIndex(int sourceIndex); void updateClipping(); @@ -143,7 +145,7 @@ private: bool m_bSlidingSkins, m_bAnimatingMove; - DWORD currentPackCount; + int currentPackCount; ESkinSelectNavigation m_currentNavigation; bool m_bIgnoreInput; From 99d63ce7ecc0f382431b0c72aa5e6d2defc62b36 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:02:16 +1100 Subject: [PATCH 12/24] Remove WinAPI small-id types from XUI player flows --- .../Platform/Common/XUI/XUI_InGameInfo.cpp | 10 +++++----- Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.h | 4 +++- .../Platform/Common/XUI/XUI_InGamePlayerOptions.cpp | 6 +++--- Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.cpp | 4 ++-- Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.h | 8 +++++--- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.cpp index 4ccc70b92..c49a82675 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.cpp @@ -37,10 +37,10 @@ HRESULT CScene_InGameInfo::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } - DWORD playerCount = g_NetworkManager.GetPlayerCount(); + int playerCount = g_NetworkManager.GetPlayerCount(); m_playersCount = 0; - for(DWORD i = 0; i < playerCount; ++i) + for(int i = 0; i < playerCount; ++i) { INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i ); @@ -209,7 +209,7 @@ HRESULT CScene_InGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* else if(selectedPlayer->IsLocal() != TRUE && selectedPlayer->IsSameSystem(g_NetworkManager.GetHostPlayer()) != TRUE) { // Only ops will hit this, can kick anyone not local and not local to the host - BYTE *smallId = new BYTE(); + std::uint8_t *smallId = new std::uint8_t(); *smallId = m_players[playersList.GetCurSel()]; unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; @@ -520,7 +520,7 @@ HRESULT CScene_InGameInfo::OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL int CScene_InGameInfo::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMessageResult result) { - BYTE smallId = *(BYTE *)pParam; + std::uint8_t smallId = *static_cast(pParam); delete pParam; if(result==C4JStorage::EMessage_ResultAccept) @@ -534,4 +534,4 @@ int CScene_InGameInfo::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMes } return 0; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.h b/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.h index b0802e4c7..96d536a92 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_InGameInfo.h @@ -1,5 +1,7 @@ #pragma once //using namespace std; +#include + #include "../media/xuiscene_ingameinfo.h" #include "XUI_CustomMessages.h" @@ -74,7 +76,7 @@ private: D3DXVECTOR3 m_OriginalPosition; int m_playersCount; - BYTE m_players[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's + std::uint8_t m_players[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's bool m_bIgnoreKeyPresses; void updateTooltips(); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp index 77359391a..0c7a89edb 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp @@ -300,7 +300,7 @@ HRESULT CScene_InGamePlayerOptions::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINoti if( hObjPressed == m_buttonKick ) { - BYTE *smallId = new BYTE(); + std::uint8_t *smallId = new std::uint8_t(); *smallId = m_networkSmallId; unsigned int uiIDA[2]; uiIDA[0]=IDS_CONFIRM_OK; @@ -330,7 +330,7 @@ HRESULT CScene_InGamePlayerOptions::OnControlNavigate(XUIMessageControlNavigate int CScene_InGamePlayerOptions::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMessageResult result) { - BYTE smallId = *(BYTE *)pParam; + std::uint8_t smallId = *static_cast(pParam); delete pParam; if(result==C4JStorage::EMessage_ResultAccept) @@ -496,4 +496,4 @@ void CScene_InGamePlayerOptions::resetCheatCheckboxes() m_checkboxes[eControl_CheatTeleport].SetCheck( isModerator && (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanTeleport) != 0) ); } -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.cpp index dacb30cc4..0e60916ee 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.cpp @@ -11,7 +11,7 @@ #include "../../Minecraft.Client/Player/MultiPlayerLocalPlayer.h" #include "XUI_Scene_Win.h" -BYTE CScene_Win::s_winUserIndex = 0; +std::uint8_t CScene_Win::s_winUserIndex = 0; const float CScene_Win::AUTO_SCROLL_SPEED = 1.0f; const float CScene_Win::PLAYER_SCROLL_SPEED = 3.0f; @@ -299,4 +299,4 @@ HRESULT CScene_Win::OnNavForward(XUIMessageNavForward *pNavForwardData, BOOL& bH KillTimer(0); return S_OK; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.h b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.h index a498cd316..8cb177623 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Win.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "../media/xuiscene_Win.h" #include "XUI_CustomMessages.h" @@ -53,6 +55,6 @@ private: void updateNoise(); public: - static BYTE s_winUserIndex; - static void setWinUserIndex(BYTE winUserIndex) { s_winUserIndex = winUserIndex; } -}; \ No newline at end of file + static std::uint8_t s_winUserIndex; + static void setWinUserIndex(std::uint8_t winUserIndex) { s_winUserIndex = winUserIndex; } +}; From ad82b86701d0dbc0247c7f54fe010f837ed0600c Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:04:09 +1100 Subject: [PATCH 13/24] Remove WinAPI state types from XUI controls --- .../Platform/Common/XUI/XUI_Control_ComboBox.h | 6 +++--- Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.h | 4 ++-- .../Platform/Common/XUI/XUI_Ctrl_EnchantmentBook.h | 4 ++-- .../Platform/Common/XUI/XUI_Ctrl_MinecraftPlayer.h | 4 ++-- .../Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h | 6 +++--- .../Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.h | 8 ++++---- .../Platform/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h | 6 +++--- .../Platform/Common/XUI/XUI_Ctrl_SplashPulser.h | 4 ++-- Minecraft.Client/Platform/Common/XUI/XUI_CustomMessages.h | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Control_ComboBox.h b/Minecraft.Client/Platform/Common/XUI/XUI_Control_ComboBox.h index 28b611871..87138c5be 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Control_ComboBox.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Control_ComboBox.h @@ -10,8 +10,8 @@ public: LPCWSTR pwszText; LPCWSTR pwszImage; HXUIBRUSH hXuiBrush; - BOOL fChecked; - BOOL fEnabled; + bool fChecked; + bool fEnabled; } LIST_ITEM_INFO; @@ -50,4 +50,4 @@ protected: HRESULT OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData,BOOL& rfHandled); -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.h index 11bdd4564..0cd03b218 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.h @@ -17,8 +17,8 @@ public: LPCWSTR pwszText; LPCWSTR pwszImage; HXUIBRUSH hXuiBrush; - BOOL fChecked; - BOOL fEnabled; + bool fChecked; + bool fEnabled; bool bIsDamaged; // damaged save FILETIME fTime; int iData; // user data diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentBook.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentBook.h index 93f0239ea..c9685b569 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentBook.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentBook.h @@ -38,7 +38,7 @@ private: float flip, oFlip, flipT, flipA; float open, oOpen; - BOOL m_bDirty; + bool m_bDirty; float m_fScale,m_fAlpha; int m_iPad; CXuiSceneEnchant *m_containerScene; @@ -48,4 +48,4 @@ private: float m_fRawWidth,m_fRawHeight; void tickBook(); -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftPlayer.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftPlayer.h index 70692bfe9..4ae9275be 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftPlayer.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftPlayer.h @@ -31,7 +31,7 @@ protected: HRESULT OnRender(XUIMessageRender *pRenderData, BOOL &rfHandled); private: - BOOL m_bDirty; + bool m_bDirty; float m_fScale,m_fAlpha; int m_iPad; CXuiSceneInventory *m_containerScene; @@ -39,4 +39,4 @@ private: float m_fScreenWidth,m_fScreenHeight; float m_fRawWidth,m_fRawHeight; -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h index ccec743f3..91e734aa5 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h @@ -73,7 +73,7 @@ private: bool bindTexture(const std::wstring& urlTexture, int backupTexture); bool bindTexture(const std::wstring& urlTexture, const std::wstring& backupTexture); - BOOL m_bDirty; + bool m_bDirty; float m_fScale,m_fAlpha; std::wstring m_customTextureUrl; @@ -93,7 +93,7 @@ private: float m_walkAnimPos; bool m_bAutoRotate, m_bRotatingLeft; - BYTE m_rotateTick; + int m_rotateTick; float m_fTargetRotation, m_fOriginalRotation; int m_framesAnimatingRotation; bool m_bAnimatingToFacing; @@ -103,4 +103,4 @@ private: ESkinPreviewAnimations m_currentAnimation; //std::vector *m_pvAdditionalBoxes; std::vector *m_pvAdditionalModelParts; -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.h index 1f337f692..7c9aca131 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.h @@ -39,9 +39,9 @@ protected: private: std::shared_ptr m_item; - BOOL m_bDirty; - INT m_iPassThroughDataAssociation; - INT m_iPassThroughIdAssociation; + bool m_bDirty; + int m_iPassThroughDataAssociation; + int m_iPassThroughIdAssociation; float m_fScale,m_fAlpha; int m_iPad; int m_iID; @@ -56,4 +56,4 @@ private: ItemRenderer *m_pItemRenderer; static LPCWSTR xzpIcons[15]; -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h index c2423d829..f2a350ef5 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h @@ -24,7 +24,7 @@ class CXuiCtrlSlotItemCtrlBase { private: // 4J WESTY : Pointer Prototype : Added to support prototype only. - BOOL m_bSkipDefaultNavigation; + bool m_bSkipDefaultNavigation; public: // We define a lot of functions as virtual. These should be implemented to call the protected version by @@ -56,7 +56,7 @@ public: int GetObjectCount( HXUIOBJ hObj ); // 4J WESTY : Pointer Prototype : Added to support prototype only. - void SetSkipsDefaultNavigation( BOOL bSkipDefaultNavigation ) { m_bSkipDefaultNavigation = bSkipDefaultNavigation; } + void SetSkipsDefaultNavigation( bool bSkipDefaultNavigation ) { m_bSkipDefaultNavigation = bSkipDefaultNavigation; } // 4J WESTY : Pointer Prototype : Added to support prototype only. int GetEmptyStackSpace( HXUIOBJ hObj ); // Returns number of items that can still be stacked into this slot. @@ -75,4 +75,4 @@ protected: HRESULT OnControlNavigate(HXUIOBJ hObj, XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled); HRESULT OnKeyDown(HXUIOBJ hObj, XUIMessageInput *pInputData, BOOL& bHandled); -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SplashPulser.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SplashPulser.h index 959bb0e55..b8ba5cb77 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SplashPulser.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SplashPulser.h @@ -27,10 +27,10 @@ protected: HRESULT OnRender(XUIMessageRender *pRenderData, BOOL &rfHandled); private: - BOOL m_bDirty; + bool m_bDirty; float m_fScale,m_fAlpha; float m_fScreenWidth,m_fScreenHeight; float m_fRawWidth,m_fRawHeight; -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_CustomMessages.h b/Minecraft.Client/Platform/Common/XUI/XUI_CustomMessages.h index ae7a0fda3..03116b548 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_CustomMessages.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_CustomMessages.h @@ -20,7 +20,7 @@ typedef struct int iDataBitField; int iItemBitField; LPCWSTR szPath; - BOOL bDirty; + bool bDirty; } CustomMessage_GetSlotItem_Struct; From e45dfbeee6277117c308027c1b46b360d5f016c3 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:06:48 +1100 Subject: [PATCH 14/24] Remove WinAPI booleans from XUI scene locals --- .../Platform/Common/XUI/XUI_HelpControls.cpp | 8 ++++---- .../Platform/Common/XUI/XUI_SkinSelect.cpp | 7 ++++--- .../Platform/Common/XUI/XUI_SocialPost.cpp | 6 +++--- .../Platform/Common/XUI/XUI_TutorialPopup.cpp | 20 +++++++++---------- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_HelpControls.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_HelpControls.cpp index 06ddb4aa9..867a2171c 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_HelpControls.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_HelpControls.cpp @@ -196,10 +196,10 @@ HRESULT CScene_Controls::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) delete [] layoutString; // Set check box initial states. - BOOL bInvertLook = app.GetGameSettings(m_iPad,eGameSetting_ControlInvertLook); + bool bInvertLook = app.GetGameSettings(m_iPad,eGameSetting_ControlInvertLook) != 0; m_InvertLook.SetCheck( bInvertLook ); - BOOL bSouthPaw = app.GetGameSettings(m_iPad,eGameSetting_ControlSouthPaw); + bool bSouthPaw = app.GetGameSettings(m_iPad,eGameSetting_ControlSouthPaw) != 0; m_SouthPaw.SetCheck( bSouthPaw ); return S_OK; @@ -531,12 +531,12 @@ HRESULT CScene_Controls::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pN // Handle check box changes. if ( hObjPressed == m_InvertLook.m_hObj ) { - BOOL bIsChecked = m_InvertLook.IsChecked(); + bool bIsChecked = m_InvertLook.IsChecked() != FALSE; app.SetGameSettings(m_iPad,eGameSetting_ControlInvertLook,(unsigned char)( bIsChecked ) ); } else if ( hObjPressed == m_SouthPaw.m_hObj ) { - BOOL bIsChecked = m_SouthPaw.IsChecked(); + bool bIsChecked = m_SouthPaw.IsChecked() != FALSE; app.SetGameSettings(m_iPad,eGameSetting_ControlSouthPaw,(unsigned char)( bIsChecked ) ); PositionAllText(m_iPad); } diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp index cdc88e27b..493d812fd 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_SkinSelect.cpp @@ -620,7 +620,8 @@ HRESULT CScene_SkinSelect::OnBasePositionChanged() void CScene_SkinSelect::handleSkinIndexChanged() { - BOOL showPrevious = FALSE, showNext = FALSE; + bool showPrevious = false; + bool showNext = false; int previousIndex = 0, nextIndex = 0; std::wstring skinName = L""; std::wstring skinOrigin = L""; @@ -767,8 +768,8 @@ void CScene_SkinSelect::handleSkinIndexChanged() m_previewControl->SetTexture(m_selectedSkinPath, backupTexture); m_previewControl->SetCapeTexture(m_selectedCapePath); - showNext = TRUE; - showPrevious = TRUE; + showNext = true; + showPrevious = true; nextIndex = getNextSkinIndex(m_skinIndex); previousIndex = getPreviousSkinIndex(m_skinIndex); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_SocialPost.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_SocialPost.cpp index cb6d3f4a6..15d05661d 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_SocialPost.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_SocialPost.cpp @@ -51,7 +51,7 @@ HRESULT CScene_SocialPost::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) m_EditCaption.SetCaretPosition((int)wCaption.length()); m_EditDesc.SetCaretPosition((int)wDesc.length()); - BOOL bHasAllText = /*( wTitle.length()!=0) && */(wCaption.length()!=0) && (wDesc.length()!=0); + bool bHasAllText = /*( wTitle.length()!=0) && */(wCaption.length()!=0) && (wDesc.length()!=0); m_OK.SetEnable(bHasAllText); @@ -78,7 +78,7 @@ std::wstring wDesc = m_EditDesc.GetText(); std::wstring wCaption = m_EditCaption.GetText(); std::wstring wDesc = m_EditDesc.GetText(); - BOOL bHasAllText = /*( wTitle.length()!=0) &&*/ (wCaption.length()!=0) && (wDesc.length()!=0); + bool bHasAllText = /*( wTitle.length()!=0) &&*/ (wCaption.length()!=0) && (wDesc.length()!=0); m_OK.SetEnable(bHasAllText); } @@ -144,4 +144,4 @@ HRESULT CScene_SocialPost::OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL { bHandled=true; return app.AdjustSplitscreenScene_PlayerChanged(m_hObj,&m_OriginalPosition,m_iPad,bJoining,false); -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_TutorialPopup.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_TutorialPopup.cpp index 1b3d6298d..5544c0c92 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_TutorialPopup.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_TutorialPopup.cpp @@ -79,8 +79,8 @@ void CScene_TutorialPopup::UpdateInteractScenePosition(bool visible) HXUICLASS brewingClass = XuiFindClass( L"CXuiSceneBrewingStand" ); HXUICLASS anvilClass = XuiFindClass( L"CXuiSceneAnvil" ); HXUICLASS tradingClass = XuiFindClass( L"CXuiSceneTrading" ); - BOOL isCraftingScene = XuiClassDerivesFrom( sceneClass, craftingClass ); - BOOL isCreativeScene = XuiClassDerivesFrom( sceneClass, creativeInventoryClass ); + bool isCraftingScene = XuiClassDerivesFrom( sceneClass, craftingClass ) != FALSE; + bool isCreativeScene = XuiClassDerivesFrom( sceneClass, creativeInventoryClass ) != FALSE; switch(Minecraft::GetInstance()->localplayers[m_iPad]->m_iScreenSection) { @@ -115,7 +115,7 @@ void CScene_TutorialPopup::UpdateInteractScenePosition(bool visible) XuiClassDerivesFrom( sceneClass, anvilClass ) || XuiClassDerivesFrom( sceneClass, tradingClass ) || isCreativeScene || - isCraftingScene == TRUE ) + isCraftingScene ) { XuiElementGetTimeline( m_interactScene->m_hObj, &timeline); if(visible) @@ -194,7 +194,7 @@ HRESULT CScene_TutorialPopup::_SetDescription(CXuiScene *interactScene, LPCWSTR D3DXVECTOR3 titlePos; hr = XuiElementGetPosition( m_title, &titlePos ); - BOOL titleShowAtStart = m_title.IsShown(); + bool titleShowAtStart = m_title.IsShown() != FALSE; if( title != NULL && title[0] != 0 ) { m_title.SetText( title ); @@ -205,7 +205,7 @@ HRESULT CScene_TutorialPopup::_SetDescription(CXuiScene *interactScene, LPCWSTR m_title.SetText( L"" ); m_title.SetShow(FALSE); } - BOOL titleShowAtEnd = m_title.IsShown(); + bool titleShowAtEnd = m_title.IsShown() != FALSE; if(titleShowAtStart != titleShowAtEnd) { float fHeight, fWidth, fTitleHeight, fDescHeight, fDescWidth; @@ -284,7 +284,7 @@ std::wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, { std::wstring temp(desc); - BOOL iconShowAtStart = m_pCraftingPic->IsShown(); + bool iconShowAtStart = m_pCraftingPic->IsShown() != FALSE; if( icon != TUTORIAL_NO_ICON ) { @@ -411,7 +411,7 @@ std::wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, } } - BOOL iconShowAtEnd = m_pCraftingPic->IsShown(); + bool iconShowAtEnd = m_pCraftingPic->IsShown() != FALSE; if(iconShowAtStart != iconShowAtEnd) { float fHeight, fWidth, fIconHeight, fDescHeight, fDescWidth; @@ -439,7 +439,7 @@ std::wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, std::wstring CScene_TutorialPopup::_SetImage(std::wstring &desc) { - BOOL imageShowAtStart = m_image.IsShown(); + bool imageShowAtStart = m_image.IsShown() != FALSE; std::wstring openTag(L"{*IMAGE*}"); std::wstring closeTag(L"{*/IMAGE*}"); @@ -464,7 +464,7 @@ std::wstring CScene_TutorialPopup::_SetImage(std::wstring &desc) m_image.SetShow( FALSE ); } - BOOL imageShowAtEnd = m_image.IsShown(); + bool imageShowAtEnd = m_image.IsShown() != FALSE; if(imageShowAtStart != imageShowAtEnd) { float fHeight, fWidth, fIconHeight, fDescHeight, fDescWidth; @@ -600,4 +600,4 @@ bool CScene_TutorialPopup::IsSceneVisible(int iPad) isVisible = pThis->_IsSceneVisible(); } return isVisible; -} \ No newline at end of file +} From 7b39869e38187f312f560a2b12c3fea0202e686e Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:08:46 +1100 Subject: [PATCH 15/24] Remove WinAPI counts from XUI menu locals --- .../Platform/Common/XUI/XUI_LoadSettings.cpp | 10 +++++----- .../Platform/Common/XUI/XUI_MultiGameCreate.cpp | 12 ++++++------ .../Platform/Common/XUI/XUI_MultiGameInfo.cpp | 7 +++---- .../Common/XUI/XUI_MultiGameJoinLoad.cpp | 16 ++++++++-------- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp index b082709f5..df5493ddc 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_LoadSettings.cpp @@ -847,7 +847,7 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue) bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame; // 4J Stu - If we only have one controller connected, then don't show the sign-in UI again - DWORD connectedControllers = 0; + int connectedControllers = 0; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; @@ -872,7 +872,7 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue) } else { - DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); + unsigned int dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); // No guest problems so we don't need to force a sign-in of players here StartGameFromSave(pClass, dwLocalUsersMask); @@ -1007,7 +1007,7 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu // It's possible that the player has not signed in - they can back out if(ProfileManager.IsSignedIn(iPad)) { - DWORD dwLocalUsersMask = 0; + unsigned int dwLocalUsersMask = 0; bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame; bool noPrivileges = false; @@ -1397,7 +1397,7 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen) bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && m_MoreOptionsParams.bOnlineGame; // 4J Stu - If we only have one controller connected, then don't show the sign-in UI again - DWORD connectedControllers = 0; + int connectedControllers = 0; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; @@ -1423,7 +1423,7 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen) } } - DWORD dwLocalUsersMask = 0; + unsigned int dwLocalUsersMask = 0; dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); // Load data from disc diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameCreate.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameCreate.cpp index d1da94594..dcdf3e07c 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameCreate.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameCreate.cpp @@ -459,7 +459,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr else { // 4J Stu - If we only have one controller connected, then don't show the sign-in UI again - DWORD connectedControllers = 0; + int connectedControllers = 0; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; @@ -565,7 +565,7 @@ int CScene_MultiGameCreate::WarningTrialTexturePackReturned(void *pParam,int iPa // 4J Stu - If we only have one controller connected, then don't show the sign-in UI again - DWORD connectedControllers = 0; + int connectedControllers = 0; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; @@ -628,7 +628,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINot { // Enable the done button when we have all of the necessary information std::wstring wWorldName = m_EditWorldName.GetText(); - BOOL bHasWorldName = ( wWorldName.length()!=0); + bool bHasWorldName = ( wWorldName.length()!=0); m_NewWorld.SetEnable(bHasWorldName); } else if(hObjSource==m_SliderDifficulty.GetSlider() ) @@ -761,7 +761,7 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame; // 4J Stu - If we only have one controller connected, then don't show the sign-in UI again - DWORD connectedControllers = 0; + int connectedControllers = 0; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; @@ -815,7 +815,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue // It's possible that the player has not signed in - they can back out if(ProfileManager.IsSignedIn(iPad)) { - DWORD dwLocalUsersMask = 0; + unsigned int dwLocalUsersMask = 0; bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame; bool noPrivileges = false; @@ -889,7 +889,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw // Make our next save default to the name of the level StorageManager.SetSaveTitle((wchar_t *)wWorldName.c_str()); - BOOL bHasSeed = (pClass->m_EditSeed.GetText() != NULL); + bool bHasSeed = (pClass->m_EditSeed.GetText() != NULL); std::wstring wSeed; if(bHasSeed) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameInfo.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameInfo.cpp index 987467514..354ac9119 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameInfo.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameInfo.cpp @@ -149,7 +149,7 @@ HRESULT CScene_MultiGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPres m_bIgnoreInput=true; // 4J Stu - If we only have one controller connected, then don't show the sign-in UI again - DWORD connectedControllers = 0; + int connectedControllers = 0; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; @@ -258,9 +258,9 @@ int CScene_MultiGameInfo::StartGame_SignInReturned(void *pParam,bool bContinue, // Shared function to join the game that is the same whether we used the sign-in UI or not void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass) { - DWORD dwLocalUsersMask = 0; + unsigned int dwLocalUsersMask = 0; bool noPrivileges = false; - DWORD dwSignedInUsers = 0; + unsigned int dwSignedInUsers = 0; // if we're in SD mode, then only the primary player gets to play if(RenderManager.IsHiDef()) @@ -389,4 +389,3 @@ HRESULT CScene_MultiGameInfo::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled ) return S_OK; } - diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp index 68b0eee10..5f7c468b0 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp @@ -455,7 +455,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify { m_bIgnoreInput=true; - DWORD nIndex = m_pGamesList->GetCurSel(); + int nIndex = m_pGamesList->GetCurSel(); if( m_pGamesList->GetItemCount() > 0 && nIndex < currentSessions.size() ) { @@ -645,7 +645,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r case VK_PAD_Y: if(m_pGamesList->TreeHasFocus() && m_pGamesList->GetItemCount() > 0) { - DWORD nIndex = m_pGamesList->GetCurSel(); + int nIndex = m_pGamesList->GetCurSel(); FriendSessionInfo *pSelectedSession = currentSessions.at( nIndex ); PlayerUID xuid = pSelectedSession->data.hostPlayerUID; @@ -659,7 +659,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r if(ProfileManager.IsSignedInLive( m_iPad )) { // 4J-PB - required for a delete of the save if it's found to be a corrupted save - DWORD nIndex = m_pSavesList->GetCurSel(); + int nIndex = m_pSavesList->GetCurSel(); m_iChangingSaveGameInfoIndex=m_pSavesList->GetData(nIndex).iIndex; unsigned int uiIDA[2]; @@ -1133,7 +1133,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList() return; } - DWORD nIndex = -1; + int nIndex = -1; FriendSessionInfo *pSelectedSession = NULL; if(m_pGamesList->TreeHasFocus() && m_pGamesList->GetItemCount() > 0) { @@ -1216,7 +1216,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList() unsigned int xuiListSize = m_pGamesList->GetItemCount(); unsigned int filteredListSize = (unsigned int)currentSessions.size(); - BOOL gamesListHasFocus = m_pGamesList->TreeHasFocus(); + bool gamesListHasFocus = m_pGamesList->TreeHasFocus() != FALSE; if(filteredListSize > 0) { @@ -1790,7 +1790,7 @@ int CScene_MultiGameJoinLoad::LoadSaveDataReturned(void *pParam,bool bContinue) bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()); // 4J Stu - If we only have one controller connected, then don't show the sign-in UI again - DWORD connectedControllers = 0; + int connectedControllers = 0; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; @@ -1798,7 +1798,7 @@ int CScene_MultiGameJoinLoad::LoadSaveDataReturned(void *pParam,bool bContinue) if(!isClientSide || connectedControllers == 1 || !RenderManager.IsHiDef()) { - DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); + unsigned int dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); // No guest problems so we don't need to force a sign-in of players here StartGameFromSave(pClass, dwLocalUsersMask); @@ -1825,7 +1825,7 @@ int CScene_MultiGameJoinLoad::StartGame_SignInReturned(void *pParam,bool bContin // It's possible that the player has not signed in - they can back out if(ProfileManager.IsSignedIn(iPad)) { - DWORD dwLocalUsersMask = 0; + unsigned int dwLocalUsersMask = 0; for(unsigned int index = 0; index < XUSER_MAX_COUNT; ++index) { From 4cc0bd5e25d860158c0c157e09a29eaad1e4dd38 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:17:22 +1100 Subject: [PATCH 16/24] Remove WinAPI helper types from XUI controls --- .../Platform/Common/XUI/XUI_Ctrl_4JList.cpp | 50 +++++++++---------- .../Platform/Common/XUI/XUI_Ctrl_4JList.h | 4 +- .../XUI/XUI_Ctrl_CraftIngredientSlot.cpp | 12 ++--- .../Common/XUI/XUI_Ctrl_CraftIngredientSlot.h | 8 +-- .../Common/XUI/XUI_Ctrl_EnchantButton.cpp | 4 +- .../Common/XUI/XUI_Ctrl_EnchantmentBook.cpp | 6 +-- .../XUI/XUI_Ctrl_EnchantmentButtonText.cpp | 4 +- .../Common/XUI/XUI_Ctrl_MinecraftPlayer.cpp | 5 +- .../Common/XUI/XUI_Ctrl_MinecraftSlot.cpp | 6 +-- .../Common/XUI/XUI_Ctrl_MinecraftSlot.h | 6 +-- .../Common/XUI/XUI_Ctrl_SliderWrapper.cpp | 14 +++--- .../Common/XUI/XUI_Ctrl_SliderWrapper.h | 4 +- 12 files changed, 61 insertions(+), 62 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.cpp index 4016335ee..0ab6614bf 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.cpp @@ -16,41 +16,41 @@ void CXuiCtrl4JList::AddData( const LIST_ITEM_INFO& ItemInfo , int iSortListFrom { // need to allocate memory for the structure and its strings // and remap the string pointers - DWORD dwBytes=0; - DWORD dwLen1=0; - DWORD dwLen2=0; + std::size_t totalBytes = 0; + std::size_t textBytes = 0; + std::size_t imageBytes = 0; if(ItemInfo.pwszText) { - dwLen1=(int)wcslen(ItemInfo.pwszText)*sizeof(WCHAR); - dwBytes+=dwLen1+sizeof(WCHAR); + textBytes = wcslen(ItemInfo.pwszText) * sizeof(WCHAR); + totalBytes += textBytes + sizeof(WCHAR); } if(ItemInfo.pwszImage) { - dwLen2=(int)(wcslen(ItemInfo.pwszImage))*sizeof(WCHAR); - dwBytes+=dwLen2+sizeof(WCHAR); + imageBytes = wcslen(ItemInfo.pwszImage) * sizeof(WCHAR); + totalBytes += imageBytes + sizeof(WCHAR); } - dwBytes+=sizeof( LIST_ITEM_INFO ); - LIST_ITEM_INFO *pItemInfo = (LIST_ITEM_INFO *)new BYTE[dwBytes]; - ZeroMemory(pItemInfo,dwBytes); + totalBytes += sizeof(LIST_ITEM_INFO); + LIST_ITEM_INFO *pItemInfo = reinterpret_cast(new unsigned char[totalBytes]); + ZeroMemory(pItemInfo, totalBytes); XMemCpy( pItemInfo, &ItemInfo, sizeof( LIST_ITEM_INFO ) ); - if(dwLen1!=0) + if(textBytes != 0) { - XMemCpy( &pItemInfo[1], ItemInfo.pwszText, dwLen1 ); + XMemCpy( &pItemInfo[1], ItemInfo.pwszText, textBytes ); pItemInfo->pwszText=(LPCWSTR)&pItemInfo[1]; - if(dwLen2!=0) + if(imageBytes != 0) { - BYTE *pwszImage = ((BYTE *)&pItemInfo[1])+dwLen1+sizeof(WCHAR); - XMemCpy( pwszImage, ItemInfo.pwszImage, dwLen2 ); - pItemInfo->pwszImage=(LPCWSTR)pwszImage; + unsigned char *imageText = reinterpret_cast(&pItemInfo[1]) + textBytes + sizeof(WCHAR); + XMemCpy( imageText, ItemInfo.pwszImage, imageBytes ); + pItemInfo->pwszImage = reinterpret_cast(imageText); } } - else if(dwLen2!=0) + else if(imageBytes != 0) { - XMemCpy( &pItemInfo[1], ItemInfo.pwszImage, dwLen2 ); + XMemCpy( &pItemInfo[1], ItemInfo.pwszImage, imageBytes ); pItemInfo->pwszImage=(LPCWSTR)&pItemInfo[1]; } @@ -162,9 +162,9 @@ int CXuiCtrl4JList::GetIndexByUserData(int iData) return 0; } -CXuiCtrl4JList::LIST_ITEM_INFO& CXuiCtrl4JList::GetData(DWORD dw) +CXuiCtrl4JList::LIST_ITEM_INFO& CXuiCtrl4JList::GetData(int index) { - return *m_vListData[dw]; + return *m_vListData[index]; } CXuiCtrl4JList::LIST_ITEM_INFO& CXuiCtrl4JList::GetDataiData(int iData) @@ -356,14 +356,14 @@ HRESULT CXuiCtrl4JList::OnGetItemEnable(XUIMessageGetItemEnable *pGetItemEnableD } -HRESULT CXuiCtrl4JList::SetBorder(DWORD dw,BOOL bShow) +HRESULT CXuiCtrl4JList::SetBorder(int index, bool show) { CXuiControl Control; HXUIOBJ hVisual,hBorder; - GetItemControl(dw,&Control); + GetItemControl(index,&Control); Control.GetVisual(&hVisual); XuiElementGetChildById(hVisual,L"Border",&hBorder); - return XuiElementSetShow(hBorder,bShow); + return XuiElementSetShow(hBorder,show); } void CXuiCtrl4JList::SetSelectionChangedHandle(HXUIOBJ hObj) @@ -383,7 +383,7 @@ HRESULT CXuiCtrl4JList::OnDestroy() { XuiDestroyBrush( m_vListData[i]->hXuiBrush ); } - delete [] (BYTE *)m_vListData[i]; + delete [] reinterpret_cast(m_vListData[i]); } } return S_OK; @@ -402,4 +402,4 @@ HRESULT CXuiCtrl4JList::OnNotifySelChanged( HXUIOBJ hObjSource, XUINotifySelChan bHandled = xuiMsg.bHandled; } return S_OK; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.h index 0cd03b218..b83bfcf38 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_4JList.h @@ -40,10 +40,10 @@ public: void UpdateGraphic(int iItem,HXUIBRUSH hXuiBrush ); void UpdateGraphic(FILETIME *pfTime,HXUIBRUSH hXuiBrush ); void UpdateGraphicFromiData(int iData,HXUIBRUSH hXuiBrush ); - LIST_ITEM_INFO& GetData(DWORD dw); + LIST_ITEM_INFO& GetData(int index); LIST_ITEM_INFO& GetData(FILETIME *pFileTime); LIST_ITEM_INFO& GetDataiData(int iData); - HRESULT SetBorder(DWORD dw,BOOL bShow); // for a highlight around the current selected item in the controls layout + HRESULT SetBorder(int index, bool show); // for a highlight around the current selected item in the controls layout void SetSelectionChangedHandle(HXUIOBJ hObj); protected: diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp index 2ea13a5f5..5b8843add 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp @@ -55,19 +55,19 @@ HRESULT CXuiCtrlCraftIngredientSlot::OnGetSourceText(XUIMessageGetSourceText *pG return S_OK; } -void CXuiCtrlCraftIngredientSlot::SetRedBox(BOOL bVal) +void CXuiCtrlCraftIngredientSlot::SetRedBox(bool show) { HRESULT hr=S_OK; HXUIOBJ hObj,hObjChild; hr=GetVisual(&hObj); XuiElementGetChildById(hObj,L"BoxRed",&hObjChild); - XuiElementSetShow(hObjChild,bVal); + XuiElementSetShow(hObjChild,show); XuiElementGetChildById(hObj,L"Exclaim",&hObjChild); - XuiElementSetShow(hObjChild,bVal); + XuiElementSetShow(hObjChild,show); } -void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,bool isFoil, BOOL bShow) +void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,bool isFoil, bool bShow) { m_item = nullptr; m_iID=iId; @@ -92,7 +92,7 @@ void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCo XuiElementSetShow(m_hObj,bShow); } -void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) +void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, bool bShow) { if(item == NULL) SetIcon(iPad, 0,0,0,0,0,false,false,bShow); else @@ -120,4 +120,4 @@ void CXuiCtrlCraftIngredientSlot::SetDescription(LPCWSTR Desc) XuiControlSetText(hObjChild,Desc); XuiElementSetShow(hObjChild,Desc==NULL?FALSE:TRUE); m_Desc=Desc; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h index 0a46227be..771f27fbf 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h @@ -14,9 +14,9 @@ public: CXuiCtrlCraftIngredientSlot(); virtual ~CXuiCtrlCraftIngredientSlot() { }; - void SetRedBox(BOOL bVal); - void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha, bool bDecorations, bool isFoil = false, BOOL bShow=TRUE); - void SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); + void SetRedBox(bool show); + void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha, bool bDecorations, bool isFoil = false, bool bShow=true); + void SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, bool bShow=true); void SetDescription(LPCWSTR Desc); protected: @@ -42,4 +42,4 @@ private: bool m_isFoil; LPCWSTR m_Desc; bool m_isDirty; -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantButton.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantButton.cpp index b655644ac..b9734bcb0 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantButton.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantButton.cpp @@ -32,7 +32,7 @@ HRESULT CXuiCtrlEnchantmentButton::OnInit(XUIMessageInit* pInitData, BOOL& rfHan assert( parent != NULL ); - VOID *pObj; + void *pObj; XuiObjectFromHandle( parent, &pObj ); m_containerScene = (CXuiSceneEnchant *)pObj; @@ -87,4 +87,4 @@ HRESULT CXuiCtrlEnchantmentButton::OnGetSourceDataText(XUIMessageGetSourceText * bHandled = TRUE; return S_OK; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp index 50cc6bce7..741e0cd8e 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp @@ -23,7 +23,7 @@ //----------------------------------------------------------------------------- CXuiCtrlEnchantmentBook::CXuiCtrlEnchantmentBook() : - m_bDirty(FALSE), + m_bDirty(false), m_fScale(1.0f), m_fAlpha(1.0f) { @@ -64,7 +64,7 @@ HRESULT CXuiCtrlEnchantmentBook::OnInit(XUIMessageInit* pInitData, BOOL& rfHandl assert( parent != NULL ); - VOID *pObj; + void *pObj; XuiObjectFromHandle( parent, &pObj ); m_containerScene = (CXuiSceneEnchant *)pObj; @@ -343,4 +343,4 @@ void CXuiCtrlEnchantmentBook::tickBook() flipA += (diff - flipA) * 0.9f; flip = flip + flipA; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentButtonText.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentButtonText.cpp index 609050b06..a2de1fa4e 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentButtonText.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_EnchantmentButtonText.cpp @@ -42,7 +42,7 @@ HRESULT CXuiCtrlEnchantmentButtonText::OnInit(XUIMessageInit* pInitData, BOOL& r assert( parent != NULL ); - VOID *pObj; + void *pObj; XuiObjectFromHandle( parent, &pObj ); m_parentControl = (CXuiCtrlEnchantmentButton *)pObj; @@ -182,4 +182,4 @@ std::wstring CXuiCtrlEnchantmentButtonText::EnchantmentNames::getRandomName() word += words[random.nextInt(words.size())]; } return word; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftPlayer.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftPlayer.cpp index f9a10b2ab..fdd732787 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftPlayer.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftPlayer.cpp @@ -15,7 +15,7 @@ //----------------------------------------------------------------------------- CXuiCtrlMinecraftPlayer::CXuiCtrlMinecraftPlayer() : - m_bDirty(FALSE), + m_bDirty(false), m_fScale(1.0f), m_fAlpha(1.0f) { @@ -45,7 +45,7 @@ HRESULT CXuiCtrlMinecraftPlayer::OnInit(XUIMessageInit* pInitData, BOOL& rfHandl assert( parent != NULL ); - VOID *pObj; + void *pObj; XuiObjectFromHandle( parent, &pObj ); m_containerScene = (CXuiSceneInventory *)pObj; @@ -187,4 +187,3 @@ HRESULT CXuiCtrlMinecraftPlayer::OnRender(XUIMessageRender *pRenderData, BOOL &b } - diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp index b26bbf8e7..858b15cc0 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp @@ -73,7 +73,7 @@ CXuiCtrlMinecraftSlot::~CXuiCtrlMinecraftSlot() delete m_pItemRenderer; } -VOID CXuiCtrlMinecraftSlot::SetPassThroughDataAssociation(unsigned int iID, unsigned int iData) +void CXuiCtrlMinecraftSlot::SetPassThroughDataAssociation(unsigned int iID, unsigned int iData) { m_item = nullptr; m_iPassThroughIdAssociation = iID; @@ -309,7 +309,7 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa } -void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,BOOL bShow, bool isFoil) +void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,bool bShow, bool isFoil) { m_item = nullptr; m_iID=iId; @@ -343,7 +343,7 @@ void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, i XuiElementSetShow(m_hObj,bShow); } -void CXuiCtrlMinecraftSlot::SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) +void CXuiCtrlMinecraftSlot::SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, bool bShow) { m_item = item; m_isFoil = item->isFoil(); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.h index 7c9aca131..2bb03eebd 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSlot.h @@ -16,14 +16,14 @@ class CXuiCtrlMinecraftSlot : public CXuiControlImpl public: XUI_IMPLEMENT_CLASS(CXuiCtrlMinecraftSlot, L"CXuiCtrlMinecraftSlot", XUI_CLASS_LABEL) - VOID SetPassThroughDataAssociation(unsigned int iID, unsigned int iData); + void SetPassThroughDataAssociation(unsigned int iID, unsigned int iData); CXuiCtrlMinecraftSlot(); virtual ~CXuiCtrlMinecraftSlot(); void renderGuiItem(Font *font, Textures *textures,ItemInstance *item, int x, int y); void RenderItem(); - void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,BOOL bShow, bool isFoil); - void SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); + void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,bool bShow, bool isFoil); + void SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, bool bShow=true); protected: diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SliderWrapper.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SliderWrapper.cpp index ddc01ef3d..6b3424d49 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SliderWrapper.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SliderWrapper.cpp @@ -5,7 +5,7 @@ HRESULT CXuiCtrlSliderWrapper::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) { - VOID *pObj; + void *pObj; HXUIOBJ hObjChild; XuiElementGetChildById(m_hObj,L"FocusSink",&hObjChild); @@ -17,8 +17,8 @@ HRESULT CXuiCtrlSliderWrapper::OnInit( XUIMessageInit* pInitData, BOOL& bHandled m_pSlider = (CXuiSlider *)pObj; m_sliderActive = false; - m_bDisplayVal=true; - m_bPlaySound=false; // make this false to avoid a sound being played in the first setting of the slider value in a scene + m_bDisplayVal = true; + m_bPlaySound = false; // make this false to avoid a sound being played in the first setting of the slider value in a scene XuiSetTimer( m_hObj,NO_SOUND_TIMER,50); bHandled = TRUE; return S_OK; @@ -66,7 +66,7 @@ HRESULT CXuiCtrlSliderWrapper::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINoti if(m_bPlaySound) { - m_bPlaySound=false; + m_bPlaySound = false; CXuiSceneBase::PlayUISFX(eSFX_Scroll); XuiSetTimer( m_hObj,NO_SOUND_TIMER,150); } @@ -108,7 +108,7 @@ HRESULT CXuiCtrlSliderWrapper::SetValue( int nValue ) return S_OK; } -HRESULT CXuiCtrlSliderWrapper::SetValueDisplay( BOOL bShow ) +HRESULT CXuiCtrlSliderWrapper::SetValueDisplay(bool show) { CXuiCtrlSliderWrapper *pThis; HXUIOBJ hVisual,hText; @@ -121,7 +121,7 @@ HRESULT CXuiCtrlSliderWrapper::SetValueDisplay( BOOL bShow ) if(hText!=NULL) { - XuiElementSetShow(hText,bShow); + XuiElementSetShow(hText,show); } return S_OK; @@ -171,4 +171,4 @@ HRESULT CXuiCtrlSliderWrapper::SetRange( int nRangeMin, int nRangeMax) return hr; pThis->m_pSlider->SetRange(nRangeMin, nRangeMax); return S_OK; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SliderWrapper.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SliderWrapper.h index 03659fcae..0b8be115b 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SliderWrapper.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SliderWrapper.h @@ -33,6 +33,6 @@ public: HRESULT SetRange( int nRangeMin, int nRangeMax); LPCWSTR GetText( ); HRESULT SetText(LPCWSTR text, int iDataAssoc=0 ); - HRESULT SetValueDisplay( BOOL bShow ); + HRESULT SetValueDisplay( bool show ); -}; \ No newline at end of file +}; From 20cd01a66dc9d6edc3c202d4ce10c61f1162ac42 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:19:32 +1100 Subject: [PATCH 17/24] Remove WinAPI timer types from XUI scene base --- .../Platform/Common/XUI/XUI_Scene_Base.cpp | 42 +++++++++---------- .../Platform/Common/XUI/XUI_Scene_Base.h | 6 +-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.cpp index f91953792..e15bfccff 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.cpp @@ -23,7 +23,7 @@ #define PRESS_START_TIMER 0 CXuiSceneBase *CXuiSceneBase::Instance = NULL; -DWORD CXuiSceneBase::m_dwTrialTimerLimitSecs=DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; +unsigned int CXuiSceneBase::m_trialTimerLimitSecs = DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; //---------------------------------------------------------------------------------- // Performs initialization tasks - retrieves controls. //---------------------------------------------------------------------------------- @@ -771,13 +771,13 @@ HRESULT CXuiSceneBase::_EnableTooltip( unsigned int iPad, unsigned int tooltip, return S_OK; } -HRESULT CXuiSceneBase::_AnimateKeyPress(DWORD userIndex, DWORD dwKeyCode) +HRESULT CXuiSceneBase::_AnimateKeyPress(unsigned int userIndex, unsigned int keyCode) { if(m_playerBaseScenePosition[userIndex] == e_BaseScene_NotSet) { userIndex = DEFAULT_XUI_MENU_USER; } - switch(dwKeyCode) + switch(keyCode) { case VK_PAD_A: m_Buttons[userIndex][BUTTON_TOOLTIP_A].Press(); @@ -976,24 +976,24 @@ HRESULT CXuiSceneBase::_UpdateTrialTimer(unsigned int iPad) { WCHAR wcTime[20]; - DWORD dwTimeTicks=(DWORD)app.getTrialTimer(); + unsigned int trialTimeTicks = static_cast(app.getTrialTimer()); - if(dwTimeTicks>m_dwTrialTimerLimitSecs) + if(trialTimeTicks > m_trialTimerLimitSecs) { - dwTimeTicks=m_dwTrialTimerLimitSecs; + trialTimeTicks = m_trialTimerLimitSecs; } - dwTimeTicks=m_dwTrialTimerLimitSecs-dwTimeTicks; + trialTimeTicks = m_trialTimerLimitSecs - trialTimeTicks; #ifndef _CONTENT_PACKAGE if(true) #else // display the time - only if there's less than 3 minutes - if(dwTimeTicks<180) + if(trialTimeTicks < 180) #endif { - int iMins=dwTimeTicks/60; - int iSeconds=dwTimeTicks%60; + int iMins = trialTimeTicks / 60; + int iSeconds = trialTimeTicks % 60; swprintf( wcTime, 20, L"%d:%02d",iMins,iSeconds); m_TrialTimer.SetText(wcTime); } @@ -1003,7 +1003,7 @@ HRESULT CXuiSceneBase::_UpdateTrialTimer(unsigned int iPad) } // are we out of time? - if(dwTimeTicks==0) + if(trialTimeTicks == 0) { // Trial over app.SetAction(iPad,eAppAction_TrialOver); @@ -1014,14 +1014,14 @@ HRESULT CXuiSceneBase::_UpdateTrialTimer(unsigned int iPad) void CXuiSceneBase::_ReduceTrialTimerValue() { - DWORD dwTimeTicks=(int)app.getTrialTimer(); + unsigned int trialTimeTicks = static_cast(app.getTrialTimer()); - if(dwTimeTicks>m_dwTrialTimerLimitSecs) + if(trialTimeTicks > m_trialTimerLimitSecs) { - dwTimeTicks=m_dwTrialTimerLimitSecs; + trialTimeTicks = m_trialTimerLimitSecs; } - m_dwTrialTimerLimitSecs-=dwTimeTicks; + m_trialTimerLimitSecs -= trialTimeTicks; } HRESULT CXuiSceneBase::_ShowTrialTimer(BOOL bVal) @@ -1971,9 +1971,9 @@ HRESULT CXuiSceneBase::EnableTooltip( unsigned int iPad, unsigned int tooltip, b return CXuiSceneBase::Instance->_EnableTooltip(iPad, tooltip, enable); } -HRESULT CXuiSceneBase::AnimateKeyPress(DWORD userIndex, DWORD dwKeyCode) +HRESULT CXuiSceneBase::AnimateKeyPress(unsigned int userIndex, unsigned int keyCode) { - return CXuiSceneBase::Instance->_AnimateKeyPress(userIndex, dwKeyCode ); + return CXuiSceneBase::Instance->_AnimateKeyPress(userIndex, keyCode); } HRESULT CXuiSceneBase::ShowSavingMessage( unsigned int iPad, C4JStorage::ESavingMessage eVal ) @@ -2080,7 +2080,7 @@ HRESULT CXuiSceneBase::UpdatePlayerBasePositions() // If the game is not started (or is being held paused for a bit) then display all scenes fullscreen if( pMinecraft == NULL ) { - for( BYTE idx = 0; idx < XUSER_MAX_COUNT; ++idx) + for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { padPositions[idx] = e_BaseScene_Fullscreen; } @@ -2093,7 +2093,7 @@ HRESULT CXuiSceneBase::UpdatePlayerBasePositions() padPositions[primaryPad] = e_BaseScene_Fullscreen; // May need to turn off the player who just left - for( BYTE idx = 0; idx < XUSER_MAX_COUNT; ++idx) + for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { DisplayGamertag(idx,FALSE); } @@ -2103,7 +2103,7 @@ HRESULT CXuiSceneBase::UpdatePlayerBasePositions() else { - for( BYTE idx = 0; idx < XUSER_MAX_COUNT; ++idx) + for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { if(pMinecraft->localplayers[idx] != NULL) { @@ -2240,4 +2240,4 @@ void CXuiSceneBase::CreateBaseSceneInstance() BOOL handled; sceneBase->OnInit(NULL,handled); } -#endif \ No newline at end of file +#endif diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.h b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.h index bdcbf5755..e851be422 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.h @@ -359,7 +359,7 @@ private: HRESULT _SetPlayerBaseScenePosition( unsigned int iPad, EBaseScenePosition position ); void _UpdateSelectedItemPos( unsigned int iPad); EBaseScenePosition _GetPlayerBasePosition(int iPad); - HRESULT _AnimateKeyPress(DWORD userIndex, DWORD dwKeyCode); + HRESULT _AnimateKeyPress(unsigned int userIndex, unsigned int keyCode); HXUIOBJ _GetPlayerBaseScene(int iPad) {return m_BasePlayerScene[iPad].m_hObj;} HRESULT _PlayUISFX(ESoundEffect eSound); void _SetEmptyQuadrantLogo(int iPad,EBaseScenePosition ePos); @@ -381,7 +381,7 @@ private: unsigned int m_uiSelectedItemOpacityCountDown[XUSER_MAX_COUNT]; public: - static DWORD m_dwTrialTimerLimitSecs; + static unsigned int m_trialTimerLimitSecs; public: static CXuiSceneBase *GetInstance() { return Instance; } @@ -393,7 +393,7 @@ public: static HRESULT RefreshTooltips( unsigned int iPad); static HRESULT EnableTooltip( unsigned int iPad, unsigned int tooltip, bool enable ); static HRESULT SetTooltipsEnabled( unsigned int iPad, bool bA = true, bool bB = true, bool bX = true, bool bY = true, bool bLT = true, bool bRT = true, bool bLB = true, bool bRB=true, bool bLS=true); - static HRESULT AnimateKeyPress(DWORD userIndex, DWORD dwKeyCode); + static HRESULT AnimateKeyPress(unsigned int userIndex, unsigned int keyCode); static HRESULT ShowSavingMessage( unsigned int iPad, C4JStorage::ESavingMessage eVal); static HRESULT ShowBackground( unsigned int iPad, BOOL bShow ); static HRESULT ShowDarkOverlay( unsigned int iPad, BOOL bShow ); From a76d41647370161bcaa79b1ff26647961474104c Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:23:16 +1100 Subject: [PATCH 18/24] Remove WinAPI booleans from XUI scene helpers --- .../Platform/Common/XUI/XUI_Scene_Base.cpp | 82 +++++++++---------- .../Platform/Common/XUI/XUI_Scene_Base.h | 36 ++++---- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.cpp index e15bfccff..b66a1da8e 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.cpp @@ -49,7 +49,7 @@ HRESULT CXuiSceneBase::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) { for( unsigned int i = 0; i < BUTTONS_TOOLTIP_MAX; ++i ) { - m_visible[idx][ i ] = FALSE; + m_visible[idx][ i ] = false; m_iCurrentTooltipTextID[idx][i]=-1; hTooltipText[idx][i]=NULL; hTooltipTextSmall[idx][i]=NULL; @@ -63,7 +63,7 @@ HRESULT CXuiSceneBase::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) m_bCrouching[idx]=false; m_uiSelectedItemOpacityCountDown[idx] =0; - m_bossHealthVisible[idx] = FALSE; + m_bossHealthVisible[idx] = false; switch(idx) { @@ -368,14 +368,14 @@ void CXuiSceneBase::_TickAllBaseScenes() m_pBossHealthProgress[i].SetRange(0, boss->getMaxHealth() ); m_pBossHealthProgress[i].SetValue( boss->getSynchedHealth() ); - m_bossHealthVisible[i] = TRUE; + m_bossHealthVisible[i] = true; _UpdateSelectedItemPos(i); } - else if( m_bossHealthVisible[i] == TRUE) + else if(m_bossHealthVisible[i]) { m_BossHealthGroup[i].SetShow(FALSE); - m_bossHealthVisible[i] = FALSE; + m_bossHealthVisible[i] = false; _UpdateSelectedItemPos(i); } @@ -388,7 +388,7 @@ void CXuiSceneBase::_TickAllBaseScenes() if( m_ticksWithNoBoss > 20 ) { m_BossHealthGroup[i].SetShow(FALSE); - m_bossHealthVisible[i] = FALSE; + m_bossHealthVisible[i] = false; _UpdateSelectedItemPos(i); } @@ -481,12 +481,12 @@ void CXuiSceneBase::_TickAllBaseScenes() } } -HRESULT CXuiSceneBase::_SetEnableTooltips( unsigned int iPad, BOOL bVal ) +HRESULT CXuiSceneBase::_SetEnableTooltips( unsigned int iPad, bool enabled ) { for(int i=0;ilevel!=NULL) + if(show && pMinecraft->level!=NULL) { __int64 i64TimeOfDay =0; // are we in the Nether? - Leave the time as 0 if we are, so we show daylight @@ -884,19 +884,19 @@ HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow ) hr=XuiElementSetShow(hDay,TRUE); } } - hr=XuiElementSetShow(m_Background[iPad],bShow); + hr=XuiElementSetShow(m_Background[iPad],show); return hr; } -HRESULT CXuiSceneBase::_ShowDarkOverlay( unsigned int iPad, BOOL bShow ) +HRESULT CXuiSceneBase::_ShowDarkOverlay( unsigned int iPad, bool show ) { - return XuiElementSetShow(m_DarkOverlay[iPad],bShow); + return XuiElementSetShow(m_DarkOverlay[iPad],show); } -HRESULT CXuiSceneBase::_ShowLogo( unsigned int iPad, BOOL bShow ) +HRESULT CXuiSceneBase::_ShowLogo( unsigned int iPad, bool show ) { - return XuiElementSetShow(m_Logo[iPad],bShow); + return XuiElementSetShow(m_Logo[iPad],show); } HRESULT CXuiSceneBase::_ShowPressStart(unsigned int iPad) @@ -966,9 +966,9 @@ HRESULT CXuiSceneBase::_UpdateAutosaveCountdownTimer(unsigned int uiSeconds) return S_OK; } -HRESULT CXuiSceneBase::_ShowAutosaveCountdownTimer(BOOL bVal) +HRESULT CXuiSceneBase::_ShowAutosaveCountdownTimer(bool show) { - m_TrialTimer.SetShow(bVal); + m_TrialTimer.SetShow(show); return S_OK; } @@ -1024,9 +1024,9 @@ void CXuiSceneBase::_ReduceTrialTimerValue() m_trialTimerLimitSecs -= trialTimeTicks; } -HRESULT CXuiSceneBase::_ShowTrialTimer(BOOL bVal) +HRESULT CXuiSceneBase::_ShowTrialTimer(bool show) { - m_TrialTimer.SetShow(bVal); + m_TrialTimer.SetShow(show); return S_OK; } @@ -1595,7 +1595,7 @@ HRESULT CXuiSceneBase::_PlayUISFX(ESoundEffect eSound) } -HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, BOOL bDisplay ) +HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, bool display ) { if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L<_SetEnableTooltips(iPad, bVal ); + return CXuiSceneBase::Instance->_SetEnableTooltips(iPad, enabled); } return S_OK; } @@ -1906,11 +1906,11 @@ HRESULT CXuiSceneBase::ShowTooltip( unsigned int iPad, unsigned int tooltip, boo return S_OK; } -HRESULT CXuiSceneBase::ShowSafeArea( BOOL bShow ) +HRESULT CXuiSceneBase::ShowSafeArea(bool show) { if( CXuiSceneBase::Instance != NULL ) { - return CXuiSceneBase::Instance->_ShowSafeArea(bShow ); + return CXuiSceneBase::Instance->_ShowSafeArea(show); } return S_OK; } @@ -1986,19 +1986,19 @@ HRESULT CXuiSceneBase::ShowSavingMessage( unsigned int iPad, C4JStorage::ESaving return S_OK; } -HRESULT CXuiSceneBase::ShowBackground( unsigned int iPad, BOOL bShow ) +HRESULT CXuiSceneBase::ShowBackground( unsigned int iPad, bool show ) { - return CXuiSceneBase::Instance->_ShowBackground(iPad, bShow ); + return CXuiSceneBase::Instance->_ShowBackground(iPad, show); } -HRESULT CXuiSceneBase::ShowDarkOverlay( unsigned int iPad, BOOL bShow ) +HRESULT CXuiSceneBase::ShowDarkOverlay( unsigned int iPad, bool show ) { - return CXuiSceneBase::Instance->_ShowDarkOverlay(iPad, bShow ); + return CXuiSceneBase::Instance->_ShowDarkOverlay(iPad, show); } -HRESULT CXuiSceneBase::ShowLogo( unsigned int iPad, BOOL bShow ) +HRESULT CXuiSceneBase::ShowLogo( unsigned int iPad, bool show ) { - return CXuiSceneBase::Instance->_ShowLogo(iPad, bShow ); + return CXuiSceneBase::Instance->_ShowLogo(iPad, show); } HRESULT CXuiSceneBase::ShowPressStart(unsigned int iPad) @@ -2019,9 +2019,9 @@ HRESULT CXuiSceneBase::UpdateAutosaveCountdownTimer(unsigned int uiSeconds) return S_OK; } -HRESULT CXuiSceneBase::ShowAutosaveCountdownTimer(BOOL bVal) +HRESULT CXuiSceneBase::ShowAutosaveCountdownTimer(bool show) { - CXuiSceneBase::Instance->_ShowAutosaveCountdownTimer(bVal); + CXuiSceneBase::Instance->_ShowAutosaveCountdownTimer(show); return S_OK; } @@ -2030,9 +2030,9 @@ HRESULT CXuiSceneBase::UpdateTrialTimer(unsigned int iPad) CXuiSceneBase::Instance->_UpdateTrialTimer(iPad); return S_OK; } -HRESULT CXuiSceneBase::ShowTrialTimer(BOOL bVal) +HRESULT CXuiSceneBase::ShowTrialTimer(bool show) { - CXuiSceneBase::Instance->_ShowTrialTimer(bVal); + CXuiSceneBase::Instance->_ShowTrialTimer(show); return S_OK; } @@ -2210,10 +2210,10 @@ void CXuiSceneBase::SetEmptyQuadrantLogo(int iScreenSection) CXuiSceneBase::Instance->_SetEmptyQuadrantLogo(iPad,ePos); } -HRESULT CXuiSceneBase::DisplayGamertag( unsigned int iPad, BOOL bDisplay ) +HRESULT CXuiSceneBase::DisplayGamertag( unsigned int iPad, bool display ) { - CXuiSceneBase::Instance->_DisplayGamertag(iPad,bDisplay); + CXuiSceneBase::Instance->_DisplayGamertag(iPad, display); return S_OK; } diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.h b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.h index e851be422..f8a9cf4b7 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_Base.h @@ -109,8 +109,8 @@ protected: CXuiControl m_selectedItemA[XUSER_MAX_COUNT]; CXuiControl m_selectedItemSmallA[XUSER_MAX_COUNT]; - BOOL m_visible[XUSER_MAX_COUNT][BUTTONS_TOOLTIP_MAX]; - BOOL m_bossHealthVisible[XUSER_MAX_COUNT]; + bool m_visible[XUSER_MAX_COUNT][BUTTONS_TOOLTIP_MAX]; + bool m_bossHealthVisible[XUSER_MAX_COUNT]; int m_iWrongTexturePackTickC; // Message map. Here we tie messages to message handlers. @@ -337,23 +337,23 @@ public: private: void _TickAllBaseScenes(); HRESULT _SetTooltipText( unsigned int iPad, unsigned int tooltip, int iTextID ); - HRESULT _SetEnableTooltips( unsigned int iPad, BOOL bVal ); + HRESULT _SetEnableTooltips( unsigned int iPad, bool enabled ); HRESULT _ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show ); HRESULT _SetTooltipsEnabled( unsigned int iPad, bool bA = true, bool bB = true, bool bX = true, bool bY = true, bool bLT = true, bool bRT = true, bool bLB=true, bool bRB = true, bool bLS = true); HRESULT _RefreshTooltips( unsigned int iPad); HRESULT _EnableTooltip( unsigned int iPad, unsigned int tooltip, bool enable ); HRESULT _ShowSavingMessage( unsigned int iPad, C4JStorage::ESavingMessage eVal ); - HRESULT _ShowBackground( unsigned int iPad, BOOL bShow ); - HRESULT _ShowDarkOverlay( unsigned int iPad, BOOL bShow ); - HRESULT _ShowLogo( unsigned int iPad, BOOL bShow ); + HRESULT _ShowBackground( unsigned int iPad, bool show ); + HRESULT _ShowDarkOverlay( unsigned int iPad, bool show ); + HRESULT _ShowLogo( unsigned int iPad, bool show ); HRESULT _ShowPressStart(unsigned int iPad); HRESULT _UpdateAutosaveCountdownTimer(unsigned int uiSeconds); - HRESULT _ShowAutosaveCountdownTimer(BOOL bVal); + HRESULT _ShowAutosaveCountdownTimer(bool show); HRESULT _UpdateTrialTimer(unsigned int iPad); - HRESULT _ShowTrialTimer(BOOL bVal); + HRESULT _ShowTrialTimer(bool show); void _ReduceTrialTimerValue(); HRESULT _HidePressStart(); - HRESULT _ShowSafeArea( BOOL bShow ); + HRESULT _ShowSafeArea( bool show ); HRESULT _ShowOtherPlayersBaseScene(int iPad, bool show); bool _PressStartPlaying(unsigned int iPad); HRESULT _SetPlayerBaseScenePosition( unsigned int iPad, EBaseScenePosition position ); @@ -363,7 +363,7 @@ private: HXUIOBJ _GetPlayerBaseScene(int iPad) {return m_BasePlayerScene[iPad].m_hObj;} HRESULT _PlayUISFX(ESoundEffect eSound); void _SetEmptyQuadrantLogo(int iPad,EBaseScenePosition ePos); - HRESULT _DisplayGamertag( unsigned int iPad, BOOL bDisplay ); + HRESULT _DisplayGamertag( unsigned int iPad, bool display ); void _SetSelectedItem( unsigned int iPad, const std::wstring& name); void _HideAllGameUIElements(); bool _GetBaseSceneSafeZone( unsigned int iPad, D3DXVECTOR2 &origin, float &width, float &height); @@ -387,7 +387,7 @@ public: static CXuiSceneBase *GetInstance() { return Instance; } static void TickAllBaseScenes(); static HRESULT SetTooltipText( unsigned int iPad, unsigned int tooltip, int iTextID ); - static HRESULT SetEnableTooltips( unsigned int iPad, BOOL bVal ); + static HRESULT SetEnableTooltips( unsigned int iPad, bool enabled ); static HRESULT ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show ); static HRESULT SetTooltips( unsigned int iPad, int iA, int iB=-1, int iX=-1, int iY=-1 , int iLT=-1, int iRT=-1, int iLB=-1, int iRB=-1, int iLS=-1, bool forceUpdate = false); static HRESULT RefreshTooltips( unsigned int iPad); @@ -395,16 +395,16 @@ public: static HRESULT SetTooltipsEnabled( unsigned int iPad, bool bA = true, bool bB = true, bool bX = true, bool bY = true, bool bLT = true, bool bRT = true, bool bLB = true, bool bRB=true, bool bLS=true); static HRESULT AnimateKeyPress(unsigned int userIndex, unsigned int keyCode); static HRESULT ShowSavingMessage( unsigned int iPad, C4JStorage::ESavingMessage eVal); - static HRESULT ShowBackground( unsigned int iPad, BOOL bShow ); - static HRESULT ShowDarkOverlay( unsigned int iPad, BOOL bShow ); - static HRESULT ShowLogo( unsigned int iPad, BOOL bShow ); + static HRESULT ShowBackground( unsigned int iPad, bool show ); + static HRESULT ShowDarkOverlay( unsigned int iPad, bool show ); + static HRESULT ShowLogo( unsigned int iPad, bool show ); static HRESULT UpdateAutosaveCountdownTimer(unsigned int uiSeconds); - static HRESULT ShowAutosaveCountdownTimer(BOOL bVal); + static HRESULT ShowAutosaveCountdownTimer(bool show); static HRESULT UpdateTrialTimer(unsigned int iPad); - static HRESULT ShowTrialTimer(BOOL bVal); + static HRESULT ShowTrialTimer(bool show); static void ReduceTrialTimerValue(); static HRESULT HidePressStart(); - static HRESULT ShowSafeArea( BOOL bShow ); + static HRESULT ShowSafeArea( bool show ); static HRESULT ShowOtherPlayersBaseScene(int iPad, bool show); static HRESULT ShowPressStart(unsigned int iPad); @@ -419,7 +419,7 @@ public: static HXUIOBJ GetPlayerBaseScene(int iPad); static HRESULT PlayUISFX(ESoundEffect eSound); static void SetEmptyQuadrantLogo(int iSection); - static HRESULT DisplayGamertag( unsigned int iPad, BOOL bDisplay ); + static HRESULT DisplayGamertag( unsigned int iPad, bool display ); static void SetSelectedItem( unsigned int iPad, const std::wstring &name); static void HideAllGameUIElements(); From eb524ae9b8b8345930c2669d869da3854b983bcc Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:25:18 +1100 Subject: [PATCH 19/24] Remove WinAPI object pointers from XUI scenes --- Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SlotList.cpp | 3 +-- Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp | 4 ++-- Minecraft.Client/Platform/Common/XUI/XUI_Debug.h | 2 +- Minecraft.Client/Platform/Common/XUI/XUI_HelpControls.cpp | 2 +- Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp | 4 ++-- .../Platform/Common/XUI/XUI_InGamePlayerOptions.cpp | 2 +- Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp | 2 +- .../Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp | 4 ++-- .../Platform/Common/XUI/XUI_Scene_CraftingPanel.cpp | 4 ++-- .../Platform/Common/XUI/XUI_TransferToXboxOne.cpp | 3 +-- 10 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SlotList.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SlotList.cpp index 08bd0550b..2c59a0cdd 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SlotList.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_SlotList.cpp @@ -224,8 +224,7 @@ void CXuiCtrlSlotList::Clicked() void CXuiCtrlSlotList::GetCXuiCtrlSlotItem(int itemIndex, CXuiCtrlSlotItemListItem** CXuiCtrlSlotItem) { HXUIOBJ itemControl = this->GetItemControl(itemIndex); - VOID *pObj; + void *pObj; XuiObjectFromHandle( itemControl, &pObj ); *CXuiCtrlSlotItem = (CXuiCtrlSlotItemListItem *)pObj; } - diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp index 459c2562d..79d64a674 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp @@ -37,7 +37,7 @@ HRESULT CScene_DLCMain::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) m_Timer.SetShow(FALSE); m_bIgnoreInput=false; - VOID *pObj; + void *pObj; XuiObjectFromHandle( xList, &pObj ); list = (CXuiCtrl4JList *) pObj; @@ -222,7 +222,7 @@ HRESULT CScene_DLCOffers::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) m_bIgnorePress=true; - VOID *pObj; + void *pObj; m_hXuiBrush=NULL; XuiObjectFromHandle( m_List, &pObj ); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Debug.h b/Minecraft.Client/Platform/Common/XUI/XUI_Debug.h index 1fa6d3c86..955c80e25 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Debug.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Debug.h @@ -35,7 +35,7 @@ private: typedef struct { HXUIOBJ hXuiObj; - VOID *pvData; + void *pvData; } DEBUGDATA; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_HelpControls.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_HelpControls.cpp index 867a2171c..68acf8a43 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_HelpControls.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_HelpControls.cpp @@ -163,7 +163,7 @@ HRESULT CScene_Controls::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) } // fill out the layouts list - VOID *pObj; + void *pObj; XuiObjectFromHandle( m_SchemeList, &pObj ); m_pLayoutList = (CXuiCtrl4JList *)pObj; CXuiCtrl4JList::LIST_ITEM_INFO ListInfo[3]; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp index 03a5a4d46..c4bc86e33 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp @@ -439,7 +439,7 @@ HRESULT CScene_Credits::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) HXUIOBJ text; GetChildById( idString, &text ); - VOID* pTextObj; + void *pTextObj; XuiObjectFromHandle( text, &pTextObj ); m_aTextTypes[ i ].m_appTextElements[ j ] = (CXuiControl *)pTextObj; m_aTextTypes[ i ].m_appTextElements[ j ]->SetShow( false ); @@ -685,4 +685,4 @@ HRESULT CScene_Credits::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled ) bHandled = TRUE; } return S_OK; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp index 0c7a89edb..41f489a98 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_InGamePlayerOptions.cpp @@ -357,7 +357,7 @@ void CScene_InGamePlayerOptions::OnPlayerChanged(void *callbackParam, INetworkPl HXUIOBJ hBackScene = scene->GetBackScene(); CScene_InGameInfo* infoScene; - VOID *pObj; + void *pObj; XuiObjectFromHandle( hBackScene, &pObj ); infoScene = (CScene_InGameInfo *)pObj; if(infoScene != NULL) CScene_InGameInfo::OnPlayerChanged(infoScene,pPlayer,leaving); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp index 6b14c14dd..875696a44 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp @@ -904,7 +904,7 @@ void CScene_Leaderboards::PopulateLeaderboard(bool noResults) if(m_pHTitleIconSlots[0]==NULL) { - VOID *pObj; + void *pObj; HXUIOBJ button; D3DXVECTOR3 vPos; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp index 5f7c468b0..0b1cb7633 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp @@ -93,7 +93,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand m_iSaveInfoC=0; - VOID *pObj; + void *pObj; XuiObjectFromHandle( m_SavesList, &pObj ); m_pSavesList = (CXuiCtrl4JList *)pObj; @@ -2512,7 +2512,7 @@ HRESULT CScene_MultiGameJoinLoad::OnCustomMessage_DLCInstalled() HRESULT CScene_MultiGameJoinLoad::OnCustomMessage_DLCMountingComplete() { - VOID *pObj; + void *pObj; XuiObjectFromHandle( m_SavesList, &pObj ); m_pSavesList = (CXuiCtrl4JList *)pObj; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_CraftingPanel.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_CraftingPanel.cpp index ceee39d22..327f8d843 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Scene_CraftingPanel.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Scene_CraftingPanel.cpp @@ -39,7 +39,7 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle m_bIgnoreKeyPresses=true; D3DXVECTOR3 vec; - VOID *pObj; + void *pObj; CraftingPanelScreenInput* pCraftingPanelData = (CraftingPanelScreenInput*)pInitData->pvInitData; m_iContainerType=pCraftingPanelData->iContainerType; m_pPlayer=pCraftingPanelData->player; @@ -633,4 +633,4 @@ void CXuiSceneCraftingPanel::updateVSlotPositions(int iSlots, int i) vec.x=m_vSlot0Pos.x + m_iCurrentSlotHIndex*m_fSlotSize; vec.z=0.0f; m_pVSlotsBrushImageControl[i]->SetPosition(&vec); -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_TransferToXboxOne.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_TransferToXboxOne.cpp index 839698dbd..b0c872d35 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_TransferToXboxOne.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_TransferToXboxOne.cpp @@ -24,7 +24,7 @@ HRESULT CScene_TransferToXboxOne::OnInit( XUIMessageInit* pInitData, BOOL& bHand m_bIgnoreInput=false; MapChildControls(); - VOID *pObj; + void *pObj; XuiObjectFromHandle( m_SavesSlotList, &pObj ); m_pSavesSlotList = (CXuiCtrl4JList *)pObj; @@ -566,4 +566,3 @@ HRESULT CScene_TransferToXboxOne::OnNotifyKillFocus(HXUIOBJ hObjSource, XUINotif return S_OK; } - From b6d3c0c6eeb27f9a40dfe229b3faff2f2999c299 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:27:39 +1100 Subject: [PATCH 20/24] Use integer locator sizes in XUI scenes --- Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp | 2 +- Minecraft.Client/Platform/Common/XUI/XUI_DebugOverlay.cpp | 4 ++-- Minecraft.Client/Platform/Common/XUI/XUI_MainMenu.cpp | 4 ++-- .../Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp index 79d64a674..956457fa1 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp @@ -262,7 +262,7 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly ) CXuiCtrl4JList::LIST_ITEM_INFO *pListInfo=NULL; //XMARKETPLACE_CONTENTOFFER_INFO xOffer; XMARKETPLACE_CURRENCY_CONTENTOFFER_INFO xOffer; - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; ZeroMemory(szResourceLocator,sizeof(WCHAR)*LOCATOR_SIZE); const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_DebugOverlay.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_DebugOverlay.cpp index 6764fb23f..9a321290f 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_DebugOverlay.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_DebugOverlay.cpp @@ -171,7 +171,7 @@ HRESULT CScene_DebugOverlay::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress HXUIOBJ hScene; HRESULT hr; //const WCHAR XZP_SEPARATOR = L'#'; - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; swprintf(szResourceLocator, LOCATOR_SIZE, L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/"); @@ -189,7 +189,7 @@ HRESULT CScene_DebugOverlay::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress HXUIOBJ hScene; HRESULT hr; //const WCHAR XZP_SEPARATOR = L'#'; - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; swprintf(szResourceLocator, LOCATOR_SIZE, L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/"); diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MainMenu.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MainMenu.cpp index 03643d023..2423a7a72 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MainMenu.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MainMenu.cpp @@ -68,7 +68,7 @@ HRESULT CScene_Main::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) CXuiSceneBase::ShowBackground( DEFAULT_XUI_MENU_USER, TRUE ); CXuiSceneBase::ShowLogo( DEFAULT_XUI_MENU_USER, TRUE ); - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; // load from the .xzp file @@ -1291,4 +1291,4 @@ HRESULT CScene_Main::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled ) } return S_OK; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp index 0b1cb7633..5bf3db581 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.cpp @@ -48,7 +48,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand XuiControlSetText(m_SavesList,app.GetString(IDS_START_GAME)); - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); @@ -2700,7 +2700,7 @@ bool CScene_MultiGameJoinLoad::GetSavesInfoCallback(LPVOID pParam,int iTotalSave else { // we could put in a damaged save icon here - const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string + constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string WCHAR szResourceLocator[ LOCATOR_SIZE ]; const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); From ce4cb8ea70cab96a44e756157979dce9cc09b5c5 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:30:04 +1100 Subject: [PATCH 21/24] Remove WinAPI locals from XUI scenes --- Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp | 4 +--- Minecraft.Client/Platform/Common/XUI/XUI_HelpAndOptions.cpp | 4 ++-- Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp | 1 - Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp | 2 +- Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.h | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp index 956457fa1..058db6805 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_DLCOffers.cpp @@ -371,7 +371,7 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly ) // Bug 49249 - JPN: Code Defect: Missing Text: String 'Minecraft' is missing in contents download screen. // Looks like we shouldn't be removing this text for Japanese, and probably Chinese & Korean - DWORD dwLanguage = XGetLanguage( ); + unsigned int dwLanguage = XGetLanguage(); switch(dwLanguage) { case XC_LANGUAGE_KOREAN: @@ -450,7 +450,6 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly ) if (dlc != NULL) { std::uint8_t *pData=NULL; - UINT uiSize=0; unsigned int dwSize=0; WCHAR *cString = dlc->wchBanner; @@ -703,7 +702,6 @@ HRESULT CScene_DLCOffers::OnNotifySelChanged(HXUIOBJ hObjSource, XUINotifySelCha if (dlc != NULL) { std::uint8_t *pImage=NULL; - UINT uiSize=0; unsigned int dwSize=0; WCHAR *cString = dlc->wchBanner; diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_HelpAndOptions.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_HelpAndOptions.cpp index d999cad59..461640c6f 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_HelpAndOptions.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_HelpAndOptions.cpp @@ -326,7 +326,7 @@ HRESULT CScene_HelpAndOptions::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHa case VK_PAD_B: case VK_ESCAPE: - BYTE userIndex = pInputData->UserIndex; + int userIndex = pInputData->UserIndex; if( !app.IsPauseMenuDisplayed(userIndex) ) { // If we are not from a pause menu, then we are from the main menu @@ -459,4 +459,4 @@ HRESULT CScene_HelpAndOptions::OnCustomMessage_Splitscreenplayer(bool bJoining, { bHandled=true; return app.AdjustSplitscreenScene_PlayerChanged(m_hObj,&m_OriginalPosition,m_iPad,bJoining,false); -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp index c4bc86e33..dc60cdc6f 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_HelpCredits.cpp @@ -500,7 +500,6 @@ HRESULT CScene_Credits::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled) HRESULT CScene_Credits::OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled) { // ignore any joypads other than the main - BYTE bFocusUser=XuiElementGetFocusUser(pControlNavigateData->hObjSource); // get the user from the control /*if(!=ProfileManager.GetLockedProfile()) { diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp b/Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp index 875696a44..9da266cc2 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Leaderboards.cpp @@ -473,7 +473,7 @@ HRESULT CScene_Leaderboards::OnKeyDown(XUIMessageInput* pInputData, BOOL& bHandl case VK_PAD_B: case VK_ESCAPE: { - BYTE userIndex = pInputData->UserIndex; + int userIndex = pInputData->UserIndex; if( !app.IsPauseMenuDisplayed(userIndex) ) { // If we are not from a pause menu, then we are from the main menu diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.h b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.h index 3c1082afa..95eafb34a 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_MultiGameJoinLoad.h @@ -155,7 +155,7 @@ private: std::vector *m_generators; JoinMenuInitData *m_initData; - UINT m_DefaultMinecraftIconSize; + unsigned int m_DefaultMinecraftIconSize; PBYTE m_DefaultMinecraftIconData; int *m_iConfigA; // track the texture packs that we don't have installed int m_iTexturePacksNotInstalled; @@ -165,4 +165,4 @@ private: bool m_bTransferComplete; bool m_bTransferFail; bool m_bSaveTransferInProgress; -}; \ No newline at end of file +}; From 60790a86afff7cdd5279ebb11baa4064cbe20284 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sat, 14 Mar 2026 07:32:45 +1100 Subject: [PATCH 22/24] Remove WinAPI types from console utility helpers --- Minecraft.Client/Platform/Common/Console_Utils.cpp | 9 ++++----- Minecraft.Client/Platform/Common/Consoles_App.h | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Console_Utils.cpp b/Minecraft.Client/Platform/Common/Console_Utils.cpp index 2aee7c307..85bceb5ce 100644 --- a/Minecraft.Client/Platform/Common/Console_Utils.cpp +++ b/Minecraft.Client/Platform/Common/Console_Utils.cpp @@ -7,12 +7,12 @@ // Desc: Internal helper function //-------------------------------------------------------------------------------------- #ifndef _CONTENT_PACKAGE -static VOID DebugSpewV( const CHAR* strFormat, va_list pArgList ) +static void DebugSpewV(const char* strFormat, va_list pArgList) { #if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || defined(__linux__) assert(0); #else - CHAR str[2048]; + char str[2048]; // Use the secure CRT to avoid buffer overruns. Specify a count of // _TRUNCATE so that too long strings will be silently truncated // rather than triggering an error. @@ -27,9 +27,9 @@ static VOID DebugSpewV( const CHAR* strFormat, va_list pArgList ) // Desc: Prints formatted debug spew //-------------------------------------------------------------------------------------- #ifdef _Printf_format_string_ // VC++ 2008 and later support this annotation -VOID CDECL DebugSpew( _In_z_ _Printf_format_string_ const CHAR* strFormat, ... ) +void CDECL DebugSpew(_In_z_ _Printf_format_string_ const char* strFormat, ...) #else -VOID CDECL DebugPrintf( const CHAR* strFormat, ... ) +void CDECL DebugPrintf(const char* strFormat, ...) #endif { #ifndef _CONTENT_PACKAGE @@ -39,4 +39,3 @@ VOID CDECL DebugPrintf( const CHAR* strFormat, ... ) va_end( pArgList ); #endif } - diff --git a/Minecraft.Client/Platform/Common/Consoles_App.h b/Minecraft.Client/Platform/Common/Consoles_App.h index 4b8807399..e044f7a19 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.h +++ b/Minecraft.Client/Platform/Common/Consoles_App.h @@ -197,10 +197,10 @@ public: void SetFreezePlayers(bool bVal) { m_bFreezePlayers = bVal; } // debug -0 show safe area - void ShowSafeArea(BOOL bShow) + void ShowSafeArea(bool show) { #ifdef _XBOX - CXuiSceneBase::ShowSafeArea( bShow ); + CXuiSceneBase::ShowSafeArea(show); #endif } // 4J-PB - to capture the social post screenshot @@ -485,7 +485,7 @@ public: - static const DWORD m_dwOfferID = 0x00000001; + static constexpr unsigned int m_dwOfferID = 0x00000001; // timer void InitTime(); From d2a14a4957d60fd26bfd11f95953ccb59d6afae0 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Sun, 15 Mar 2026 01:48:08 +1100 Subject: [PATCH 23/24] Drop ComboBox primitive cleanup from XUI ABI surface --- Minecraft.Client/Platform/Common/XUI/XUI_Control_ComboBox.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Control_ComboBox.h b/Minecraft.Client/Platform/Common/XUI/XUI_Control_ComboBox.h index 87138c5be..28b611871 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Control_ComboBox.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Control_ComboBox.h @@ -10,8 +10,8 @@ public: LPCWSTR pwszText; LPCWSTR pwszImage; HXUIBRUSH hXuiBrush; - bool fChecked; - bool fEnabled; + BOOL fChecked; + BOOL fEnabled; } LIST_ITEM_INFO; @@ -50,4 +50,4 @@ protected: HRESULT OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData,BOOL& rfHandled); -}; +}; \ No newline at end of file From 7dacd17e620f607a21df89e380d04db6289dae1f Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Sun, 15 Mar 2026 00:44:43 -0500 Subject: [PATCH 24/24] refactor: use uint8_t for `m_rotateTick` in XUI skin preview --- .../Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h index 91e734aa5..6bf3df460 100644 --- a/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h +++ b/Minecraft.Client/Platform/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h @@ -93,7 +93,7 @@ private: float m_walkAnimPos; bool m_bAutoRotate, m_bRotatingLeft; - int m_rotateTick; + std::uint8_t m_rotateTick; float m_fTargetRotation, m_fOriginalRotation; int m_framesAnimatingRotation; bool m_bAnimatingToFacing;