|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/bases/d_SmallScore.hpp>
Displays a small popup score indicator.
The class handles the creation, animation, and rendering of a single small score popup, which appears when performing actions such as stomping enemies, collecting coins, or earning 1-UPs.
Definition at line 13 of file d_SmallScore.hpp.
Public Types | |
| enum | STATE_e { STATE_MAKE_START , STATE_UP_MOVE , STATE_DISP_WAIT , STATE_GOAL_DISP , STATE_COUNT , STATE_NONE = STATE_COUNT } |
| The possible states of the score popup. More... | |
| enum | POPUP_TYPE_e { POPUP_TYPE_100 , POPUP_TYPE_200 , POPUP_TYPE_400 , POPUP_TYPE_800 , POPUP_TYPE_1000 , POPUP_TYPE_2000 , POPUP_TYPE_4000 , POPUP_TYPE_8000 , POPUP_TYPE_1 , POPUP_TYPE_2 , POPUP_TYPE_3 , POPUP_TYPE_4 , POPUP_TYPE_5 , POPUP_TYPE_6 , POPUP_TYPE_7 , POPUP_TYPE_8 , POPUP_TYPE_1UP , POPUP_TYPE_2UP , POPUP_TYPE_3UP , POPUP_TYPE_4UP , POPUP_TYPE_1UP_COLOR_CHANGE , POPUP_TYPE_COIN_2 , POPUP_TYPE_COIN_3 , POPUP_TYPE_COIN_5 , POPUP_TYPE_COIN_10 , POPUP_TYPE_COIN_15 , POPUP_TYPE_COIN_20 , POPUP_TYPE_INVALID = -1 } |
| The different types of the small score popups. More... | |
| enum | T_PANE_e { T_100_00 , T_1000_00 , T_red2_00 , T_1UP_00 , T_coin_x_00 , T_coinPoint_00 , T_COUNT } |
| The text boxes used for the layout. More... | |
| enum | N_PANE_e { N_coin_00 , N_COUNT } |
| The null panes used for the layout. More... | |
| typedef void(dSmallScore_c::* | ProcFunc) () |
Public Member Functions | |
| dSmallScore_c () | |
| Constructs a new score popup creator. | |
| virtual | ~dSmallScore_c () |
| Destroys the score popup creator. | |
| bool | createLayout (d2d::ResAccMultLoader_c *res) |
| void | execute () |
| void | draw () |
| bool | doDelete () |
| void | setPlayer1upColor (int) |
| void | setPlayer1000Color (int) |
| void | setPlayer100Color (int) |
| void | chgColor () |
| void | setNormalOrBlueColor () |
| void | ScissorMaskSet () |
| void | BigSmallAnime () |
| void | MakeStart () |
| void | UpMove () |
| void | DispWait () |
| void | GoalScoreDisp () |
| void | PositionSet () |
| void | CreateSmallScore (const mVec3_c &, int, int) |
| void | PosSet (const mVec3_c &) |
| void | setClipScale (mVec2_c v) |
Public Attributes | |
| LytBase_c | mLayout |
| The layout for the score popup. | |
| mVec2_c | mPos |
| mVec2_c | mPosDelta |
| mVec2_c | mPosDeceleration |
| mVec2_c | mPosOffset |
| mVec2_c | mScale |
| mVec2_c | mClipScale |
| mVec2_c | mAnimScale |
| nw4r::lyt::Pane * | mpRootPane |
| The root pane of the layout. | |
| LytTextBox_c * | mpTextBoxes [T_COUNT] |
| The text boxes used for the layout. | |
| nw4r::lyt::Pane * | mpNullPanes [N_COUNT] |
| The null panes used for the layout. | |
| float | mMaxHeight |
| The maximum height the score popup can be displayed at. | |
| STATE_e | mState |
| The state the score popup is in. | |
| int | mPopupType |
| The popup type. Value is a POPUP_TYPE_e. | |
| int | mDispWaitCounter |
The amount of frames the DispWait state has been active. | |
| int | mDispWaitTime |
The number of frames to wait in the DispWait state. | |
| int | mPlayerType |
| int | mChgColorCounter |
| Counter that is incremented every call to chgColor(), which ensures that the 1-UP color is only set once every 10 calls. | |
| u32 | mPlayerColor |
| int | mAnimCounter |
| u32 | mCurTextbox |
| The textbox currently displayed. Value is a T_PANE_e. | |
| bool | mIsGoalScore |
| bool | mInitialized |
| Whether the layout has been initialized. | |
| bool | mEnableColorChange |
| bool | mEnableBigSmallAnim |
| bool | mAnimIsShrinking |
| bool | mHasBlueColor |
| Whether counter type score popups should be colored blue instead of red. | |
Static Public Attributes | |
| static dSmallScore_c * | m_instance = nullptr |
| The instance of the score popup creator. | |
| typedef void(dSmallScore_c::* dSmallScore_c::ProcFunc) () |
Definition at line 75 of file d_SmallScore.hpp.
The possible states of the score popup.
Definition at line 17 of file d_SmallScore.hpp.
The different types of the small score popups.
Definition at line 27 of file d_SmallScore.hpp.
The text boxes used for the layout.
Definition at line 59 of file d_SmallScore.hpp.
The null panes used for the layout.
Definition at line 70 of file d_SmallScore.hpp.
| dSmallScore_c::dSmallScore_c | ( | ) |
Constructs a new score popup creator.
Definition at line 13 of file d_SmallScore.cpp.
|
virtual |
Destroys the score popup creator.
Definition at line 17 of file d_SmallScore.cpp.
| bool dSmallScore_c::createLayout | ( | d2d::ResAccMultLoader_c * | res | ) |
Definition at line 21 of file d_SmallScore.cpp.
| void dSmallScore_c::execute | ( | ) |
Definition at line 67 of file d_SmallScore.cpp.
| void dSmallScore_c::draw | ( | ) |
Definition at line 85 of file d_SmallScore.cpp.
| bool dSmallScore_c::doDelete | ( | ) |
Definition at line 97 of file d_SmallScore.cpp.
| void dSmallScore_c::setPlayer1upColor | ( | int | player_id | ) |
Definition at line 101 of file d_SmallScore.cpp.
| void dSmallScore_c::setPlayer1000Color | ( | int | player_id | ) |
Definition at line 105 of file d_SmallScore.cpp.
| void dSmallScore_c::setPlayer100Color | ( | int | playerType | ) |
Definition at line 126 of file d_SmallScore.cpp.
| void dSmallScore_c::chgColor | ( | ) |
Definition at line 140 of file d_SmallScore.cpp.
| void dSmallScore_c::setNormalOrBlueColor | ( | ) |
Definition at line 166 of file d_SmallScore.cpp.
| void dSmallScore_c::ScissorMaskSet | ( | ) |
Definition at line 186 of file d_SmallScore.cpp.
| void dSmallScore_c::BigSmallAnime | ( | ) |
Definition at line 203 of file d_SmallScore.cpp.
| void dSmallScore_c::MakeStart | ( | ) |
Definition at line 226 of file d_SmallScore.cpp.
| void dSmallScore_c::UpMove | ( | ) |
Definition at line 293 of file d_SmallScore.cpp.
| void dSmallScore_c::DispWait | ( | ) |
Definition at line 309 of file d_SmallScore.cpp.
| void dSmallScore_c::GoalScoreDisp | ( | ) |
Definition at line 339 of file d_SmallScore.cpp.
| void dSmallScore_c::PositionSet | ( | ) |
Definition at line 341 of file d_SmallScore.cpp.
| void dSmallScore_c::CreateSmallScore | ( | const mVec3_c & | pos, |
| int | popupType, | ||
| int | playerType ) |
Definition at line 369 of file d_SmallScore.cpp.
| void dSmallScore_c::PosSet | ( | const mVec3_c & | pos | ) |
Definition at line 387 of file d_SmallScore.cpp.
|
inline |
Definition at line 104 of file d_SmallScore.hpp.
| LytBase_c dSmallScore_c::mLayout |
The layout for the score popup.
Definition at line 106 of file d_SmallScore.hpp.
| mVec2_c dSmallScore_c::mPos |
Definition at line 107 of file d_SmallScore.hpp.
| mVec2_c dSmallScore_c::mPosDelta |
Definition at line 108 of file d_SmallScore.hpp.
| mVec2_c dSmallScore_c::mPosDeceleration |
Definition at line 109 of file d_SmallScore.hpp.
| mVec2_c dSmallScore_c::mPosOffset |
Definition at line 110 of file d_SmallScore.hpp.
| mVec2_c dSmallScore_c::mScale |
Definition at line 111 of file d_SmallScore.hpp.
| mVec2_c dSmallScore_c::mClipScale |
Definition at line 112 of file d_SmallScore.hpp.
| mVec2_c dSmallScore_c::mAnimScale |
Definition at line 113 of file d_SmallScore.hpp.
| nw4r::lyt::Pane* dSmallScore_c::mpRootPane |
The root pane of the layout.
Definition at line 114 of file d_SmallScore.hpp.
| LytTextBox_c* dSmallScore_c::mpTextBoxes[T_COUNT] |
The text boxes used for the layout.
Definition at line 115 of file d_SmallScore.hpp.
| nw4r::lyt::Pane* dSmallScore_c::mpNullPanes[N_COUNT] |
The null panes used for the layout.
Definition at line 116 of file d_SmallScore.hpp.
| float dSmallScore_c::mMaxHeight |
The maximum height the score popup can be displayed at.
Definition at line 117 of file d_SmallScore.hpp.
| STATE_e dSmallScore_c::mState |
The state the score popup is in.
Definition at line 118 of file d_SmallScore.hpp.
| int dSmallScore_c::mPopupType |
The popup type. Value is a POPUP_TYPE_e.
Definition at line 119 of file d_SmallScore.hpp.
| int dSmallScore_c::mDispWaitCounter |
The amount of frames the DispWait state has been active.
Definition at line 120 of file d_SmallScore.hpp.
| int dSmallScore_c::mDispWaitTime |
The number of frames to wait in the DispWait state.
Definition at line 121 of file d_SmallScore.hpp.
| int dSmallScore_c::mPlayerType |
Definition at line 122 of file d_SmallScore.hpp.
| int dSmallScore_c::mChgColorCounter |
Counter that is incremented every call to chgColor(), which ensures that the 1-UP color is only set once every 10 calls.
Definition at line 123 of file d_SmallScore.hpp.
| u32 dSmallScore_c::mPlayerColor |
Definition at line 124 of file d_SmallScore.hpp.
| int dSmallScore_c::mAnimCounter |
Definition at line 125 of file d_SmallScore.hpp.
| u32 dSmallScore_c::mCurTextbox |
The textbox currently displayed. Value is a T_PANE_e.
Definition at line 126 of file d_SmallScore.hpp.
| bool dSmallScore_c::mIsGoalScore |
Definition at line 127 of file d_SmallScore.hpp.
| bool dSmallScore_c::mInitialized |
Whether the layout has been initialized.
Definition at line 128 of file d_SmallScore.hpp.
| bool dSmallScore_c::mEnableColorChange |
Definition at line 129 of file d_SmallScore.hpp.
| bool dSmallScore_c::mEnableBigSmallAnim |
Definition at line 130 of file d_SmallScore.hpp.
| bool dSmallScore_c::mAnimIsShrinking |
Definition at line 131 of file d_SmallScore.hpp.
| bool dSmallScore_c::mHasBlueColor |
Whether counter type score popups should be colored blue instead of red.
Definition at line 132 of file d_SmallScore.hpp.
|
static |
The instance of the score popup creator.
Definition at line 134 of file d_SmallScore.hpp.