NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
m_fader_base.hpp
1#pragma once
2#include <dol/mLib/m_color.hpp>
3
7public:
8
10 enum EStatus {
15 };
16
20 enum FLAG_e {
21 FADE_IN_COMPLETE = 1,
22 FADE_OUT_COMPLETE = 2
23 };
24
28 mFaderBase_c(const mColor &color, EStatus status);
29
30 virtual ~mFaderBase_c();
31
32 virtual void setStatus(EStatus status) = 0;
33 virtual EStatus getStatus() const;
34
38 virtual bool fadeIn();
39
43 virtual bool fadeOut();
44
47 virtual int calc();
48
49 virtual void draw() = 0;
50
51 void setFrame(u16 duration);
52 void setColor(const mColor &color);
53
54protected:
56 u8 mFlag;
60};
Base fader implementation.
virtual ~mFaderBase_c()
Destroys the fader.
virtual void draw()=0
Draws the fader.
u16 mCurrFrame
The fader's current frame.
EStatus mStatus
The fader's status.
virtual EStatus getStatus() const
Gets the fader's status.
virtual void setStatus(EStatus status)=0
Sets the fader's status.
u8 mFlag
The fader's flags.
virtual bool fadeIn()
Initiates a fade in from pure blacked-out.
FLAG_e
Some flags related to the fader.
void setFrame(u16 duration)
Sets the duration of the fade. Duration must not be zero.
u16 mFrameCount
The fader's duration.
mColor mFaderColor
The fader's color.
EStatus
The fader's status.
@ FADE_IN
Transition from OPAQUE to HIDDEN.
@ FADE_OUT
Transition from HIDDEN to OPAQUE.
@ HIDDEN
The screen is completely unblocked.
@ OPAQUE
The screen is completely blacked out.
virtual int calc()
Calculates the fader at the current frame.
virtual bool fadeOut()
Initiates a fade out from no-obstruction.
void setColor(const mColor &color)
Sets the fader's color. Alpha is not modified.
A 32-bit RGBA color.
Definition m_color.hpp:6