summaryrefslogtreecommitdiff
path: root/include/toBeSorted
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2026-01-29 23:33:34 +0100
committerrobojumper <robojumper@gmail.com>2026-01-30 23:38:28 +0100
commit75f3be60d26e205f1681afb44a3b4d5a72f75d80 (patch)
tree2e399dc27bddb24282a0b6714367e6678fce97de /include/toBeSorted
parent62fc066b605680af84cc921aba070b62e7df8ff7 (diff)
A start
Diffstat (limited to 'include/toBeSorted')
-rw-r--r--include/toBeSorted/misc_actor.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/toBeSorted/misc_actor.h b/include/toBeSorted/misc_actor.h
index 4024e1bc..ade8210e 100644
--- a/include/toBeSorted/misc_actor.h
+++ b/include/toBeSorted/misc_actor.h
@@ -1,6 +1,10 @@
#ifndef MISC_ACTOR_H
#define MISC_ACTOR_H
+#include "common.h"
+#include "d/flag/sceneflag_manager.h"
+#include "d/t/d_t_clef_game.h"
+
// TODO - this header might be unnecessary; a lot of functions in
// the split corresponding to this header clearly are REL functions
// that were moved to the DOL because they need to be called from the DOL.
@@ -9,4 +13,47 @@
bool checkIsInSkykeepPuzzle();
void restoreSkykeepPuzzleFromGlobal();
+extern const u8 sTadtoneSceneflags[];
+extern const u8 sTadtoneGroupSizes[];
+
+inline bool isValidTadtoneGroupIndex(s32 i) {
+ return 0 <= i && i <= 17 - 1;
+}
+
+inline void unkTadtoneInline(s32 i, u8 *result) {
+ if (result != nullptr) {
+ if (isValidTadtoneGroupIndex(i)) {
+ if (SceneflagManager::sInstance->isNotTempOrZoneFlag(sTadtoneSceneflags[i])) {
+ if (SceneflagManager::sInstance->checkTempOrSceneflag(sTadtoneSceneflags[i])) {
+ *result = sTadtoneGroupSizes[i];
+ } else if (dTgClefGame_c::GetInstance() == nullptr) {
+ *result = 0;
+ } else {
+ *result = dTgClefGame_c::GetInstance()->getField_0x14C(i);
+ }
+ } else {
+ *result = sTadtoneGroupSizes[i];
+ }
+ }
+ }
+}
+
+inline void unkTadtoneInline2(s32 i, u8 *result) {
+ if (result != nullptr) {
+ if (isValidTadtoneGroupIndex(i)) {
+ *result = sTadtoneGroupSizes[i];
+ }
+ }
+}
+
+inline void unkTadtoneInline3(s32 i, u8 *result) {
+ if (result != nullptr) {
+ if (isValidTadtoneGroupIndex(i)) {
+ if (dTgClefGame_c::GetInstance() != nullptr) {
+ *result = dTgClefGame_c::GetInstance()->getField_0x15D(i);
+ }
+ }
+ }
+}
+
#endif