From 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Sat, 7 Mar 2026 21:12:22 -0600 Subject: Revert "Project modernization (#630)" This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817. --- .../Common/UI/UIScene_TeleportMenu.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp') diff --git a/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp b/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp index 017af93e..f6916d13 100644 --- a/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp @@ -12,7 +12,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa // Setup all the Iggy references we need for this scene initialiseMovie(); - TeleportMenuInitData *initParam = static_cast(initData); + TeleportMenuInitData *initParam = (TeleportMenuInitData *)initData; m_teleportToPlayer = initParam->teleportToPlayer; @@ -41,7 +41,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa { INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i ); - if( player != nullptr && !(player->IsLocal() && player->GetUserIndex() == m_iPad) ) + if( player != NULL && !(player->IsLocal() && player->GetUserIndex() == m_iPad) ) { m_players[m_playersCount] = player->GetSmallId(); ++m_playersCount; @@ -59,7 +59,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa } int voiceStatus = 0; - if(player != nullptr && player->HasVoice() ) + if(player != NULL && player->HasVoice() ) { if( player->IsMutedByLocalUser(m_iPad) ) { @@ -131,7 +131,7 @@ void UIScene_TeleportMenu::handleReload() { INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i ); - if( player != nullptr && !(player->IsLocal() && player->GetUserIndex() == m_iPad) ) + if( player != NULL && !(player->IsLocal() && player->GetUserIndex() == m_iPad) ) { m_players[m_playersCount] = player->GetSmallId(); ++m_playersCount; @@ -149,7 +149,7 @@ void UIScene_TeleportMenu::handleReload() } int voiceStatus = 0; - if(player != nullptr && player->HasVoice() ) + if(player != NULL && player->HasVoice() ) { if( player->IsMutedByLocalUser(m_iPad) ) { @@ -189,7 +189,7 @@ void UIScene_TeleportMenu::tick() { INetworkPlayer *player = g_NetworkManager.GetPlayerBySmallId( m_players[i] ); - if( player != nullptr ) + if( player != NULL ) { m_players[i] = player->GetSmallId(); @@ -250,11 +250,11 @@ void UIScene_TeleportMenu::handleInput(int iPad, int key, bool repeat, bool pres void UIScene_TeleportMenu::handlePress(F64 controlId, F64 childId) { - app.DebugPrintf("Pressed = %d, %d\n", static_cast(controlId), static_cast(childId)); - switch(static_cast(controlId)) + app.DebugPrintf("Pressed = %d, %d\n", (int)controlId, (int)childId); + switch((int)controlId) { case eControl_GamePlayers: - int currentSelection = static_cast(childId); + int currentSelection = (int)childId; INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ currentSelection ] ); INetworkPlayer *thisPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(m_iPad); @@ -275,7 +275,7 @@ void UIScene_TeleportMenu::handlePress(F64 controlId, F64 childId) void UIScene_TeleportMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer *pPlayer, bool leaving) { - UIScene_TeleportMenu *scene = static_cast(callbackParam); + UIScene_TeleportMenu *scene = (UIScene_TeleportMenu *)callbackParam; bool playerFound = false; int foundIndex = 0; for(int i = 0; i < scene->m_playersCount; ++i) @@ -320,7 +320,7 @@ void UIScene_TeleportMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer * } int voiceStatus = 0; - if(pPlayer != nullptr && pPlayer->HasVoice() ) + if(pPlayer != NULL && pPlayer->HasVoice() ) { if( pPlayer->IsMutedByLocalUser(scene->m_iPad) ) { -- cgit v1.2.3