NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
mColorFader_c Class Reference

#include <game/mLib/m_color_fader.hpp>

Inheritance diagram for mColorFader_c:
[legend]

Description

A fader that fades a color in and out.

Definition at line 6 of file m_color_fader.hpp.

Public Member Functions

 mColorFader_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.
 
- 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 Attributes

u8 mAspectRatio
 The screen's aspect ratio. 0 = 4:3, 1 = 16:9.
 

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.
 

Constructor & Destructor Documentation

◆ mColorFader_c()

mColorFader_c::mColorFader_c ( mColor col,
mFaderBase_c::EStatus status )

Definition at line 5 of file m_color_fader.cpp.

◆ ~mColorFader_c()

mColorFader_c::~mColorFader_c ( )
virtual

Definition at line 9 of file m_color_fader.cpp.

Member Function Documentation

◆ setStatus()

void mColorFader_c::setStatus ( EStatus status)
virtual

Sets the fader's status.

Implements mFaderBase_c.

Definition at line 11 of file m_color_fader.cpp.

◆ calc()

int mColorFader_c::calc ( )
virtual

Calculates the fader at the current frame.

Returns
If the operation was successful.

Reimplemented from mFaderBase_c.

Definition at line 21 of file m_color_fader.cpp.

◆ draw()

void mColorFader_c::draw ( )
virtual

Draws the fader.

Implements mFaderBase_c.

Definition at line 44 of file m_color_fader.cpp.

Member Data Documentation

◆ mAspectRatio

u8 mColorFader_c::mAspectRatio
private

The screen's aspect ratio. 0 = 4:3, 1 = 16:9.

Definition at line 16 of file m_color_fader.hpp.