NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/bases/d_wipe_mario.hpp>
A fader that animates a Mario texture in/out.
Seen when entering a regular stage, for example.
Definition at line 9 of file d_wipe_mario.hpp.
Public Types | |
enum | ACTION_e { OPEN_SETUP , ANIME_END_CHECK , CLOSE_SETUP , IDLE } |
The possible actions performed in calc. More... | |
enum | ANIM_e { IN , OUT } |
The animations for this fader. More... | |
Public Types inherited from mFaderBase_c | |
enum | EStatus { OPAQUE , HIDDEN , FADE_IN , FADE_OUT } |
The fader's status. More... | |
enum | FLAG_e { FADE_IN_COMPLETE = BIT_FLAG(0) , FADE_OUT_COMPLETE = BIT_FLAG(1) } |
Some flags related to the fader. More... | |
Public Member Functions | |
dWipeMario_c (nw4r::ut::Color, mFaderBase_c::EStatus stat) | |
See mFaderBase_c::mFaderBase_c. | |
~dWipeMario_c () | |
Destroys the fader. | |
bool | createLayout () |
Loads the resources and creates the layout for the fader. | |
void | OpenSetup () |
Prepares the fade-out transition. | |
void | AnimeEndCheck () |
Checks if the fade animation has finished yet. | |
void | CloseSetup () |
Prepares the fade-in transition. | |
virtual int | calc () |
Calculates the fader at the current frame. | |
virtual void | draw () |
Draws the fader. | |
virtual void | setStatus (mFaderBase_c::EStatus stat) |
Sets the fader's status. | |
virtual bool | fadeIn () |
Initiates a fade in from pure blacked-out. | |
virtual bool | fadeOut () |
Initiates a fade out from no-obstruction. | |
Public Member Functions inherited from mFaderBase_c | |
mFaderBase_c (const mColor &color, EStatus status) | |
Constructs a new fader. | |
virtual | ~mFaderBase_c () |
Destroys the fader. | |
virtual EStatus | getStatus () const |
Gets the fader's status. | |
void | setFrame (u16 duration) |
Sets the duration of the fade. Duration must not be zero. | |
void | setColor (const mColor &color) |
Sets the fader's color. Alpha is not modified. | |
Static Public Attributes | |
static dWipeMario_c * | m_instance |
The instance of the fader. | |
Private Attributes | |
LytBase_c | mLyt |
The layout for the fader. | |
nw4r::lyt::Pane * | mpRootPane |
The root pane of the fader layout. | |
nw4r::lyt::Window * | mpWnd [1] |
The window pane containing the fader texture. | |
ACTION_e | mAction |
The action to be performed in calc. | |
bool | mIsCreated |
Whether the layout for the fader has been created. | |
Additional Inherited Members | |
Protected Attributes inherited from mFaderBase_c | |
EStatus | mStatus |
The fader's status. | |
u8 | mFlag |
The fader's flags. | |
u16 | mFrameCount |
The fader's duration. | |
u16 | mCurrFrame |
The fader's current frame. | |
mColor | mFaderColor |
The fader's color. | |
The possible actions performed in calc.
Enumerator | |
---|---|
OPEN_SETUP | Prepare the fade-out transition. |
ANIME_END_CHECK | Fade has begun, waiting for it to end. |
CLOSE_SETUP | Prepare the fade-in transition. |
IDLE | The fade has not been started. |
Definition at line 13 of file d_wipe_mario.hpp.
enum dWipeMario_c::ANIM_e |
The animations for this fader.
Enumerator | |
---|---|
IN | Fade-in animation. |
OUT | Fade-out animation. |
Definition at line 21 of file d_wipe_mario.hpp.
dWipeMario_c::dWipeMario_c | ( | nw4r::ut::Color | color, |
mFaderBase_c::EStatus | stat ) |
See mFaderBase_c::mFaderBase_c.
Definition at line 9 of file d_wipe_mario.cpp.
dWipeMario_c::~dWipeMario_c | ( | ) |
Destroys the fader.
Definition at line 15 of file d_wipe_mario.cpp.
bool dWipeMario_c::createLayout | ( | ) |
Loads the resources and creates the layout for the fader.
Definition at line 19 of file d_wipe_mario.cpp.
void dWipeMario_c::OpenSetup | ( | ) |
Prepares the fade-out transition.
Definition at line 86 of file d_wipe_mario.cpp.
void dWipeMario_c::AnimeEndCheck | ( | ) |
Checks if the fade animation has finished yet.
If the animation has finished, sets the status accordingly and switches back to the IDLE action.
Definition at line 92 of file d_wipe_mario.cpp.
void dWipeMario_c::CloseSetup | ( | ) |
Prepares the fade-in transition.
Definition at line 106 of file d_wipe_mario.cpp.
|
virtual |
Calculates the fader at the current frame.
Reimplemented from mFaderBase_c.
Definition at line 68 of file d_wipe_mario.cpp.
|
virtual |
|
virtual |
Sets the fader's status.
The only allowed values are OPAQUE and HIDDEN.
Implements mFaderBase_c.
Definition at line 112 of file d_wipe_mario.cpp.
|
virtual |
Initiates a fade in from pure blacked-out.
The screen must be OPAQUE for the operation to be executed.
Reimplemented from mFaderBase_c.
Definition at line 134 of file d_wipe_mario.cpp.
|
virtual |
Initiates a fade out from no-obstruction.
The screen must be HIDDEN for the operation to be executed.
Reimplemented from mFaderBase_c.
Definition at line 142 of file d_wipe_mario.cpp.
|
static |
The instance of the fader.
Definition at line 54 of file d_wipe_mario.hpp.
|
private |
The layout for the fader.
Definition at line 57 of file d_wipe_mario.hpp.
|
private |
The root pane of the fader layout.
Definition at line 58 of file d_wipe_mario.hpp.
|
private |
The window pane containing the fader texture.
Definition at line 59 of file d_wipe_mario.hpp.
|
private |
The action to be performed in calc.
Definition at line 60 of file d_wipe_mario.hpp.
|
private |
Whether the layout for the fader has been created.
Definition at line 61 of file d_wipe_mario.hpp.