1#include <game/bases/d_wipe_dokan.hpp>
2#include <game/bases/d_base_actor.hpp>
3#include <game/bases/d_game_com.hpp>
4#include <game/bases/d_a_player_manager.hpp>
5#include <game/bases/d_a_player_demo_manager.hpp>
20 static const char *AnmNameTbl[ANIM_NAME_COUNT] = {
21 "wipeDokan_02_inBlackDown.brlan",
22 "wipeDokan_02_outBlackUp.brlan",
23 "wipeDokan_02_outBlackDown.brlan",
24 "wipeDokan_02_inBlackUp.brlan"
27 static const char *GROUP_NAME_DT[ANIM_COUNT] = {
34 static const int ANIME_INDEX_TBL[ANIM_COUNT] = {
41 static const char *PPANE_NAME_DT[P_COUNT] = {
49 bool res =
mLyt.ReadResource(
"wipeDokan/wipeDokan.arc",
false);
54 mLyt.build(
"wipeDokan_02.brlyt", 0);
55 mLyt.AnimeResRegister(AnmNameTbl, ANIM_NAME_COUNT);
56 mLyt.GroupRegister(GROUP_NAME_DT, ANIME_INDEX_TBL, ANIM_COUNT);
58 mLyt.PPaneRegister(PPANE_NAME_DT,
mpPic, P_COUNT);
62 mLyt.AllAnimeEndSetup();
65 mLyt.mDrawOrder = m2d::DRAW_ORDER_WIPE;
74 static const Proc Proc_tbl[] = {
98 mLyt.AllAnimeEndSetup();
108 if (!
mLyt.isAnime(-1)) {
111 mFlag |= FADE_IN_COMPLETE;
115 mFlag |= FADE_OUT_COMPLETE;
122 int actPlayer = daPyDemoMng_c::mspInstance->mPlNo;
126 dAcPy_c *player = daPyMng_c::getPlayer(actPlayer);
127 if (player ==
nullptr) {
130 return dGameCom::getDispCenterY() < player->
mPos.y;
134 mLyt.AllAnimeEndSetup();
147 mpPic[P_baseBlack_00]->SetAlpha(255);
153 }
else if (status ==
HIDDEN) {
156 mpPic[P_baseBlack_00]->SetAlpha(0);
mVec3_c mPos
The actor's position.
A fader that animates a wavy texture across the screen.
void OpenSetup()
Prepares the fade-out transition.
void CloseSetup()
Prepares the fade-in transition.
virtual bool fadeIn()
Initiates a fade in from pure blacked-out.
@ IN_DOWN
Downward fade-in.
@ OUT_DOWN
Downward fade-out.
ACTION_e mAction
The action to be performed in calc().
LytBase_c mLyt
The layout for the fader.
bool mIsCreated
Whether the layout for the fader has been created.
virtual bool fadeOut()
Initiates a fade out from no-obstruction.
~dWipeDokan_c()
Destroys the fader.
void AnimeEndCheck()
Checks if the fade animation has finished yet.
virtual void setStatus(mFaderBase_c::EStatus status)
Sets the fader's status.
@ OPEN_SETUP
Prepare the fade-out transition.
@ CLOSE_SETUP
Prepare the fade-in transition.
@ ANIME_END_CHECK
Fade has begun, waiting for it to end.
@ IDLE
The fade has not been started.
bool MuKiDecision()
Returns whether the wipe should go upwards or downwards.
virtual int calc()
Calculates the fader at the current frame.
static dWipeDokan_c * m_instance
The instance of the fader.
nw4r::lyt::Picture * mpPic[P_COUNT]
The picture panes.
nw4r::lyt::Pane * mpRootPane
The root pane of the fader layout.
virtual void draw()
Draws the fader.
bool createLayout()
Loads the resources and creates the layout for the fader.
dWipeDokan_c(nw4r::ut::Color, mFaderBase_c::EStatus status)
Constructs a new fader.
EStatus mStatus
The fader's status.
virtual EStatus getStatus() const
Gets the fader's status.
u8 mFlag
The fader's flags.
virtual bool fadeIn()
Initiates a fade in from pure blacked-out.
mFaderBase_c(const mColor &color, EStatus status)
Constructs a new fader.
EStatus
The fader's status.
@ FADE_IN
Transition from OPAQUE to HIDDEN.
@ HIDDEN
The screen is completely unblocked.
@ OPAQUE
The screen is completely blacked out.
virtual bool fadeOut()
Initiates a fade out from no-obstruction.