Modified so that when you enter a new scene, you keep your mask on :D

This commit is contained in:
starburst 2022-05-18 21:34:54 -05:00
commit 02f5fae219
3 changed files with 4 additions and 0 deletions

View file

@ -31,6 +31,7 @@ void BootCommands_Init()
CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gNewDrops", 0);
CVar_RegisterS32("gVisualAgony", 0); CVar_RegisterS32("gVisualAgony", 0);
CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French
CVar_RegisterS32("gMaskNum", 0);
} }
//void BootCommands_ParseBootArgs(char* str) //void BootCommands_ParseBootArgs(char* str)

View file

@ -154,6 +154,8 @@ void Gameplay_Destroy(GameState* thisx) {
GlobalContext* globalCtx = (GlobalContext*)thisx; GlobalContext* globalCtx = (GlobalContext*)thisx;
Player* player = GET_PLAYER(globalCtx); Player* player = GET_PLAYER(globalCtx);
CVar_SetS32("gMaskNum", player->currentMask);
globalCtx->state.gfxCtx->callback = NULL; globalCtx->state.gfxCtx->callback = NULL;
globalCtx->state.gfxCtx->callbackParam = 0; globalCtx->state.gfxCtx->callbackParam = 0;
SREG(91) = 0; SREG(91) = 0;

View file

@ -412,6 +412,7 @@ void func_8008EC70(Player* this) {
void Player_SetEquipmentData(GlobalContext* globalCtx, Player* this) { void Player_SetEquipmentData(GlobalContext* globalCtx, Player* this) {
if (this->csMode != 0x56) { if (this->csMode != 0x56) {
this->currentMask = CVar_GetS32("gMaskNum", 0);
this->currentShield = CUR_EQUIP_VALUE(EQUIP_SHIELD); this->currentShield = CUR_EQUIP_VALUE(EQUIP_SHIELD);
this->currentTunic = CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1; this->currentTunic = CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1;
this->currentBoots = CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1; this->currentBoots = CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1;