Add #ifdef declarations for NON_MATCHING code

This commit is contained in:
AlexApps99
2021-07-26 21:58:51 +12:00
parent 88bcc9eec1
commit 42807160cf
55 changed files with 274 additions and 95 deletions
+9 -3
View File
@@ -113,7 +113,8 @@ bool hasOneTagAtLeast(const ActorConstDataAccess& accessor, const sead::SafeStri
return false;
}
// NON_MATCHING: this version doesn't have unnecessary register moves.
// this version doesn't have unnecessary register moves.
#ifdef NON_MATCHING
bool shouldSkipSpawnWhenRaining(map::Object* obj) {
if (obj->getFlags().isOff(map::Object::Flag::CreateNotRain))
return false;
@@ -124,6 +125,7 @@ bool shouldSkipSpawnWhenRaining(map::Object* obj) {
const auto pos = obj->getTranslate();
return !world::Manager::instance()->isRaining(pos);
}
#endif
bool shouldSkipSpawnIfGodForestOff(map::Object* obj) {
bool value = false;
@@ -177,7 +179,8 @@ auto initSpawnConditionGameDataFlags_dummy() {
return sIsGetStopTimerLv2Handle;
}
// NON_MATCHING: redundant branches in the original code.
// redundant branches in the original code.
#ifdef NON_MATCHING
bool hasAnyRevivalTag(const sead::SafeString& actor) {
auto* info = InfoData::instance();
al::ByamlIter iter;
@@ -198,6 +201,7 @@ bool hasAnyRevivalTag(const sead::SafeString& actor) {
}
return false;
}
#endif
bool hasStopTimerMiddleTag(Actor* actor) {
return hasTag(actor, tags::StopTimerMiddle);
@@ -207,10 +211,12 @@ bool hasStopTimerShortTag(Actor* actor) {
return hasTag(actor, tags::StopTimerShort);
}
// NON_MATCHING: ???
// ???
#ifdef NON_MATCHING
const char* arrowTypeToString(ArrowType idx) {
return sArrowTypes[u32(idx)];
}
#endif
ArrowType arrowTypeFromString(const sead::SafeString& name) {
for (s32 i = 0; i < sArrowTypes.size(); ++i) {