SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
include
Game
Map
StageSwitch.hpp
1
#pragma once
2
3
#include <revolution.h>
4
5
#include "Game/NameObj/NameObj.hpp"
6
#include "Game/Util/JMapIdInfo.hpp"
7
8
class
BitFlag128
{
9
public
:
10
inline
BitFlag128
() {
11
mFlags[0] = 0;
12
mFlags[1] = 0;
13
mFlags[2] = 0;
14
mFlags[3] = 0;
15
}
16
17
bool
get(
int
)
const
;
18
void
set(
int
,
bool
);
19
20
u32 mFlags[0x4];
// _0
21
};
22
23
class
ZoneSwitch
:
public
BitFlag128
{
24
public
:
25
ZoneSwitch
();
26
};
27
28
class
SwitchIdInfo
{
29
public
:
30
SwitchIdInfo
(s32,
const
JMapInfoIter
&);
31
32
s32 getSwitchNo()
const
;
33
34
JMapIdInfo
* mIDInfo;
// _0
35
bool
mIsGlobal;
// _4
36
};
37
38
class
StageSwitchContainer
:
public
NameObj
{
39
public
:
40
struct
ContainerSwitch
{
41
s32 mData;
// _0
42
ZoneSwitch
* mSwitch;
// _4
43
};
44
45
StageSwitchContainer
();
46
47
virtual
~StageSwitchContainer
();
48
49
void
createAndAddZone(
const
SwitchIdInfo
&);
50
ZoneSwitch
* getZoneSwitch(
const
SwitchIdInfo
&);
51
ZoneSwitch
* findZoneSwitchFromTable(
const
SwitchIdInfo
&);
52
53
ContainerSwitch
mSwitches[20];
// _C
54
s32 mCount;
// _AC
55
ZoneSwitch
* mGlobalSwitches;
// _B0
56
};
57
58
class
StageSwitchFunction
{
59
public
:
60
static
SwitchIdInfo
* createSwitchIdInfo(
const
char
*,
const
JMapInfoIter
&,
bool
);
61
static
void
onSwitchBySwitchIdInfo(
const
SwitchIdInfo
&);
62
static
void
offSwitchBySwitchIdInfo(
const
SwitchIdInfo
&);
63
static
bool
isOnSwitchBySwitchIdInfo(
const
SwitchIdInfo
&);
64
};
65
66
class
StageSwitchCtrl
{
67
public
:
68
StageSwitchCtrl
(
const
JMapInfoIter
&);
69
70
void
onSwitchA();
71
void
offSwitchA();
72
bool
isOnSwitchA()
const
;
73
bool
isValidSwitchA()
const
;
74
void
onSwitchB();
75
void
offSwitchB();
76
bool
isOnSwitchB()
const
;
77
bool
isValidSwitchB()
const
;
78
bool
isOnSwitchAppear()
const
;
79
bool
isValidSwitchAppear()
const
;
80
void
onSwitchDead();
81
void
offSwitchDead();
82
bool
isValidSwitchDead()
const
;
83
bool
isOnAllSwitchAfterB(
int
)
const
;
84
bool
isOnAnyOneSwitchAfterB(
int
)
const
;
85
86
SwitchIdInfo
* mSW_A;
// _0
87
SwitchIdInfo
* mSW_B;
// _4
88
SwitchIdInfo
* mSW_Appear;
// _8
89
SwitchIdInfo
* mSW_Dead;
// _C
90
};
91
92
namespace
MR {
93
StageSwitchCtrl
* createStageSwitchCtrl(
NameObj
*,
const
JMapInfoIter
&);
94
};
BitFlag128
Definition
StageSwitch.hpp:8
JMapIdInfo
Definition
JMapIdInfo.hpp:6
JMapInfoIter
Definition
JMapInfo.hpp:16
NameObj
The most basic form of an object.
Definition
NameObj.hpp:11
StageSwitchContainer
Definition
StageSwitch.hpp:38
StageSwitchCtrl
Definition
StageSwitch.hpp:66
StageSwitchFunction
Definition
StageSwitch.hpp:58
SwitchIdInfo
Definition
StageSwitch.hpp:28
ZoneSwitch
Definition
StageSwitch.hpp:23
StageSwitchContainer::ContainerSwitch
Definition
StageSwitch.hpp:40
Generated by
1.10.0