forked from cafeberry/cafeberry
chore: cleanup names
This commit is contained in:
@@ -89,8 +89,8 @@ CMinecraftApp::CMinecraftApp()
|
||||
for(int i=0;i<XUSER_MAX_COUNT;i++)
|
||||
{
|
||||
m_eTMSAction[i]=eTMSAction_Idle;
|
||||
m_eXuiAction[i]=eAppAction_Idle;
|
||||
m_eXuiActionParam[i] = NULL;
|
||||
m_eUIAction[i]=eAppAction_Idle;
|
||||
m_eUIActionParam[i] = NULL;
|
||||
//m_dwAdditionalModelParts[i] = 0;
|
||||
|
||||
if(FAILED(XUserGetSigninInfo(i,XUSER_GET_SIGNIN_INFO_OFFLINE_XUID_ONLY ,&m_currentSigninInfo[i])))
|
||||
@@ -106,8 +106,8 @@ CMinecraftApp::CMinecraftApp()
|
||||
m_uiOpacityCountDown[i]=0;
|
||||
|
||||
}
|
||||
m_eGlobalXuiAction=eAppAction_Idle;
|
||||
m_eGlobalXuiServerAction=eXuiServerAction_Idle;
|
||||
m_eGlobalUIAction=eAppAction_Idle;
|
||||
m_eGlobalUIServerAction=eUIServerAction_Idle;
|
||||
|
||||
m_bResourcesLoaded=false;
|
||||
m_bGameStarted=false;
|
||||
@@ -199,13 +199,13 @@ CMinecraftApp::CMinecraftApp()
|
||||
// m_uiTransferSlotC=5;
|
||||
#endif
|
||||
|
||||
#if (defined _CONTENT_PACAKGE) || (defined _XBOX)
|
||||
#if (defined _CONTENT_PACAKGE || _XBOX)
|
||||
m_bUseDPadForDebug = false;
|
||||
#else
|
||||
m_bUseDPadForDebug = true;
|
||||
#endif
|
||||
|
||||
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
|
||||
#if !(defined _WINDOWS64)
|
||||
for(int i=0;i<XUSER_MAX_COUNT;i++)
|
||||
{
|
||||
m_eOptionsStatusA[i]=C4JStorage::eOptions_Callback_Idle;
|
||||
@@ -301,25 +301,25 @@ LPCWSTR CMinecraftApp::GetString(int iID)
|
||||
return app.m_stringTable->getString(iID);
|
||||
}
|
||||
|
||||
void CMinecraftApp::SetAction(int iPad, eXuiAction action, LPVOID param)
|
||||
void CMinecraftApp::SetAction(int iPad, eUIAction action, LPVOID param)
|
||||
{
|
||||
if( ( m_eXuiAction[iPad] == eAppAction_ReloadTexturePack ) && ( action == eAppAction_EthernetDisconnected ) )
|
||||
if( ( m_eUIAction[iPad] == eAppAction_ReloadTexturePack ) && ( action == eAppAction_EthernetDisconnected ) )
|
||||
{
|
||||
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eXuiAction[iPad], action);
|
||||
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eUIAction[iPad], action);
|
||||
}
|
||||
else if( ( m_eXuiAction[iPad] == eAppAction_ReloadTexturePack ) && ( action == eAppAction_ExitWorld ) )
|
||||
else if( ( m_eUIAction[iPad] == eAppAction_ReloadTexturePack ) && ( action == eAppAction_ExitWorld ) )
|
||||
{
|
||||
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eXuiAction[iPad], action);
|
||||
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eUIAction[iPad], action);
|
||||
}
|
||||
else if(m_eXuiAction[iPad] == eAppAction_ExitWorldCapturedThumbnail && action != eAppAction_Idle)
|
||||
else if(m_eUIAction[iPad] == eAppAction_ExitWorldCapturedThumbnail && action != eAppAction_Idle)
|
||||
{
|
||||
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eXuiAction[iPad], action);
|
||||
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eUIAction[iPad], action);
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Changing App action for pad %d from %d to %d\n", iPad, m_eXuiAction[iPad], action);
|
||||
m_eXuiAction[iPad]=action;
|
||||
m_eXuiActionParam[iPad] = param;
|
||||
app.DebugPrintf("Changing App action for pad %d from %d to %d\n", iPad, m_eUIAction[iPad], action);
|
||||
m_eUIAction[iPad]=action;
|
||||
m_eUIActionParam[iPad] = param;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,30 +344,6 @@ void CMinecraftApp::SetAppPaused(bool val)
|
||||
m_bIsAppPaused = val;
|
||||
}
|
||||
|
||||
void CMinecraftApp::HandleButtonPresses()
|
||||
{
|
||||
for(int i=0;i<4;i++)
|
||||
{
|
||||
HandleButtonPresses(i);
|
||||
}
|
||||
}
|
||||
|
||||
void CMinecraftApp::HandleButtonPresses(int iPad)
|
||||
{
|
||||
|
||||
// // test an update of the profile data
|
||||
// void *pData=ProfileManager.GetGameDefinedProfileData(iPad);
|
||||
//
|
||||
// unsigned char *pchData= (unsigned char *)pData;
|
||||
// int iCount=0;
|
||||
// for(int i=0;i<GAME_DEFINED_PROFILE_DATA_BYTES;i++)
|
||||
// {
|
||||
// pchData[i]=0xBC;
|
||||
// //if(iCount==255) iCount = 0;
|
||||
// }
|
||||
// ProfileManager.WriteToProfile(iPad,true);
|
||||
}
|
||||
|
||||
bool CMinecraftApp::LoadInventoryMenu(int iPad,shared_ptr<LocalPlayer> player,bool bNavigateBack)
|
||||
{
|
||||
bool success = true;
|
||||
@@ -753,7 +729,7 @@ void CMinecraftApp::InitGameSettings()
|
||||
{
|
||||
for(int i=0;i<XUSER_MAX_COUNT;i++)
|
||||
{
|
||||
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
|
||||
#if !(defined _WINDOWS64)
|
||||
GameSettingsA[i]=(GAME_SETTINGS *)StorageManager.GetGameDefinedProfileData(i);
|
||||
#else
|
||||
GameSettingsA[i]=(GAME_SETTINGS *)ProfileManager.GetGameDefinedProfileData(i);
|
||||
@@ -764,21 +740,20 @@ void CMinecraftApp::InitGameSettings()
|
||||
//SetDefaultGameSettings(i); - done on a callback from the profile manager
|
||||
|
||||
// 4J-PB - adding in for Windows & PS3 to set the defaults for the joypad
|
||||
#if defined _WINDOWS64
|
||||
#ifdef _WINDOWS64
|
||||
C_4JProfile::PROFILESETTINGS *pProfileSettings=ProfileManager.GetDashboardProfileSettings(i);
|
||||
SetDefaultOptions(pProfileSettings,i);
|
||||
ProfileManager.LoadSettings(GameSettingsA[i], sizeof(GAME_SETTINGS));
|
||||
ApplyGameSettingsChanged(i);
|
||||
#elif defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__
|
||||
#else
|
||||
C4JStorage::PROFILESETTINGS *pProfileSettings=StorageManager.GetDashboardProfileSettings(i);
|
||||
// 4J-PB - don't cause an options write to happen here
|
||||
SetDefaultOptions(pProfileSettings,i,false);
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
|
||||
#if !(defined _WINDOWS64)
|
||||
int CMinecraftApp::SetDefaultOptions(C4JStorage::PROFILESETTINGS *pSettings,const int iPad,bool bWriteProfile)
|
||||
#else
|
||||
int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,const int iPad)
|
||||
@@ -871,7 +846,7 @@ int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,con
|
||||
|
||||
//#endif
|
||||
|
||||
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
|
||||
#if !(defined _WINDOWS64)
|
||||
GameSettingsA[iPad]->bSettingsChanged=bWriteProfile;
|
||||
#endif
|
||||
|
||||
@@ -899,8 +874,7 @@ int CMinecraftApp::DefaultOptionsCallback(LPVOID pParam,C_4JProfile::PROFILESETT
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
|
||||
|
||||
#if !(defined _WINDOWS64)
|
||||
wstring CMinecraftApp::toStringOptionsStatus(const C4JStorage::eOptionsCallback &eStatus)
|
||||
{
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
@@ -1227,9 +1201,6 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
|
||||
{
|
||||
// This might be from a version during testing of new profile updates
|
||||
app.DebugPrintf("Don't know what to do with this profile version!\n");
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
// __debugbreak();
|
||||
#endif
|
||||
|
||||
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
|
||||
pGameSettings->ucMenuSensitivity=100; //eGameSetting_Sensitivity_InMenu
|
||||
@@ -1352,7 +1323,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
|
||||
// Game Host only (and for now we can't change the diff while in game, so this shouldn't happen)
|
||||
if(bInGame && g_NetworkManager.IsHost() && (iPad==ProfileManager.GetPrimaryPad()))
|
||||
{
|
||||
app.SetXuiServerAction(iPad,eXuiServerAction_ServerSettingChanged_Difficulty);
|
||||
app.SetUIServerAction(iPad,eUIServerAction_ServerSettingChanged_Difficulty);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1418,7 +1389,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
|
||||
{
|
||||
// Update the Game Host setting if you are the host and you are in-game
|
||||
app.SetGameHostOption(eGameHostOption_Gamertags,((GameSettingsA[iPad]->usBitmaskValues&0x0008)!=0)?1:0);
|
||||
app.SetXuiServerAction(iPad,eXuiServerAction_ServerSettingChanged_Gamertags);
|
||||
app.SetUIServerAction(iPad,eUIServerAction_ServerSettingChanged_Gamertags);
|
||||
|
||||
PlayerList *players = MinecraftServer::getInstance()->getPlayerList();
|
||||
for(AUTO_VAR(it3, players->players.begin()); it3 != players->players.end(); ++it3)
|
||||
@@ -1494,7 +1465,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
|
||||
{
|
||||
// Update the Game Host setting if you are the host and you are in-game
|
||||
app.SetGameHostOption(eGameHostOption_BedrockFog,GetGameSettings(iPad,eGameSetting_BedrockFog)?1:0);
|
||||
app.SetXuiServerAction(iPad,eXuiServerAction_ServerSettingChanged_BedrockFog);
|
||||
app.SetUIServerAction(iPad,eUIServerAction_ServerSettingChanged_BedrockFog);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2588,21 +2559,21 @@ int CMinecraftApp::DisplaySavingMessage(void *pParam, C4JStorage::ESavingMessage
|
||||
|
||||
void CMinecraftApp::SetActionConfirmed(LPVOID param)
|
||||
{
|
||||
XuiActionParam *actionInfo = (XuiActionParam *)param;
|
||||
UIActionParam *actionInfo = (UIActionParam *)param;
|
||||
app.SetAction(actionInfo->iPad, actionInfo->action);
|
||||
}
|
||||
|
||||
|
||||
void CMinecraftApp::HandleXuiActions(void)
|
||||
void CMinecraftApp::HandleUIActions(void)
|
||||
{
|
||||
eXuiAction eAction;
|
||||
eUIAction eAction;
|
||||
eTMSAction eTMS;
|
||||
LPVOID param;
|
||||
Minecraft *pMinecraft=Minecraft::GetInstance();
|
||||
shared_ptr<MultiplayerLocalPlayer> player;
|
||||
|
||||
// are there any global actions to deal with?
|
||||
eAction = app.GetGlobalXuiAction();
|
||||
eAction = app.GetGlobalUIAction();
|
||||
if(eAction!=eAppAction_Idle)
|
||||
{
|
||||
switch(eAction)
|
||||
@@ -2613,7 +2584,7 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
UINT uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
C4JStorage::EMessageResult result = ui.RequestErrorMessage( IDS_CANT_PLACE_NEAR_SPAWN_TITLE, IDS_CANT_PLACE_NEAR_SPAWN_TEXT, uiIDA,1,XUSER_INDEX_ANY);
|
||||
if(result != C4JStorage::EMessage_Busy) SetGlobalXuiAction(eAppAction_Idle);
|
||||
if(result != C4JStorage::EMessage_Busy) SetGlobalUIAction(eAppAction_Idle);
|
||||
|
||||
}
|
||||
break;
|
||||
@@ -2625,8 +2596,8 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
// are there any app actions to deal with?
|
||||
for(int i=0;i<XUSER_MAX_COUNT;i++)
|
||||
{
|
||||
eAction = app.GetXuiAction(i);
|
||||
param = m_eXuiActionParam[i];
|
||||
eAction = app.GetUIAction(i);
|
||||
param = m_eUIActionParam[i];
|
||||
|
||||
if(eAction!=eAppAction_Idle)
|
||||
{
|
||||
@@ -2661,7 +2632,7 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
bool bKeepHiding = false;
|
||||
for(int j=0; j < XUSER_MAX_COUNT;++j)
|
||||
{
|
||||
if(app.GetXuiAction(j) == eAppAction_SocialPostScreenshot)
|
||||
if(app.GetUIAction(j) == eAppAction_SocialPostScreenshot)
|
||||
{
|
||||
bKeepHiding = true;
|
||||
break;
|
||||
@@ -2783,7 +2754,7 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
SetAction(i,eAppAction_Idle);
|
||||
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_AutoSaveGame);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_AutoSaveGame);
|
||||
|
||||
if(app.GetGameHostOption(eGameHostOption_DisableSaving)) StorageManager.SetSaveDisabled(true);
|
||||
#else
|
||||
@@ -3265,7 +3236,7 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
pMinecraft->localplayers[i]->respawn();
|
||||
|
||||
// If the respawn requires a dimension change then the action will have changed
|
||||
//if(app.GetXuiAction(i) == eAppAction_Respawn)
|
||||
//if(app.GetUIAction(i) == eAppAction_Respawn)
|
||||
//{
|
||||
// SetAction(i,eAppAction_Idle);
|
||||
// CloseXuiScenes(i);
|
||||
@@ -7365,7 +7336,7 @@ void CMinecraftApp::EnterSaveNotificationSection()
|
||||
|
||||
if( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 )
|
||||
{
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)TRUE);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7383,7 +7354,7 @@ void CMinecraftApp::LeaveSaveNotificationSection()
|
||||
|
||||
if( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 )
|
||||
{
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7412,14 +7383,14 @@ int CMinecraftApp::RemoteSaveThreadProc( void* lpParameter )
|
||||
pMinecraft->progressRenderer->progressStage( -1 );
|
||||
pMinecraft->progressRenderer->progressStagePercentage(0);
|
||||
|
||||
while( !app.GetGameStarted() && app.GetXuiAction( ProfileManager.GetPrimaryPad() ) == eAppAction_WaitRemoteServerSaveComplete )
|
||||
while( !app.GetGameStarted() && app.GetUIAction( ProfileManager.GetPrimaryPad() ) == eAppAction_WaitRemoteServerSaveComplete )
|
||||
{
|
||||
// Tick all the games connections
|
||||
pMinecraft->tickAllConnections();
|
||||
Sleep( 100 );
|
||||
}
|
||||
|
||||
if( app.GetXuiAction( ProfileManager.GetPrimaryPad() ) != eAppAction_WaitRemoteServerSaveComplete )
|
||||
if( app.GetUIAction( ProfileManager.GetPrimaryPad() ) != eAppAction_WaitRemoteServerSaveComplete )
|
||||
{
|
||||
// Something cancelled us?
|
||||
return ERROR_CANCELLED;
|
||||
|
||||
Reference in New Issue
Block a user