SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
PowerStar.hpp
1#pragma once
2
3#include "Game/MapObj/PowerStarAppearPoint.hpp"
4#include "Game/NameObj/NameObjArchiveListCollector.hpp"
5#include "Game/LiveActor/LiveActor.hpp"
6#include "Game/LiveActor/ModelObj.hpp"
7#include "Game/Util/Color.hpp"
8#include "JSystem/JGeometry.hpp"
9
10namespace {
11 const char* cAppearDemoName = "パワースター出現";
12 const char* cStageClearAnimNameKoopaVs3 = "GrandStarGetKoopaVs3";
13};
14
15class PowerStar : public LiveActor {
16public:
17 PowerStar(const char *);
18
19 virtual ~PowerStar();
20 virtual void init(const JMapInfoIter &);
21 virtual void initAfterPlacement();
22 virtual void appear();
23 virtual void makeActorAppeared();
24 virtual void control();
25 virtual void calcAndSetBaseMtx();
26 virtual bool receiveMsgPlayerAttack(u32, HitSensor *, HitSensor *);
27 virtual bool receiveOtherMsg(u32, HitSensor *, HitSensor *);
28
29 void requestAppear();
30 void setDemoAppearPos(const TVec3f &);
31 bool isEndAppearDemo() const;
32 void offAppearDemo();
33 static void setupColor(LiveActor *, const NameObj *, s32);
34 static void setupColorAtResultSequence(LiveActor *, bool);
35 static void requestPointLight(const LiveActor *, const NameObj *, s32);
36 static void requestPointLightAtResultSequence(const LiveActor *);
37 static f32 getPowerStarWaitRotateSpeed();
38 static s32 getBtpFrameCurrentStage(s32);
39 static bool isCurrentStageKoopaVs3();
40 static void initShadowPowerStar(LiveActor *, bool);
41 static void makeArchiveList(NameObjArchiveListCollector *, const JMapInfoIter &);
42 void initMapToolInfo(const JMapInfoIter &);
43 void initModel();
44 void initSensorGrandStar();
45 void initShadow(const JMapInfoIter &);
46 void initPosture();
47 void endAppearDemo();
48 PowerStarAppearPoint* getNearestAppearPoint(const TVec3f &) const;
49 LiveActor* getAppearCameraActor();
50 ActorCameraInfo* getAppearCameraInfo() const;
51 void requestAppearOrWait();
52 void calcAppearDemoRiseTrans(TVec3f *, f32) const;
53 void processWait(f32);
54 void exeAppearDemoRise();
55 void exeAppearDemoMove();
56 void exeAppearDemoKoopa();
57 void exeWait();
58 void exeWeak();
59 void exeWeakNoRotate();
60 void exeWeakToWait();
61 void exeStageClearDemo();
62
63 inline bool isGrandStar() {
64 return mIsGrandStar;
65 }
66
67 s32 mPowerStarId; // _8C
68 bool mIsInDemo; // _90
69 TVec3f mAppearPosition; // _94
70 TVec3f _A0;
71 TVec3f _AC;
72 TPos3f _B8;
73 TMtx34f _E8;
74 ModelObj* mPowerStarModelObj; // _118
75 u8 _11C;
76 u8 _11D;
77 u8 _11E;
78 u8 _11F;
79
80 // _120
81 // this isn't what they wrote but oh well
82 union {
83 volatile s32 mColorFrame_v;
84 s32 mColorFrame;
85 };
86
87 volatile bool mIsGrandStar; // _124
88 bool _125; // Obj_arg0
89 bool _126; // Obj_arg1
90 bool _127; // Obj_arg4
91 ActorCameraInfo* mCameraInfo; // _128
92 PowerStarAppearPoint* mCameraActor; // _12C
93 ModelObj* mLuigiNPC; // _130
94 TMtx34f _134;
95 u8 _164;
96};
97
98namespace NrvPowerStar {
99 NERVE(PowerStarNrvWaitStartAppear);
100 NERVE(PowerStarNrvAppearDemoRise);
101 NERVE(PowerStarNrvAppearDemoMove);
102 NERVE(PowerStarNrvAppearDemoKoopa);
103 NERVE(PowerStarNrvWait);
104 NERVE(PowerStarNrvWeak);
105 NERVE(PowerStarNrvWeakNoRotate);
106 NERVE(PowerStarNrvWeakToWait);
107 NERVE(PowerStarNrvStageClearDemo);
108};
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
Stores archive names of NameObjs.
The most basic form of an object.
Definition NameObj.hpp:11
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.
Definition PowerStar.cpp:61