NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
EGG::ColorFader Class Reference
Inheritance diagram for EGG::ColorFader:
[legend]

Description

Definition at line 8 of file eggColorFader.hpp.

Public Types

enum  ColorFaderFlag {
  FLAG_1 = BIT_FLAG(0) ,
  FLAG_2 = BIT_FLAG(1)
}
 
- Public Types inherited from EGG::Fader
enum  EStatus {
  OPAQUE ,
  HIDDEN ,
  FADE_IN ,
  FADE_OUT
}
 The fader's status. More...
 

Public Member Functions

 ColorFader (float x, float y, float w, float h, nw4r::ut::Color color, EStatus initialStatus)
 
virtual void setStatus (EStatus status)
 
virtual EStatus getStatus () const
 Sets the fader's status.
 
virtual bool fadeIn ()
 Gets the fader's status.
 
virtual bool fadeOut ()
 Initiates a fade in from pure blacked-out.
 
virtual int calc ()
 Initiates a fade out from no-obstruction.
 
virtual void draw ()
 Calculates the fader at the current frame.
 
void setFrame (u16 frameCount)
 
void setColor (nw4r::ut::Color color)
 
bool isStatus (EStatus status)
 
float getWidth () const
 
float getHeight () const
 
- Public Member Functions inherited from EGG::Fader

Protected Attributes

EStatus mStatus
 
u8 mFlag
 
u16 mFrameCount
 
u16 mFrame
 
nw4r::ut::Color mCurrColor
 
float mLeft
 
float mTop
 
float mRight
 
float mBottom
 

Member Enumeration Documentation

◆ ColorFaderFlag

enum EGG::ColorFader::ColorFaderFlag

Definition at line 10 of file eggColorFader.hpp.

Constructor & Destructor Documentation

◆ ColorFader()

EGG::ColorFader::ColorFader ( float x,
float y,
float w,
float h,
nw4r::ut::Color color,
Fader::EStatus initialStatus )

Definition at line 4 of file eggColorFader.cpp.

◆ ~ColorFader()

EGG::ColorFader::~ColorFader ( )
virtual

Definition at line 150 of file eggColorFader.cpp.

Member Function Documentation

◆ setStatus()

void EGG::ColorFader::setStatus ( Fader::EStatus status)
virtual

Implements EGG::Fader.

Definition at line 29 of file eggColorFader.cpp.

◆ getStatus()

virtual EStatus EGG::ColorFader::getStatus ( ) const
inlinevirtual

Sets the fader's status.

Implements EGG::Fader.

Definition at line 18 of file eggColorFader.hpp.

◆ fadeIn()

bool EGG::ColorFader::fadeIn ( )
virtual

Gets the fader's status.

Implements EGG::Fader.

Definition at line 39 of file eggColorFader.cpp.

◆ fadeOut()

bool EGG::ColorFader::fadeOut ( )
virtual

Initiates a fade in from pure blacked-out.

The screen must be OPAQUE for the operation to be executed.

Returns
If the action was carried out.

Implements EGG::Fader.

Definition at line 49 of file eggColorFader.cpp.

◆ calc()

int EGG::ColorFader::calc ( )
virtual

Initiates a fade out from no-obstruction.

The screen must be HIDDEN for the operation to be executed.

Returns
If the action was carried out.

Implements EGG::Fader.

Definition at line 59 of file eggColorFader.cpp.

◆ draw()

void EGG::ColorFader::draw ( )
virtual

Calculates the fader at the current frame.

Returns
If the operation was successful.

Implements EGG::Fader.

Definition at line 94 of file eggColorFader.cpp.

◆ setFrame()

void EGG::ColorFader::setFrame ( u16 frameCount)

Definition at line 18 of file eggColorFader.cpp.

◆ setColor()

void EGG::ColorFader::setColor ( nw4r::ut::Color color)

Definition at line 22 of file eggColorFader.cpp.

◆ isStatus()

bool EGG::ColorFader::isStatus ( EStatus status)
inline

Definition at line 28 of file eggColorFader.hpp.

◆ getWidth()

float EGG::ColorFader::getWidth ( ) const
inline

Definition at line 29 of file eggColorFader.hpp.

◆ getHeight()

float EGG::ColorFader::getHeight ( ) const
inline

Definition at line 30 of file eggColorFader.hpp.

Member Data Documentation

◆ mStatus

EStatus EGG::ColorFader::mStatus
protected

Definition at line 33 of file eggColorFader.hpp.

◆ mFlag

u8 EGG::ColorFader::mFlag
protected

Definition at line 34 of file eggColorFader.hpp.

◆ mFrameCount

u16 EGG::ColorFader::mFrameCount
protected

Definition at line 35 of file eggColorFader.hpp.

◆ mFrame

u16 EGG::ColorFader::mFrame
protected

Definition at line 36 of file eggColorFader.hpp.

◆ mCurrColor

nw4r::ut::Color EGG::ColorFader::mCurrColor
protected

Definition at line 37 of file eggColorFader.hpp.

◆ mLeft

float EGG::ColorFader::mLeft
protected

Definition at line 38 of file eggColorFader.hpp.

◆ mTop

float EGG::ColorFader::mTop
protected

Definition at line 39 of file eggColorFader.hpp.

◆ mRight

float EGG::ColorFader::mRight
protected

Definition at line 40 of file eggColorFader.hpp.

◆ mBottom

float EGG::ColorFader::mBottom
protected

Definition at line 41 of file eggColorFader.hpp.