StageSwitchKeeper::isUsingSwitchNo

This commit is contained in:
shibbo 2024-09-03 21:01:05 -04:00
parent 1b3e5cecf8
commit 22f761b63f
5 changed files with 14 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "decompiled",
"message": "0.34%",
"message": "0.3407%",
"color": "blue"
}

View File

@ -54818,7 +54818,7 @@ _ZN2al23StageSwitchAccesserListC2EPKNS_19StageSwitchAccesserE=00000071008D3620=0
_ZN2al17StageSwitchKeeperC2Ev=00000071008D3630=00000010=true
_ZN2al17StageSwitchKeeper4initEPNS_19StageSwitchDirectorERKNS_13PlacementInfoE=00000071008D3640=000001A8=true
_ZNK2al17StageSwitchKeeper25tryGetStageSwitchAccesserEPKc=00000071008D37F0=00000098=true
_ZN2al17StageSwitchKeeper15isUsingSwitchNoEi=00000071008D3890=0000004C=false
_ZN2al17StageSwitchKeeper15isUsingSwitchNoEi=00000071008D3890=0000004C=true
_ZN2al19StageSwitchAccesserC2Ev=00000071008D38E0=0000001C=false
_ZN2al19StageSwitchAccesser4initEPNS_19StageSwitchDirectorEPKcRKNS_11PlacementIdEb=00000071008D3900=000000C8=false
_ZNK2al19StageSwitchAccesser7isValidEv=00000071008D39D0=00000010=false

View File

@ -21,7 +21,7 @@ namespace al {
void* _8;
const char* mName; // 0x10
u64 _18;
s32 _20;
s32 mSwitchNo; // 0x20
s32 _24;
bool _28;
};

View File

@ -13,6 +13,7 @@ namespace al {
void init(StageSwitchDirector*, const PlacementInfo&);
StageSwitchAccesser* tryGetStageSwitchAccesser(const char*) const;
bool isUsingSwitchNo(s32);
StageSwitchAccesser* mAccessors = nullptr; // 0x00
s32 mLinkCount = 0; // 0x8

View File

@ -45,4 +45,14 @@ namespace al {
return nullptr;
}
bool StageSwitchKeeper::isUsingSwitchNo(s32 switchNo) {
for (s32 i = 0; i < mLinkCount; i++) {
if (mAccessors[i].mSwitchNo == switchNo) {
return true;
}
}
return false;
}
}; // namespace al