aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/Consoles_App.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 15:53:32 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 15:53:32 +0700
commitd63f79325f85e014361eb8cf1e41eaebedb1ae71 (patch)
treed9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.Client/Common/Consoles_App.cpp
parentd6ec138710461294c3ffd2723bc8a9f212d3471f (diff)
Get rid of MSVC's __int64
Use either int64_t, uint64_t or long long and unsigned long long, defined as per C++11 standard
Diffstat (limited to 'Minecraft.Client/Common/Consoles_App.cpp')
-rw-r--r--Minecraft.Client/Common/Consoles_App.cpp620
1 files changed, 310 insertions, 310 deletions
diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp
index b047f58e..0e55ec9f 100644
--- a/Minecraft.Client/Common/Consoles_App.cpp
+++ b/Minecraft.Client/Common/Consoles_App.cpp
@@ -198,11 +198,11 @@ CMinecraftApp::CMinecraftApp()
m_dwRequiredTexturePackID=0;
m_bResetNether=false;
-
+
#ifdef _XBOX
// m_bTransferSavesToXboxOne=false;
// m_uiTransferSlotC=5;
-#endif
+#endif
#if (defined _CONTENT_PACAKGE) || (defined _XBOX)
m_bUseDPadForDebug = false;
@@ -219,7 +219,7 @@ CMinecraftApp::CMinecraftApp()
for(int i=0;i<XUSER_MAX_COUNT;i++)
{
- m_vBannedListA[i] = new vector<PBANNEDLISTDATA>;
+ m_vBannedListA[i] = new vector<PBANNEDLISTDATA>;
}
LocaleAndLanguageInit();
@@ -265,7 +265,7 @@ void CMinecraftApp::DebugPrintf(int user, const char *szFormat, ...)
{
SceUID tty2 = sceIoOpen("tty2:", SCE_O_WRONLY, 0);
if(tty2>=0)
- {
+ {
std::string string1(buf);
sceIoWrite(tty2, string1.c_str(), string1.length());
sceIoClose(tty2);
@@ -276,7 +276,7 @@ void CMinecraftApp::DebugPrintf(int user, const char *szFormat, ...)
{
SceUID tty3 = sceIoOpen("tty3:", SCE_O_WRONLY, 0);
if(tty3>=0)
- {
+ {
std::string string1(buf);
sceIoWrite(tty3, string1.c_str(), string1.length());
sceIoClose(tty3);
@@ -318,7 +318,7 @@ void CMinecraftApp::SetAction(int iPad, eXuiAction action, LPVOID param)
m_eXuiAction[iPad]=action;
m_eXuiActionParam[iPad] = param;
}
-}
+}
bool CMinecraftApp::IsAppPaused()
{
@@ -354,7 +354,7 @@ 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++)
@@ -443,7 +443,7 @@ bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,shared_ptr<LocalPlayer> player,
CraftingPanelScreenInput* initData = new CraftingPanelScreenInput();
initData->player = player;
- initData->iContainerType=RECIPE_TYPE_3x3;
+ initData->iContainerType=RECIPE_TYPE_3x3;
initData->iPad = iPad;
initData->x = x;
initData->y = y;
@@ -550,7 +550,7 @@ bool CMinecraftApp::LoadContainerMenu(int iPad,shared_ptr<Container> inventory,
initData->container = container;
initData->iPad = iPad;
- // Load the scene.
+ // Load the scene.
if(app.GetLocalPlayerCount()>1)
{
initData->bSplitscreen=true;
@@ -780,7 +780,7 @@ int CMinecraftApp::DefaultOptionsCallback(LPVOID pParam,C_4JProfile::PROFILESETT
pApp->DebugPrintf("Setting default options for player %d", iPad);
pApp->SetAction(iPad,eAppAction_SetDefaultOptions, (LPVOID)pSettings);
//pApp->SetDefaultOptions(pSettings,iPad);
-
+
// if the profile data has been changed, then force a profile write
// It seems we're allowed to break the 5 minute rule if it's the result of a user action
//pApp->CheckGameSettingsChanged();
@@ -834,7 +834,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
case PROFILE_VERSION_1:
case PROFILE_VERSION_2:
// need to fill in values for the new profile data. No need to save the profile - that'll happen if they get changed, or if the auto save for the profile kicks in
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
pGameSettings->ucMenuSensitivity=100; //eGameSetting_Sensitivity_InMenu
pGameSettings->ucInterfaceOpacity=80; //eGameSetting_Sensitivity_InMenu
@@ -880,7 +880,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
break;
case PROFILE_VERSION_3:
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
pGameSettings->uiBitmaskValues=0L; // reset
pGameSettings->uiBitmaskValues|=GAMESETTING_CLOUDS; //eGameSetting_Clouds - on
@@ -917,7 +917,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
case PROFILE_VERSION_4:
{
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
-
+
pGameSettings->uiBitmaskValues&=~GAMESETTING_BEDROCKFOG; //eGameSetting_BedrockFog - off
pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYHUD; //eGameSetting_DisplayHUD - on
pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYHAND; //eGameSetting_DisplayHand - on
@@ -1014,7 +1014,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
break;
case PROFILE_VERSION_7:
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
// reset the display new message counter
pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYUPDATEMSG; //eGameSetting_DisplayUpdateMessage (counter)
@@ -1037,7 +1037,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
break;
#endif
case PROFILE_VERSION_8:
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
// reset the display new message counter
//pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYUPDATEMSG; //eGameSetting_DisplayUpdateMessage (counter)
@@ -1055,17 +1055,17 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
break;
case PROFILE_VERSION_9:
// PS3DEC13
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
pGameSettings->uiBitmaskValues&=~GAMESETTING_PS3EULAREAD; //eGameSetting_PS3_EULA_Read - off
-
+
// PS3 1.05 - added Greek
pGameSettings->ucLanguage = MINECRAFT_LANGUAGE_DEFAULT; // use the system language
}
break;
case PROFILE_VERSION_10:
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
pGameSettings->ucLanguage = MINECRAFT_LANGUAGE_DEFAULT; // use the system language
@@ -1073,7 +1073,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
break;
default:
- {
+ {
// 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
@@ -1175,7 +1175,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
if(iPad==ProfileManager.GetPrimaryPad())
{
pMinecraft->options->set(Options::Option::SOUND,((float)GameSettingsA[iPad]->ucSoundFXVolume)/100.0f);
- }
+ }
break;
case eGameSetting_Gamma:
if(iPad==ProfileManager.GetPrimaryPad())
@@ -1183,10 +1183,10 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
// ucGamma range is 0-100, UpdateGamma is 0 - 32768
float fVal=((float)GameSettingsA[iPad]->ucGamma)*327.68f;
RenderManager.UpdateGamma((unsigned short)fVal);
- }
+ }
break;
- case eGameSetting_Difficulty:
+ case eGameSetting_Difficulty:
if(iPad==ProfileManager.GetPrimaryPad())
{
pMinecraft->options->toggle(Options::Option::DIFFICULTY,GameSettingsA[iPad]->usBitmaskValues&0x03);
@@ -1208,7 +1208,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
{
app.DebugPrintf("NOT ACTIONING DIFFICULTY - Primary pad is %d, This pad is %d\n",ProfileManager.GetPrimaryPad(),iPad);
}
-
+
break;
case eGameSetting_Sensitivity_InGame:
// 4J-PB - we don't use the options value
@@ -1335,7 +1335,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
//nothing to do here
break;
case eGameSetting_BedrockFog:
- {
+ {
bool bInGame=pMinecraft->level!=NULL;
// Game Host only
@@ -1414,8 +1414,8 @@ DWORD CMinecraftApp::GetPlayerSkinId(int iPad)
{
// 4J Stu - DLC skins are numbered using decimal rather than hex to make it easier to number manually
swprintf(chars, 256, L"dlcskin%08d.png", GET_DLC_SKIN_ID_FROM_BITMASK(dwSkin));
-
- Pack=app.m_dlcManager.getPackContainingSkin(chars);
+
+ Pack=app.m_dlcManager.getPackContainingSkin(chars);
if(Pack)
{
@@ -1518,7 +1518,7 @@ unsigned int CMinecraftApp::GetPlayerFavoriteSkinsCount(int iPad)
void CMinecraftApp::ValidateFavoriteSkins(int iPad)
{
unsigned int uiCount=GetPlayerFavoriteSkinsCount(iPad);
-
+
// remove invalid skins
unsigned int uiValidSkin=0;
wchar_t chars[256];
@@ -1539,7 +1539,7 @@ void CMinecraftApp::ValidateFavoriteSkins(int iPad)
if( pDLCPack->hasPurchasedFile(DLCManager::e_DLCType_Skin, L"") || (pSkinFile && pSkinFile->isFree()))
{
- GameSettingsA[iPad]->uiFavoriteSkinA[uiValidSkin++]=GameSettingsA[iPad]->uiFavoriteSkinA[i];
+ GameSettingsA[iPad]->uiFavoriteSkinA[uiValidSkin++]=GameSettingsA[iPad]->uiFavoriteSkinA[i];
}
}
}
@@ -1560,7 +1560,7 @@ void CMinecraftApp::HideMashupPackWorld(int iPad, unsigned int iMashupPackID)
void CMinecraftApp::SetMinecraftLanguage(int iPad, unsigned char ucLanguage)
{
- GameSettingsA[iPad]->ucLanguage = ucLanguage;
+ GameSettingsA[iPad]->ucLanguage = ucLanguage;
GameSettingsA[iPad]->bSettingsChanged = true;
}
@@ -1612,7 +1612,7 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
if(iPad==ProfileManager.GetPrimaryPad())
{
ActionGameSettings(iPad,eVal);
- }
+ }
GameSettingsA[iPad]->bSettingsChanged=true;
}
break;
@@ -1627,7 +1627,7 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
GameSettingsA[iPad]->bSettingsChanged=true;
}
break;
- case eGameSetting_Difficulty:
+ case eGameSetting_Difficulty:
if((GameSettingsA[iPad]->usBitmaskValues&0x03)!=(ucVal&0x03))
{
GameSettingsA[iPad]->usBitmaskValues&=~0x03;
@@ -1972,9 +1972,9 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
- }
- break;
- case eGameSetting_UISize:
+ }
+ break;
+ case eGameSetting_UISize:
if((GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_UISIZE)!=((ucVal&0x03)<<11))
{
GameSettingsA[iPad]->uiBitmaskValues&=~GAMESETTING_UISIZE;
@@ -1986,7 +1986,7 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
GameSettingsA[iPad]->bSettingsChanged=true;
}
break;
- case eGameSetting_UISizeSplitscreen:
+ case eGameSetting_UISizeSplitscreen:
if((GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_UISIZE_SPLITSCREEN)!=((ucVal&0x03)<<13))
{
GameSettingsA[iPad]->uiBitmaskValues&=~GAMESETTING_UISIZE_SPLITSCREEN;
@@ -2011,8 +2011,8 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
- }
- break;
+ }
+ break;
case eGameSetting_PS3_EULA_Read:
if((GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_PS3EULAREAD)!=(ucVal&0x01)<<16)
{
@@ -2026,8 +2026,8 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
- }
- break;
+ }
+ break;
case eGameSetting_PSVita_NetworkModeAdhoc:
if((GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_PSVITANETWORKMODEADHOC)!=(ucVal&0x01)<<17)
{
@@ -2041,8 +2041,8 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
- }
- break;
+ }
+ break;
}
}
@@ -2067,7 +2067,7 @@ unsigned char CMinecraftApp::GetGameSettings(int iPad,eGameSetting eVal)
case eGameSetting_Gamma:
return GameSettingsA[iPad]->ucGamma;
break;
- case eGameSetting_Difficulty:
+ case eGameSetting_Difficulty:
return GameSettingsA[iPad]->usBitmaskValues&0x0003;
break;
case eGameSetting_Sensitivity_InGame:
@@ -2116,7 +2116,7 @@ unsigned char CMinecraftApp::GetGameSettings(int iPad,eGameSetting eVal)
case eGameSetting_InterfaceOpacity:
return GameSettingsA[iPad]->ucInterfaceOpacity;
break;
-
+
case eGameSetting_Clouds:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_CLOUDS);
break;
@@ -2131,7 +2131,7 @@ unsigned char CMinecraftApp::GetGameSettings(int iPad,eGameSetting eVal)
break;
case eGameSetting_DisplayUpdateMessage:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_DISPLAYUPDATEMSG)>>4;
- break;
+ break;
case eGameSetting_BedrockFog:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_BEDROCKFOG)>>6;
break;
@@ -2457,13 +2457,13 @@ void CMinecraftApp::HandleXuiActions(void)
param = m_eXuiActionParam[i];
if(eAction!=eAppAction_Idle)
- {
+ {
switch(eAction)
{
// the renderer will capture a screenshot
case eAppAction_SocialPost:
if(ProfileManager.IsFullVersion())
- {
+ {
// Facebook Share
if( CSocialManager::Instance()->IsTitleAllowedToPostImages() && CSocialManager::Instance()->AreAllUsersAllowedToPostImages() )
{
@@ -2523,7 +2523,7 @@ void CMinecraftApp::HandleXuiActions(void)
else
{
// ask the player if they would like to upgrade, or they'll lose the level
-
+
UINT uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@@ -2533,7 +2533,7 @@ void CMinecraftApp::HandleXuiActions(void)
break;
case eAppAction_AutosaveSaveGame:
- {
+ {
// Need to run a check to see if the save exists in order to stop the dialog asking if we want to overwrite it coming up on an autosave
bool bSaveExists;
StorageManager.DoesSaveExist(&bSaveExists);
@@ -2543,7 +2543,7 @@ void CMinecraftApp::HandleXuiActions(void)
{
// flag the render to capture the screenshot for the save
- SetAction(i,eAppAction_AutosaveSaveGameCapturedThumbnail);
+ SetAction(i,eAppAction_AutosaveSaveGameCapturedThumbnail);
}
}
@@ -2569,7 +2569,7 @@ void CMinecraftApp::HandleXuiActions(void)
//INT saveOrCheckpointId = 0;
//bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
//SentientManager.RecordLevelSaveOrCheckpoint(ProfileManager.GetPrimaryPad(), saveOrCheckpointId);
-
+
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &UIScene_PauseMenu::SaveWorldThreadProc;
loadingParams->lpParam = (LPVOID)false;
@@ -2593,7 +2593,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
loadingParams->completionData = completionData;
-
+
// 4J Stu - Xbox only
#ifdef _XBOX
// Temporarily make this scene fullscreen
@@ -2606,7 +2606,7 @@ void CMinecraftApp::HandleXuiActions(void)
break;
case eAppAction_AutosaveSaveGameCapturedThumbnail:
- {
+ {
app.SetAutosaveTimerTime();
SetAction(i,eAppAction_Idle);
@@ -2624,12 +2624,12 @@ void CMinecraftApp::HandleXuiActions(void)
// This just allows it to be shown
if(pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()] != NULL) pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()]->getTutorial()->showTutorialPopup(false);
-
+
//INT saveOrCheckpointId = 0;
//bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
//SentientManager.RecordLevelSaveOrCheckpoint(ProfileManager.GetPrimaryPad(), saveOrCheckpointId);
-
+
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &UIScene_PauseMenu::SaveWorldThreadProc;
@@ -2642,7 +2642,7 @@ void CMinecraftApp::HandleXuiActions(void)
completionData->iPad = ProfileManager.GetPrimaryPad();
//completionData->bAutosaveWasMenuDisplayed=ui.GetMenuDisplayed(ProfileManager.GetPrimaryPad());
loadingParams->completionData = completionData;
-
+
// 4J Stu - Xbox only
#ifdef _XBOX
// Temporarily make this scene fullscreen
@@ -2656,7 +2656,7 @@ void CMinecraftApp::HandleXuiActions(void)
case eAppAction_ExitPlayer:
// a secondary player has chosen to quit
{
- int iPlayerC=g_NetworkManager.GetPlayerCount();
+ int iPlayerC=g_NetworkManager.GetPlayerCount();
// Since the player is exiting, let's flush any profile writes for them, and hope we're not breaking TCR 136...
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
@@ -2677,7 +2677,7 @@ void CMinecraftApp::HandleXuiActions(void)
// not required - it's done within the removeLocalPlayerIdx
// if(pMinecraft->level->isClientSide)
- // {
+ // {
// // we need to remove the qnetplayer, or this player won't be able to get back into the game until qnet times out and removes them
// g_NetworkManager.NotifyPlayerLeaving(g_NetworkManager.GetLocalPlayerByUserIndex(i));
// }
@@ -2716,9 +2716,9 @@ void CMinecraftApp::HandleXuiActions(void)
if(iPlayerC>2) // one player is about to leave here - they'll be set to idle in the qnet manager player leave
{
for(int iPlayer=0;iPlayer<XUSER_MAX_COUNT;iPlayer++)
- {
+ {
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
@@ -2733,9 +2733,9 @@ void CMinecraftApp::HandleXuiActions(void)
else
{
for(int iPlayer=0;iPlayer<XUSER_MAX_COUNT;iPlayer++)
- {
+ {
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
@@ -2747,11 +2747,11 @@ void CMinecraftApp::HandleXuiActions(void)
}
}
}
-
+
#ifdef _DURANGO
ProfileManager.RemoveGamepadFromGame(i);
-#endif
-
+#endif
+
SetAction(i,eAppAction_Idle);
}
break;
@@ -2763,7 +2763,7 @@ void CMinecraftApp::HandleXuiActions(void)
StorageManager.ForceQueuedProfileWrites(i);
#else
ProfileManager.ForceQueuedProfileWrites(i);
-#endif
+#endif
// if there are any tips showing, we need to close them
pMinecraft->gui->clearMessages(i);
@@ -2798,9 +2798,9 @@ void CMinecraftApp::HandleXuiActions(void)
if(iPlayerC>2) // one player is about to leave here - they'll be set to idle in the qnet manager player leave
{
for(int iPlayer=0;iPlayer<XUSER_MAX_COUNT;iPlayer++)
- {
+ {
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
@@ -2815,9 +2815,9 @@ void CMinecraftApp::HandleXuiActions(void)
else
{
for(int iPlayer=0;iPlayer<XUSER_MAX_COUNT;iPlayer++)
- {
+ {
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
@@ -2872,7 +2872,7 @@ void CMinecraftApp::HandleXuiActions(void)
SetAction(i,eAppAction_Idle);
// If we're already leaving don't exit
- if (g_NetworkManager.IsLeavingGame())
+ if (g_NetworkManager.IsLeavingGame())
{
break;
}
@@ -2903,7 +2903,7 @@ void CMinecraftApp::HandleXuiActions(void)
Minecraft::GetInstance()->forceStatsSave(j);
}
}
- LeaderboardManager::Instance()->CloseSession();
+ LeaderboardManager::Instance()->CloseSession();
#elif (defined _XBOX)
ProfileManager.ForceQueuedProfileWrites();
#endif
@@ -2923,7 +2923,7 @@ void CMinecraftApp::HandleXuiActions(void)
#ifdef _DURANGO
ProfileManager.RemoveGamepadFromGame(i);
-#endif
+#endif
SetAction(i,eAppAction_Idle);
return;
}
@@ -2941,13 +2941,13 @@ void CMinecraftApp::HandleXuiActions(void)
// Change the presence info
// Are we offline or online, and how many players are there
-
+
if(g_NetworkManager.GetPlayerCount()>1)
{
for(int j=0;j<XUSER_MAX_COUNT;j++)
- {
+ {
if(pMinecraft->localplayers[j])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
app.SetRichPresenceContext(j,CONTEXT_GAME_STATE_BLANK);
@@ -2966,7 +2966,7 @@ void CMinecraftApp::HandleXuiActions(void)
{
app.SetRichPresenceContext(i,CONTEXT_GAME_STATE_BLANK);
if(g_NetworkManager.IsLocalGame())
- {
+ {
ProfileManager.SetCurrentGameActivity(i,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
}
else
@@ -2987,14 +2987,14 @@ void CMinecraftApp::HandleXuiActions(void)
// turn off the gamertags in splitscreen for the primary player, since they are about to be made fullscreen
ui.HideAllGameUIElements();
-
+
// 4J Stu - Fix for #12368 - Crash: Game crashes when saving then exiting and selecting to save
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
#ifdef _XBOX
app.TutorialSceneNavigateBack(idx,true);
#endif
-
+
// 4J Stu - Fix for #13257 - CRASH: Gameplay: Title crashed after exiting the tutorial
// It doesn't matter if they were in the tutorial already
pMinecraft->playerLeftTutorial( idx );
@@ -3002,7 +3002,7 @@ void CMinecraftApp::HandleXuiActions(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &UIScene_PauseMenu::ExitWorldThreadProc;
- loadingParams->lpParam = param;
+ loadingParams->lpParam = param;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
// If param is non-null then this is a forced exit by the server, so make sure the player knows why
@@ -3015,11 +3015,11 @@ void CMinecraftApp::HandleXuiActions(void)
completionData->iPad = DEFAULT_XUI_MENU_USER;
loadingParams->completionData = completionData;
- ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
+ ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
}
break;
case eAppAction_ExitWorldTrial:
- {
+ {
SetAction(i,eAppAction_Idle);
pMinecraft->gui->clearMessages();
@@ -3031,14 +3031,14 @@ void CMinecraftApp::HandleXuiActions(void)
SetGameStarted(false);
ui.CloseAllPlayersScenes();
-
+
// 4J Stu - Fix for #12368 - Crash: Game crashes when saving then exiting and selecting to save
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
#ifdef _XBOX
app.TutorialSceneNavigateBack(idx,true);
#endif
-
+
// 4J Stu - Fix for #13257 - CRASH: Gameplay: Title crashed after exiting the tutorial
// It doesn't matter if they were in the tutorial already
pMinecraft->playerLeftTutorial( idx );
@@ -3046,7 +3046,7 @@ void CMinecraftApp::HandleXuiActions(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &UIScene_PauseMenu::ExitWorldThreadProc;
- loadingParams->lpParam = param;
+ loadingParams->lpParam = param;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bShowBackground=TRUE;
@@ -3054,7 +3054,7 @@ void CMinecraftApp::HandleXuiActions(void)
completionData->type = e_ProgressCompletion_NavigateToHomeMenu;
completionData->iPad = DEFAULT_XUI_MENU_USER;
loadingParams->completionData = completionData;
-
+
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
}
@@ -3072,7 +3072,7 @@ void CMinecraftApp::HandleXuiActions(void)
param->showTooltips = false;
param->setFailTimer = false;
ui.NavigateToScene(i,eUIScene_ConnectingProgress, param);
-
+
// Need to reset this incase the player has already died and respawned
pMinecraft->localplayers[i]->SetPlayerRespawned(false);
@@ -3100,7 +3100,7 @@ void CMinecraftApp::HandleXuiActions(void)
// Disable game & update thread whilst we do any of this
//app.SetGameStarted(false);
pMinecraft->gameRenderer->DisableUpdateThread();
-
+
// 4J Stu - We don't need this on a thread in multiplayer as respawning is asynchronous.
pMinecraft->localplayers[i]->respawn();
@@ -3116,7 +3116,7 @@ void CMinecraftApp::HandleXuiActions(void)
//app.NavigateToScene(i,eUIScene_FullscreenProgress, loadingParams, true);
}
- }
+ }
break;
case eAppAction_WaitForRespawnComplete:
player = pMinecraft->localplayers[i];
@@ -3156,8 +3156,8 @@ void CMinecraftApp::HandleXuiActions(void)
}
break;
case eAppAction_PrimaryPlayerSignedOut:
- {
- //SetAction(i,eAppAction_Idle);
+ {
+ //SetAction(i,eAppAction_Idle);
// clear the autosavetimer that might be displayed
ui.ShowAutosaveCountdownTimer(false);
@@ -3175,10 +3175,10 @@ void CMinecraftApp::HandleXuiActions(void)
// 4J-PB - the libs will display the Returned to Title screen
// UINT uiIDA[1];
// uiIDA[0]=IDS_CONFIRM_OK;
-//
+//
// ui.RequestMessageBox(IDS_RETURNEDTOMENU_TITLE, IDS_RETURNEDTOTITLESCREEN_TEXT, uiIDA, 1, i,&CMinecraftApp::PrimaryPlayerSignedOutReturned,this,app.GetStringTable());
if( g_NetworkManager.IsInSession() )
- {
+ {
app.SetAction(i,eAppAction_PrimaryPlayerSignedOutReturned);
}
else
@@ -3226,7 +3226,7 @@ void CMinecraftApp::HandleXuiActions(void)
if (!gameStarted)
{
- // 1. Exit
+ // 1. Exit
MinecraftServer::HaltServer();
// Fix for #12530 - TCR 001 BAS Game Stability: Title will crash if the player disconnects while starting a new world and then opts to play the tutorial once they have been returned to the Main Menu.
@@ -3294,21 +3294,21 @@ void CMinecraftApp::HandleXuiActions(void)
ui.HideAllGameUIElements();
ui.CloseAllPlayersScenes();
-
+
// 4J Stu - Fix for #12368 - Crash: Game crashes when saving then exiting and selecting to save
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
#ifdef _XBOX
app.TutorialSceneNavigateBack(idx,true);
#endif
-
+
// 4J Stu - Fix for #13257 - CRASH: Gameplay: Title crashed after exiting the tutorial
// It doesn't matter if they were in the tutorial already
pMinecraft->playerLeftTutorial( idx );
}
LoadingInputParams *loadingParams = new LoadingInputParams();
- loadingParams->func = &CMinecraftApp::SignoutExitWorldThreadProc;
+ loadingParams->func = &CMinecraftApp::SignoutExitWorldThreadProc;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bShowBackground=TRUE;
@@ -3346,7 +3346,7 @@ void CMinecraftApp::HandleXuiActions(void)
break;
case eAppAction_TrialOver:
- {
+ {
SetAction(i,eAppAction_Idle);
UINT uiIDA[2];
uiIDA[0]=IDS_UNLOCK_TITLE;
@@ -3358,7 +3358,7 @@ void CMinecraftApp::HandleXuiActions(void)
// INVITES
case eAppAction_DashboardTrialJoinFromInvite:
- {
+ {
TelemetryManager->RecordUpsellPresented(i, eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID);
SetAction(i,eAppAction_Idle);
@@ -3370,7 +3370,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
break;
case eAppAction_ExitAndJoinFromInvite:
- {
+ {
UINT uiIDA[3];
SetAction(i,eAppAction_Idle);
@@ -3379,7 +3379,7 @@ void CMinecraftApp::HandleXuiActions(void)
#if defined(_XBOX_ONE) || defined(__ORBIS__)
// Show save option is saves ARE disabled
if(ProfileManager.IsFullVersion() && StorageManager.GetSaveDisabled() && i==ProfileManager.GetPrimaryPad() && g_NetworkManager.IsHost() && GetGameStarted() )
- {
+ {
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_EXIT_GAME_SAVE;
uiIDA[2]=IDS_EXIT_GAME_NO_SAVE;
@@ -3389,7 +3389,7 @@ void CMinecraftApp::HandleXuiActions(void)
else
#else
if(ProfileManager.IsFullVersion() && !StorageManager.GetSaveDisabled() && i==ProfileManager.GetPrimaryPad() && g_NetworkManager.IsHost() && GetGameStarted() )
- {
+ {
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_EXIT_GAME_SAVE;
uiIDA[2]=IDS_EXIT_GAME_NO_SAVE;
@@ -3409,7 +3409,7 @@ void CMinecraftApp::HandleXuiActions(void)
ui.RequestMessageBox(IDS_UNLOCK_TITLE, IDS_UNLOCK_ACCEPT_INVITE, uiIDA, 2, i,&CMinecraftApp::UnlockFullInviteReturned,this,app.GetStringTable());
}
else
- {
+ {
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_EXIT_GAME, IDS_CONFIRM_LEAVE_VIA_INVITE, uiIDA, 2,i,&CMinecraftApp::ExitAndJoinFromInvite,this,app.GetStringTable(), 0, 0, false);
@@ -3430,14 +3430,14 @@ void CMinecraftApp::HandleXuiActions(void)
SetGameStarted(false);
ui.CloseAllPlayersScenes();
-
+
// 4J Stu - Fix for #12368 - Crash: Game crashes when saving then exiting and selecting to save
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
#ifdef _XBOX
app.TutorialSceneNavigateBack(idx,true);
#endif
-
+
// 4J Stu - Fix for #13257 - CRASH: Gameplay: Title crashed after exiting the tutorial
// It doesn't matter if they were in the tutorial already
pMinecraft->playerLeftTutorial( idx );
@@ -3497,7 +3497,7 @@ void CMinecraftApp::HandleXuiActions(void)
if(ProfileManager.IsSignedIn(index) )
{
if(index==i || pMinecraft->localplayers[index]!=NULL )
- {
+ {
m_InviteData.dwLocalUsersMask |= g_NetworkManager.GetLocalPlayerMask( index );
}
}
@@ -3506,7 +3506,7 @@ void CMinecraftApp::HandleXuiActions(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CGameNetworkManager::ExitAndJoinFromInviteThreadProc;
- loadingParams->lpParam = (LPVOID)&m_InviteData;
+ loadingParams->lpParam = (LPVOID)&m_InviteData;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bShowBackground=TRUE;
@@ -3544,7 +3544,7 @@ void CMinecraftApp::HandleXuiActions(void)
if( index != inviteData->dwUserIndex && ProfileManager.IsSignedIn(index) )
{
if( (m_InviteData.dwLocalUsersMask & g_NetworkManager.GetLocalPlayerMask( index ) ) == 0 )
- {
+ {
ProfileManager.RemoveGamepadFromGame(index);
}
}
@@ -3568,7 +3568,7 @@ void CMinecraftApp::HandleXuiActions(void)
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_CONNECTION_LOST_SERVER, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
-
+
ui.NavigateToHomeMenu();
ui.UpdatePlayerBasePositions();
}
@@ -3580,12 +3580,12 @@ void CMinecraftApp::HandleXuiActions(void)
if( g_NetworkManager.IsInGameplay() )
{
// This kicks off a thread that waits for the server to end, then closes the current session, starts a new one and joins the local players into it
-
+
SetAction(i,eAppAction_Idle);
if( !GetChangingSessionType() && !g_NetworkManager.IsLocalGame() )
{
- SetGameStarted(false);
+ SetGameStarted(false);
SetChangingSessionType(true);
SetReallyChangingSessionType(true);
@@ -3597,14 +3597,14 @@ void CMinecraftApp::HandleXuiActions(void)
ui.CloseAllPlayersScenes();
}
ui.ShowOtherPlayersBaseScene(ProfileManager.GetPrimaryPad(), true);
-
+
// Remove this line to fix:
// #49084 - TU5: Code: Gameplay: The title crashes every time client navigates to 'Play game' menu and loads/creates new game after a "Connection to Xbox LIVE was lost" message has appeared.
//app.NavigateToScene(0,eUIScene_Main);
-
+
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CGameNetworkManager::ChangeSessionTypeThreadProc;
- loadingParams->lpParam = NULL;
+ loadingParams->lpParam = NULL;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
#ifdef __PS3__
@@ -3626,7 +3626,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
loadingParams->completionData = completionData;
- ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
+ ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
}
}
else if( g_NetworkManager.IsLeavingGame() )
@@ -3653,9 +3653,9 @@ void CMinecraftApp::HandleXuiActions(void)
case eAppAction_SetDefaultOptions:
SetAction(i,eAppAction_Idle);
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
- SetDefaultOptions((C4JStorage::PROFILESETTINGS *)param,i);
+ SetDefaultOptions((C4JStorage::PROFILESETTINGS *)param,i);
#else
- SetDefaultOptions((C_4JProfile::PROFILESETTINGS *)param,i);
+ SetDefaultOptions((C_4JProfile::PROFILESETTINGS *)param,i);
#endif
// if the profile data has been changed, then force a profile write
@@ -3663,7 +3663,7 @@ void CMinecraftApp::HandleXuiActions(void)
CheckGameSettingsChanged(true,i);
break;
-
+
case eAppAction_RemoteServerSave:
{
// If the remote server save has already finished, don't complete the action
@@ -3674,7 +3674,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
SetAction(i,eAppAction_WaitRemoteServerSaveComplete);
-
+
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
ui.CloseUIScenes(i, true);
@@ -3685,7 +3685,7 @@ void CMinecraftApp::HandleXuiActions(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CMinecraftApp::RemoteSaveThreadProc;
- loadingParams->lpParam = NULL;
+ loadingParams->lpParam = NULL;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bRequiresUserAction=FALSE;
@@ -3727,7 +3727,7 @@ void CMinecraftApp::HandleXuiActions(void)
if(!app.GetGameStarted()) MinecraftServer::HaltServer(true);
if( g_NetworkManager.IsInSession() )
- {
+ {
app.SetAction(i,eAppAction_PrimaryPlayerSignedOutReturned);
}
else
@@ -3736,7 +3736,7 @@ void CMinecraftApp::HandleXuiActions(void)
MinecraftServer::resetFlags();
}
break;
-
+
case eAppAction_BanLevel:
{
// It's possible that this state can get set after the game has been exited (e.g. by network disconnection) so we can't ban the level at that point
@@ -3744,12 +3744,12 @@ void CMinecraftApp::HandleXuiActions(void)
{
TelemetryManager->RecordBanLevel(i);
-#if defined _XBOX
- INetworkPlayer *pHost=g_NetworkManager.GetHostPlayer();
+#if defined _XBOX
+ INetworkPlayer *pHost=g_NetworkManager.GetHostPlayer();
// write the level to the banned level list, and exit the world
AddLevelToBannedLevelList(i,((NetworkPlayerXbox *)pHost)->GetUID(),GetUniqueMapName(),true);
#elif defined _XBOX_ONE
- INetworkPlayer *pHost=g_NetworkManager.GetHostPlayer();
+ INetworkPlayer *pHost=g_NetworkManager.GetHostPlayer();
AddLevelToBannedLevelList(i,pHost->GetUID(),GetUniqueMapName(),true);
#endif
// primary player would exit the world, secondary would exit the player
@@ -3765,7 +3765,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
break;
case eAppAction_LevelInBanLevelList:
- {
+ {
UINT uiIDA[2];
uiIDA[0]=IDS_BUTTON_REMOVE_FROM_BAN_LIST;
uiIDA[1]=IDS_EXIT_GAME;
@@ -3804,15 +3804,15 @@ void CMinecraftApp::HandleXuiActions(void)
break;
case eAppAction_ReloadTexturePack:
- {
+ {
SetAction(i,eAppAction_Idle);
Minecraft *pMinecraft = Minecraft::GetInstance();
pMinecraft->textures->reloadAll();
pMinecraft->skins->updateUI();
-
+
if(!pMinecraft->skins->isUsingDefaultSkin())
{
- TexturePack *pTexturePack = pMinecraft->skins->getSelected();
+ TexturePack *pTexturePack = pMinecraft->skins->getSelected();
DLCPack *pDLCPack=pTexturePack->getDLCPack();
@@ -3830,7 +3830,7 @@ void CMinecraftApp::HandleXuiActions(void)
// 4J-PB - If the texture pack has audio, we need to switch to this
if(pMinecraft->skins->getSelected()->hasAudio())
{
- Minecraft::GetInstance()->soundEngine->playStreaming(L"", 0, 0, 0, 1, 1);
+ Minecraft::GetInstance()->soundEngine->playStreaming(L"", 0, 0, 0, 1, 1);
}
}
@@ -3863,7 +3863,7 @@ void CMinecraftApp::HandleXuiActions(void)
eTMS = app.GetTMSAction(i);
if(eTMS!=eTMSAction_Idle)
- {
+ {
switch(eTMS)
{
// TMS++ actions
@@ -3888,7 +3888,7 @@ void CMinecraftApp::HandleXuiActions(void)
#endif
case eTMSAction_TMSPP_UserFileList:
// retrieve the file list first
-#if defined _XBOX
+#if defined _XBOX
SetTMSAction(i,eTMSAction_TMSPP_UserFileList_Waiting);
app.TMSPP_RetrieveFileList(i,C4JStorage::eGlobalStorage_TitleUser,"\\",eTMSAction_TMSPP_XUIDSFile);
#elif defined _XBOX_ONE
@@ -3907,7 +3907,7 @@ void CMinecraftApp::HandleXuiActions(void)
SetTMSAction(i,eTMSAction_TMSPP_DLCFile);
#endif
- break;
+ break;
case eTMSAction_TMSPP_DLCFile:
#if defined _XBOX || defined _XBOX_ONE
SetTMSAction(i,eTMSAction_TMSPP_DLCFile_Waiting);
@@ -3941,7 +3941,7 @@ void CMinecraftApp::HandleXuiActions(void)
case eTMSAction_TMSPP_RetrieveFiles_HelpAndOptions:
case eTMSAction_TMSPP_RetrieveFiles_DLCMain:
// retrieve the file list first
-#if defined _XBOX
+#if defined _XBOX
// pass in the next app action on the call or callback completing
SetTMSAction(i,eTMSAction_TMSPP_XUIDSFile_Waiting);
app.TMSPP_RetrieveFileList(i,C4JStorage::eGlobalStorage_Title,"\\",eTMSAction_TMSPP_DLCFileOnly);
@@ -3953,7 +3953,7 @@ void CMinecraftApp::HandleXuiActions(void)
#endif
break;
case eTMSAction_TMSPP_RetrieveUserFilelist_DLCFileOnly:
-#if defined _XBOX
+#if defined _XBOX
SetTMSAction(i,eTMSAction_TMSPP_UserFileList_Waiting);
app.TMSPP_RetrieveFileList(i,C4JStorage::eGlobalStorage_TitleUser,"\\",eTMSAction_TMSPP_XUIDSFile);
#elif defined _XBOX_ONE
@@ -4095,7 +4095,7 @@ void CMinecraftApp::loadMediaArchive()
mediapath = L"Common\\Media\\MediaPSVita.arc";
#endif
- if (!mediapath.empty())
+ if (!mediapath.empty())
{
m_mediaArchive = new ArchiveFile( File(mediapath) );
}
@@ -4176,7 +4176,7 @@ int CMinecraftApp::PrimaryPlayerSignedOutReturned(void *pParam,int iPad,const C4
// We always create a session before kicking of any of the game code, so even though we may still be joining/creating a game
// at this point we want to handle it differently from just being in a menu
if( g_NetworkManager.IsInSession() )
- {
+ {
app.SetAction(iPad,eAppAction_PrimaryPlayerSignedOutReturned);
}
else
@@ -4193,7 +4193,7 @@ int CMinecraftApp::EthernetDisconnectReturned(void *pParam,int iPad,const C4JSto
// if the player is null, we're in the menus
if(Minecraft::GetInstance()->player!=NULL)
- {
+ {
app.SetAction(pMinecraft->player->GetXboxPad(),eAppAction_EthernetDisconnectedReturned);
}
else
@@ -4323,10 +4323,10 @@ int CMinecraftApp::SignoutExitWorldThreadProc( void* lpParameter )
// 4J-JEV: Fix for #106402 - TCR #014 BAS Debug Output:
// TU12: Mass Effect Mash-UP: Save file "Default_DisplayName" is created on all storage devices after signing out from a re-launched pre-generated world
- app.m_gameRules.unloadCurrentGameRules(); //
+ app.m_gameRules.unloadCurrentGameRules(); //
MinecraftServer::resetFlags();
-
+
// We can't start/join a new game until the session is destroyed, so wait for it to be idle again
while( g_NetworkManager.IsInSession() )
{
@@ -4426,7 +4426,7 @@ int CMinecraftApp::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::EMes
}
#elif defined(__ORBIS__)
else
- {
+ {
// Determine why they're not "signed in live"
if (ProfileManager.isSignedInPSN(iPad))
{
@@ -4438,7 +4438,7 @@ int CMinecraftApp::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::EMes
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
else
- {
+ {
// Not signed in to PSN
UINT uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
@@ -4495,7 +4495,7 @@ int CMinecraftApp::UnlockFullExitReturned(void *pParam,int iPad,C4JStorage::EMes
}
#elif defined(__ORBIS__)
else
- {
+ {
// Determine why they're not "signed in live"
if (ProfileManager.isSignedInPSN(iPad))
{
@@ -4509,7 +4509,7 @@ int CMinecraftApp::UnlockFullExitReturned(void *pParam,int iPad,C4JStorage::EMes
pApp->SetAction(pMinecraft->player->GetXboxPad(),eAppAction_ExitWorldTrial);
}
else
- {
+ {
// Not signed in to PSN
UINT uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
@@ -4594,7 +4594,7 @@ void CMinecraftApp::ProfileReadErrorCallback(void *pParam)
void CMinecraftApp::ClearSignInChangeUsersMask()
{
- // 4J-PB - When in the main menu, the user is on pad 0, and any change they make to their profile will be to pad 0 data
+ // 4J-PB - When in the main menu, the user is on pad 0, and any change they make to their profile will be to pad 0 data
// If they then go in as a secondary player to a splitscreen game, their profile will not be read again on pad 1 if they were previously in a splitscreen game
// This is because m_uiLastSignInData remembers they were in previously, and doesn't read the profile data for them again
// Fix this by resetting the m_uiLastSignInData on pressing play game for secondary users. The Primary user does a read profile on play game anyway
@@ -4629,7 +4629,7 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
{
// Primary Player gone or there's been a sign out and sign in of the primary player, so kick them out
pApp->SetAction(iPrimaryPlayer,eAppAction_PrimaryPlayerSignedOut);
-
+
// 4J-PB - invalidate their banned level list
pApp->InvalidateBannedList(iPrimaryPlayer);
@@ -4700,7 +4700,7 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
bool bPlayerChanged=(uiChangedPlayers&(1<<i))==(1<<i);
bool bPlayerSignedIn=((uiSignInData&(1<<i))!=0);
- if( bPlayerChanged && (!bPlayerSignedIn || (bPlayerSignedIn && !ProfileManager.AreXUIDSEqual(pApp->m_currentSigninInfo[i].xuid, info.xuid) ) ))
+ if( bPlayerChanged && (!bPlayerSignedIn || (bPlayerSignedIn && !ProfileManager.AreXUIDSEqual(pApp->m_currentSigninInfo[i].xuid, info.xuid) ) ))
{
// 4J-PB - invalidate their banned level list
pApp->DebugPrintf("Player at index %d Left - invalidating their banned list\n",i);
@@ -4735,7 +4735,7 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
pApp->SetAction(iPrimaryPlayer,eAppAction_EthernetDisconnected);
}
-
+
g_NetworkManager.HandleSignInChange();
}
// Some menus require the player to be signed in to live, so if this callback happens and the primary player is
@@ -4749,7 +4749,7 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
// 4J-JEV: Need to kick of loading of profile data for sub-sign in players.
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
- if( i != iPrimaryPlayer
+ if( i != iPrimaryPlayer
&& ( uiChangedPlayers & (1<<i) )
&& ( uiSignInData & (1<<i) )
)
@@ -4869,7 +4869,7 @@ void CMinecraftApp::NotificationsCallback(LPVOID pParam,DWORD dwNotification, un
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
int CMinecraftApp::MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- if(result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultAccept)
{
#ifdef __PS3__
SQRNetworkManager_PS3::AttemptPSNSignIn(&CMinecraftApp::NowDisplayFullVersionPurchase, &app,true);
@@ -4886,7 +4886,7 @@ int CMinecraftApp::MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- if(result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultAccept)
{
#ifdef __PS3__
SQRNetworkManager_PS3::AttemptPSNSignIn(&CMinecraftApp::NowDisplayFullVersionPurchase, &app,true);
@@ -4898,7 +4898,7 @@ int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,i
}
//4J-PB - we need to exit the trial, or we'll be in the pause menu with ignore input true
- app.SetAction(iPad,eAppAction_ExitWorldTrial);
+ app.SetAction(iPad,eAppAction_ExitWorldTrial);
return 0;
}
@@ -4930,7 +4930,7 @@ void CMinecraftApp::UpsellReturnedCallback(LPVOID pParam, eUpsellType type, eUps
#ifdef __PS3__
// special case for people who are not signed in to the PSN while playing the trial game
case eUpsellResponse_UserNotSignedInPSN:
-
+
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&CMinecraftApp::MustSignInFullVersionPurchaseReturned,&app, app.GetStringTable());
@@ -4941,9 +4941,9 @@ void CMinecraftApp::UpsellReturnedCallback(LPVOID pParam, eUpsellType type, eUps
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,&app, app.GetStringTable());
break;
-#endif
+#endif
case eUpsellResponse_Declined:
- default:
+ default:
senResponse = eSen_UpsellOutcome_Declined;
break;
};
@@ -4959,7 +4959,7 @@ void CMinecraftApp::UpsellReturnedCallback(LPVOID pParam, eUpsellType type, eUps
break;
};
- // Always the primary pad that gets an upsell
+ // Always the primary pad that gets an upsell
TelemetryManager->RecordUpsellResponded(ProfileManager.GetPrimaryPad(), eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID, senResponse);
}
@@ -4977,7 +4977,7 @@ int CMinecraftApp::DebugInputCallback(LPVOID pParam)
{
if(app.DebugSettingsOn())
{
- app.ActionDebugMask(i);
+ app.ActionDebugMask(i);
}
else
{
@@ -5069,7 +5069,7 @@ void CMinecraftApp::MountNextDLC(int iPad)
if(StorageManager.MountInstalledDLC(iPad,m_iTotalDLCInstalled,&CMinecraftApp::DLCMountedCallback,this)!=ERROR_IO_PENDING )
{
// corrupt DLC
- app.DebugPrintf("Failed to mount DLC %d for pad %d\n",m_iTotalDLCInstalled,iPad);
+ app.DebugPrintf("Failed to mount DLC %d for pad %d\n",m_iTotalDLCInstalled,iPad);
++m_iTotalDLCInstalled;
app.MountNextDLC(iPad);
}
@@ -5142,7 +5142,7 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
app.m_dlcManager.removePack(pack);
pack = NULL;
}
-
+
if(pack == NULL)
{
app.DebugPrintf("Pack \"%ls\" is not installed, so adding it\n", CONTENT_DATA_DISPLAY_NAME(ContentData));
@@ -5187,15 +5187,15 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
// void CMinecraftApp::InstallDefaultCape()
// {
// if(!m_bDefaultCapeInstallAttempted)
-// {
+// {
// // we only attempt to install the cape once per launch of the game
// m_bDefaultCapeInstallAttempted=true;
-//
+//
// wstring wTemp=L"Default_Cape.png";
// bool bRes=app.IsFileInMemoryTextures(wTemp);
// // if the file is not already in the memory textures, then read it from TMS
// if(!bRes)
-// {
+// {
// BYTE *pBuffer=NULL;
// DWORD dwSize=0;
// // 4J-PB - out for now for DaveK so he doesn't get the birthday cape
@@ -5205,13 +5205,13 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
// if(eTMSStatus==C4JStorage::ETMSStatus_Idle)
// {
// app.AddMemoryTextureFile(wTemp,pBuffer,dwSize);
-// }
+// }
// #endif
// }
// }
// }
- void CMinecraftApp::HandleDLC(DLCPack *pack)
+ void CMinecraftApp::HandleDLC(DLCPack *pack)
{
DWORD dwFilesProcessed = 0;
#ifndef _XBOX
@@ -5248,7 +5248,7 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
{
strcpy(szFullFilename,szPath);
strcat(szFullFilename,wfd.cFileName);
-
+
if(( GetFileAttributes( szFullFilename ) & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY)
{
#ifdef _XBOX
@@ -5259,9 +5259,9 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
File texturePCKPath(wsTemp );
if(texturePCKPath.exists())
{
- app.DebugPrintf("Found a replacement .pck\n");
+ app.DebugPrintf("Found a replacement .pck\n");
m_dlcManager.readDLCDataFile(dwFilesProcessed, wsTemp,pack);
- }
+ }
else
{
m_dlcManager.readDLCDataFile(dwFilesProcessed, szFullFilename,pack);
@@ -5271,7 +5271,7 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
#endif
}
- }
+ }
while( FindNextFile( hFind, &wfd ) );
// Close the find handle.
@@ -5284,8 +5284,8 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
// int CMinecraftApp::DLCReadCallback(LPVOID pParam,C4JStorage::DLC_FILE_DETAILS *pDLCData)
// {
-//
-//
+//
+//
// return 0;
// }
@@ -5294,7 +5294,7 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
// Desc: Initializes the timer variables
//-------------------------------------------------------------------------------------
void CMinecraftApp::InitTime()
- {
+ {
// Get the frequency of the timer
LARGE_INTEGER qwTicksPerSec;
@@ -5306,8 +5306,8 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
// Zero out the elapsed and total time
m_Time.qwAppTime.QuadPart = 0;
- m_Time.fAppTime = 0.0f;
- m_Time.fElapsedTime = 0.0f;
+ m_Time.fAppTime = 0.0f;
+ m_Time.fElapsedTime = 0.0f;
}
//-------------------------------------------------------------------------------------
@@ -5319,14 +5319,14 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
LARGE_INTEGER qwNewTime;
LARGE_INTEGER qwDeltaTime;
- QueryPerformanceCounter( &qwNewTime );
+ QueryPerformanceCounter( &qwNewTime );
qwDeltaTime.QuadPart = qwNewTime.QuadPart - m_Time.qwTime.QuadPart;
- m_Time.qwAppTime.QuadPart += qwDeltaTime.QuadPart;
+ m_Time.qwAppTime.QuadPart += qwDeltaTime.QuadPart;
m_Time.qwTime.QuadPart = qwNewTime.QuadPart;
m_Time.fElapsedTime = m_Time.fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
- m_Time.fAppTime = m_Time.fSecsPerTick * ((FLOAT)(m_Time.qwAppTime.QuadPart));
+ m_Time.fAppTime = m_Time.fSecsPerTick * ((FLOAT)(m_Time.qwAppTime.QuadPart));
}
@@ -5359,8 +5359,8 @@ bool CMinecraftApp::isXuidDeadmau5(PlayerUID xuid)
return false;
}
-void CMinecraftApp::AddMemoryTextureFile(const wstring &wName,PBYTE pbData,DWORD dwBytes)
-{
+void CMinecraftApp::AddMemoryTextureFile(const wstring &wName,PBYTE pbData,DWORD dwBytes)
+{
EnterCriticalSection(&csMemFilesLock);
// check it's not already in
PMEMDATA pData=NULL;
@@ -5408,7 +5408,7 @@ void CMinecraftApp::AddMemoryTextureFile(const wstring &wName,PBYTE pbData,DWORD
void CMinecraftApp::RemoveMemoryTextureFile(const wstring &wName)
{
EnterCriticalSection(&csMemFilesLock);
-
+
AUTO_VAR(it, m_MEM_Files.find(wName));
if(it != m_MEM_Files.end())
{
@@ -5436,7 +5436,7 @@ bool CMinecraftApp::DefaultCapeExists()
EnterCriticalSection(&csMemFilesLock);
AUTO_VAR(it, m_MEM_Files.find(wTex));
- if(it != m_MEM_Files.end()) val = true;
+ if(it != m_MEM_Files.end()) val = true;
LeaveCriticalSection(&csMemFilesLock);
return val;
@@ -5448,7 +5448,7 @@ bool CMinecraftApp::IsFileInMemoryTextures(const wstring &wName)
EnterCriticalSection(&csMemFilesLock);
AUTO_VAR(it, m_MEM_Files.find(wName));
- if(it != m_MEM_Files.end()) val = true;
+ if(it != m_MEM_Files.end()) val = true;
LeaveCriticalSection(&csMemFilesLock);
return val;
@@ -5467,14 +5467,14 @@ void CMinecraftApp::GetMemFileDetails(const wstring &wName,PBYTE *ppbData,DWORD
LeaveCriticalSection(&csMemFilesLock);
}
-void CMinecraftApp::AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes)
-{
+void CMinecraftApp::AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes)
+{
EnterCriticalSection(&csMemTPDLock);
// check it's not already in
PMEMDATA pData=NULL;
AUTO_VAR(it, m_MEM_TPD.find(iConfig));
if(it == m_MEM_TPD.end())
- {
+ {
pData = (PMEMDATA)new BYTE[sizeof(MEMDATA)];
ZeroMemory( pData, sizeof(MEMDATA) );
pData->pbData=pbData;
@@ -5487,8 +5487,8 @@ void CMinecraftApp::AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes)
LeaveCriticalSection(&csMemTPDLock);
}
-void CMinecraftApp::RemoveMemoryTPDFile(int iConfig)
-{
+void CMinecraftApp::RemoveMemoryTPDFile(int iConfig)
+{
EnterCriticalSection(&csMemTPDLock);
// check it's not already in
PMEMDATA pData=NULL;
@@ -5550,7 +5550,7 @@ bool CMinecraftApp::IsFileInTPD(int iConfig)
EnterCriticalSection(&csMemTPDLock);
AUTO_VAR(it, m_MEM_TPD.find(iConfig));
- if(it != m_MEM_TPD.end()) val = true;
+ if(it != m_MEM_TPD.end()) val = true;
LeaveCriticalSection(&csMemTPDLock);
return val;
@@ -5576,18 +5576,18 @@ void CMinecraftApp::GetTPD(int iConfig,PBYTE *ppbData,DWORD *pdwBytes)
// #ifndef _CONTENT_PACKAGE
// // read the local file
// File gtsFile( wsFile->c_str() );
-//
-// __int64 fileSize = gtsFile.length();
-//
+//
+// int64_t fileSize = gtsFile.length();
+//
// if(fileSize!=0)
// {
// FileInputStream fis(gtsFile);
// byteArray ba((int)fileSize);
// fis.read(ba);
// fis.close();
-//
+//
// bRes=StorageManager.WriteTMSFile(iQuadrant,eStorageFacility,(WCHAR *)wsFile->c_str(),ba.data, ba.length);
-//
+//
// }
// #endif
// return bRes;
@@ -5637,7 +5637,7 @@ int CMinecraftApp::ExitAndJoinFromInviteSaveDialogReturned(void *pParam,int iPad
CMinecraftApp *pClass = (CMinecraftApp *)pParam;
// Exit with or without saving
// Decline means save in this dialog
- if(result==C4JStorage::EMessage_ResultDecline || result==C4JStorage::EMessage_ResultThirdOption)
+ if(result==C4JStorage::EMessage_ResultDecline || result==C4JStorage::EMessage_ResultThirdOption)
{
if( result==C4JStorage::EMessage_ResultDecline ) // Save
{
@@ -5649,7 +5649,7 @@ int CMinecraftApp::ExitAndJoinFromInviteSaveDialogReturned(void *pParam,int iPad
DLCPack * pDLCPack=tPack->getDLCPack();
if(!pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" ))
- {
+ {
// upsell
// get the dlc texture pack
@@ -5669,7 +5669,7 @@ int CMinecraftApp::ExitAndJoinFromInviteSaveDialogReturned(void *pParam,int iPad
// Give the player a warning about the trial version of the texture pack
ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_WARNING_DLC_TRIALTEXTUREPACK_TEXT, uiIDA, 2, iPad,&CMinecraftApp::WarningTrialTexturePackReturned,pClass,app.GetStringTable());
- return S_OK;
+ return S_OK;
}
}
#ifndef _XBOX_ONE
@@ -5727,7 +5727,7 @@ int CMinecraftApp::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStor
if(result==C4JStorage::EMessage_ResultAccept)
{
if(ProfileManager.IsSignedIn(iPad))
- {
+ {
// need to allow downloads here, or the player would need to quit the game to let the download of a texture pack happen. This might affect the network traffic, since the download could take all the bandwidth...
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
@@ -5747,7 +5747,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4
//CMinecraftApp* pClass = (CMinecraftApp*)pParam;
// results switched for this dialog
- if(result==C4JStorage::EMessage_ResultDecline)
+ if(result==C4JStorage::EMessage_ResultDecline)
{
INT saveOrCheckpointId = 0;
@@ -5759,7 +5759,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4
DLCPack * pDLCPack=tPack->getDLCPack();
if(!pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" ))
- {
+ {
// upsell
// get the dlc texture pack
@@ -5779,7 +5779,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4
// Give the player a warning about the trial version of the texture pack
ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_WARNING_DLC_TRIALTEXTUREPACK_TEXT, uiIDA, 2, iPad,&CMinecraftApp::WarningTrialTexturePackReturned,NULL,app.GetStringTable());
- return S_OK;
+ return S_OK;
}
}
//bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
@@ -5794,7 +5794,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4
int CMinecraftApp::ExitAndJoinFromInviteDeclineSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
// results switched for this dialog
- if(result==C4JStorage::EMessage_ResultDecline)
+ if(result==C4JStorage::EMessage_ResultDecline)
{
#if defined(_XBOX_ONE) || defined(__ORBIS__)
StorageManager.SetSaveDisabled(false);
@@ -5921,7 +5921,7 @@ void CMinecraftApp::InitialiseTips()
// Only randomise the content package build
#ifdef _CONTENT_PACKAGE
-
+
for(int i=1;i<MAX_TIPS_GAMETIP;i++)
{
m_GameTipA[i].iSortValue=TipRandom->nextInt();
@@ -5983,7 +5983,7 @@ UINT CMinecraftApp::GetNextTip()
}
else
{
- if(bShowSkinDLCTip && ProfileManager.IsFullVersion())
+ if(bShowSkinDLCTip && ProfileManager.IsFullVersion())
{
bShowSkinDLCTip=false;
if( app.DLCInstallProcessCompleted() )
@@ -6019,7 +6019,7 @@ int CMinecraftApp::GetHTMLFontSize(EHTMLFontSize size)
wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shadowColour /*= 0xFFFFFFFF*/)
{
wstring text(desc);
-
+
wchar_t replacements[64];
// We will also insert line breaks here as couldn't figure out how to get them to come through from strings.resx !
text = replaceAll(text, L"{*B*}", L"<br />" );
@@ -6108,7 +6108,7 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado
text = replaceAll(text, L"{*ICON_SHANK_03*}", GetIconReplacement(XZP_ICON_SHANK_03) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_UP*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_UP ) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_DOWN*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_DOWN ) );
- text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_RIGHT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_RIGHT ) );
+ text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_RIGHT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_RIGHT ) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_LEFT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_LEFT ) );
#if defined _XBOX_ONE || defined __PSVITA__
text = replaceAll(text, L"{*CONTROLLER_VK_START*}", GetVKReplacement(VK_PAD_START ) );
@@ -6124,13 +6124,13 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado
text = replaceAll(text, L"{*IMAGEROOT*}", imageRoot);
#endif // _XBOX
- // Fix for #8903 - UI: Localization: KOR/JPN/CHT: Button Icons are rendered with padding space, which looks no good
+ // Fix for #8903 - UI: Localization: KOR/JPN/CHT: Button Icons are rendered with padding space, which looks no good
DWORD dwLanguage = XGetLanguage( );
switch(dwLanguage)
{
- case XC_LANGUAGE_KOREAN:
+ case XC_LANGUAGE_KOREAN:
case XC_LANGUAGE_JAPANESE:
- case XC_LANGUAGE_TCHINESE:
+ case XC_LANGUAGE_TCHINESE:
text = replaceAll(text, L"&nbsp;", L"" );
break;
}
@@ -6273,7 +6273,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey)
case VK_PAD_LTHUMB_UPLEFT :
case VK_PAD_LTHUMB_UPRIGHT :
case VK_PAD_LTHUMB_DOWNRIGHT:
- case VK_PAD_LTHUMB_DOWNLEFT :
+ case VK_PAD_LTHUMB_DOWNLEFT :
return app.GetString( IDS_CONTROLLER_LEFT_STICK );
case VK_PAD_RTHUMB_UP :
case VK_PAD_RTHUMB_DOWN :
@@ -6282,7 +6282,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey)
case VK_PAD_RTHUMB_UPLEFT :
case VK_PAD_RTHUMB_UPRIGHT :
case VK_PAD_RTHUMB_DOWNRIGHT:
- case VK_PAD_RTHUMB_DOWNLEFT :
+ case VK_PAD_RTHUMB_DOWNLEFT :
return app.GetString( IDS_CONTROLLER_RIGHT_STICK );
default:
break;
@@ -6445,7 +6445,7 @@ HRESULT CMinecraftApp::RegisterMojangData(WCHAR *pXuidName, PlayerUID xuid, WCHA
// ignore the names if we don't recognize them
if(pXuidName!=NULL)
- {
+ {
if( wcscmp( pXuidName, L"XUID_NOTCH" ) == 0 )
{
eTempXuid = eXUID_Notch; // might be needed for the apple at some point
@@ -6465,7 +6465,7 @@ HRESULT CMinecraftApp::RegisterMojangData(WCHAR *pXuidName, PlayerUID xuid, WCHA
pMojangData = new MOJANG_DATA;
ZeroMemory(pMojangData,sizeof(MOJANG_DATA));
pMojangData->eXuid=eTempXuid;
-
+
wcsncpy( pMojangData->wchSkin, pSkin, MAX_CAPENAME_SIZE);
wcsncpy( pMojangData->wchCape, pCape, MAX_CAPENAME_SIZE);
MojangData[xuid]=pMojangData;
@@ -6485,7 +6485,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
// #ifdef _XBOX
// if(pType!=NULL)
-// {
+// {
// if(wcscmp(pType,L"XboxOneTransfer")==0)
// {
// if(iValue>0)
@@ -6501,7 +6501,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
// {
// app.m_uiTransferSlotC=iValue;
// }
-//
+//
// }
// #endif
@@ -6510,7 +6510,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
}
#if (defined _XBOX || defined _WINDOWS64)
-HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, __uint64 ullOfferID_Full, __uint64 ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile)
+HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, uint64_t ullOfferID_Full, uint64_t ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile)
{
HRESULT hr=S_OK;
DLC_INFO *pDLCData=new DLC_INFO;
@@ -6525,18 +6525,18 @@ HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGe
#ifndef __ORBIS__
// ignore the names if we don't recognize them
if(pBannerName!=L"")
- {
+ {
wcsncpy_s( pDLCData->wchBanner, pBannerName, MAX_BANNERNAME_SIZE);
}
if(pDataFile[0]!=0)
- {
+ {
wcsncpy_s( pDLCData->wchDataFile, pDataFile, MAX_BANNERNAME_SIZE);
}
#endif
if(pType!=NULL)
- {
+ {
if(wcscmp(pType,L"Skin")==0)
{
pDLCData->eDLCType=e_DLC_SkinPack;
@@ -6615,12 +6615,12 @@ HRESULT CMinecraftApp::RegisterDLCData(eDLCContentType eType, WCHAR *pwchBannerN
// ignore the names if we don't recognize them
if(pwchBannerName!=L"")
- {
+ {
wcsncpy_s( pDLCData->wchBanner, pwchBannerName, MAX_BANNERNAME_SIZE);
}
if(pwchProductName[0]!=0)
- {
+ {
pDLCData->wsDisplayName=pwchProductName;
}
@@ -6662,7 +6662,7 @@ HRESULT CMinecraftApp::RegisterDLCData(char *pchDLCName, unsigned int uiSortInde
pDLCData->iConfig = app.GetiConfigFromName(pchDLCName);
pDLCData->uiSortIndex=uiSortIndex;
- pDLCData->eDLCType = app.GetDLCTypeFromName(pchDLCName);
+ pDLCData->eDLCType = app.GetDLCTypeFromName(pchDLCName);
strcpy(pDLCData->chImageURL,pchImageURL);
//bool bIsTrialDLC = app.GetTrialFromName(pchDLCName);
@@ -6734,7 +6734,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfo(char *pchDLCName)
string tempString=pchDLCName;
if(DLCInfo.size()>0)
- {
+ {
AUTO_VAR(it, DLCInfo.find(tempString));
if( it == DLCInfo.end() )
@@ -6807,7 +6807,7 @@ bool CMinecraftApp::GetDLCFullOfferIDForPackID(const int iPackID,wstring &Produc
{
AUTO_VAR(it, DLCTextures_PackID.find(iPackID));
if( it == DLCTextures_PackID.end() )
- {
+ {
return false;
}
else
@@ -6879,7 +6879,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial)
{
//DLC_INFO *pDLCInfo=NULL;
if(DLCInfo_Trial.size()>0)
- {
+ {
AUTO_VAR(it, DLCInfo_Trial.find(ullOfferID_Trial));
if( it == DLCInfo_Trial.end() )
@@ -6936,7 +6936,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForFullOfferID(WCHAR *pwchProductID)
{
wstring wsTemp = pwchProductID;
if(DLCInfo_Full.size()>0)
- {
+ {
AUTO_VAR(it, DLCInfo_Full.find(wsTemp));
if( it == DLCInfo_Full.end() )
@@ -6965,7 +6965,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForProductName(WCHAR *pwchProductName)
}
++it;
}
-
+
return NULL;
}
@@ -6976,7 +6976,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full)
{
if(DLCInfo_Full.size()>0)
- {
+ {
AUTO_VAR(it, DLCInfo_Full.find(ullOfferID_Full));
if( it == DLCInfo_Full.end() )
@@ -7069,7 +7069,7 @@ int CMinecraftApp::RemoteSaveThreadProc( void* lpParameter )
void CMinecraftApp::ExitGameFromRemoteSave( LPVOID lpParameter )
{
int primaryPad = ProfileManager.GetPrimaryPad();
-
+
UINT uiIDA[3];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
@@ -7082,11 +7082,11 @@ int CMinecraftApp::ExitGameFromRemoteSaveDialogReturned(void *pParam,int iPad,C4
//CScene_Pause* pClass = (CScene_Pause*)pParam;
// results switched for this dialog
- if(result==C4JStorage::EMessage_ResultDecline)
+ if(result==C4JStorage::EMessage_ResultDecline)
{
app.SetAction(iPad,eAppAction_ExitWorld);
}
- else
+ else
{
#ifndef _XBOX
// Inform fullscreen progress scene that it's not being cancelled after all
@@ -7167,7 +7167,7 @@ void CMinecraftApp::AddLevelToBannedLevelList(int iPad, PlayerUID xuid, char *ps
m_vBannedListA[iPad]->push_back(pBannedListData);
if(bWriteToTMS)
- {
+ {
DWORD dwDataBytes=(DWORD)(sizeof(BANNEDLISTDATA)*m_vBannedListA[iPad]->size());
PBANNEDLISTDATA pBannedList = (BANNEDLISTDATA *)(new CHAR [dwDataBytes]);
int iCount=0;
@@ -7197,7 +7197,7 @@ bool CMinecraftApp::IsInBannedLevelList(int iPad, PlayerUID xuid, char *pszLevel
#ifdef _XBOX_ONE
PlayerUID bannedPlayerUID = pData->wchPlayerUID;
if(IsEqualXUID (bannedPlayerUID,xuid) && (strcmp(pData->pszLevelName,pszLevelName)==0))
-#else
+#else
if(IsEqualXUID (pData->xuid,xuid) && (strcmp(pData->pszLevelName,pszLevelName)==0))
#endif
{
@@ -7212,12 +7212,12 @@ void CMinecraftApp::RemoveLevelFromBannedLevelList(int iPad, PlayerUID xuid, cha
{
//bool bFound=false;
//bool bRes;
-
+
// we will have retrieved the banned level list from TMS, so remove this one from it and write it back to TMS
for(AUTO_VAR(it, m_vBannedListA[iPad]->begin()); it != m_vBannedListA[iPad]->end(); )
{
PBANNEDLISTDATA pBannedListData = *it;
-
+
if(pBannedListData!=NULL)
{
#ifdef _XBOX_ONE
@@ -7298,7 +7298,7 @@ bool CMinecraftApp::AlreadySeenCreditText(const wstring &wstemp)
wstring temp=m_vCreditText.at(i);
// if they are the same, break out of the case
- if(temp.compare(wstemp)==0)
+ if(temp.compare(wstemp)==0)
{
return true;
}
@@ -7588,7 +7588,7 @@ unsigned int CMinecraftApp::GetGameHostOption(unsigned int uiHostSettings, eGame
break;
case eGameHostOption_FireSpreads:
return (uiHostSettings&GAME_HOST_OPTION_BITMASK_FIRESPREADS);
- break;
+ break;
case eGameHostOption_CheatsEnabled:
return (uiHostSettings&(GAME_HOST_OPTION_BITMASK_HOSTFLY|GAME_HOST_OPTION_BITMASK_HOSTHUNGER|GAME_HOST_OPTION_BITMASK_HOSTINVISIBLE));
break;
@@ -7606,7 +7606,7 @@ unsigned int CMinecraftApp::GetGameHostOption(unsigned int uiHostSettings, eGame
break;
case eGameHostOption_DisableSaving:
return (uiHostSettings&GAME_HOST_OPTION_BITMASK_DISABLESAVE);
- break;
+ break;
}
return false;
@@ -7659,7 +7659,7 @@ unsigned int CMinecraftApp::FromBigEndian(unsigned int uiValue)
// Keep it in big endian
return uiValue;
#else
- unsigned int uiReturn = ( ( uiValue >> 24 ) & 0x000000ff ) |
+ unsigned int uiReturn = ( ( uiValue >> 24 ) & 0x000000ff ) |
( ( uiValue >> 8 ) & 0x0000ff00 ) |
( ( uiValue << 8 ) & 0x00ff0000 ) |
( ( uiValue << 24 ) & 0xff000000 );
@@ -7685,7 +7685,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
uiCount+=8;
while(uiCount<dwImageBytes)
- {
+ {
uiChunkLen=*(unsigned int *)&ucPtr[uiCount];
uiChunkLen=FromBigEndian(uiChunkLen);
uiCount+=sizeof(int);
@@ -7709,7 +7709,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
pszKeyword++;
if(strcmp(szKeyword,"4J_SEED")==0)
{
- // read the seed value
+ // read the seed value
unsigned int uiValueC=0;
while(*pszKeyword!=0 && (pszKeyword < ucPtr + uiCount + uiChunkLen) )
{
@@ -7721,7 +7721,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
else if(strcmp(szKeyword,"4J_HOSTOPTIONS")==0)
{
bHostOptionsRead = true;
- // read the host options value
+ // read the host options value
unsigned int uiValueC=0;
unsigned char pszHostOptions[8]; // Hex representation of unsigned int
ZeroMemory(&pszHostOptions,8);
@@ -7738,7 +7738,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
}
else if(strcmp(szKeyword,"4J_TEXTUREPACK")==0)
{
- // read the texture pack value
+ // read the texture pack value
unsigned int uiValueC=0;
unsigned char pszTexturePack[8]; // Hex representation of unsigned int
ZeroMemory(&pszTexturePack,8);
@@ -7763,7 +7763,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
return;
}
-unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, __int64 seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId)
+unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, int64_t seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId)
{
int iTextMetadataBytes = 0;
if(hasSeed)
@@ -7830,13 +7830,13 @@ bool CMinecraftApp::GetTerrainFeaturePosition(_eTerrainFeatureType eType,int *pX
for(AUTO_VAR(it, m_vTerrainFeatures.begin()); it < m_vTerrainFeatures.end(); ++it)
{
FEATURE_DATA *pFeatureData=*it;
-
+
if(pFeatureData->eTerrainFeature==eType)
{
*pX=pFeatureData->x;
*pZ=pFeatureData->z;
return true;
- }
+ }
}
return false;
@@ -7976,7 +7976,7 @@ unsigned int CMinecraftApp::AddDLCRequest(eDLCMarketplaceType eType, bool bPromo
{
// promote
if(bPromote)
- {
+ {
m_DLCDownloadQueue.erase(m_DLCDownloadQueue.begin()+iPosition);
m_DLCDownloadQueue.insert(m_DLCDownloadQueue.begin(),pCurrent);
}
@@ -7988,10 +7988,10 @@ unsigned int CMinecraftApp::AddDLCRequest(eDLCMarketplaceType eType, bool bPromo
}
DLCRequest *pDLCreq = new DLCRequest;
- pDLCreq->dwType=m_dwContentTypeA[eType];
+ pDLCreq->dwType=m_dwContentTypeA[eType];
pDLCreq->eState=e_DLC_ContentState_Idle;
- m_DLCDownloadQueue.push_back(pDLCreq);
+ m_DLCDownloadQueue.push_back(pDLCreq);
m_bAllDLCContentRetrieved=false;
LeaveCriticalSection(&csDLCDownloadQueue);
@@ -8023,7 +8023,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
{
// promote
if(bPromote)
- {
+ {
m_TMSPPDownloadQueue.erase(m_TMSPPDownloadQueue.begin()+iPosition);
m_TMSPPDownloadQueue.insert(m_TMSPPDownloadQueue.begin(),pCurrent);
bPromoted=true;
@@ -8057,17 +8057,17 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
{
// first check if the image is already in the memory textures, since we might be loading some from the Title Update partition
if(pDLC->wchDataFile[0]!=0)
- {
+ {
//WCHAR *cString = pDLC->wchDataFile;
// 4J-PB - shouldn't check this here - let the TMS files override it, so if they are on TMS, we'll take them first
//int iIndex = app.GetLocalTMSFileIndex(pDLC->wchDataFile,true);
//if(iIndex!=-1)
- {
+ {
bool bPresent = app.IsFileInTPD(pDLC->iConfig);
if(!bPresent)
- {
+ {
// this may already be present in the vector because of a previous trial/full offer
bool bAlreadyInQueue=false;
@@ -8083,7 +8083,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
}
if(!bAlreadyInQueue)
- {
+ {
TMSPPRequest *pTMSPPreq = new TMSPPRequest;
pTMSPPreq->CallbackFunc=&CMinecraftApp::TMSPPFileReturned;
@@ -8095,7 +8095,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
pTMSPPreq->eState=e_TMS_ContentState_Queued;
m_bAllTMSContentRetrieved=false;
m_TMSPPDownloadQueue.push_back(pTMSPPreq);
- }
+ }
}
else
{
@@ -8119,20 +8119,20 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
// is this the right type?
if(pDLC->eDLCType==eType)
- {
+ {
WCHAR *cString = pDLC->wchBanner;
// 4J-PB - shouldn't check this here - let the TMS files override it, so if they are on TMS, we'll take them first
- // is the file in the TMS XZP?
+ // is the file in the TMS XZP?
//int iIndex = app.GetLocalTMSFileIndex(cString,true);
//if(iIndex!=-1)
- {
- bool bPresent = app.IsFileInMemoryTextures(cString);
+ {
+ bool bPresent = app.IsFileInMemoryTextures(cString);
if(!bPresent) // retrieve it from TMSPP
- {
+ {
bool bAlreadyInQueue=false;
for(AUTO_VAR(it, m_TMSPPDownloadQueue.begin()); it != m_TMSPPDownloadQueue.end(); ++it)
{
@@ -8146,7 +8146,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
}
if(!bAlreadyInQueue)
- {
+ {
TMSPPRequest *pTMSPPreq = new TMSPPRequest;
pTMSPPreq->CallbackFunc=&CMinecraftApp::TMSPPFileReturned;
@@ -8159,7 +8159,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
pTMSPPreq->eState=e_TMS_ContentState_Queued;
m_bAllTMSContentRetrieved=false;
- m_TMSPPDownloadQueue.push_back(pTMSPPreq);
+ m_TMSPPDownloadQueue.push_back(pTMSPPreq);
app.DebugPrintf("===m_TMSPPDownloadQueue Adding %ls, q size is %d\n",pTMSPPreq->wchFilename,m_TMSPPDownloadQueue.size());
}
}
@@ -8183,11 +8183,11 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
//int iIndex = app.GetLocalTMSFileIndex(cString,true);
//if(iIndex!=-1)
- {
+ {
bool bPresent = app.IsFileInMemoryTextures(cString);
-
+
if(!bPresent)
- {
+ {
// this may already be present in the vector because of a previous trial/full offer
bool bAlreadyInQueue=false;
@@ -8203,7 +8203,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
}
if(!bAlreadyInQueue)
- {
+ {
//app.DebugPrintf("Adding a request to the TMSPP download queue - %ls\n",pDLC->wchBanner);
TMSPPRequest *pTMSPPreq = new TMSPPRequest;
ZeroMemory(pTMSPPreq,sizeof(TMSPPRequest));
@@ -8222,7 +8222,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
m_bAllTMSContentRetrieved=false;
m_TMSPPDownloadQueue.push_back(pTMSPPreq);
app.DebugPrintf("===m_TMSPPDownloadQueue Adding %ls, q size is %d\n",pTMSPPreq->wchFilename,m_TMSPPDownloadQueue.size());
- }
+ }
}
}
}
@@ -8329,7 +8329,7 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
#if defined(_XBOX) || defined(_WINDOWS64)
char szFile[MAX_TMSFILENAME_SIZE];
wcstombs(szFile,pCurrent->wchFilename,MAX_TMSFILENAME_SIZE);
-
+
if(strcmp(szFilename,szFile)==0)
#elif _XBOX_ONE
@@ -8340,15 +8340,15 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
pCurrent->eState=e_TMS_ContentState_Retrieved;
if(pFileData!=NULL)
- {
+ {
#ifdef _XBOX_ONE
-
+
switch(pCurrent->eType)
{
case e_DLC_TexturePackData:
- {
+ {
// 4J-PB - we need to allocate memory for the file data and copy into it, since the current data is a reference into the blob download memory
PBYTE pbData = new BYTE [pFileData->dwSize];
memcpy(pbData,pFileData->pbData,pFileData->dwSize);
@@ -8357,17 +8357,17 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
app.DebugPrintf("Got texturepack data\n");
// get the config value for the texture pack
int iConfig=app.GetTPConfigVal(pCurrent->wchFilename);
- app.AddMemoryTPDFile(iConfig, pbData, pFileData->dwSize);
+ app.AddMemoryTPDFile(iConfig, pbData, pFileData->dwSize);
}
break;
default:
// 4J-PB - check the data is an image
if(pFileData->pbData[0]==0x89)
- {
+ {
// 4J-PB - we need to allocate memory for the file data and copy into it, since the current data is a reference into the blob download memory
PBYTE pbData = new BYTE [pFileData->dwSize];
memcpy(pbData,pFileData->pbData,pFileData->dwSize);
-
+
pClass->m_vTMSPPData.push_back(pbData);
app.DebugPrintf("Got image data - %ls\n",pCurrent->wchFilename);
app.AddMemoryTextureFile(pCurrent->wchFilename, pbData, pFileData->dwSize);
@@ -8383,11 +8383,11 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
switch(pCurrent->eType)
{
case e_DLC_TexturePackData:
- {
+ {
app.DebugPrintf("--- Got texturepack data %ls\n",pCurrent->wchFilename);
// get the config value for the texture pack
int iConfig=app.GetTPConfigVal(pCurrent->wchFilename);
- app.AddMemoryTPDFile(iConfig, pFileData->pbData, pFileData->dwSize);
+ app.AddMemoryTPDFile(iConfig, pFileData->pbData, pFileData->dwSize);
}
break;
default:
@@ -8407,7 +8407,7 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
}
break;
}
-
+
}
LeaveCriticalSection(&pClass->csTMSPPDownloadQueue);
@@ -8651,7 +8651,7 @@ void CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, SKIN_BOX *SkinBoxA, D
for(unsigned int i=0;i<dwSkinBoxC;i++)
{
if(pModel)
- {
+ {
ModelPart *pModelPart=pModel->AddOrRetrievePart(&SkinBoxA[i]);
pvModelPart->push_back(pModelPart);
pvSkinBoxes->push_back(&SkinBoxA[i]);
@@ -8661,7 +8661,7 @@ void CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, SKIN_BOX *SkinBoxA, D
m_AdditionalModelParts.insert( std::pair<DWORD, vector<ModelPart *> *>(dwSkinID, pvModelPart) );
m_AdditionalSkinBoxes.insert( std::pair<DWORD, vector<SKIN_BOX *> *>(dwSkinID, pvSkinBoxes) );
-
+
LeaveCriticalSection( &csAdditionalSkinBoxes );
LeaveCriticalSection( &csAdditionalModelParts );
@@ -8681,7 +8681,7 @@ vector<ModelPart *> * CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, vect
for(AUTO_VAR(it, pvSkinBoxA->begin());it != pvSkinBoxA->end(); ++it)
{
if(pModel)
- {
+ {
ModelPart *pModelPart=pModel->AddOrRetrievePart(*it);
pvModelPart->push_back(pModelPart);
}
@@ -8725,7 +8725,7 @@ vector<SKIN_BOX *> *CMinecraftApp::GetAdditionalSkinBoxes(DWORD dwSkinID)
pvSkinBoxes = (*it).second;
}
}
-
+
LeaveCriticalSection( &csAdditionalSkinBoxes );
return pvSkinBoxes;
}
@@ -8768,16 +8768,16 @@ void CMinecraftApp::SetAnimOverrideBitmask(DWORD dwSkinID,unsigned int uiAnimOve
DWORD CMinecraftApp::getSkinIdFromPath(const wstring &skin)
{
- bool dlcSkin = false;
+ bool dlcSkin = false;
unsigned int skinId = 0;
-
+
if(skin.size() >= 14)
{
dlcSkin = skin.substr(0,3).compare(L"dlc") == 0;
wstring skinValue = skin.substr(7,skin.size());
skinValue = skinValue.substr(0,skinValue.find_first_of(L'.'));
-
+
std::wstringstream ss;
// 4J Stu - dlc skins are numbered using decimal to make it easier for artists/people to number manually
// Everything else is numbered using hex
@@ -8801,7 +8801,7 @@ wstring CMinecraftApp::getSkinPathFromId(DWORD skinId)
{
// 4J Stu - DLC skins are numbered using decimal rather than hex to make it easier to number manually
swprintf(chars, 256, L"dlcskin%08d.png", GET_DLC_SKIN_ID_FROM_BITMASK(skinId));
-
+
}
else
{
@@ -8826,7 +8826,7 @@ int CMinecraftApp::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::E
if(result!=C4JStorage::EMessage_Cancelled)
{
if(app.GetRequiredTexturePackID()!=0)
- {
+ {
// we need to enable background downloading for the DLC
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
@@ -8844,7 +8844,7 @@ int CMinecraftApp::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::E
DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full);
ullIndexA[0]=pDLCInfo->ullOfferID_Trial;
StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
- }
+ }
}
}
#endif
@@ -8887,39 +8887,39 @@ byteArray CMinecraftApp::getArchiveFile(const wstring &filename)
// DLC
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
-int CMinecraftApp::GetDLCInfoCount()
-{
+int CMinecraftApp::GetDLCInfoCount()
+{
return (int)DLCInfo.size();
}
#elif defined _XBOX_ONE
-int CMinecraftApp::GetDLCInfoTrialOffersCount()
-{
+int CMinecraftApp::GetDLCInfoTrialOffersCount()
+{
return 0;
}
-int CMinecraftApp::GetDLCInfoFullOffersCount()
-{
+int CMinecraftApp::GetDLCInfoFullOffersCount()
+{
return (int)DLCInfo_Full.size();
}
#else
-int CMinecraftApp::GetDLCInfoTrialOffersCount()
-{
+int CMinecraftApp::GetDLCInfoTrialOffersCount()
+{
return (int)DLCInfo_Trial.size();
}
-int CMinecraftApp::GetDLCInfoFullOffersCount()
-{
+int CMinecraftApp::GetDLCInfoFullOffersCount()
+{
return (int)DLCInfo_Full.size();
}
#endif
-int CMinecraftApp::GetDLCInfoTexturesOffersCount()
-{
+int CMinecraftApp::GetDLCInfoTexturesOffersCount()
+{
return (int)DLCTextures_PackID.size();
}
// AUTOSAVE
-void CMinecraftApp::SetAutosaveTimerTime(void)
+void CMinecraftApp::SetAutosaveTimerTime(void)
{
#if defined(_XBOX_ONE) || defined(__ORBIS__)
m_uiAutosaveTimer= GetTickCount()+1000*60;
@@ -8928,23 +8928,23 @@ void CMinecraftApp::SetAutosaveTimerTime(void)
#endif
}// value x 15 to get mins, x60 for secs
-bool CMinecraftApp::AutosaveDue(void)
-{
+bool CMinecraftApp::AutosaveDue(void)
+{
return (GetTickCount()>m_uiAutosaveTimer);
}
-unsigned int CMinecraftApp::SecondsToAutosave()
-{
- return (m_uiAutosaveTimer - GetTickCount() ) / 1000;
+unsigned int CMinecraftApp::SecondsToAutosave()
+{
+ return (m_uiAutosaveTimer - GetTickCount() ) / 1000;
}
-void CMinecraftApp::SetTrialTimerStart(void)
+void CMinecraftApp::SetTrialTimerStart(void)
{
m_fTrialTimerStart=m_Time.fAppTime; mfTrialPausedTime=0.0f;
}
-float CMinecraftApp::getTrialTimer(void)
-{
+float CMinecraftApp::getTrialTimer(void)
+{
return m_Time.fAppTime-m_fTrialTimerStart-mfTrialPausedTime;
}
@@ -8979,7 +8979,7 @@ bool CMinecraftApp::IsLocalMultiplayerAvailable()
//#else
// for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
// {
- // if( (i!=userIndex) && (InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i)) )
+ // if( (i!=userIndex) && (InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i)) )
// {
// iOtherConnectedControllers++;
// }
@@ -8993,7 +8993,7 @@ bool CMinecraftApp::IsLocalMultiplayerAvailable()
void CMinecraftApp::getLocale(vector<wstring> &vecWstrLocales)
{
vector<eMCLang> locales;
-
+
DWORD dwSystemLanguage = XGetLanguage( );
// 4J-PB - restrict the 360 language until we're ready to have them in
@@ -9054,7 +9054,7 @@ void CMinecraftApp::getLocale(vector<wstring> &vecWstrLocales)
case XC_LOCALE_UNITED_ARAB_EMIRATES:
case XC_LOCALE_GREAT_BRITAIN:
locales.push_back(eMCLang_enGB);
- break;
+ break;
default: //XC_LOCALE_UNITED_STATES
break;
}
@@ -9151,7 +9151,7 @@ void CMinecraftApp::getLocale(vector<wstring> &vecWstrLocales)
break;
case XC_LANGUAGE_BNORWEGIAN :
locales.push_back(eMCLang_nbNO);
- locales.push_back(eMCLang_noNO);
+ locales.push_back(eMCLang_noNO);
locales.push_back(eMCLang_nnNO);
break;
case XC_LANGUAGE_DUTCH :
@@ -9294,7 +9294,7 @@ void CMinecraftApp::LocaleAndLanguageInit()
m_localeA[eMCLang_esCO] =L"es-CO";
m_localeA[eMCLang_esUS] =L"es-US";
m_localeA[eMCLang_svSE] =L"sv-SE";
-
+
m_localeA[eMCLang_csCZ] =L"cs-CZ";
m_localeA[eMCLang_elGR] =L"el-GR";
m_localeA[eMCLang_nnNO] =L"nn-NO";