Remove Win32 callback types from launch menus

This commit is contained in:
notmatthewbeshay 2026-03-10 22:14:25 +11:00
parent 7b3b49c662
commit b4a005fb8c
8 changed files with 33 additions and 33 deletions

View file

@ -235,7 +235,7 @@ void UIController::SetSysUIShowing(bool bVal)
m_bSystemUIShowing=bVal; m_bSystemUIShowing=bVal;
} }
void UIController::SetSystemUIShowing(LPVOID lpParam,bool bVal) void UIController::SetSystemUIShowing(void *lpParam,bool bVal)
{ {
UIController *pClass=(UIController *)lpParam; UIController *pClass=(UIController *)lpParam;
pClass->SetSysUIShowing(bVal); pClass->SetSysUIShowing(bVal);

View file

@ -225,7 +225,7 @@ public:
void setupRenderPosition(S32 xOrigin, S32 yOrigin); void setupRenderPosition(S32 xOrigin, S32 yOrigin);
void SetSysUIShowing(bool bVal); void SetSysUIShowing(bool bVal);
static void SetSystemUIShowing(LPVOID lpParam,bool bVal); static void SetSystemUIShowing(void *lpParam,bool bVal);
protected: protected:
virtual void setTileOrigin(S32 xPos, S32 yPos) = 0; virtual void setTileOrigin(S32 xPos, S32 yPos) = 0;

View file

@ -484,7 +484,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId)
} }
#ifdef _DURANGO #ifdef _DURANGO
void UIScene_CreateWorldMenu::checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege, int iPad) void UIScene_CreateWorldMenu::checkPrivilegeCallback(void *lpParam, bool hasPrivilege, int iPad)
{ {
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)lpParam; UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)lpParam;
@ -752,7 +752,7 @@ void UIScene_CreateWorldMenu::handleGainFocus(bool navBack)
} }
} }
int UIScene_CreateWorldMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,bool bRes) int UIScene_CreateWorldMenu::KeyboardCompleteWorldNameCallback(void *lpParam,bool bRes)
{ {
UIScene_CreateWorldMenu *pClass=(UIScene_CreateWorldMenu *)lpParam; UIScene_CreateWorldMenu *pClass=(UIScene_CreateWorldMenu *)lpParam;
pClass->m_bIgnoreInput=false; pClass->m_bIgnoreInput=false;
@ -774,7 +774,7 @@ int UIScene_CreateWorldMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,bo
return 0; return 0;
} }
int UIScene_CreateWorldMenu::KeyboardCompleteSeedCallback(LPVOID lpParam,bool bRes) int UIScene_CreateWorldMenu::KeyboardCompleteSeedCallback(void *lpParam,bool bRes)
{ {
UIScene_CreateWorldMenu *pClass=(UIScene_CreateWorldMenu *)lpParam; UIScene_CreateWorldMenu *pClass=(UIScene_CreateWorldMenu *)lpParam;
pClass->m_bIgnoreInput=false; pClass->m_bIgnoreInput=false;
@ -1061,7 +1061,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
} }
// 4J Stu - Shared functionality that is the same whether we needed a quadrant sign-in or not // 4J Stu - Shared functionality that is the same whether we needed a quadrant sign-in or not
void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD dwLocalUsersMask) void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, int localUsersMask)
{ {
#if TO_BE_IMPLEMENTED #if TO_BE_IMPLEMENTED
// stop the timer running that causes a check for new texture packs in TMS but not installed, since this will run all through the create game, and will crash if it tries to create an hbrush // stop the timer running that causes a check for new texture packs in TMS but not installed, since this will run all through the create game, and will crash if it tries to create an hbrush
@ -1172,7 +1172,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
app.SetGameHostOption(eGameHostOption_HostCanChangeHunger,pClass->m_MoreOptionsParams.bHostPrivileges); app.SetGameHostOption(eGameHostOption_HostCanChangeHunger,pClass->m_MoreOptionsParams.bHostPrivileges);
app.SetGameHostOption(eGameHostOption_HostCanBeInvisible,pClass->m_MoreOptionsParams.bHostPrivileges ); app.SetGameHostOption(eGameHostOption_HostCanBeInvisible,pClass->m_MoreOptionsParams.bHostPrivileges );
g_NetworkManager.HostGame(dwLocalUsersMask,isClientSide,isPrivate,MINECRAFT_NET_MAX_PLAYERS,0); g_NetworkManager.HostGame(localUsersMask,isClientSide,isPrivate,MINECRAFT_NET_MAX_PLAYERS,0);
param->settings = app.GetGameHostOption( eGameHostOption_All ); param->settings = app.GetGameHostOption( eGameHostOption_All );
@ -1243,7 +1243,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
// bool isOnlineGame = pClass->m_MoreOptionsParams.bOnlineGame; // bool isOnlineGame = pClass->m_MoreOptionsParams.bOnlineGame;
int primaryPad = ProfileManager.GetPrimaryPad(); int primaryPad = ProfileManager.GetPrimaryPad();
bool noPrivileges = false; bool noPrivileges = false;
DWORD dwLocalUsersMask = 0; int localUsersMask = 0;
bool isSignedInLive = ProfileManager.IsSignedInLive(primaryPad); bool isSignedInLive = ProfileManager.IsSignedInLive(primaryPad);
int iPadNotSignedInLive = -1; int iPadNotSignedInLive = -1;
bool isLocalMultiplayerAvailable = app.IsLocalMultiplayerAvailable(); bool isLocalMultiplayerAvailable = app.IsLocalMultiplayerAvailable();
@ -1259,7 +1259,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
} }
if( !ProfileManager.AllowedToPlayMultiplayer(i) ) noPrivileges = true; if( !ProfileManager.AllowedToPlayMultiplayer(i) ) noPrivileges = true;
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(i); localUsersMask |= CGameNetworkManager::GetLocalPlayerMask(i);
isSignedInLive = isSignedInLive && ProfileManager.IsSignedInLive(i); isSignedInLive = isSignedInLive && ProfileManager.IsSignedInLive(i);
} }
} }
@ -1326,7 +1326,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
else else
{ {
// This is NOT called from a storage manager thread, and is in fact called from the main thread in the Profile library tick. Therefore we use the main threads IntCache. // This is NOT called from a storage manager thread, and is in fact called from the main thread in the Profile library tick. Therefore we use the main threads IntCache.
CreateGame(pClass, dwLocalUsersMask); CreateGame(pClass, localUsersMask);
} }
} }
} }

View file

@ -92,16 +92,16 @@ private:
bool IsLocalMultiplayerAvailable(); bool IsLocalMultiplayerAvailable();
#ifdef _DURANGO #ifdef _DURANGO
static void checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege, int iPad); static void checkPrivilegeCallback(void *lpParam, bool hasPrivilege, int iPad);
#endif #endif
protected: protected:
static int KeyboardCompleteWorldNameCallback(LPVOID lpParam,const bool bRes); static int KeyboardCompleteWorldNameCallback(void *lpParam,const bool bRes);
static int KeyboardCompleteSeedCallback(LPVOID lpParam,const bool bRes); static int KeyboardCompleteSeedCallback(void *lpParam,const bool bRes);
void handlePress(F64 controlId, F64 childId); void handlePress(F64 controlId, F64 childId);
void handleSliderMove(F64 sliderId, F64 currentValue); void handleSliderMove(F64 sliderId, F64 currentValue);
static void CreateGame(UIScene_CreateWorldMenu* pClass, DWORD dwLocalUsersMask); static void CreateGame(UIScene_CreateWorldMenu* pClass, int localUsersMask);
static int ConfirmCreateReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); static int ConfirmCreateReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
static int StartGame_SignInReturned(void *pParam,bool bContinue, int iPad); static int StartGame_SignInReturned(void *pParam,bool bContinue, int iPad);
static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result); static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result);
@ -112,4 +112,4 @@ protected:
#endif #endif
virtual void checkStateAndStartGame(); virtual void checkStateAndStartGame();
}; };

View file

@ -398,7 +398,7 @@ void UIScene_LaunchMoreOptionsMenu::handleTimerComplete(int id)
};*/ };*/
} }
int UIScene_LaunchMoreOptionsMenu::KeyboardCompleteSeedCallback(LPVOID lpParam,bool bRes) int UIScene_LaunchMoreOptionsMenu::KeyboardCompleteSeedCallback(void *lpParam,bool bRes)
{ {
UIScene_LaunchMoreOptionsMenu *pClass=(UIScene_LaunchMoreOptionsMenu *)lpParam; UIScene_LaunchMoreOptionsMenu *pClass=(UIScene_LaunchMoreOptionsMenu *)lpParam;
pClass->m_bIgnoreInput=false; pClass->m_bIgnoreInput=false;

View file

@ -116,7 +116,7 @@ public:
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
virtual void handleFocusChange(F64 controlId, F64 childId); virtual void handleFocusChange(F64 controlId, F64 childId);
virtual void handleTimerComplete(int id); virtual void handleTimerComplete(int id);
static int KeyboardCompleteSeedCallback(LPVOID lpParam,const bool bRes); static int KeyboardCompleteSeedCallback(void *lpParam,const bool bRes);
virtual void handlePress(F64 controlId, F64 childId); virtual void handlePress(F64 controlId, F64 childId);
virtual void handleSliderMove(F64 sliderId, F64 currentValue); virtual void handleSliderMove(F64 sliderId, F64 currentValue);

View file

@ -31,7 +31,7 @@ int UIScene_LoadMenu::m_iDifficultyTitleSettingA[4]=
IDS_DIFFICULTY_TITLE_HARD IDS_DIFFICULTY_TITLE_HARD
}; };
int UIScene_LoadMenu::LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes) int UIScene_LoadMenu::LoadSaveDataThumbnailReturned(void *lpParam, std::uint8_t *pbThumbnail, DWORD dwThumbnailBytes)
{ {
UIScene_LoadMenu *pClass= (UIScene_LoadMenu *)lpParam; UIScene_LoadMenu *pClass= (UIScene_LoadMenu *)lpParam;
@ -680,7 +680,7 @@ void UIScene_LoadMenu::handlePress(F64 controlId, F64 childId)
} }
#ifdef _DURANGO #ifdef _DURANGO
void UIScene_LoadMenu::checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege, int iPad) void UIScene_LoadMenu::checkPrivilegeCallback(void *lpParam, bool hasPrivilege, int iPad)
{ {
UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)lpParam; UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)lpParam;
@ -1290,10 +1290,10 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
} }
} }
#endif #endif
DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); int localUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
// No guest problems so we don't need to force a sign-in of players here // No guest problems so we don't need to force a sign-in of players here
StartGameFromSave(pClass, dwLocalUsersMask); StartGameFromSave(pClass, localUsersMask);
} }
} }
else else
@ -1418,7 +1418,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 // 4J Stu - Shared functionality that is the same whether we needed a quadrant sign-in or not
void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocalUsersMask) void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, int localUsersMask)
{ {
INT saveOrCheckpointId = 0; INT saveOrCheckpointId = 0;
bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
@ -1467,7 +1467,7 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocal
app.SetGameHostOption(eGameHostOption_GameType,pClass->m_bGameModeSurvival?GameType::SURVIVAL->getId():GameType::CREATIVE->getId() ); app.SetGameHostOption(eGameHostOption_GameType,pClass->m_bGameModeSurvival?GameType::SURVIVAL->getId():GameType::CREATIVE->getId() );
g_NetworkManager.HostGame(dwLocalUsersMask,isClientSide,isPrivate,MINECRAFT_NET_MAX_PLAYERS,0); g_NetworkManager.HostGame(localUsersMask,isClientSide,isPrivate,MINECRAFT_NET_MAX_PLAYERS,0);
param->settings = app.GetGameHostOption( eGameHostOption_All ); param->settings = app.GetGameHostOption( eGameHostOption_All );
@ -1542,9 +1542,9 @@ void UIScene_LoadMenu::LoadLevelGen(LevelGenerationOptions *levelGen)
} }
DWORD dwLocalUsersMask = 0; int localUsersMask = 0;
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); localUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
// Load data from disc // Load data from disc
//File saveFile( L"Tutorial\\Tutorial" ); //File saveFile( L"Tutorial\\Tutorial" );
//LoadSaveFromDisk(&saveFile); //LoadSaveFromDisk(&saveFile);
@ -1555,7 +1555,7 @@ void UIScene_LoadMenu::LoadLevelGen(LevelGenerationOptions *levelGen)
bool isPrivate = (app.GetGameSettings(m_iPad,eGameSetting_InviteOnly)>0)?true:false; bool isPrivate = (app.GetGameSettings(m_iPad,eGameSetting_InviteOnly)>0)?true:false;
g_NetworkManager.HostGame(dwLocalUsersMask,isClientSide,isPrivate,MINECRAFT_NET_MAX_PLAYERS,0); g_NetworkManager.HostGame(localUsersMask,isClientSide,isPrivate,MINECRAFT_NET_MAX_PLAYERS,0);
NetworkGameInitData *param = new NetworkGameInitData(); NetworkGameInitData *param = new NetworkGameInitData();
param->seed = 0; param->seed = 0;
@ -1627,7 +1627,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
{ {
int primaryPad = ProfileManager.GetPrimaryPad(); int primaryPad = ProfileManager.GetPrimaryPad();
bool noPrivileges = false; bool noPrivileges = false;
DWORD dwLocalUsersMask = 0; int localUsersMask = 0;
bool isSignedInLive = ProfileManager.IsSignedInLive(primaryPad); bool isSignedInLive = ProfileManager.IsSignedInLive(primaryPad);
bool isOnlineGame = pClass->m_MoreOptionsParams.bOnlineGame; bool isOnlineGame = pClass->m_MoreOptionsParams.bOnlineGame;
int iPadNotSignedInLive = -1; int iPadNotSignedInLive = -1;
@ -1644,7 +1644,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
} }
if( !ProfileManager.AllowedToPlayMultiplayer(i) ) noPrivileges = true; if( !ProfileManager.AllowedToPlayMultiplayer(i) ) noPrivileges = true;
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(i); localUsersMask |= CGameNetworkManager::GetLocalPlayerMask(i);
isSignedInLive = isSignedInLive && ProfileManager.IsSignedInLive(i); isSignedInLive = isSignedInLive && ProfileManager.IsSignedInLive(i);
} }
} }
@ -1731,7 +1731,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
} }
#endif #endif
// This is NOT called from a storage manager thread, and is in fact called from the main thread in the Profile library tick. Therefore we use the main threads IntCache. // This is NOT called from a storage manager thread, and is in fact called from the main thread in the Profile library tick. Therefore we use the main threads IntCache.
StartGameFromSave(pClass, dwLocalUsersMask); StartGameFromSave(pClass, localUsersMask);
} }
} }
} }

View file

@ -110,15 +110,15 @@ private:
void LaunchGame(void); void LaunchGame(void);
#ifdef _DURANGO #ifdef _DURANGO
static void checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege, int iPad); static void checkPrivilegeCallback(void *lpParam, bool hasPrivilege, int iPad);
#endif #endif
static int ConfirmLoadReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); static int ConfirmLoadReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
static void StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocalUsersMask); static void StartGameFromSave(UIScene_LoadMenu* pClass, int localUsersMask);
static int LoadSaveDataReturned(void *pParam,bool bIsCorrupt, bool bIsOwner); static int LoadSaveDataReturned(void *pParam,bool bIsCorrupt, bool bIsOwner);
static int TrophyDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); static int TrophyDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
static int LoadDataComplete(void *pParam); static int LoadDataComplete(void *pParam);
static int LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes); static int LoadSaveDataThumbnailReturned(void *lpParam, std::uint8_t *pbThumbnail, DWORD dwThumbnailBytes);
static int CheckResetNetherReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); static int CheckResetNetherReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
static int DeleteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); static int DeleteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
static int DeleteSaveDataReturned(void *pParam,bool bSuccess); static int DeleteSaveDataReturned(void *pParam,bool bSuccess);
@ -129,5 +129,5 @@ private:
#endif #endif
public: public:
static int StartGame_SignInReturned(LPVOID pParam, bool, int); static int StartGame_SignInReturned(void *pParam, bool, int);
}; };