mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-23 22:45:05 -04:00
fix key count inconsistency
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user