aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/XUI/XUI_Scene_Win.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/Common/XUI/XUI_Scene_Win.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
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.
Diffstat (limited to 'Minecraft.Client/Common/XUI/XUI_Scene_Win.cpp')
-rw-r--r--Minecraft.Client/Common/XUI/XUI_Scene_Win.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Win.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Win.cpp
index c4c279a6..19e6b016 100644
--- a/Minecraft.Client/Common/XUI/XUI_Scene_Win.cpp
+++ b/Minecraft.Client/Common/XUI/XUI_Scene_Win.cpp
@@ -21,7 +21,7 @@ const float CScene_Win::PLAYER_SCROLL_SPEED = 3.0f;
//----------------------------------------------------------------------------------
HRESULT CScene_Win::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
{
- m_iPad = *static_cast<int *>(pInitData->pvInitData);
+ m_iPad = *(int *)pInitData->pvInitData;
m_bIgnoreInput = false;
@@ -57,18 +57,18 @@ HRESULT CScene_Win::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
noNoiseString = app.FormatHTMLString(m_iPad, noNoiseString, 0xff000000);
Random random(8124371);
- size_t found=noNoiseString.find_first_of(L"{");
- size_t length;
+ int found=(int)noNoiseString.find_first_of(L"{");
+ int length;
while (found!=string::npos)
{
length = random.nextInt(4) + 3;
m_noiseLengths.push_back(length);
- found=noNoiseString.find_first_of(L"{", found + 1);
+ found=(int)noNoiseString.find_first_of(L"{",found+1);
}
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft->localplayers[s_winUserIndex] != nullptr)
+ if(pMinecraft->localplayers[s_winUserIndex] != NULL)
{
noNoiseString = replaceAll(noNoiseString,L"{*PLAYER*}",pMinecraft->localplayers[s_winUserIndex]->name);
}
@@ -134,7 +134,7 @@ HRESULT CScene_Win::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled)
app.CloseAllPlayersXuiScenes();
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
- if(pMinecraft->localplayers[i] != nullptr)
+ if(pMinecraft->localplayers[i] != NULL)
{
app.SetAction(i,eAppAction_Respawn);
}
@@ -143,7 +143,7 @@ HRESULT CScene_Win::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled)
// Show the other players scenes
CXuiSceneBase::ShowOtherPlayersBaseScene(pInputData->UserIndex, true);
// This just allows it to be shown
- if(pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()] != nullptr) pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()]->getTutorial()->showTutorialPopup(true);
+ if(pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()] != NULL) pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()]->getTutorial()->showTutorialPopup(true);
ui.UpdatePlayerBasePositions();
rfHandled = TRUE;
@@ -277,7 +277,7 @@ HRESULT CScene_Win::OnNavReturn(HXUIOBJ hObj,BOOL& rfHandled)
CXuiSceneBase::ShowOtherPlayersBaseScene(ProfileManager.GetPrimaryPad(), false);
// This just allows it to be shown
- if(Minecraft::GetInstance()->localgameModes[ProfileManager.GetPrimaryPad()] != nullptr) Minecraft::GetInstance()->localgameModes[ProfileManager.GetPrimaryPad()]->getTutorial()->showTutorialPopup(false);
+ if(Minecraft::GetInstance()->localgameModes[ProfileManager.GetPrimaryPad()] != NULL) Minecraft::GetInstance()->localgameModes[ProfileManager.GetPrimaryPad()]->getTutorial()->showTutorialPopup(false);
// Temporarily make this scene fullscreen
CXuiSceneBase::SetPlayerBaseScenePosition( ProfileManager.GetPrimaryPad(), CXuiSceneBase::e_BaseScene_Fullscreen );