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 a9be52c41a.
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user