NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
m_fader.cpp
3#include <game/mLib/m_fader.hpp>
4#include <game/mLib/m_fader_base.hpp>
5
7
13
15
16 // Make sure no other fader is currently in the process of fading the screen
17 if (mFader != nullptr) {
19 if (cannotSet) {
20 return false;
21 }
22 }
23
24 // Get the fader's status
26 if (mFader != nullptr) {
27 status = mFader->getStatus();
28 } else {
29 status = fader->getStatus();
30 }
31
32 // Set the fader and its status
33 mFader = fader;
34 switch(status) {
35 case mFaderBase_c::OPAQUE: mFader->setStatus(mFaderBase_c::OPAQUE); break;
36 case mFaderBase_c::HIDDEN: mFader->setStatus(mFaderBase_c::HIDDEN); break;
37 }
38
39 return true;
40}
Base fader implementation.
virtual EStatus getStatus() const
Gets the fader's status.
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.
static mFaderBase_c * mFader
The fader currently in use.
Definition m_fader.hpp:18
static bool setFader(mFaderBase_c *fader)
Sets the fader to be used.
Definition m_fader.cpp:14
static bool isStatus(mFaderBase_c::EStatus status)
Checks if the current fader's status matches status .
Definition m_fader.hpp:12
static void draw()
Draws the current fader.
Definition m_fader.cpp:8
void resetMaterial()
Turns off all indirect texture processing.
@ INVALIDATE_ALL
Invalidates all states.
Definition state.hpp:29
void Invalidate(ulong flag)
Invalidates the state recorded within the G3D library, depending on the flag. See G3DState::Invalidat...