|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/mLib/m_fader_base.hpp>
Base fader implementation.
Definition at line 6 of file m_fader_base.hpp.
Public Types | |
| 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 | |
| mFaderBase_c (const mColor &color, EStatus status) | |
| Constructs a new fader. | |
| virtual | ~mFaderBase_c () |
| Destroys the fader. | |
| virtual void | setStatus (EStatus status)=0 |
| Sets the fader's status. | |
| virtual EStatus | getStatus () const |
| Gets 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. | |
| virtual int | calc () |
| Calculates the fader at the current frame. | |
| virtual void | draw ()=0 |
| Draws the fader. | |
| 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. | |
Protected Attributes | |
| 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 fader's status.
| Enumerator | |
|---|---|
| OPAQUE | The screen is completely blacked out. |
| HIDDEN | The screen is completely unblocked. |
| FADE_IN | Transition from OPAQUE to HIDDEN. |
| FADE_OUT | Transition from HIDDEN to OPAQUE. |
Definition at line 10 of file m_fader_base.hpp.
| enum mFaderBase_c::FLAG_e |
Some flags related to the fader.
Definition at line 20 of file m_fader_base.hpp.
| mFaderBase_c::mFaderBase_c | ( | const mColor & | color, |
| mFaderBase_c::EStatus | status ) |
Constructs a new fader.
Definition at line 4 of file m_fader_base.cpp.
|
virtual |
Destroys the fader.
Definition at line 18 of file m_fader_base.cpp.
|
pure virtual |
Sets the fader's status.
Implemented in dWipeCircle_c, dWipeDokan_c, dWipeKuppa_c, dWipeMario_c, mColorFader_c, and mWipeFader_c.
|
virtual |
Gets the fader's status.
Definition at line 30 of file m_fader_base.cpp.
|
virtual |
Initiates a fade in from pure blacked-out.
The screen must be OPAQUE for the operation to be executed.
Reimplemented in dWipeCircle_c, dWipeDokan_c, dWipeKuppa_c, and dWipeMario_c.
Definition at line 34 of file m_fader_base.cpp.
|
virtual |
Initiates a fade out from no-obstruction.
The screen must be HIDDEN for the operation to be executed.
Reimplemented in dWipeCircle_c, dWipeDokan_c, dWipeKuppa_c, and dWipeMario_c.
Definition at line 44 of file m_fader_base.cpp.
|
virtual |
Calculates the fader at the current frame.
Reimplemented in dWipeCircle_c, dWipeDokan_c, dWipeKuppa_c, dWipeMario_c, mColorFader_c, and mWipeFader_c.
Definition at line 54 of file m_fader_base.cpp.
|
pure virtual |
Draws the fader.
Implemented in dWipeCircle_c, dWipeDokan_c, dWipeKuppa_c, dWipeMario_c, mColorFader_c, and mWipeFader_c.
| void mFaderBase_c::setFrame | ( | u16 | duration | ) |
Sets the duration of the fade. Duration must not be zero.
Definition at line 20 of file m_fader_base.cpp.
| void mFaderBase_c::setColor | ( | const mColor & | color | ) |
Sets the fader's color. Alpha is not modified.
Definition at line 24 of file m_fader_base.cpp.
|
protected |
The fader's status.
Definition at line 55 of file m_fader_base.hpp.
|
protected |
The fader's flags.
Definition at line 56 of file m_fader_base.hpp.
|
protected |
The fader's duration.
Definition at line 57 of file m_fader_base.hpp.
|
protected |
The fader's current frame.
Definition at line 58 of file m_fader_base.hpp.
|
protected |
The fader's color.
Definition at line 59 of file m_fader_base.hpp.