SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
SnowplowSwitch.cpp
1#include "Game/MapObj/SnowplowSwitch.hpp"
2
3SnowplowSwitch::SnowplowSwitch(const char *pName) : LiveActor(pName) {
4 _8C = 0;
5}
6
7bool SnowplowSwitch::receiveOtherMsg(u32 msg, HitSensor *, HitSensor *) {
8 if (msg == 73) {
9 return _8C == 0;
10 }
11
12 if (msg == 74 && _8C) {
13 _8C = 1;
14 MR::onSwitchA(this);
15 return true;
16 }
17
18 return false;
19}
20
21SnowplowSwitch::~SnowplowSwitch() {
22
23}
24
26 MR::initDefaultPos(this, rIter);
27 MR::connectToSceneMapObjMovement(this);
28 MR::invalidateClipping(this);
29 initHitSensor(1);
30 TVec3f sensorOffs;
31 sensorOffs.x = 0.0f;
32 sensorOffs.y = 0.0f;
33 sensorOffs.z = 0.0f;
34 MR::addHitSensorEnemy(this, "Body", 8, 70.0f, sensorOffs);
35 MR::needStageSwitchWriteA(this, rIter);
36
37 if (MR::useStageSwitchReadAppear(this, rIter)) {
38 MR::syncStageSwitchAppear(this);
39 makeActorDead();
40 }
41 else {
42 makeActorAppeared();
43 }
44}
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.