fix key count inconsistency

This commit is contained in:
gymnast86
2026-05-18 11:05:46 -07:00
parent 6321bcf0d8
commit ea0c697afa
2 changed files with 15 additions and 3 deletions
+1 -3
View File
@@ -2077,9 +2077,7 @@ inline void dComIfGs_setKeyNum(u8 i_keyNum) {
}
#if TARGET_PC
inline u8 dComIfGs_getKeyNum(int i_stageNo) {
return g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().getKeyNum();
}
u8 dComIfGs_getKeyNum(int i_stageNo);
#endif
inline void dComIfGs_onDungeonItemMap() {
+14
View File
@@ -3316,6 +3316,20 @@ void dComIfGs_setSelectEquipShield(u8 i_itemNo) {
g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().setSelectEquip(COLLECT_SHIELD, i_itemNo);
}
#if TARGET_PC
u8 dComIfGs_getKeyNum(int i_stageNo) {
// If we're on the current stage for this key, take the current stage info
if (dComIfGp_getStageStagInfo()) {
if (i_stageNo == dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo())) {
return dComIfGs_getKeyNum();
}
}
// Otherwise take info from the save
return g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().getKeyNum();
}
#endif
void dComIfGs_setKeyNum(int i_stageNo, u8 i_keyNum) {
if (dComIfGp_getStageStagInfo()) {
if (i_stageNo == dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo())) {