SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
FileSelectEffect.cpp
1#include "Game/Map/FileSelectEffect.hpp"
2
3FileSelectEffect::FileSelectEffect(const char *pName) : LiveActor(pName) {
4 mEffectFrame = 0.0f;
5}
6
8 initModelManagerWithAnm("MiniatureGalaxySelect", nullptr, false);
9 MR::connectToSceneMapObj(this);
10 MR::invalidateClipping(this);
11 initNerve(&FileSelectEffectNrvWait::sInstance);
12 makeActorDead();
13}
14
15void FileSelectEffect::appear() {
16 LiveActor::appear();
17 setNerve(&FileSelectEffectNrvAppear::sInstance);
18}
19
20// FileSelectEffect::disappear
21
22void FileSelectEffect::exeAppear() {
23 if (MR::isFirstStep(this)) {
24 MR::startBrk(this, "Appear");
25 MR::startBtk(this, "MiniatureGalaxySelect");
26 }
27
28 if (MR::isBrkOneTimeAndStopped(this)) {
29 setNerve(&FileSelectEffectNrvWait::sInstance);
30 }
31}
32
33void FileSelectEffect::exeDisappear() {
34 if (MR::isFirstStep(this)) {
35 MR::startBrk(this, "Disappear");
36 J3DFrameCtrl* ctrl = MR::getBrkCtrl(this);
37 MR::setBrkFrame(this, ctrl->mEndFrame - mEffectFrame);
38 }
39
40 if (MR::isBrkOneTimeAndStopped(this)) {
41 kill();
42 }
43}
44
45// FileSelectEffect::calcAndSetBaseMtx
46
47namespace {
48 INIT_NERVE(FileSelectEffectNrvAppear);
49 INIT_NERVE(FileSelectEffectNrvWait);
50 INIT_NERVE(FileSelectEffectNrvDisappear);
51};
52
53FileSelectEffect::~FileSelectEffect() {
54
55}
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24