SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
StarPieceCounter.hpp
1#pragma once
2
3#include "Game/Screen/LayoutActor.hpp"
4#include "Game/Screen/CounterLayoutAppearer.hpp"
5#include "Game/Screen/CountUpPaneRumbler.hpp"
6
8public:
9 StarPieceCounter(const char *);
10
11 virtual ~StarPieceCounter();
12 virtual void init(const JMapInfoIter &);
13 virtual void appear();
14 virtual void control();
15
16 void forceAppear(bool);
17 void disappear(bool);
18 bool isWait() const;
19 void forceSync();
20 bool tryOnModeTicoEat(bool);
21 bool tryOffModeTicoEat();
22 void updateCounter();
23 void updateCounterValue();
24 bool isValidAppearSituation() const;
25 bool isDispCenter() const;
26 bool tryChangeModeTicoEat(int);
27
28 void exeHide();
29 void exeAppear();
30 void exeWait();
31 void exeDisappear();
32
33 s32 mStarPieceNum; // _20
34 s32 _24;
35 u32 _28;
36 CounterLayoutAppearer* mAppearer; // _2C
37 CountUpPaneRumbler* mPaneRumbler; // _30
38 TVec2f mFollowPos; // _34
39 s32 _3C;
40 int _40;
41};
42
43namespace NrvStarPieceCounter {
44 NERVE_DECL(StarPieceCounterNrvHide, StarPieceCounter, StarPieceCounter::exeHide);
45 NERVE_DECL(StarPieceCounterNrvAppear, StarPieceCounter, StarPieceCounter::exeAppear);
46 NERVE_DECL(StarPieceCounterNrvWait, StarPieceCounter, StarPieceCounter::exeWait);
47 NERVE_DECL(StarPieceCounterNrvDisappear, StarPieceCounter, StarPieceCounter::exeDisappear);
48};
49
50namespace StarPieceUtil {
51 inline bool isDeadOrWaiting(StarPieceCounter *pCounter) {
52 bool isDeadAndWaiting = false;
53
54 if (!MR::isDead(pCounter) && pCounter->isNerve(&NrvStarPieceCounter::StarPieceCounterNrvWait::sInstance)) {
55 isDeadAndWaiting = true;
56 }
57
58 return isDeadAndWaiting;
59 }
60};
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.