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
5namespace 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}
virtual void draw()
Calculates the fader at the current frame.
virtual bool fadeOut()
Initiates a fade in from pure blacked-out.
virtual EStatus getStatus() const
Sets the fader's status.
virtual bool fadeIn()
Gets the fader's status.
virtual int calc()
Initiates a fade out from no-obstruction.
Interface for a fader.
Definition eggFader.hpp:8
EStatus
The fader's status.
Definition eggFader.hpp:12
A 32-bit RGBA color.
Definition color.hpp:8