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:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions

View File

@@ -101,9 +101,9 @@ UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void *initData, UILayer *parentLa
TelemetryManager->RecordPauseOrInactive(m_iPad);
Minecraft *pMinecraft = Minecraft::GetInstance();
if(pMinecraft != nullptr && pMinecraft->localgameModes[iPad] != nullptr )
if(pMinecraft != NULL && pMinecraft->localgameModes[iPad] != NULL )
{
TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[iPad]);
TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[iPad];
// This just allows it to be shown
gameMode->getTutorial()->showTutorialPopup(false);
@@ -114,9 +114,9 @@ UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void *initData, UILayer *parentLa
UIScene_PauseMenu::~UIScene_PauseMenu()
{
Minecraft *pMinecraft = Minecraft::GetInstance();
if(pMinecraft != nullptr && pMinecraft->localgameModes[m_iPad] != nullptr )
if(pMinecraft != NULL && pMinecraft->localgameModes[m_iPad] != NULL )
{
TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[m_iPad]);
TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad];
// This just allows it to be shown
gameMode->getTutorial()->showTutorialPopup(true);
@@ -506,7 +506,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
{
if(m_bIgnoreInput) return;
switch(static_cast<int>(controlId))
switch((int)controlId)
{
case BUTTON_PAUSE_RESUMEGAME:
if( m_iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
@@ -593,7 +593,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
{
bool bContentRestricted=false;
#if defined(__PS3__) || defined(__PSVITA__)
ProfileManager.GetChatAndContentRestrictions(m_iPad,true,nullptr,&bContentRestricted,nullptr);
ProfileManager.GetChatAndContentRestrictions(m_iPad,true,NULL,&bContentRestricted,NULL);
#endif
if(bContentRestricted)
{
@@ -654,9 +654,9 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
if(m_iPad==ProfileManager.GetPrimaryPad())
{
int playTime = -1;
if( pMinecraft->localplayers[m_iPad] != nullptr )
if( pMinecraft->localplayers[m_iPad] != NULL )
{
playTime = static_cast<int>(pMinecraft->localplayers[m_iPad]->getSessionTimer());
playTime = (int)pMinecraft->localplayers[m_iPad]->getSessionTimer();
}
#if defined(_XBOX_ONE) || defined(__ORBIS__)
@@ -723,9 +723,9 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
else
{
int playTime = -1;
if( pMinecraft->localplayers[m_iPad] != nullptr )
if( pMinecraft->localplayers[m_iPad] != NULL )
{
playTime = static_cast<int>(pMinecraft->localplayers[m_iPad]->getSessionTimer());
playTime = (int)pMinecraft->localplayers[m_iPad]->getSessionTimer();
}
TelemetryManager->RecordLevelExit(m_iPad, eSen_LevelExitStatus_Exited);
@@ -741,9 +741,9 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
if(m_iPad==ProfileManager.GetPrimaryPad())
{
int playTime = -1;
if( pMinecraft->localplayers[m_iPad] != nullptr )
if( pMinecraft->localplayers[m_iPad] != NULL )
{
playTime = static_cast<int>(pMinecraft->localplayers[m_iPad]->getSessionTimer());
playTime = (int)pMinecraft->localplayers[m_iPad]->getSessionTimer();
}
// adjust the trial time played
@@ -759,9 +759,9 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
else
{
int playTime = -1;
if( pMinecraft->localplayers[m_iPad] != nullptr )
if( pMinecraft->localplayers[m_iPad] != NULL )
{
playTime = static_cast<int>(pMinecraft->localplayers[m_iPad]->getSessionTimer());
playTime = (int)pMinecraft->localplayers[m_iPad]->getSessionTimer();
}
TelemetryManager->RecordLevelExit(m_iPad, eSen_LevelExitStatus_Exited);
@@ -839,7 +839,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
if(!Minecraft::GetInstance()->skins->isUsingDefaultSkin())
{
TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected();
DLCTexturePack *pDLCTexPack=static_cast<DLCTexturePack *>(tPack);
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tPack;
m_pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack();
@@ -979,7 +979,7 @@ int UIScene_PauseMenu::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::
// 4J-PB - need to check this user can access the store
#if defined(__PS3__) || defined(__PSVITA__)
bool bContentRestricted;
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,nullptr,&bContentRestricted,nullptr);
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
@@ -1003,7 +1003,7 @@ int UIScene_PauseMenu::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::
int UIScene_PauseMenu::SaveGame_SignInReturned(void *pParam,bool bContinue, int iPad)
{
UIScene_PauseMenu* pClass = static_cast<UIScene_PauseMenu *>(ui.GetSceneFromCallbackId((size_t)pParam));
UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
if(pClass) pClass->SetIgnoreInput(false);
if(bContinue==true)
@@ -1112,7 +1112,7 @@ int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContin
{
#ifndef __ORBIS__
bool bContentRestricted=false;
ProfileManager.GetChatAndContentRestrictions(pClass->m_iPad,true,nullptr,&bContentRestricted,nullptr);
ProfileManager.GetChatAndContentRestrictions(pClass->m_iPad,true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
// you can't see leaderboards
@@ -1183,7 +1183,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
#ifndef __ORBIS__
// 4J-PB - need to check this user can access the store
bool bContentRestricted=false;
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,nullptr,&bContentRestricted,nullptr);
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
@@ -1203,7 +1203,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
app.DebugPrintf("Texture Pack - %s\n",pchPackName);
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
if(pSONYDLCInfo!=nullptr)
if(pSONYDLCInfo!=NULL)
{
char chName[42];
char chKeyName[20];
@@ -1214,7 +1214,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
// we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it.
// So we assume the first sku for the product is the one we want
// MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char
// MGH - keyname in the DLC file is 16 chars long, but there's no space for a NULL terminating char
memset(chKeyName, 0, sizeof(chKeyName));
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);
@@ -1260,7 +1260,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue
#ifndef __ORBIS__
// 4J-PB - need to check this user can access the store
bool bContentRestricted=false;
ProfileManager.GetChatAndContentRestrictions(iPad,true,nullptr,&bContentRestricted,nullptr);
ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
@@ -1280,7 +1280,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue
app.DebugPrintf("Texture Pack - %s\n",pchPackName);
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
if(pSONYDLCInfo!=nullptr)
if(pSONYDLCInfo!=NULL)
{
char chName[42];
char chKeyName[20];
@@ -1291,7 +1291,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue
// we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it.
// So we assume the first sku for the product is the one we want
// MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char
// MGH - keyname in the DLC file is 16 chars long, but there's no space for a NULL terminating char
memset(chKeyName, 0, sizeof(chKeyName));
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);