mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-06 19:52:45 -04:00
fmap poe counter
This commit is contained in:
@@ -747,3 +747,109 @@ void dMenuMapCommon_c::debugIcon() {
|
||||
setIconInfo(ICON_LV8_WARP_e, pos_x, pos_y, 0.0f, scale, 1.0f, 1);
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
static constexpr struct {
|
||||
std::string stagename;
|
||||
u8 switch_no;
|
||||
s8 region_id;
|
||||
u8 save_id;
|
||||
} l_poeInfo[] = {
|
||||
// Dungeons
|
||||
{"D_MN06", 0x19, -1, 0x15},
|
||||
{"D_MN06", 0x18, -1, 0x15},
|
||||
{"D_MN07", 0x54, -1, 0x16},
|
||||
{"D_MN07", 0x55, -1, 0x16},
|
||||
{"D_MN10", 0x1E, -1, 0x13},
|
||||
{"D_MN10", 0x1F, -1, 0x13},
|
||||
{"D_MN10", 0x20, -1, 0x13},
|
||||
{"D_MN10", 0x21, -1, 0x13},
|
||||
{"D_MN11", 0x72, -1, 0x14},
|
||||
{"D_MN11", 0x15, -1, 0x14},
|
||||
{"D_MN11", 0x7F, -1, 0x14},
|
||||
|
||||
// Sub-Dungeons
|
||||
{"D_SB01", 0x45, 4, 0x19},
|
||||
{"D_SB01", 0x46, 4, 0x19},
|
||||
{"D_SB01", 0x47, 4, 0x19},
|
||||
{"D_SB02", 0x60, 2, 0x19},
|
||||
{"D_SB03", 0x5E, 3, 0x1A},
|
||||
{"D_SB03", 0x5F, 3, 0x1A},
|
||||
{"D_SB03", 0x5D, 3, 0x1A},
|
||||
{"D_SB05", 0xA, 3, 0x1B},
|
||||
{"D_SB05", 0xB, 3, 0x1B},
|
||||
{"D_SB07", 0xF, 4, 0x1B},
|
||||
{"D_SB07", 0x10, 4, 0x1B},
|
||||
|
||||
// Field Spots
|
||||
{"F_SP108", 0x5D, 1, 0x2},
|
||||
{"F_SP109", 0x5E, 2, 0x3},
|
||||
{"F_SP109", 0x5F, 2, 0x3},
|
||||
{"F_SP110", 0x59, 2, 0x3},
|
||||
{"F_SP111", 0x57, 2, 0x3},
|
||||
{"F_SP111", 0x58, 2, 0x3},
|
||||
{"F_SP113", 0x49, 3, 0x4},
|
||||
{"F_SP113", 0x4A, 3, 0x4},
|
||||
{"F_SP114", 0x7C, 5, 0x8},
|
||||
{"F_SP114", 0x7D, 5, 0x8},
|
||||
{"F_SP114", 0x7B, 5, 0x8},
|
||||
{"F_SP114", 0x7E, 5, 0x8},
|
||||
{"F_SP114", 0x7F, 5, 0x8},
|
||||
{"F_SP115", 0x46, 3, 0x4},
|
||||
{"F_SP115", 0x47, 3, 0x4},
|
||||
{"F_SP115", 0x4B, 3, 0x4},
|
||||
{"F_SP115", 0x4C, 3, 0x4},
|
||||
{"F_SP115", 0x4D, 3, 0x4},
|
||||
{"F_SP117", 0xF, 1, 0x7},
|
||||
{"F_SP117", 0x1E, 1, 0x7},
|
||||
{"F_SP117", 0x10, 1, 0x7},
|
||||
{"F_SP117", 0x11, 1, 0x7},
|
||||
{"F_SP118", 0x78, 4, 0xA},
|
||||
{"F_SP118", 0x5A, 4, 0xA},
|
||||
{"F_SP121", 0x3A, 2, 0x6},
|
||||
{"F_SP121", 0x39, 1, 0x6},
|
||||
{"F_SP121", 0x33, 3, 0x6},
|
||||
{"F_SP121", 0x3B, 3, 0x6},
|
||||
{"F_SP122", 0x49, 3, 0x6},
|
||||
{"F_SP122", 0x30, 3, 0x6},
|
||||
{"F_SP122", 0x47, 3, 0x6},
|
||||
{"F_SP124", 0x5B, 4, 0xA},
|
||||
{"F_SP124", 0x5C, 4, 0xA},
|
||||
{"F_SP124", 0x5D, 4, 0xA},
|
||||
{"F_SP124", 0x33, 4, 0xA},
|
||||
{"F_SP126", 0x48, 3, 0x4},
|
||||
{"F_SP128", 0x40, 2, 0x3},
|
||||
{"R_SP160", 0x1F, 3, 0x9},
|
||||
};
|
||||
|
||||
void dMenuMapCommon_c::getDmapPoeCount(const std::string& stageName, int& nowCount, int& totalCount) {
|
||||
nowCount = 0;
|
||||
totalCount = 0;
|
||||
|
||||
for (const auto& i : l_poeInfo) {
|
||||
if (stageName == i.stagename) {
|
||||
nowCount += dComIfGs_isSaveSwitch(i.save_id, i.switch_no);
|
||||
totalCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dMenuMapCommon_c::getFmapPoeCount(const int regionNo, int& nowCount, int& totalCount) {
|
||||
nowCount = 0;
|
||||
totalCount = 0;
|
||||
|
||||
if (regionNo < 0)
|
||||
return;
|
||||
|
||||
for (const auto& i : l_poeInfo) {
|
||||
if (regionNo == i.region_id) {
|
||||
if (dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo()) == i.save_id) {
|
||||
nowCount += dComIfGs_isSwitch(i.switch_no, -1);
|
||||
} else {
|
||||
nowCount += dComIfGs_isSaveSwitch(i.save_id, i.switch_no);
|
||||
}
|
||||
totalCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user