NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
eggColorFader.hpp
1
#pragma once
2
#include <lib/egg/fader/eggFader.hpp>
3
#include <lib/nw4r/ut/color.hpp>
4
5
namespace
EGG {
6
8
class
ColorFader
:
public
Fader
{
9
public
:
10
enum
ColorFaderFlag {
11
FLAG_1 = BIT_FLAG(0),
12
FLAG_2 = BIT_FLAG(1)
13
};
14
15
ColorFader
(
float
x,
float
y,
float
w,
float
h,
nw4r::ut::Color
color,
EStatus
initialStatus);
16
17
virtual
void
setStatus(
EStatus
status);
18
virtual
EStatus
getStatus
()
const
{
return
mStatus; }
19
virtual
bool
fadeIn
();
20
virtual
bool
fadeOut
();
21
virtual
int
calc
();
22
virtual
void
draw
();
23
virtual
~ColorFader
();
24
25
void
setFrame(u16 frameCount);
26
void
setColor(
nw4r::ut::Color
color);
27
28
bool
isStatus(EStatus status) {
return
getStatus
() == status; }
29
float
getWidth()
const
{
return
mRight - mLeft; }
30
float
getHeight()
const
{
return
mBottom - mTop; }
31
32
protected
:
33
EStatus mStatus;
34
u8 mFlag;
35
u16 mFrameCount;
36
u16 mFrame;
37
nw4r::ut::Color
mCurrColor;
38
float
mLeft;
39
float
mTop;
40
float
mRight;
41
float
mBottom;
42
};
43
}
EGG::ColorFader
Definition
eggColorFader.hpp:8
EGG::ColorFader::draw
virtual void draw()
Calculates the fader at the current frame.
Definition
eggColorFader.cpp:94
EGG::ColorFader::fadeOut
virtual bool fadeOut()
Initiates a fade in from pure blacked-out.
Definition
eggColorFader.cpp:49
EGG::ColorFader::getStatus
virtual EStatus getStatus() const
Sets the fader's status.
Definition
eggColorFader.hpp:18
EGG::ColorFader::fadeIn
virtual bool fadeIn()
Gets the fader's status.
Definition
eggColorFader.cpp:39
EGG::ColorFader::calc
virtual int calc()
Initiates a fade out from no-obstruction.
Definition
eggColorFader.cpp:59
EGG::Fader
Interface for a fader.
Definition
eggFader.hpp:8
EGG::Fader::EStatus
EStatus
The fader's status.
Definition
eggFader.hpp:12
nw4r::ut::Color
A 32-bit RGBA color.
Definition
color.hpp:8
include
lib
egg
fader
eggColorFader.hpp
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.12.0