This commit is contained in:
GabsPuNs
2026-05-14 21:52:21 -04:00
parent 1b2f5c6fe8
commit f8a2d644f5
291 changed files with 7363 additions and 18368 deletions

View File

@@ -482,10 +482,7 @@ bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,shared_ptr<LocalPlayer> player,
else
initData->bSplitscreen=false;
if(app.GetGameSettings(iPad,eGameSetting_ClassicCrafting))
success = ui.NavigateToScene(iPad,eUIScene_ClassicCraftingMenu, initData);
else
success = ui.NavigateToScene(iPad,eUIScene_Crafting3x3Menu, initData);
success = ui.NavigateToScene(iPad,eUIScene_Crafting3x3Menu, initData);
return success;
}
@@ -913,20 +910,16 @@ int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,con
app.SetGameHostOption(eGameHostOption_NaturalRegeneration, 1 );
app.SetGameHostOption(eGameHostOption_DoDaylightCycle, 1 );
// TU25
SetGameSettings(iPad,eGameSetting_CaveSounds, 1);
SetGameSettings(iPad,eGameSetting_ClassicCrafting, 0);
// New
SetGameSettings(iPad,eGameSetting_GraphicsMode, 2);
SetGameSettings(iPad,eGameSetting_OldSwingAnimation, 0);
// 4J-PB - leave these in, or remove from everywhere they are referenced!
// Although probably best to leave in unless we split the profile settings into platform specific classes - having different meaning per platform for the same bitmask could get confusing
//#ifdef __PS3__
// PS3DEC13
SetGameSettings(iPad,eGameSetting_PS3_EULA_Read,0); // EULA not read
// New
SetGameSettings(iPad,eGameSetting_GraphicsMode,2);
SetGameSettings(iPad,eGameSetting_OldSwingAnimation,0);
// PS3 1.05 - added Greek
// 4J-JEV: We cannot change these in-game, as they could affect localised strings and font.
@@ -1082,10 +1075,6 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
// Added a bitmask in TU13 to enable/disable display of the Mash-up pack worlds in the saves list
pGameSettings->uiMashUpPackWorldsDisplay = 0xFFFFFFFF;
// TU25
pGameSettings->uiBitmaskValues|=GAMESETTING_CAVESOUNDS; //eGameSetting_CaveSounds - on
pGameSettings->uiBitmaskValues|=GAMESETTING_CLASSICCRAFTING; //eGameSetting_ClassicCrafting - off
// PS3 1.05 - added Greek
pGameSettings->ucLanguage = MINECRAFT_LANGUAGE_DEFAULT; // use the system language
}
@@ -1384,10 +1373,6 @@ void CMinecraftApp::ApplyGameSettingsChanged(int iPad)
ActionGameSettings(iPad,eGameSetting_PS3_EULA_Read);
// TU25
ActionGameSettings(iPad,eGameSetting_CaveSounds);
ActionGameSettings(iPad,eGameSetting_ClassicCrafting);
ActionGameSettings(iPad,eGameSetting_OldSwingAnimation);
ActionGameSettings(iPad,eGameSetting_GraphicsMode);
}
@@ -1624,12 +1609,6 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
case eGameSetting_PSVita_NetworkModeAdhoc:
//nothing to do here
break;
case eGameSetting_CaveSounds:
//nothing to do here
break;
case eGameSetting_ClassicCrafting:
//nothing to do here
break;
case eGameSetting_OldSwingAnimation:
//nothing to do here
break;
@@ -2386,40 +2365,8 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
}
break;
// TU25
case eGameSetting_CaveSounds:
if((GameSettingsA[iPad]->uiBitmaskValues & GAMESETTING_CAVESOUNDS)!=(ucVal & 0x01)<<18)
{
if(ucVal==1)
{
GameSettingsA[iPad]->uiBitmaskValues|=GAMESETTING_CAVESOUNDS;
}
else
{
GameSettingsA[iPad]->uiBitmaskValues&=~GAMESETTING_CAVESOUNDS;
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
}
break;
case eGameSetting_ClassicCrafting:
if((GameSettingsA[iPad]->uiBitmaskValues & GAMESETTING_CLASSICCRAFTING)!=(ucVal & 0x01)<<19)
{
if(ucVal==1)
{
GameSettingsA[iPad]->uiBitmaskValues|=GAMESETTING_CLASSICCRAFTING;
}
else
{
GameSettingsA[iPad]->uiBitmaskValues&=~GAMESETTING_CLASSICCRAFTING;
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
}
break;
case eGameSetting_OldSwingAnimation:
if((GameSettingsA[iPad]->uiBitmaskValues & GAMESETTING_OLDSWINGANIMATION)!=(ucVal & 0x01)<<26)
if(((GameSettingsA[iPad]->uiBitmaskValues & GAMESETTING_OLDSWINGANIMATION) != 0) != ((ucVal & 0x01) != 0))
{
if(ucVal==1)
{
@@ -2432,6 +2379,7 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
}
break;
case eGameSetting_GraphicsMode:
if(GameSettingsA[iPad]->ucGraphicsMode != ucVal)
@@ -2578,16 +2526,8 @@ unsigned char CMinecraftApp::GetGameSettings(int iPad,eGameSetting eVal)
case eGameSetting_PSVita_NetworkModeAdhoc:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_PSVITANETWORKMODEADHOC)>>17;
// TU25
case eGameSetting_CaveSounds:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_CAVESOUNDS)>>18;
case eGameSetting_ClassicCrafting:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_CLASSICCRAFTING)>>19;
// New
case eGameSetting_OldSwingAnimation:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_OLDSWINGANIMATION)>>26;
return (GameSettingsA[iPad]->uiBitmaskValues & GAMESETTING_OLDSWINGANIMATION) >> 26;
break;
case eGameSetting_GraphicsMode:
return GameSettingsA[iPad]->ucGraphicsMode;
@@ -3728,7 +3668,7 @@ void CMinecraftApp::HandleXuiActions(void)
else
{
#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if(UIScene_LoadCreateJoinMenu::isSaveTransferRunning())
if(UIScene_LoadOrJoinMenu::isSaveTransferRunning())
{
// the save transfer is still in progress, delay jumping back to the main menu until we've cleaned up
SetAction(i,eAppAction_EthernetDisconnected);
@@ -5776,8 +5716,8 @@ void CMinecraftApp::HandleDLC(DLCPack *pack)
char szPath[] = "DLCDrive:\\";
char szFullFilename[256];
strcpy_s(szFullFilename,szPath);
strcat_s(szFullFilename, "*");
strcpy(szFullFilename,szPath);
strcat(szFullFilename,"*");
// Start the find and check for failure.
hFind = FindFirstFile( szFullFilename, &wfd );
@@ -5791,8 +5731,8 @@ void CMinecraftApp::HandleDLC(DLCPack *pack)
// Display each file and ask for the next.
do
{
strcpy_s(szFullFilename,szPath);
strcat_s(szFullFilename,wfd.cFileName);
strcpy(szFullFilename,szPath);
strcat(szFullFilename,wfd.cFileName);
if(( GetFileAttributes( szFullFilename ) & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY)
{
@@ -7103,8 +7043,8 @@ HRESULT CMinecraftApp::RegisterMojangData(WCHAR *pXuidName, PlayerUID xuid, WCHA
ZeroMemory(pMojangData,sizeof(MOJANG_DATA));
pMojangData->eXuid=eTempXuid;
wcsncpy_s( pMojangData->wchSkin, pSkin, MAX_CAPENAME_SIZE);
wcsncpy_s( pMojangData->wchCape, pCape, MAX_CAPENAME_SIZE);
wcsncpy( pMojangData->wchSkin, pSkin, MAX_CAPENAME_SIZE);
wcsncpy( pMojangData->wchCape, pCape, MAX_CAPENAME_SIZE);
MojangData[xuid]=pMojangData;
}
@@ -7300,7 +7240,7 @@ HRESULT CMinecraftApp::RegisterDLCData(char *pchDLCName, unsigned int uiSortInde
pDLCData->iConfig = app.GetiConfigFromName(pchDLCName);
pDLCData->uiSortIndex=uiSortIndex;
pDLCData->eDLCType = app.GetDLCTypeFromName(pchDLCName);
strcpy_s(pDLCData->chImageURL,pchImageURL);
strcpy(pDLCData->chImageURL,pchImageURL);
//bool bIsTrialDLC = app.GetTrialFromName(pchDLCName);
switch(pDLCData->eDLCType)
@@ -7308,14 +7248,14 @@ HRESULT CMinecraftApp::RegisterDLCData(char *pchDLCName, unsigned int uiSortInde
case e_DLC_TexturePacks:
{
char *pchName=(char *)malloc(strlen(pchDLCName)+1);
strcpy_s(pchName,pchDLCName);
strcpy(pchName,pchDLCName);
DLCTextures_PackID[pDLCData->iConfig]=pchName;
}
break;
case e_DLC_MashupPacks:
{
char *pchName=(char *)malloc(strlen(pchDLCName)+1);
strcpy_s(pchName,pchDLCName);
strcpy(pchName,pchDLCName);
DLCTextures_PackID[pDLCData->iConfig]=pchName;
}
break;
@@ -7806,7 +7746,7 @@ void CMinecraftApp::AddLevelToBannedLevelList(int iPad, PlayerUID xuid, char *ps
#else
memcpy(&pBannedListData->xuid, &xuid, sizeof(PlayerUID));
#endif
strcpy_s(pBannedListData->pszLevelName,pszLevelName);
strcpy(pBannedListData->pszLevelName,pszLevelName);
m_vBannedListA[iPad]->push_back(pBannedListData);
if (bWriteToTMS)
@@ -7926,7 +7866,7 @@ void CMinecraftApp::AddCreditText(LPCWSTR lpStr)
pCreditStruct->m_iStringID[0]=NO_TRANSLATED_STRING;
pCreditStruct->m_iStringID[1]=NO_TRANSLATED_STRING;
pCreditStruct->m_Text=new WCHAR [wcslen(lpStr)+1];
wcscpy_s((WCHAR*)pCreditStruct->m_Text, wcslen(lpStr) + 1, lpStr);
wcscpy((WCHAR *)pCreditStruct->m_Text,lpStr);
vDLCCredits.push_back(pCreditStruct);
}
@@ -8533,7 +8473,7 @@ unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, int64_t see
int iTextMetadataBytes = 0;
if(hasSeed)
{
strcpy_s((char*)bTextMetadata, 8, "4J_SEED");
strcpy((char *)bTextMetadata,"4J_SEED");
_i64toa_s(seed,(char *)&bTextMetadata[8],42,10);
// get the length
@@ -8543,7 +8483,7 @@ unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, int64_t see
}
// Save the host options that this world was last played with
strcpy_s((char *)&bTextMetadata[iTextMetadataBytes], 15, "4J_HOSTOPTIONS");
strcpy((char *)&bTextMetadata[iTextMetadataBytes],"4J_HOSTOPTIONS");
_itoa_s(uiHostOptions,(char *)&bTextMetadata[iTextMetadataBytes+15],9,16);
iTextMetadataBytes += 15;
@@ -8551,7 +8491,7 @@ unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, int64_t see
++iTextMetadataBytes; // Add a null terminator at the end of the host options value
// Save the texture pack id
strcpy_s((char *)&bTextMetadata[iTextMetadataBytes], 15, "4J_TEXTUREPACK");
strcpy((char *)&bTextMetadata[iTextMetadataBytes],"4J_TEXTUREPACK");
_itoa_s(uiTexturePackId,(char *)&bTextMetadata[iTextMetadataBytes+15],9,16);
iTextMetadataBytes += 15;
@@ -9079,7 +9019,7 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
{
#if defined(_XBOX) || defined(_WINDOWS64)
char szFile[MAX_TMSFILENAME_SIZE];
wcstombs_s(nullptr, szFile, MAX_TMSFILENAME_SIZE, pCurrent->wchFilename, _TRUNCATE);
wcstombs(szFile,pCurrent->wchFilename,MAX_TMSFILENAME_SIZE);
if(strcmp(szFilename,szFile)==0)
@@ -9592,7 +9532,7 @@ int CMinecraftApp::TexturePackDialogReturned(void* pParam, int iPad, C4JStorage:
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);
#ifdef __ORBIS__
strcpy_s(chName, chKeyName);
strcpy(chName, chKeyName);
#else
sprintf(chName, "%s-%s", app.GetCommerceCategory(), chKeyName);
#endif
@@ -10323,7 +10263,7 @@ enum ETitleUpdateTexturePacks
};
#ifdef _WINDOWS64
wstring titleUpdateTexturePackRoot = L"Data/DLC";
wstring titleUpdateTexturePackRoot = L"Data/DLC/";
#elif defined(__ORBIS__)
wstring titleUpdateTexturePackRoot = L"/app0/orbis/CU/DLC/";
#elif defined(__PSVITA__)