blob: ade8210e62ed9df63e3efbe84f0a14a1b28bdf7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#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.
// So ideally all of these declarations were moved to REL class definitions...
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
|