NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/mLib/m_wipe_fader.hpp>
A fader that wipes a texture in and out to/from the center of the screen.
Definition at line 6 of file m_wipe_fader.hpp.
Public Member Functions | |
mWipeFader_c (mColor col, mFaderBase_c::EStatus status) | |
virtual void | setStatus (EStatus status) |
Sets the fader's status. | |
virtual int | calc () |
Calculates the fader at the current frame. | |
virtual void | draw () |
Draws the fader. | |
virtual void | setTexture (void *data, int width, int height) |
Sets the texture to use for the fader. | |
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. | |
virtual bool | fadeIn () |
Initiates a fade in from pure blacked-out. | |
virtual bool | fadeOut () |
Initiates a fade out from no-obstruction. | |
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. | |
Private Member Functions | |
virtual void | calcMtx () |
Calculates the texture matrix needed for drawing the texture to the screen. | |
Private Attributes | |
Mtx | mTexMtx |
The texture matrix. | |
u8 | mProgress |
A value from 0 to 255 that represents the current progress of the fader. | |
float | mAspectRatioFactor |
How much to stretch the texture horizontally to compensate for the screen's aspect ratio. | |
void * | mpTextureData |
The texture data. | |
int | mTexWidth |
The width of the texture. | |
int | mTexHeight |
The height of the texture. | |
Additional Inherited Members | |
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... | |
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. | |
mWipeFader_c::mWipeFader_c | ( | mColor | col, |
mFaderBase_c::EStatus | status ) |
Definition at line 5 of file m_wipe_fader.cpp.
|
virtual |
Definition at line 21 of file m_wipe_fader.cpp.
|
virtual |
|
virtual |
Calculates the fader at the current frame.
Reimplemented from mFaderBase_c.
Definition at line 39 of file m_wipe_fader.cpp.
|
virtual |
|
virtual |
Sets the texture to use for the fader.
Definition at line 23 of file m_wipe_fader.cpp.
|
privatevirtual |
Calculates the texture matrix needed for drawing the texture to the screen.
Automatically called by calc().
Definition at line 60 of file m_wipe_fader.cpp.
|
private |
The texture matrix.
Definition at line 22 of file m_wipe_fader.hpp.
|
private |
A value from 0 to 255 that represents the current progress of the fader.
Definition at line 23 of file m_wipe_fader.hpp.
|
private |
How much to stretch the texture horizontally to compensate for the screen's aspect ratio.
Definition at line 24 of file m_wipe_fader.hpp.
|
private |
The texture data.
Definition at line 25 of file m_wipe_fader.hpp.
|
private |
The width of the texture.
Definition at line 26 of file m_wipe_fader.hpp.
|
private |
The height of the texture.
Definition at line 27 of file m_wipe_fader.hpp.