NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_SmallScore.hpp
1#pragma once
2#include <game/bases/d_resource.hpp>
3#include <game/bases/d_lytbase.hpp>
4#include <game/mLib/m_vec.hpp>
5#include <lib/nw4r/lyt/lyt_pane.hpp>
6
7
8class dSmallScore_c {
9
10 enum STATE_e {
11 STATE_MAKE_START = 0,
12 STATE_UP_MOVE = 1,
13 STATE_DISP_WAIT = 2,
14 STATE_GOAL_DISP = 3,
15 STATE_NONE = 4
16 };
17
18 typedef void (dSmallScore_c::*ProcFunc)();
19
20public:
21 dSmallScore_c();
22 virtual ~dSmallScore_c();
23
24 bool createLayout(d2d::ResAccMultLoader_c *);
25 void execute();
26 void draw();
27 void doDelete();
28
29 void setPlayer1upColor(int);
30 void setPlayer1000Color(int);
31 void setPlayer100Color(int);
32 void chgColor();
33
34 void setNormalOrBlueColor();
35
36 void ScissorMaskSet();
37 void BigSmallAnime();
38
39 void MakeStart();
40 void UpMove();
41 void DispWait();
42 void GoalScoreDisp();
43
44 void PositionSet();
45 void CreateSmallScore(const mVec3_c &, int, int);
46 void PosSet(const mVec3_c &);
47
48 LytBase_c mLayout;
49 mVec2_c mPos;
50 mVec2_c mPosDelta;
51 mVec2_c mPosDeceleration;
52 mVec2_c mPosOffset;
53 mVec2_c mScale;
54 mVec2_c mClipScale;
55 mVec2_c mAnimScale;
56 nw4r::lyt::Pane *mpRootPane;
57 LytTextBox_c *T_100_00;
58 LytTextBox_c *T_1000_00;
59 LytTextBox_c *T_red2_00;
60 LytTextBox_c *T_1UP_00;
61 LytTextBox_c *T_coin_x_00;
62 LytTextBox_c *T_coinPoint_00;
63 nw4r::lyt::Pane *N_coin_00;
64 float mMaxHeight;
65 STATE_e mState; ///< Determines the state the score popup is in
66 int mPopupType;
67 int mDispWaitCounter; ///< Counter that is incremented every frame while in the 'DispWait' state
68 int mDispWaitTime; ///< Number of frames to wait in 'DispWait' (unless mPlayerType is 4, in which case the default value is 60)
69 int mPlayerType;
70 int mChgColorCounter; ///< Counter that is incremented every call to dSmallScore_c::chgColor(), which ensures that the 1-up color is only set once every 10 calls.
71 u32 mPlayerColor;
72 int mAnimCounter;
73 u32 mCurTextbox;
74 bool mIsGoalScore;
75 bool mInitialized;
76 bool mEnableColorChange;
77 bool mEnableBigSmallAnim;
78 bool mAnimIsShrinking;
79 bool mHasBlueColor;
80
81 /// @brief Gets the n-th text box.
82 LytTextBox_c *getTextBox(int n) { return (&T_100_00)[n]; }
83
84 static dSmallScore_c *m_instance;
85
86};
int mChgColorCounter
Counter that is incremented every call to dSmallScore_c::chgColor(), which ensures that the 1-up colo...
STATE_e mState
Determines the state the score popup is in.
int mDispWaitCounter
Counter that is incremented every frame while in the 'DispWait' state.
int mDispWaitTime
Number of frames to wait in 'DispWait' (unless mPlayerType is 4, in which case the default value is 6...
LytTextBox_c * getTextBox(int n)
Gets the n-th text box.
A two-dimensional floating point vector.
Definition m_vec.hpp:9
A three-dimensional floating point vector.
Definition m_vec.hpp:100