NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_CourseSelectGuide.cpp
1#include <game/bases/d_CourseSelectGuide.hpp>
2#include <game/bases/d_a_player_com.hpp>
3#include <game/bases/d_a_player_manager.hpp>
4#include <game/bases/d_game_display.hpp>
5#include <game/bases/d_game_com.hpp>
6#include <game/bases/d_game_key.hpp>
7#include <game/bases/d_save_mng.hpp>
8#include <game/mLib/m_video.hpp>
10
12
13template <>
16};
17
19
21 mStateMgrWorldCourse(*this, StateID_WorldCourseOnStageWait),
22 mStateMgrGuide(*this, StateID_GuideOnStageWait),
23 mStateMgrUp(*this, StateID_UpOnStageWait),
24 mStateMgrDown(*this, StateID_DownOnStageWait),
25 mStateMgrLeft(*this, StateID_LeftOnStageWait),
26 mStateMgrRight(*this, StateID_RightOnStageWait),
27 mStateMgrShadow(*this, StateID_ShadowOnStageWait),
28 mStateMgrScrollGuide(*this, StateID_ScrollGuideOnStageWait)
29{
30 mVec3_c dummy; // [Unused - generate a constructor for mVec3_c in this TU].
31 mInitialized = false;
32 m_instance = this;
33}
34
35STATE_DEFINE(dCourseSelectGuide_c, WorldCourseOnStageWait);
36STATE_DEFINE(dCourseSelectGuide_c, WorldCourseOnStageAnimeEndCheck);
37STATE_DEFINE(dCourseSelectGuide_c, WorldCourseDisp);
38STATE_DEFINE(dCourseSelectGuide_c, WorldCourseExitAnimeEndCheck);
39STATE_DEFINE(dCourseSelectGuide_c, GuideOnStageWait);
40STATE_DEFINE(dCourseSelectGuide_c, GuideOnStageAnimeEndCheck);
42STATE_DEFINE(dCourseSelectGuide_c, GuideExitAnimeEndCheck);
44STATE_DEFINE(dCourseSelectGuide_c, UpOnStageAnimeEndCheck);
46STATE_DEFINE(dCourseSelectGuide_c, UpExitAnimeEndCheck);
47STATE_DEFINE(dCourseSelectGuide_c, DownOnStageWait);
48STATE_DEFINE(dCourseSelectGuide_c, DownOnStageAnimeEndCheck);
50STATE_DEFINE(dCourseSelectGuide_c, DownExitAnimeEndCheck);
51STATE_DEFINE(dCourseSelectGuide_c, LeftOnStageWait);
52STATE_DEFINE(dCourseSelectGuide_c, LeftOnStageAnimeEndCheck);
54STATE_DEFINE(dCourseSelectGuide_c, LeftExitAnimeEndCheck);
55STATE_DEFINE(dCourseSelectGuide_c, RightOnStageWait);
56STATE_DEFINE(dCourseSelectGuide_c, RightOnStageAnimeEndCheck);
58STATE_DEFINE(dCourseSelectGuide_c, RightExitAnimeEndCheck);
59STATE_DEFINE(dCourseSelectGuide_c, ShadowOnStageWait);
60STATE_DEFINE(dCourseSelectGuide_c, ShadowOnStageAnimeEndCheck);
62STATE_DEFINE(dCourseSelectGuide_c, ShadowExitAnimeEndCheck);
63STATE_DEFINE(dCourseSelectGuide_c, ScrollGuideOnStageWait);
64STATE_DEFINE(dCourseSelectGuide_c, ScrollGuideOnStageAnimeEndCheck);
65STATE_DEFINE(dCourseSelectGuide_c, ScrollGuideDisp);
66STATE_DEFINE(dCourseSelectGuide_c, ScrollGuideExitAnimeEndCheck);
67
71
73 static const char *AnmNameTbl[ANIM_NAME_COUNT] = {
74 "corseSelectUIGuide_37_inInfo.brlan",
75 "corseSelectUIGuide_37_loopInfo.brlan",
76 "corseSelectUIGuide_37_outInfo.brlan",
77 "corseSelectUIGuide_37_inMapArrow.brlan",
78 "corseSelectUIGuide_37_loopArrow.brlan",
79 "corseSelectUIGuide_37_outMapArrow.brlan",
80 "corseSelectUIGuide_37_inShadow.brlan",
81 "corseSelectUIGuide_37_outShadow.brlan"
82 };
83
84 static const char *GROUP_NAME_DT[ANIM_COUNT] = {
85 "A00_underGuide", "A01_zanki", "A02_courseInfo",
86 "A00_underGuide", "A01_zanki", "A02_courseInfo",
87 "A00_underGuide", "A01_zanki", "A02_courseInfo",
88 "B00_ArrowRight", "B01_ArrowLeft", "B02_ArrowUp", "B03_ArrowUnder",
89 "B00_ArrowRight", "B01_ArrowLeft", "B02_ArrowUp", "B03_ArrowUnder",
90 "B00_ArrowRight", "B01_ArrowLeft", "B02_ArrowUp", "B03_ArrowUnder",
91 "C00_shadow",
92 "C00_shadow"
93 };
94
95 static const int ANIME_INDEX_TBL[ANIM_COUNT] = {
96 inInfo, inInfo, inInfo,
97 loopInfo, loopInfo, loopInfo,
98 outInfo, outInfo, outInfo,
99 inMapArrow, inMapArrow, inMapArrow, inMapArrow,
100 loopArrow, loopArrow, loopArrow, loopArrow,
101 outMapArrow, outMapArrow, outMapArrow, outMapArrow,
102 inShadow,
103 outShadow
104 };
105
106 static const char *NPANE_NAME_DT[N_COUNT] = {
107 "N_IconPos1P_00", "N_IconPos2P_00", "N_IconPos3P_00", "N_IconPos4P_00",
108 "N_mapArrow_00",
109 "N_proportionL_00", "N_proportionR_00", "N_proportionC_00",
110 "N_guideViewC_00", "N_guideViewR_01",
111 "N_left_00"
112 };
113
114 static const char *T_PANE_NAME_TBL[T_COUNT] = {
115 "T_worldNum_00",
116 "T_cSelect_00", "T_cSelect_pic",
117 "T_lifeNumber_00", "T_lifeNumber_01", "T_lifeNumber_02", "T_lifeNumber_03",
118 "T_guideViewLS_00", "T_guideViewL_01"
119 };
120
121 static const int MESSAGE_DATA_TBL[T_FIXED_COUNT] = {
122 MSG_CS_SELECT_WORLD,
123 MSG_CS_MENU,
124 MSG_CS_WORLD
125 };
126 static const char *T_PANE_FIXED_NAME_TBL[T_FIXED_COUNT] = {
127 "T_guideViewC_00",
128 "T_guideViewR_00",
129 "T_world_00"
130 };
131
132 static const char *P_PANE_NAME_TBL[P_COUNT] = {
133 "P_cC_1_00",
134 "P_cC_2_00",
135 "P_cC_3_00",
136 "P_cC_1s_00",
137 "P_cC_2s_00",
138 "P_cC_3s_00",
139 "P_flagSkull_00",
140 "P_marioFace_00",
141 "P_luigiFace_00",
142 "P_BkinoFace_00",
143 "P_YkinoFace_00",
144 "P_bgShadow_00"
145 };
146
147 if (mInitialized) {
148 return true;
149 }
150 if (!mLayout.ReadResource("corseSelectUIGuide/corseSelectUIGuide.arc", false)) {
151 return false;
152 }
153 mLayout.build("corseSelectUIGuide_37.brlyt", 0);
154 mLayout.AnimeResRegister(AnmNameTbl, ANIM_NAME_COUNT);
155 mLayout.GroupRegister(GROUP_NAME_DT, ANIME_INDEX_TBL, ANIM_COUNT);
156 mpRootPane = mLayout.getRootPane();
157 mLayout.NPaneRegister(NPANE_NAME_DT, &mpNullPanes[N_IconPos1P_00], N_COUNT);
158 mLayout.TPaneRegister(T_PANE_NAME_TBL, &mpTextBoxes[T_worldNum_00], T_COUNT);
159 mLayout.TPaneNameRegister(T_PANE_FIXED_NAME_TBL, MESSAGE_DATA_TBL, BMG_CATEGORY_COURSE_SELECT_GUIDE, T_FIXED_COUNT);
160 mLayout.PPaneRegister(P_PANE_NAME_TBL, &mpPicturePanes[P_cC_1_00], P_COUNT);
161
162 mLayout.mDrawOrder = 2;
163 mpRootPane->setVisible(true);
164 mpNullPanes[N_mapArrow_00]->setVisible(true);
165 mpPicturePanes[P_flagSkull_00]->setVisible(false);
166
167 for (int i = 0; i < ARRAY_SIZE(mRest); i++) {
168 mRest[i] = -1;
169 }
170
172
174 mInitialized = true;
175
176 mWorldNo = dScWMap_c::getWorldNo();
177 mCourseNo = -10;
178 mCourseType = dWmLib::COURSE_TYPE_INVALID;
179
180 mLayout.AllAnimeEndSetup();
181
182 mEnabled = true;
183
184 mShowCourseInfo = false;
185 mHideCourseInfo = true;
186
187 mIsCourseInfoOutAnime = false;
188 mNoAnimCourseInfoIn = false;
189
190 mBeginGuide = false;
191 mEndGuide = true;
192 mGuideRelated = false;
193 mNoHUDAppearAnim = false;
194
195 mMapView = false;
196 mDisableArrows = false;
197 mHideHUD = false;
198
199 mShowShadow = false;
200 mHideShadow = false;
201
202 mShowScrollGuide = false;
203 mEndScrollGuide = false;
204
205 mScrollGuideRelated = false;
206 mCourseInfoAnim = false;
207 mUpAnim = false;
208 mDownAnim = false;
209 mLeftAnim = false;
210 mRightAnim = false;
211
212 mShowRestNumber = false;
213
216
217 mRestAlpha = 255;
218 mRestAlphaTarget = 255;
219
220 mLayout.ReverseAnimeStartSetup(ANIM_OUT_UNDER, false);
221 mLayout.ReverseAnimeStartSetup(ANIM_OUT_ZANKI, false);
222 mLayout.ReverseAnimeStartSetup(ANIM_OUT_COURSE_INFO, false);
223 mLayout.AnimePlay();
224 mLayout.calc();
226 mLayout.ReverseAnimeStartSetup(ANIM_IN_SHADOW, false);
227 mLayout.ReverseAnimeStartSetup(ANIM_IN_UNDER, false);
228 mLayout.ReverseAnimeStartSetup(ANIM_IN_ZANKI, false);
229 mLayout.ReverseAnimeStartSetup(ANIM_IN_COURSE_INFO, false);
230 mLayout.AnimePlay();
231 mLayout.calc();
232
233 mVec2_c scale;
234 dGameCom::DispSizeScale(scale);
235 mpNullPanes[N_proportionL_00]->setScale(scale);
236 mpNullPanes[N_proportionR_00]->setScale(scale);
237 mpNullPanes[N_proportionC_00]->setScale(scale);
238
240
241 return true;
242}
243
245 d2d::ClipSettings clipSettings;
246 if (dGameCom::GetAspectRatio() == 0) {
247 clipSettings.mPos.y = mVideo::getSmth(330.0f);
248 clipSettings.mSize.x = 640.0f;
249 clipSettings.mSize.y = 330.0f;
250 clipSettings.mEnabled = true;
251 }
252 mLayout.mClipSettings = clipSettings;
253}
254
256 static const int picPaneNums[PLAYER_COUNT] = { P_marioFace_00, P_luigiFace_00, P_BkinoFace_00, P_YkinoFace_00 };
257
258 for (int i = 0; i < PLAYER_COUNT; i++) {
259 mpPicturePanes[P_marioFace_00 + i]->setVisible(false);
260 }
261
262 int currPane = N_IconPos1P_00;
263 int playerCount = -1;
264 for (int i = 0; i < PLAYER_COUNT; i++) {
266 int playerIndex = daPyMng_c::getPlayerIndex(playerType);
267 if (dGameCom::PlayerEnterCheck(playerIndex)) {
268 mVec3_c pos;
269 pos = mpNullPanes[currPane]->mPos;
270 mpPicturePanes[picPaneNums[playerType]]->mPos = pos;
271 mpPicturePanes[picPaneNums[playerType]]->setVisible(true);
272 currPane++;
273 playerCount++;
274 }
275 }
276
277 for (int i = 0; i < PLAYER_COUNT; i++) {
278 mpNullPanes[N_IconPos1P_00 + i]->setVisible(false);
279 }
280 mpNullPanes[N_IconPos1P_00 + playerCount]->setVisible(true);
281}
282
284 static const int textBoxIdxs[PLAYER_COUNT] = { T_lifeNumber_00, T_lifeNumber_01, T_lifeNumber_03, T_lifeNumber_02 };
285
286 for (int i = 0; i < PLAYER_COUNT; i++) {
288 int playerIndex = daPyMng_c::getPlayerIndex(playerType);
289 int rest = daPyMng_c::getRest(playerType);
290 if (mRest[i] != rest) {
291 mRest[i] = rest;
292 int textIdx = textBoxIdxs[i];
293 LytTextBox_c *textBox = mpTextBoxes[textIdx];
294 dGameCom::LayoutDispNumber(rest, dGameDisplay_c::c_PLAYNUM_DIGIT, textBox, true);
295 }
296 }
297 mShowRestNumber = false;
298}
299
302 return;
303 }
304 if (mRestAlphaTarget != 0) {
306 if (mRestAlpha >= 255) {
307 mRestAlpha = 255;
308 }
309 } else {
311 if (mRestAlpha < 0) {
312 mRestAlpha = 0;
313 }
314 }
315
316 u8 alpha = mRestAlpha;
317 for (int i = 0; i < PLAYER_COUNT; i++) {
318 mpNullPanes[N_IconPos1P_00 + i]->setAlpha(alpha);
319 mpPicturePanes[P_marioFace_00 + i]->setAlpha(alpha);
320 }
321}
322
324 if (mInitialized && mEnabled) {
325 if (mShowRestNumber) {
327 }
328
329 mStateMgrWorldCourse.executeState();
330 mStateMgrGuide.executeState();
331
332 if (mMapView) {
333 mStateMgrUp.executeState();
334 mStateMgrDown.executeState();
335 mStateMgrLeft.executeState();
336 mStateMgrRight.executeState();
337
338 mMoveDirection = 0;
339 if (mEnableAllArrows) {
340 mEnableAllArrows = false;
341 }
342 if (mDisableArrows) {
343 if (
344 !mLayout.isAnime(ANIM_OUT_ARROW_U) || !mLayout.isAnime(ANIM_OUT_ARROW_D) ||
345 !mLayout.isAnime(ANIM_OUT_ARROW_L) || !mLayout.isAnime(ANIM_OUT_ARROW_R)
346 ) {
347 mDisableArrows = false;
348 mMapView = false;
349 }
350 }
351 }
352
353 mStateMgrScrollGuide.executeState();
354 mStateMgrShadow.executeState();
355 mLayout.AnimePlay();
358 mLayout.calc();
359 }
360}
361
363 if (mInitialized && mEnabled) {
364 mLayout.entry();
365 }
366}
367
369 mLayout.doDelete();
370}
371
372void dCourseSelectGuide_c::CourseSelectSet(dWmLib::PointType_e type) {
373 static const int sc_startPointIcons[WORLD_USED_COUNT] = {
374 MSG_CS_ICON_START_RIGHT, // W1
375 MSG_CS_ICON_START_UP, // W2
376 MSG_CS_ICON_START_RIGHT, // W3
377 MSG_CS_ICON_START_UP, // W4
378 MSG_CS_ICON_START_RIGHT, // W5
379 MSG_CS_ICON_START_UP, // W6
380 MSG_CS_ICON_START_RIGHT, // W7
381 MSG_CS_ICON_START_UP, // W8
382 MSG_CS_ICON_START_UP, // W9
383 };
384 dInfo_c *info = dInfo_c::m_instance;
385 MsgRes_c *msgRes = dMessage_c::getMesRes();
386 int actualWNo = mWorldNo + 1;
387 int actualLevelNo;
388 if (type == dWmLib::POINT_TYPE_PATH) {
389 mCourseNo = -2;
390 return;
391 } else if (type == dWmLib::POINT_TYPE_REGULAR_COURSE || type == dWmLib::POINT_TYPE_OTHER) {
392 actualLevelNo = mCourseNo + 1;
393 } else if (type == dWmLib::POINT_TYPE_START_NODE) {
394 mCourseType = dWmLib::COURSE_TYPE_INVALID; /// [Why not use COURSE_TYPE_KINOKO_START here?]
395 } else {
396 mCourseType = dWmLib::COURSE_TYPE_JUNCTION;
397 }
398 info->mDisplayCourseWorld = actualWNo;
399 mpTextBoxes[T_worldNum_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_CURR_WORLD, 0);
400 mRestAlphaTarget = 255;
401 int messageID;
402 switch (mCourseType) {
403 default:
404 info->mDisplayCourseNum = actualLevelNo;
405 mpTextBoxes[T_cSelect_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_COURSE_NUM, 0);
406 mpTextBoxes[T_cSelect_00]->setVisible(true);
407 mpTextBoxes[T_cSelect_pic]->setVisible(false);
408 return;
409 case dWmLib::COURSE_TYPE_GHOST: messageID = MSG_CS_ICON_GHOST_HOUSE; break;
410 case dWmLib::COURSE_TYPE_TOWER: messageID = MSG_CS_ICON_TOWER; break;
411 case dWmLib::COURSE_TYPE_CASTLE:
412 if (mWorldNo != WORLD_8) {
413 messageID = MSG_CS_ICON_CASTLE;
414 } else {
415 messageID = MSG_CS_ICON_W8_CASTLE;
416 }
417 break;
418 case dWmLib::COURSE_TYPE_KINOKO:
419 if (dScWMap_c::IsCourseType(mWorldNo, mCourseNo, dScWMap_c::COURSE_TYPE_KINOKO_HOUSE_1UP)) {
420 messageID = MSG_CS_ICON_KINOKO_HOUSE_1UP;
421 } else if (dScWMap_c::IsCourseType(mWorldNo, mCourseNo, dScWMap_c::COURSE_TYPE_KINOKO_HOUSE_STAR)) {
422 messageID = MSG_CS_ICON_KINOKO_HOUSE_STAR;
423 } else {
424 messageID = MSG_CS_ICON_KINOKO_HOUSE_RED;
425 }
426 break;
427 case dWmLib::COURSE_TYPE_JUNCTION: messageID = MSG_CS_ICON_JUNCTION; break;
428 case dWmLib::COURSE_TYPE_CANNON: messageID = MSG_CS_ICON_CANNON; break;
429 case dWmLib::COURSE_TYPE_KOOPA_SHIP:
430 if (dWmLib::isKoopaShipAnchor()) {
431 messageID = MSG_CS_ICON_ANCHOR;
432 } else {
433 messageID = MSG_CS_ICON_AIRSHIP;
434 }
435 break;
436 case dWmLib::COURSE_TYPE_PEACH_CASTLE:
438 messageID = MSG_CS_ICON_PEACH_CASTLE;
439 break;
440 case dWmLib::COURSE_TYPE_INVALID:
441 if (dWmLib::getStartPointKinokoHouseKindNum() == 0 || dWmLib::IsCourseClear(mWorldNo, STAGE_START_KINOKO_HOUSE)) {
442 messageID = sc_startPointIcons[mWorldNo];
443 break;
444 }
445 if (dWmLib::isStartPointKinokoHouseStar()) {
446 messageID = MSG_CS_ICON_KINOKO_HOUSE_STAR;
447 } else if (dWmLib::isStartPointKinokoHouseRed()) {
448 messageID = MSG_CS_ICON_KINOKO_HOUSE_RED;
449 } else {
450 messageID = MSG_CS_ICON_KINOKO_HOUSE_1UP;
451 }
452 break;
453 }
454 mpTextBoxes[T_cSelect_pic]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, messageID, 0);
455 mpTextBoxes[T_cSelect_00]->setVisible(false);
456 mpTextBoxes[T_cSelect_pic]->setVisible(true);
457}
458
460 dMj2dGame_c *saveGame = dSaveMng_c::m_instance->getSaveGame(-1);
461 dCyuukan_c *checkpoint = dInfo_c::m_instance->getCyuukan();
462 for (unsigned int i = 0; i < STAR_COIN_COUNT; i++) {
463 mpPicturePanes[P_cC_1s_00 + i]->setVisible(true);
464 mpPicturePanes[P_cC_1s_00 + i]->setAlpha(255);
465 mpPicturePanes[P_cC_1_00 + i]->setAlpha(255);
466 if (mCourseNo < 0 || !dScWMap_c::IsCourseType(mWorldNo, mCourseNo, dScWMap_c::COURSE_TYPE_NO_STAR_COINS)) {
467 mpPicturePanes[P_cC_1s_00 + i]->setVisible(false);
468 } else {
469 u8 collectCoin = saveGame->isCollectCoin(mWorldNo, mCourseNo, i);
470 if (collectCoin != 0) {
471 mpPicturePanes[P_cC_1_00 + i]->setVisible(true);
472 } else if (
473 mWorldNo == checkpoint->mWorldNo
474 && mCourseNo == checkpoint->mCourseNo
475 && checkpoint->mCoinCollection[i] != 4
476 ) {
477 mpPicturePanes[P_cC_1s_00 + i]->setAlpha(0);
478 mpPicturePanes[P_cC_1_00 + i]->setVisible(true);
479 mpPicturePanes[P_cC_1_00 + i]->setAlpha(70);
480 } else {
481 mpPicturePanes[P_cC_1_00 + i]->setVisible(false);
482 }
483 }
484 }
485}
486
488 static const u8 flags[] = {
489 BIT_FLAG(DIR_UP),
490 BIT_FLAG(DIR_DOWN),
491 BIT_FLAG(DIR_LEFT),
492 BIT_FLAG(DIR_RIGHT)
493 };
494 return (mMoveDirection & flags[dir]) != 0;
495}
496
497void dCourseSelectGuide_c::initializeState_WorldCourseOnStageWait() {}
498void dCourseSelectGuide_c::executeState_WorldCourseOnStageWait() {
500 return;
501 }
502
503 if (mWorldCourseOnStageTimer > 0) {
505 return;
506 }
508
509 if (mShowCourseInfo) {
510 mStateMgrWorldCourse.changeState(StateID_WorldCourseOnStageAnimeEndCheck);
511 }
512}
513void dCourseSelectGuide_c::finalizeState_WorldCourseOnStageWait() {}
514
515void dCourseSelectGuide_c::initializeState_WorldCourseOnStageAnimeEndCheck() {
516 mCourseInfoAnim = true;
517 mShowCourseInfo = false;
518 mLayout.AnimeStartSetup(ANIM_IN_COURSE_INFO, mNoAnimCourseInfoIn);
519}
520void dCourseSelectGuide_c::executeState_WorldCourseOnStageAnimeEndCheck() {
521 if (mHideCourseInfo) {
522 mLayout.AnimeEndSetup(ANIM_IN_COURSE_INFO);
523 mStateMgrWorldCourse.changeState(StateID_WorldCourseExitAnimeEndCheck);
524 } else if (!mLayout.isAnime(ANIM_IN_COURSE_INFO)) {
525 mStateMgrWorldCourse.changeState(StateID_WorldCourseDisp);
526 }
527}
528void dCourseSelectGuide_c::finalizeState_WorldCourseOnStageAnimeEndCheck() {
529 mCourseInfoAnim = false;
530}
531
532void dCourseSelectGuide_c::initializeState_WorldCourseDisp() {
533 mLayout.LoopAnimeStartSetup(ANIM_LOOP_COURSE_INFO);
534}
535void dCourseSelectGuide_c::executeState_WorldCourseDisp() {
536 if (mHideHUD) {
537 return;
538 }
539 mShowCourseInfo = false;
540 if (mHideCourseInfo) {
541 mStateMgrWorldCourse.changeState(StateID_WorldCourseExitAnimeEndCheck);
542 }
543}
544void dCourseSelectGuide_c::finalizeState_WorldCourseDisp() {}
545
546void dCourseSelectGuide_c::initializeState_WorldCourseExitAnimeEndCheck() {
547 mCourseInfoAnim = true;
548 mHideCourseInfo = false;
549 mLayout.AnimeEndSetup(ANIM_LOOP_COURSE_INFO);
550 mLayout.AnimeStartSetup(ANIM_OUT_COURSE_INFO, false);
551}
552void dCourseSelectGuide_c::executeState_WorldCourseExitAnimeEndCheck() {
553 if (mShowCourseInfo) {
554 mLayout.AnimeEndSetup(ANIM_OUT_COURSE_INFO);
555 mStateMgrWorldCourse.changeState(StateID_WorldCourseOnStageAnimeEndCheck);
556 } else if (!mLayout.isAnime(ANIM_OUT_COURSE_INFO)) {
557 mIsCourseInfoOutAnime = false;
558 mStateMgrWorldCourse.changeState(StateID_WorldCourseOnStageWait);
559 }
560}
561void dCourseSelectGuide_c::finalizeState_WorldCourseExitAnimeEndCheck() {
562 mCourseInfoAnim = false;
563}
564
565void dCourseSelectGuide_c::initializeState_GuideOnStageWait() {}
566void dCourseSelectGuide_c::executeState_GuideOnStageWait() {
568 return;
569 }
570
571 if (mGuideOnStageTimer > 0) {
573 return;
574 }
576
577 if (mBeginGuide) {
578 mStateMgrGuide.changeState(StateID_GuideOnStageAnimeEndCheck);
579 }
580}
581void dCourseSelectGuide_c::finalizeState_GuideOnStageWait() {
583}
584
585void dCourseSelectGuide_c::initializeState_GuideOnStageAnimeEndCheck() {
586 mBeginGuide = false;
587 mLayout.AnimeStartSetup(ANIM_IN_UNDER, mNoHUDAppearAnim);
588 mLayout.AnimeStartSetup(ANIM_IN_ZANKI, mNoHUDAppearAnim);
589}
590void dCourseSelectGuide_c::executeState_GuideOnStageAnimeEndCheck() {
591 if (mEndGuide) {
592 mLayout.AnimeEndSetup(ANIM_IN_UNDER);
593 mLayout.AnimeEndSetup(ANIM_IN_ZANKI);
594 mStateMgrGuide.changeState(StateID_GuideExitAnimeEndCheck);
595 } else {
596 if (mLayout.isAnime(ANIM_IN_UNDER) || mLayout.isAnime(ANIM_IN_ZANKI)) {
597 return;
598 }
599 mStateMgrGuide.changeState(StateID_GuideDisp);
600 }
601}
602void dCourseSelectGuide_c::finalizeState_GuideOnStageAnimeEndCheck() {}
603
604void dCourseSelectGuide_c::initializeState_GuideDisp() {
605 mLayout.LoopAnimeStartSetup(ANIM_LOOP_UNDER);
606 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ZANKI);
607}
608void dCourseSelectGuide_c::executeState_GuideDisp() {
609 if (!mHideHUD) {
610 mBeginGuide = false;
611 if (mEndGuide) {
612 mStateMgrGuide.changeState(StateID_GuideExitAnimeEndCheck);
613 }
614 }
615}
616void dCourseSelectGuide_c::finalizeState_GuideDisp() {}
617
618void dCourseSelectGuide_c::initializeState_GuideExitAnimeEndCheck() {
619 mEndGuide = false;
620 mLayout.AnimeEndSetup(ANIM_LOOP_UNDER);
621 mLayout.AnimeEndSetup(ANIM_LOOP_ZANKI);
622 mLayout.AnimeStartSetup(ANIM_OUT_UNDER, false);
623 mLayout.AnimeStartSetup(ANIM_OUT_ZANKI, false);
624}
625void dCourseSelectGuide_c::executeState_GuideExitAnimeEndCheck() {
626 if (mBeginGuide) {
627 mLayout.AnimeEndSetup(ANIM_OUT_UNDER);
628 mLayout.AnimeEndSetup(ANIM_OUT_ZANKI);
629 mStateMgrGuide.changeState(StateID_GuideOnStageAnimeEndCheck);
630 } else {
631 if (mLayout.isAnime(ANIM_OUT_UNDER) || mLayout.isAnime(ANIM_OUT_ZANKI)) {
632 return;
633 }
634 mGuideRelated = false;
635 mStateMgrGuide.changeState(StateID_GuideOnStageWait);
636 }
637}
638void dCourseSelectGuide_c::finalizeState_GuideExitAnimeEndCheck() {}
639
640void dCourseSelectGuide_c::initializeState_UpOnStageWait() {}
641void dCourseSelectGuide_c::executeState_UpOnStageWait() {
643 mStateMgrUp.changeState(StateID_UpOnStageAnimeEndCheck);
644 }
645}
646void dCourseSelectGuide_c::finalizeState_UpOnStageWait() {}
647
648void dCourseSelectGuide_c::initializeState_UpOnStageAnimeEndCheck() {
649 mUpAnim = true;
650 mLayout.AnimeStartSetup(ANIM_IN_ARROW_U, false);
651}
652void dCourseSelectGuide_c::executeState_UpOnStageAnimeEndCheck() {
653 if (!IsDirectionAllowed(DIR_UP) || mDisableArrows) {
654 mLayout.AnimeEndSetup(ANIM_IN_ARROW_U);
655 mStateMgrUp.changeState(StateID_UpExitAnimeEndCheck);
656 } else {
657 if (mLayout.isAnime(ANIM_IN_ARROW_U) || mLayout.isAnime(ANIM_IN_UNDER)) {
658 return;
659 }
660 mStateMgrUp.changeState(StateID_UpDisp);
661 }
662}
663void dCourseSelectGuide_c::finalizeState_UpOnStageAnimeEndCheck() {
664 mUpAnim = false;
665}
666
667void dCourseSelectGuide_c::initializeState_UpDisp() {
668 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_U);
669}
670void dCourseSelectGuide_c::executeState_UpDisp() {
671 if (!IsDirectionAllowed(DIR_UP) || mDisableArrows) {
672 mStateMgrUp.changeState(StateID_UpExitAnimeEndCheck);
673 }
674}
675void dCourseSelectGuide_c::finalizeState_UpDisp() {}
676
677void dCourseSelectGuide_c::initializeState_UpExitAnimeEndCheck() {
678 mUpAnim = true;
679 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_U);
680 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_U, false);
681}
682void dCourseSelectGuide_c::executeState_UpExitAnimeEndCheck() {
683 if (IsDirectionAllowed(DIR_UP)) {
684 mStateMgrUp.changeState(StateID_UpOnStageAnimeEndCheck);
685 } else if (!mLayout.isAnime(ANIM_OUT_ARROW_U)) {
686 mStateMgrUp.changeState(StateID_UpOnStageWait);
687 }
688}
689void dCourseSelectGuide_c::finalizeState_UpExitAnimeEndCheck() {
690 mUpAnim = false;
691}
692
693void dCourseSelectGuide_c::initializeState_DownOnStageWait() {}
694void dCourseSelectGuide_c::executeState_DownOnStageWait() {
695 if (!mDisableArrows && (IsDirectionAllowed(DIR_DOWN) || mEnableAllArrows)) {
696 mStateMgrDown.changeState(StateID_DownOnStageAnimeEndCheck);
697 }
698}
699void dCourseSelectGuide_c::finalizeState_DownOnStageWait() {}
700
701void dCourseSelectGuide_c::initializeState_DownOnStageAnimeEndCheck() {
702 mDownAnim = true;
703 mLayout.AnimeStartSetup(ANIM_IN_ARROW_D, false);
704}
705void dCourseSelectGuide_c::executeState_DownOnStageAnimeEndCheck() {
706 if (!IsDirectionAllowed(DIR_DOWN) || mDisableArrows) {
707 mLayout.AnimeEndSetup(ANIM_IN_ARROW_D);
708 mStateMgrDown.changeState(StateID_DownExitAnimeEndCheck);
709 } else if (!mLayout.isAnime(ANIM_IN_ARROW_D)) {
710 mStateMgrDown.changeState(StateID_DownDisp);
711 }
712}
713void dCourseSelectGuide_c::finalizeState_DownOnStageAnimeEndCheck() {
714 mDownAnim = false;
715}
716
717void dCourseSelectGuide_c::initializeState_DownDisp() {
718 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_D);
719}
720void dCourseSelectGuide_c::executeState_DownDisp() {
721 if (!IsDirectionAllowed(DIR_DOWN) || mDisableArrows) {
722 mStateMgrDown.changeState(StateID_DownExitAnimeEndCheck);
723 }
724}
725void dCourseSelectGuide_c::finalizeState_DownDisp() {}
726
727void dCourseSelectGuide_c::initializeState_DownExitAnimeEndCheck() {
728 mDownAnim = true;
729 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_D);
730 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_D, false);
731}
732void dCourseSelectGuide_c::executeState_DownExitAnimeEndCheck() {
733 if (IsDirectionAllowed(DIR_DOWN)) {
734 mStateMgrDown.changeState(StateID_DownOnStageAnimeEndCheck);
735 } else if (!mLayout.isAnime(ANIM_OUT_ARROW_D)) {
736 mStateMgrDown.changeState(StateID_DownOnStageWait);
737 }
738}
739void dCourseSelectGuide_c::finalizeState_DownExitAnimeEndCheck() {
740 mDownAnim = false;
741}
742
743void dCourseSelectGuide_c::initializeState_LeftOnStageWait() {}
744void dCourseSelectGuide_c::executeState_LeftOnStageWait() {
745 if (!mDisableArrows && (IsDirectionAllowed(DIR_LEFT) || mEnableAllArrows)) {
746 mStateMgrLeft.changeState(StateID_LeftOnStageAnimeEndCheck);
747 }
748}
749void dCourseSelectGuide_c::finalizeState_LeftOnStageWait() {}
750
751void dCourseSelectGuide_c::initializeState_LeftOnStageAnimeEndCheck() {
752 mLeftAnim = true;
753 mLayout.AnimeStartSetup(ANIM_IN_ARROW_L, false);
754}
755void dCourseSelectGuide_c::executeState_LeftOnStageAnimeEndCheck() {
756 if (!IsDirectionAllowed(DIR_LEFT) || mDisableArrows) {
757 mLayout.AnimeEndSetup(ANIM_IN_ARROW_L);
758 mStateMgrLeft.changeState(StateID_LeftExitAnimeEndCheck);
759 } else if (!mLayout.isAnime(ANIM_IN_ARROW_L)) {
760 mStateMgrLeft.changeState(StateID_LeftDisp);
761 }
762}
763void dCourseSelectGuide_c::finalizeState_LeftOnStageAnimeEndCheck() {
764 mLeftAnim = false;
765}
766
767void dCourseSelectGuide_c::initializeState_LeftDisp() {
768 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_L);
769}
770void dCourseSelectGuide_c::executeState_LeftDisp() {
771 if (!IsDirectionAllowed(DIR_LEFT) || mDisableArrows) {
772 mStateMgrLeft.changeState(StateID_LeftExitAnimeEndCheck);
773 }
774}
775void dCourseSelectGuide_c::finalizeState_LeftDisp() {}
776
777void dCourseSelectGuide_c::initializeState_LeftExitAnimeEndCheck() {
778 mLeftAnim = true;
779 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_L);
780 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_L, false);
781}
782void dCourseSelectGuide_c::executeState_LeftExitAnimeEndCheck() {
783 if (IsDirectionAllowed(DIR_LEFT)) {
784 mStateMgrLeft.changeState(StateID_LeftOnStageAnimeEndCheck);
785 } else if (!mLayout.isAnime(ANIM_OUT_ARROW_L)) {
786 mStateMgrLeft.changeState(StateID_LeftOnStageWait);
787 }
788}
789void dCourseSelectGuide_c::finalizeState_LeftExitAnimeEndCheck() {
790 mLeftAnim = false;
791}
792
793void dCourseSelectGuide_c::initializeState_RightOnStageWait() {}
794void dCourseSelectGuide_c::executeState_RightOnStageWait() {
795 if (!mDisableArrows && (IsDirectionAllowed(DIR_RIGHT) || mEnableAllArrows)) {
796 mStateMgrRight.changeState(StateID_RightOnStageAnimeEndCheck);
797 }
798}
799void dCourseSelectGuide_c::finalizeState_RightOnStageWait() {}
800
801void dCourseSelectGuide_c::initializeState_RightOnStageAnimeEndCheck() {
802 mRightAnim = true;
803 mLayout.AnimeStartSetup(ANIM_IN_ARROW_R, false);
804}
805void dCourseSelectGuide_c::executeState_RightOnStageAnimeEndCheck() {
806 if (!IsDirectionAllowed(DIR_RIGHT) || mDisableArrows) {
807 mLayout.AnimeEndSetup(ANIM_IN_ARROW_R);
808 mStateMgrRight.changeState(StateID_RightExitAnimeEndCheck);
809 } else if (!mLayout.isAnime(ANIM_IN_ARROW_R)) {
810 mStateMgrRight.changeState(StateID_RightDisp);
811 }
812}
813void dCourseSelectGuide_c::finalizeState_RightOnStageAnimeEndCheck() {
814 mRightAnim = false;
815}
816
817void dCourseSelectGuide_c::initializeState_RightDisp() {
818 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_R);
819}
820void dCourseSelectGuide_c::executeState_RightDisp() {
821 if (!IsDirectionAllowed(DIR_RIGHT) || mDisableArrows) {
822 mStateMgrRight.changeState(StateID_RightExitAnimeEndCheck);
823 }
824}
825void dCourseSelectGuide_c::finalizeState_RightDisp() {}
826
827void dCourseSelectGuide_c::initializeState_RightExitAnimeEndCheck() {
828 mRightAnim = true;
829 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_R);
830 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_R, false);
831}
832void dCourseSelectGuide_c::executeState_RightExitAnimeEndCheck() {
833 if (IsDirectionAllowed(DIR_RIGHT)) {
834 mStateMgrRight.changeState(StateID_RightOnStageAnimeEndCheck);
835 } else if (!mLayout.isAnime(ANIM_OUT_ARROW_R)) {
836 mStateMgrRight.changeState(StateID_RightOnStageWait);
837 }
838}
839void dCourseSelectGuide_c::finalizeState_RightExitAnimeEndCheck() {
840 mRightAnim = false;
841}
842
843void dCourseSelectGuide_c::initializeState_ShadowOnStageWait() {}
844void dCourseSelectGuide_c::executeState_ShadowOnStageWait() {
845 if (mShowShadow) {
846 mStateMgrShadow.changeState(StateID_ShadowOnStageAnimeEndCheck);
847 }
848}
849void dCourseSelectGuide_c::finalizeState_ShadowOnStageWait() {
850 mShowShadow = false;
851}
852
853void dCourseSelectGuide_c::initializeState_ShadowOnStageAnimeEndCheck() {
854 mLayout.AnimeStartSetup(ANIM_IN_SHADOW, false);
855}
856void dCourseSelectGuide_c::executeState_ShadowOnStageAnimeEndCheck() {
857 if (!mLayout.isAnime(-1)) {
858 mStateMgrShadow.changeState(StateID_ShadowDisp);
859 }
860}
861void dCourseSelectGuide_c::finalizeState_ShadowOnStageAnimeEndCheck() {}
862
863void dCourseSelectGuide_c::initializeState_ShadowDisp() {}
864void dCourseSelectGuide_c::executeState_ShadowDisp() {
865 if (mHideShadow) {
866 mStateMgrShadow.changeState(StateID_ShadowExitAnimeEndCheck);
867 }
868}
869void dCourseSelectGuide_c::finalizeState_ShadowDisp() {
870 mHideShadow = false;
871}
872
873void dCourseSelectGuide_c::initializeState_ShadowExitAnimeEndCheck() {
874 mLayout.AnimeStartSetup(ANIM_OUT_SHADOW, false);
875}
876void dCourseSelectGuide_c::executeState_ShadowExitAnimeEndCheck() {
877 if (!mLayout.isAnime(-1)) {
878 mStateMgrShadow.changeState(StateID_ShadowOnStageWait);
879 }
880}
881void dCourseSelectGuide_c::finalizeState_ShadowExitAnimeEndCheck() {}
882
883void dCourseSelectGuide_c::initializeState_ScrollGuideOnStageWait() {
884 mScrollGuideRelated = false;
885}
886void dCourseSelectGuide_c::executeState_ScrollGuideOnStageWait() {
888 mEndScrollGuide = false;
889 mScrollGuideRelated = false;
890 mGuideRelated = false;
891 mInMapView = false;
892#if (defined(VERSION_K) || defined(VERSION_W))
893 // Don't transition to the next state until the animation is finished.
894 // Otherwise, the "View Map" text would change to "Back to Mario" too early.
895 } else if (mShowScrollGuide && !mLayout.isAnime(ANIM_OUT_UNDER)) {
896#else
897 } else if (mShowScrollGuide) {
898#endif
899 mStateMgrScrollGuide.changeState(StateID_ScrollGuideOnStageAnimeEndCheck);
900 }
901}
902void dCourseSelectGuide_c::finalizeState_ScrollGuideOnStageWait() {
903 mShowScrollGuide = false;
904}
905
906void dCourseSelectGuide_c::initializeState_ScrollGuideOnStageAnimeEndCheck() {
908 mInMapView = true;
909 mpNullPanes[N_guideViewC_00]->setVisible(false);
910 mpNullPanes[N_guideViewR_01]->setVisible(false);
911 mpNullPanes[N_left_00]->setVisible(false);
912 mLayout.AnimeStartSetup(ANIM_IN_UNDER, false);
913 mScrollGuideRelated = true;
914}
915void dCourseSelectGuide_c::executeState_ScrollGuideOnStageAnimeEndCheck() {
916 if (mEndScrollGuide) {
917 mLayout.AnimeEndSetup(ANIM_IN_UNDER);
918 mStateMgrScrollGuide.changeState(StateID_ScrollGuideExitAnimeEndCheck);
919 } else if (!mLayout.isAnime(-1)) {
920 // [Bug: The above should probably be !mLayout.isAnime(ANIM_IN_UNDER).
921 // But since ScrollGuideDisp doesn't really do anything, no difference is visible.]
922 mStateMgrScrollGuide.changeState(StateID_ScrollGuideDisp);
923 }
924}
925void dCourseSelectGuide_c::finalizeState_ScrollGuideOnStageAnimeEndCheck() {}
926
927void dCourseSelectGuide_c::initializeState_ScrollGuideDisp() {
928 mLayout.LoopAnimeStartSetup(ANIM_LOOP_UNDER);
929}
930void dCourseSelectGuide_c::executeState_ScrollGuideDisp() {
931 if (mEndScrollGuide) {
932 mStateMgrScrollGuide.changeState(StateID_ScrollGuideExitAnimeEndCheck);
933 }
934}
935void dCourseSelectGuide_c::finalizeState_ScrollGuideDisp() {}
936
937void dCourseSelectGuide_c::initializeState_ScrollGuideExitAnimeEndCheck() {
938 mEndScrollGuide = false;
939 mLayout.AnimeEndSetup(ANIM_LOOP_UNDER);
940 mLayout.AnimeStartSetup(ANIM_OUT_UNDER, false);
941}
942void dCourseSelectGuide_c::executeState_ScrollGuideExitAnimeEndCheck() {
943 if (!mLayout.isAnime(-1)) {
944 mStateMgrScrollGuide.changeState(StateID_ScrollGuideOnStageWait);
945 }
946}
947void dCourseSelectGuide_c::finalizeState_ScrollGuideExitAnimeEndCheck() {
949 mScrollGuideRelated = false;
950 mpNullPanes[N_guideViewC_00]->setVisible(true);
951 mpNullPanes[N_guideViewR_01]->setVisible(true);
952 mpNullPanes[N_left_00]->setVisible(true);
953 mInMapView = false;
954}
955
956void dCourseSelectGuide_c::UpdateGuide(short courseNo, dWmLib::PointType_e type) {
957 if (mCourseNo == courseNo) {
958 return;
959 }
960 mCourseType = dWmLib::GetCourseTypeFromCourseNo(courseNo);
961 mCourseNo = courseNo;
962 CourseSelectSet(type);
963 if (type != dWmLib::POINT_TYPE_PATH) {
965 }
966 dInfo_c *info = dInfo_c::m_instance;
967 dCyuukan_c *checkpoint = &info->mCyuukan;
968 u8 wNo = mWorldNo;
969 u8 cNo = courseNo;
970 mpPicturePanes[P_flagSkull_00]->setVisible(false);
971 for (int i = 0; i < CHECKPOINT_COUNT; i++) {
972 if (checkpoint->isCyuukanStart(i, wNo, cNo)) {
973 mpPicturePanes[P_flagSkull_00]->setVisible(true);
974 break;
975 }
976 }
977}
978
980 Remocon::EXTENSION_TYPE_e attachedExtension = dGameKey_c::m_instance->mRemocon[0]->mAttachedExtension;
981 if (attachedExtension != mExtension) {
982 mExtension = attachedExtension;
983
984 MsgRes_c *msgRes = dMessage_c::getMesRes();
985 bool attached = true;
986 if (attachedExtension == Remocon::EXTENSION_NONE) {
987 attached = false;
988 }
989 dInfo_c::m_instance->mExtensionAttached = attached;
990 if (mInMapView) {
991 mpTextBoxes[T_guideViewLS_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_BACK_TO_MARIO, 0);
992 } else {
993 mpTextBoxes[T_guideViewLS_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_VIEW_MAP, 0);
994 }
995 mpTextBoxes[T_guideViewL_01]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_ITEMS, 0);
996 }
997}
@ EXTENSION_NONE
No Wii remote extension is connected.
Definition d_game_key.hpp:8
@ EXTENSION_UNKNOWN
It has not been checked yet whether an extension is connected.
bool mLeftAnim
Whether the left arrow is in an animation.
sFStateMgr_c< dCourseSelectGuide_c, sStateMethodUsr_FI_c > mStateMgrUp
The state manager for the up arrow for the map view.
sFStateMgr_c< dCourseSelectGuide_c, sStateMethodUsr_FI_c > mStateMgrGuide
The state manager for the button legends and remaining lives display.
bool mHideCourseInfo
Set this to true to hide the course info.
bool mShowScrollGuide
Set this to true to show the button legends for the map view mode.
bool mShowRestNumber
Whether to update the remaining lives count.
bool mHideShadow
Set this to true to remove the darkening of the world map view.
bool mInMapView
Whether the HUD is in the map view mode.
void CollectionCoinSet()
Updates the star coin icons.
bool mEndScrollGuide
Set this to true to hide the button legends for the map view mode.
int mRestAlphaTarget
The target transparency for mRestAlpha.
void ScissorMaskSet()
Clips the layout to the maximum allowed size.
bool mNoAnimCourseInfoIn
Whether the course info should simply appear instead of sliding in.
sFStateMgr_c< dCourseSelectGuide_c, sStateMethodUsr_FI_c > mStateMgrDown
The state manager for the down arrow for the map view.
bool mHideHUD
Set this to true to hide the entire HUD.
bool mShowCourseInfo
Set this to true to show the course info.
bool mUpAnim
Whether the up arrow is in an animation.
int mCourseNo
The current course number. Set to a negative value if it's a course with an icon.
Remocon::EXTENSION_TYPE_e mExtension
The currently attached Wii remote extension.
bool mEnableAllArrows
Whether to show all map view arrows. Gets reset after 1 frame.
bool mEndGuide
Set this to true to hide the remaining guide.
int mWorldNo
The current world number.
LytBase_c mLayout
The layout for the window.
sFStateMgr_c< dCourseSelectGuide_c, sStateMethodUsr_FI_c > mStateMgrLeft
The state manager for the left arrow for the map view.
int mWorldCourseOnStageTimer
Cooldown for showing the course info.
int mRest[PLAYER_COUNT]
The remaining lives for each player.
sFStateMgr_c< dCourseSelectGuide_c, sStateMethodUsr_FI_c > mStateMgrWorldCourse
The state manager for the course info (world / course name).
bool mDownAnim
Whether the down arrow is in an animation.
sFStateMgr_c< dCourseSelectGuide_c, sStateMethodUsr_FI_c > mStateMgrShadow
The state manager for darkening the course view. [Unused?].
bool mShowShadow
Set this to true to darken the world map view.
bool mDisableArrows
Whether to stop updating the map view arrows.
void UpdateGuide(short courseNo, dWmLib::PointType_e type)
Updates the course-related parts of the course info guide.
void RestAlphaDisp()
Sets the opacity of the remaining lives count.
void doDelete()
Prepares the view for deletion.
nw4r::lyt::Pane * mpNullPanes[N_COUNT]
The null panes of the view.
void ControllerConnectCheck()
Checks for attached controller extensions and updates the button hints with the correct icon.
static const int c_DISP_WAIT_TIMER
The speed at which the opacity of the remaining lives counter is changed.
nw4r::lyt::Picture * mpPicturePanes[P_COUNT]
The picture panes of the view.
static dCourseSelectGuide_c * m_instance
The instance of the view.
int mCourseType
The current course type.
bool mEnabled
Controls whether the HUD is updated every frame.
bool IsDirectionAllowed(int dir)
Returns whether the arrow for direction dir should be shown.
bool mIsCourseInfoOutAnime
Automatically set to false after the course info has been hidden.
bool mMapView
Whether the HUD should process the map view elements.
LytTextBox_c * mpTextBoxes[T_COUNT]
The textboxes of the view.
bool createLayout()
Creates the layout and initializes the class state.
void CourseSelectSet(dWmLib::PointType_e type)
Updates the textbox that displays the current course.
void draw()
Draws the view.
bool mInitialized
Whether the layout has been fully initialized.
void RestNumberDisp()
Fills in the text boxes showing the remaining lives count.
sFStateMgr_c< dCourseSelectGuide_c, sStateMethodUsr_FI_c > mStateMgrRight
The state manager for the right arrow for the map view.
dCourseSelectGuide_c()
Constructs a new course select guide instance.
bool mRightAnim
Whether the right arrow is in an animation.
virtual ~dCourseSelectGuide_c()
Destroys the instance.
sFStateMgr_c< dCourseSelectGuide_c, sStateMethodUsr_FI_c > mStateMgrScrollGuide
The state manager for the button legends during the map view.
bool mCourseInfoAnim
Whether the course information is in an animation.
bool mBeginGuide
Set this to true to show the remaining guide.
bool mNoHUDAppearAnim
Whether the HUD should be shown without an animation.
int mGuideOnStageTimer
Cooldown for showing the remaining guide HUD.
nw4r::lyt::Pane * mpRootPane
The root pane of the view.
void PlayerIconSet()
Updates the player icons in the remaining lives info to the active player.
u8 mMoveDirection
A bitmask describing which arrows should be shown in the free move view.
void execute()
The main loop of the view.
Represents the slot-specific save data for the game.
u8 isCollectCoin(int world, int level, int coin) const
Checks if the given Star Coin has been obtained in the given world/level.
static int getPlayerIndex(PLAYER_CHARACTER_e)
A two-dimensional floating point vector.
Definition m_vec.hpp:10
A three-dimensional floating point vector.
Definition m_vec.hpp:101
static T::GlobalData_t mData
PLAYER_CHARACTER_e
The identifiers for each character.
#define STAR_COIN_COUNT
The amount of Star Coins per level.
#define CHECKPOINT_COUNT
The maximum number of checkpoints supported.
@ STAGE_START_KINOKO_HOUSE
The toad house on the starting node of each world.
static const PLAYER_CHARACTER_e sc_PLAYER_ORDER[]
#define STATE_DEFINE(class, name)
Defines a state.
Definition s_State.hpp:32