SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
ItemAppearStone.cpp
1#include "Game/MapObj/ItemAppearStone.hpp"
2
3ItemAppearStone::ItemAppearStone(const char *pName) : LiveActor(pName) {
4
5}
6
8 MR::initDefaultPos(this, rIter);
9 const char* model_name = 0;
10 MR::getObjectName(&model_name, rIter);
11 initModelManagerWithAnm(model_name, 0, false);
12 MR::connectToSceneMapObj(this);
13 initEffectKeeper(0, 0, false);
14 initSound(4, false);
15 initHitSensor(1);
16 HitSensor* sensor = MR::addBodyMessageSensorMapObjMoveCollision(this);
17 MR::initCollisionParts(this, model_name, sensor, MR::getJointMtx(this, "Move"));
18 MR::setClippingTypeSphereContainsModelBoundingBox(this, 100.0f);
19 MR::needStageSwitchReadB(this, rIter);
20 initNerve(&NrvItemAppearStone::HostTypeWait::sInstance);
21 makeActorAppeared();
22 MR::startBck(this, model_name, 0);
23}
24
25void ItemAppearStone::kill() {
26 LiveActor::kill();
27}
28
32
33void ItemAppearStone::exeWait() {
34 MR::startLevelSound(this, "SE_OJ_LV_ITEM_APR_STONE_MV", -1, -1, -1);
35
36 if (MR::isOnSwitchB(this)) {
37 MR::startSound(this, "SE_OJ_ITEM_APR_STONE_BREAK", -1, -1);
38 kill();
39 }
40}
41
42ItemAppearStone::~ItemAppearStone() {
43
44}
45
46namespace NrvItemAppearStone {
47 INIT_NERVE(HostTypeWait);
48
49 void HostTypeWait::execute(Spine *pSpine) const {
50 ItemAppearStone* stone = reinterpret_cast<ItemAppearStone*>(pSpine->mExecutor);
51 stone->exeWait();
52 }
53};
virtual void calcAndSetBaseMtx()
Calculates and sets the base matrix of the actor.
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
Definition Spine.hpp:9