SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
BreakableCage.hpp
1#pragma once
2
3#include "Game/LiveActor/LiveActor.hpp"
4#include "Game/LiveActor/ModelObj.hpp"
5#include "Game/MapObj/DummyDisplayModel.hpp"
6
7namespace {
8 Vec cHitSensorOffsetCage;
9 Vec cHitSensorOffsetFixation;
10};
11
12class BreakableCage : public LiveActor {
13public:
14 BreakableCage(const char *);
15
16 enum CageType {
17 CAGE_INVALID = 0,
18 CAGE_NORMAL = 1,
19 CAGE_LARGE = 2,
20 CAGE_FIX = 3,
21 CAGE_TRASH = 4
22 };
23
24 virtual ~BreakableCage();
25 virtual void init(const JMapInfoIter &);
26 virtual void appear();
27 virtual void kill();
28 virtual void calcAndSetBaseMtx();
29 virtual bool receiveMsgPlayerAttack(u32, HitSensor *, HitSensor *);
30 virtual bool receiveMsgEnemyAttack(u32, HitSensor *, HitSensor *);
31
32 const ActorCameraInfo* getCamInfo() const {
33 return mCameraInfo;
34 }
35
36 void initMapToolInfo(const JMapInfoIter &);
37 void initModel(const char *, const JMapInfoIter &);
38 void initBaseMtxForCage();
39 bool isTypeCage() const;
40 bool isAppearPowerStar() const;
41 bool tryBreak();
42 void exeWait();
43 void exeBreak();
44
45 TPos3f mMtx; // _8C
46 ModelObj* mBreakModel; // _BC
47 CageType mCageType; // _C0
48 f32 mRotationSpeed; // _C4
49 DummyDisplayModel* mItemModel; // _C8
50 bool mIgnoreGravity; // _CC
51 bool mDelayDeadActivate; // _CD
52 const ActorCameraInfo* mCameraInfo; // _D0
53};
54
55namespace NrvBreakableCage {
56 NERVE(BreakableCageNrvWait);
57 NERVE(BreakableCageNrvWaitStartDemoBreak);
58 NERVE(BreakableCageNrvBreak);
59};
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