Merge remote-tracking branch 'origin/main' into networking

This commit is contained in:
2026-09-06 09:33:19 -04:00
1476 changed files with 260663 additions and 269030 deletions
+58 -44
View File
@@ -785,11 +785,11 @@ 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// || defined __PSVITA__
#if defined _WINDOWS64
C_4JProfile::PROFILESETTINGS *pProfileSettings=ProfileManager.GetDashboardProfileSettings(i);
// clear this for now - it will come from reading the system values
memset(pProfileSettings,0,sizeof(C_4JProfile::PROFILESETTINGS));
SetDefaultOptions(pProfileSettings,i);
ProfileManager.LoadSettings(GameSettingsA[i], sizeof(GAME_SETTINGS));
ApplyGameSettingsChanged(i);
#elif defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__
C4JStorage::PROFILESETTINGS *pProfileSettings=StorageManager.GetDashboardProfileSettings(i);
// 4J-PB - don't cause an options write to happen here
@@ -2376,6 +2376,8 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa
{
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__ )
StorageManager.WriteToProfile(i,true, bOverride5MinuteTimer);
#elif _WINDOWS64
ProfileManager.SaveSettings(GameSettingsA[i], sizeof(GAME_SETTINGS));
#else
ProfileManager.WriteToProfile(i,true, bOverride5MinuteTimer);
#endif
@@ -2389,6 +2391,8 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa
{
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
StorageManager.WriteToProfile(iPad,true, bOverride5MinuteTimer);
#elif _WINDOWS64
ProfileManager.SaveSettings(GameSettingsA[iPad], sizeof(GAME_SETTINGS));
#else
ProfileManager.WriteToProfile(iPad,true, bOverride5MinuteTimer);
#endif
@@ -2407,7 +2411,7 @@ void CMinecraftApp::ClearGameSettingsChangedFlag(int iPad)
// Remove the debug settings in the content package build
//
////////////////////////////
#ifdef _DEBUG_MENUS_ENABLED
#ifndef _DEBUG_MENUS_ENABLED
unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlayer) //bOverridePlayer is to force the send for the server to get the read options
{
return 0;
@@ -2420,9 +2424,7 @@ void CMinecraftApp::SetGameSettingsDebugMask(int iPad, unsigned int uiVal)
void CMinecraftApp::ActionDebugMask(int iPad,bool bSetAllClear)
{
}
#else
unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlayer) //bOverridePlayer is to force the send for the server to get the read options
{
if(iPad==-1)
@@ -3693,7 +3695,7 @@ void CMinecraftApp::HandleXuiActions(void)
pDLCTexPack->m_pSoundBank->Destroy();
}
#endif
#ifdef _DURANGO
#if (defined _DURANGO || _WINDOWS64)
DWORD result = StorageManager.UnmountInstalledDLC(L"TPACK");
#else
DWORD result = StorageManager.UnmountInstalledDLC("TPACK");
@@ -3865,9 +3867,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
@@ -4058,8 +4060,8 @@ void CMinecraftApp::HandleXuiActions(void)
ui.SetTooltips(i, -1);
ui.ReloadSkin();
ui.StartReloadSkinThread();
ui.ReloadSkins();
ui.StartReloadSkinsThread();
ui.setCleanupOnReload();
#endif
@@ -4438,9 +4440,7 @@ int CMinecraftApp::EthernetDisconnectReturned(void *pParam,int iPad,const C4JSto
else
{
// 4J-PB - turn off the PSN store icon just in case this happened when we were in one of the DLC menus
#ifdef __ORBIS__
sceNpCommerceHidePsStoreIcon();
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
#if defined __PSVITA__ || defined __ORBIS__
app.GetCommerce()->HidePsStoreIcon();
#endif
app.SetAction(iPad,eAppAction_EthernetDisconnectedReturned_Menus);
@@ -5490,9 +5490,9 @@ void CMinecraftApp::HandleDLC(DLCPack *pack)
{
DWORD dwFilesProcessed = 0;
#ifndef _XBOX
#if defined(__PS3__) || defined(__ORBIS__) || defined(_WINDOWS64) || defined (__PSVITA__)
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
std::vector<std::string> dlcFilenames;
#elif defined _DURANGO
#elif (defined _DURANGO || _WINDOWS64)
std::vector<std::wstring> dlcFilenames;
#endif
StorageManager.GetMountedDLCFileList("DLCDrive", dlcFilenames);
@@ -6352,27 +6352,31 @@ void CMinecraftApp::InitialiseTips()
UINT CMinecraftApp::GetNextTip()
{
static bool bShowSkinDLCTip=true;
// don't display the DLC tip in the trial game
if(ProfileManager.IsFullVersion() && app.GetNewDLCAvailable() && app.DisplayNewDLCTip())
//str1k3r - if uiStringID is IDS_TIPS_GAMETIP_0 then dont do this, fixes a bug with IDS_TIPS_GAMETIP_0 not showing on Windows64 if not high def
if(m_GameTipA[0].uiStringID != IDS_TIPS_GAMETIP_0)
{
return IDS_TIPS_GAMETIP_NEWDLC;
}
else
{
if(bShowSkinDLCTip && ProfileManager.IsFullVersion())
// don't display the DLC tip in the trial game
if(ProfileManager.IsFullVersion() && app.GetNewDLCAvailable() && app.DisplayNewDLCTip())
{
bShowSkinDLCTip=false;
if( app.DLCInstallProcessCompleted() )
return IDS_TIPS_GAMETIP_NEWDLC;
}
else
{
if(bShowSkinDLCTip && ProfileManager.IsFullVersion())
{
if(app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin)==0)
bShowSkinDLCTip=false;
if( app.DLCInstallProcessCompleted() )
{
if(app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin)==0)
{
return IDS_TIPS_GAMETIP_SKINPACKS;
}
}
else
{
return IDS_TIPS_GAMETIP_SKINPACKS;
}
}
else
{
return IDS_TIPS_GAMETIP_SKINPACKS;
}
}
}
@@ -6488,7 +6492,7 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado
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_LEFT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_LEFT ) );
#if defined _XBOX_ONE || defined __PSVITA__
#if !(defined __ORBIS__ || __PS3__)
text = replaceAll(text, L"{*CONTROLLER_VK_START*}", GetVKReplacement(VK_PAD_START ) );
text = replaceAll(text, L"{*CONTROLLER_VK_BACK*}", GetVKReplacement(VK_PAD_BACK ) );
#endif
@@ -6611,8 +6615,12 @@ wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned char ucAction)
#ifdef __PS3__
int size = 30;
#elif defined _WIN64
int size = 45;
if(ui.getScreenWidth() < 1920) size = 30;
int size = 30;
if(ui.getScreenWidth() >= 1920)
{
size = 45;
}
#else
int size = 45;
#endif
@@ -6724,7 +6732,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey)
case VK_PAD_RTHUMB_DOWNLEFT :
replacement = L"ButtonRightStick";
break;
#if defined _XBOX_ONE || defined __PSVITA__
#if defined _XBOX_ONE || defined __PSVITA__ || defined _WINDOWS64
case VK_PAD_START:
replacement = L"ButtonStart";
break;
@@ -6740,8 +6748,12 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey)
#ifdef __PS3__
int size = 30;
#elif defined _WIN64
int size = 45;
if(ui.getScreenWidth() < 1920) size = 30;
int size = 30;
if(ui.getScreenWidth() >= 1920)
{
size = 45;
}
#else
int size = 45;
#endif
@@ -6771,8 +6783,12 @@ wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon)
#ifdef __PS3__
int size = 22;
#elif defined _WIN64
int size = 33;
if(ui.getScreenWidth() < 1920) size = 22;
int size = 22;
if(ui.getScreenWidth() >= 1920)
{
size = 33;
}
#else
int size = 33;
#endif
@@ -9764,7 +9780,6 @@ void CMinecraftApp::getLocale(vector<wstring> &vecWstrLocales)
locales.push_back(eMCLang_zhCN);
break;
#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || defined _DURANGO
case XC_LANGUAGE_DANISH:
locales.push_back(eMCLang_daDA);
locales.push_back(eMCLang_daDK);
@@ -9790,7 +9805,6 @@ void CMinecraftApp::getLocale(vector<wstring> &vecWstrLocales)
locales.push_back(eMCLang_enGR);
locales.push_back(eMCLang_enGB);
break;
#endif
}
#endif
@@ -10079,13 +10093,13 @@ enum ETitleUpdateTexturePacks
};
#ifdef _WINDOWS64
wstring titleUpdateTexturePackRoot = L"Windows64\\DLC\\";
wstring titleUpdateTexturePackRoot = L"Windows64Media\\DLC\\";
#elif defined(__ORBIS__)
wstring titleUpdateTexturePackRoot = L"/app0/orbis/CU/DLC/";
wstring titleUpdateTexturePackRoot = L"app0/Orbis/DLC/";
#elif defined(__PSVITA__)
wstring titleUpdateTexturePackRoot = L"PSVita/CU/DLC/";
wstring titleUpdateTexturePackRoot = L"PSVita/DLC/";
#elif defined(__PS3__)
wstring titleUpdateTexturePackRoot = L"PS3/CU/DLC/";
wstring titleUpdateTexturePackRoot = L"PS3/DLC/";
#else
wstring titleUpdateTexturePackRoot = L"CU\\DLC\\";
#endif