feat(TU31): classic crafting (#48)

credits: comicgab
This commit is contained in:
SevenToaster509
2026-05-01 19:44:30 +03:00
committed by GitHub
parent a51d7ae834
commit 05d7ccb6d4
32 changed files with 819 additions and 186 deletions
+35 -10
View File
@@ -577,16 +577,15 @@ bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,shared_ptr<LocalPlayer> player,
initData->y = y;
initData->z = z;
if(app.GetLocalPlayerCount()>1)
{
initData->bSplitscreen=true;
success = ui.NavigateToScene(iPad,eUIScene_Crafting3x3Menu, initData);
}
if (app.GetLocalPlayerCount() > 1)
initData->bSplitscreen = true;
else
{
initData->bSplitscreen=false;
success = ui.NavigateToScene(iPad,eUIScene_Crafting3x3Menu, initData);
}
initData->bSplitscreen = false;
if (app.GetGameSettings(iPad, eGameSetting_ClassicCrafting))
success = ui.NavigateToScene(iPad, eUIScene_ClassicCraftingMenu, initData);
else
success = ui.NavigateToScene(iPad, eUIScene_Crafting3x3Menu, initData);
return success;
}
@@ -1041,6 +1040,9 @@ int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,con
app.SetGameHostOption(eGameHostOption_NaturalRegeneration, 1 );
app.SetGameHostOption(eGameHostOption_DoDaylightCycle, 1 );
//TU25
SetGameSettings(iPad, eGameSetting_ClassicCrafting, 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__
@@ -1438,6 +1440,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
pGameSettings->uiBitmaskValues|=(GAMESETTING_UISIZE&0x00000800); // uisize 2
pGameSettings->uiBitmaskValues|=(GAMESETTING_UISIZE_SPLITSCREEN&0x00004000); // splitscreen ui size 3
pGameSettings->uiBitmaskValues|=GAMESETTING_ANIMATEDCHARACTER; //eGameSetting_AnimatedCharacter - on
pGameSettings->uiBitmaskValues |= GAMESETTING_CLASSICCRAFTING; //eGameSetting_ClassicCrafting - off
// TU12
// favorite skins added, but only set in TU12 - set to FFs
for(int i=0;i<MAX_FAVORITE_SKINS;i++)
@@ -1497,6 +1500,8 @@ void CMinecraftApp::ApplyGameSettingsChanged(int iPad)
ActionGameSettings(iPad,eGameSetting_PS3_EULA_Read);
ActionGameSettings(iPad,eGameSetting_VSync);
//TU25
ActionGameSettings(iPad, eGameSetting_ClassicCrafting);
}
void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
@@ -1747,6 +1752,9 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
}
#endif
break;
case eGameSetting_ClassicCrafting:
//nothing to do here
break;
}
}
@@ -2489,7 +2497,21 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
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;
}
}
@@ -2625,6 +2647,9 @@ unsigned char CMinecraftApp::GetGameSettings(int iPad,eGameSetting eVal)
case eGameSetting_PSVita_NetworkModeAdhoc:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_PSVITANETWORKMODEADHOC)>>17;
case eGameSetting_ClassicCrafting:
return (GameSettingsA[iPad]->uiBitmaskValues & GAMESETTING_CLASSICCRAFTING) >> 26;
case eGameSetting_VSync:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_VSYNC)>>24;