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::ScissorMask scissorMask;
246 scissorMask.mPos.x = 0.0f;
247 scissorMask.mPos.y = 0.0f;
248 scissorMask.mSize.x = 0.0f;
249 scissorMask.mSize.y = 0.0f;
250 scissorMask.mEnabled = false;
251 if (dGameCom::GetAspectRatio() == 0) {
252 scissorMask.mPos.y = mVideo::getSmth(330.0f);
253 scissorMask.mSize.x = 640.0f;
254 scissorMask.mSize.y = 330.0f;
255 scissorMask.mEnabled = true;
256 }
257 mLayout.mScissorMask = scissorMask;
258}
259
261 static const int picPaneNums[PLAYER_COUNT] = { P_marioFace_00, P_luigiFace_00, P_BkinoFace_00, P_YkinoFace_00 };
262
263 for (int i = 0; i < PLAYER_COUNT; i++) {
264 mpPicturePanes[P_marioFace_00 + i]->SetVisible(false);
265 }
266
267 int currPane = N_IconPos1P_00;
268 int playerCount = -1;
269 for (int i = 0; i < PLAYER_COUNT; i++) {
271 int playerIndex = daPyMng_c::getPlayerIndex(playerType);
272 if (dGameCom::PlayerEnterCheck(playerIndex)) {
273 mVec3_c translate;
274 translate = mpNullPanes[currPane]->GetTranslate();
275 mpPicturePanes[picPaneNums[playerType]]->SetTranslate(translate);
276 mpPicturePanes[picPaneNums[playerType]]->SetVisible(true);
277 currPane++;
278 playerCount++;
279 }
280 }
281
282 for (int i = 0; i < PLAYER_COUNT; i++) {
283 mpNullPanes[N_IconPos1P_00 + i]->SetVisible(false);
284 }
285 mpNullPanes[N_IconPos1P_00 + playerCount]->SetVisible(true);
286}
287
289 static const int textBoxIdxs[PLAYER_COUNT] = { T_lifeNumber_00, T_lifeNumber_01, T_lifeNumber_03, T_lifeNumber_02 };
290
291 for (int i = 0; i < PLAYER_COUNT; i++) {
293 int playerIndex = daPyMng_c::getPlayerIndex(playerType);
294 int rest = daPyMng_c::getRest(playerType);
295 if (mRest[i] != rest) {
296 mRest[i] = rest;
297 int textIdx = textBoxIdxs[i];
298 LytTextBox_c *textBox = mpTextBoxes[textIdx];
299 dGameCom::LayoutDispNumber(rest, dGameDisplay_c::c_PLAYNUM_DIGIT, textBox, true);
300 }
301 }
302 mShowRestNumber = false;
303}
304
307 return;
308 }
309 if (mRestAlphaTarget != 0) {
311 if (mRestAlpha >= 255) {
312 mRestAlpha = 255;
313 }
314 } else {
316 if (mRestAlpha < 0) {
317 mRestAlpha = 0;
318 }
319 }
320
321 u8 alpha = mRestAlpha;
322 for (int i = 0; i < PLAYER_COUNT; i++) {
323 mpNullPanes[N_IconPos1P_00 + i]->SetAlpha(alpha);
324 mpPicturePanes[P_marioFace_00 + i]->SetAlpha(alpha);
325 }
326}
327
329 if (mInitialized && mEnabled) {
330 if (mShowRestNumber) {
332 }
333
334 mStateMgrWorldCourse.executeState();
335 mStateMgrGuide.executeState();
336
337 if (mMapView) {
338 mStateMgrUp.executeState();
339 mStateMgrDown.executeState();
340 mStateMgrLeft.executeState();
341 mStateMgrRight.executeState();
342
343 mMoveDirection = 0;
344 if (mEnableAllArrows) {
345 mEnableAllArrows = false;
346 }
347 if (mDisableArrows) {
348 if (
349 !mLayout.isAnime(ANIM_OUT_ARROW_U) || !mLayout.isAnime(ANIM_OUT_ARROW_D) ||
350 !mLayout.isAnime(ANIM_OUT_ARROW_L) || !mLayout.isAnime(ANIM_OUT_ARROW_R)
351 ) {
352 mDisableArrows = false;
353 mMapView = false;
354 }
355 }
356 }
357
358 mStateMgrScrollGuide.executeState();
359 mStateMgrShadow.executeState();
360 mLayout.AnimePlay();
363 mLayout.calc();
364 }
365}
366
368 if (mInitialized && mEnabled) {
369 mLayout.entry();
370 }
371}
372
374 mLayout.doDelete();
375}
376
377void dCourseSelectGuide_c::CourseSelectSet(dWmLib::PointType_e type) {
378 static const int sc_startPointIcons[WORLD_USED_COUNT] = {
379 MSG_CS_ICON_START_RIGHT, // W1
380 MSG_CS_ICON_START_UP, // W2
381 MSG_CS_ICON_START_RIGHT, // W3
382 MSG_CS_ICON_START_UP, // W4
383 MSG_CS_ICON_START_RIGHT, // W5
384 MSG_CS_ICON_START_UP, // W6
385 MSG_CS_ICON_START_RIGHT, // W7
386 MSG_CS_ICON_START_UP, // W8
387 MSG_CS_ICON_START_UP, // W9
388 };
389 dInfo_c *info = dInfo_c::m_instance;
390 MsgRes_c *msgRes = dMessage_c::getMesRes();
391 int actualWNo = mWorldNo + 1;
392 int actualLevelNo;
393 if (type == dWmLib::POINT_TYPE_PATH) {
394 mCourseNo = -2;
395 return;
396 } else if (type == dWmLib::POINT_TYPE_REGULAR_COURSE || type == dWmLib::POINT_TYPE_OTHER) {
397 actualLevelNo = mCourseNo + 1;
398 } else if (type == dWmLib::POINT_TYPE_START_NODE) {
399 mCourseType = dWmLib::COURSE_TYPE_INVALID; /// [Why not use COURSE_TYPE_KINOKO_START here?]
400 } else {
401 mCourseType = dWmLib::COURSE_TYPE_JUNCTION;
402 }
403 info->mDisplayCourseWorld = actualWNo;
404 mpTextBoxes[T_worldNum_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_CURR_WORLD, 0);
405 mRestAlphaTarget = 255;
406 int messageID;
407 switch (mCourseType) {
408 default:
409 info->mDisplayCourseNum = actualLevelNo;
410 mpTextBoxes[T_cSelect_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_COURSE_NUM, 0);
411 mpTextBoxes[T_cSelect_00]->SetVisible(true);
412 mpTextBoxes[T_cSelect_pic]->SetVisible(false);
413 return;
414 case dWmLib::COURSE_TYPE_GHOST: messageID = MSG_CS_ICON_GHOST_HOUSE; break;
415 case dWmLib::COURSE_TYPE_TOWER: messageID = MSG_CS_ICON_TOWER; break;
416 case dWmLib::COURSE_TYPE_CASTLE:
417 if (mWorldNo != WORLD_8) {
418 messageID = MSG_CS_ICON_CASTLE;
419 } else {
420 messageID = MSG_CS_ICON_W8_CASTLE;
421 }
422 break;
423 case dWmLib::COURSE_TYPE_KINOKO:
424 if (dScWMap_c::IsCourseType(mWorldNo, mCourseNo, dScWMap_c::COURSE_TYPE_KINOKO_HOUSE_1UP)) {
425 messageID = MSG_CS_ICON_KINOKO_HOUSE_1UP;
426 } else if (dScWMap_c::IsCourseType(mWorldNo, mCourseNo, dScWMap_c::COURSE_TYPE_KINOKO_HOUSE_STAR)) {
427 messageID = MSG_CS_ICON_KINOKO_HOUSE_STAR;
428 } else {
429 messageID = MSG_CS_ICON_KINOKO_HOUSE_RED;
430 }
431 break;
432 case dWmLib::COURSE_TYPE_JUNCTION: messageID = MSG_CS_ICON_JUNCTION; break;
433 case dWmLib::COURSE_TYPE_CANNON: messageID = MSG_CS_ICON_CANNON; break;
434 case dWmLib::COURSE_TYPE_KOOPA_SHIP:
435 if (dWmLib::isKoopaShipAnchor()) {
436 messageID = MSG_CS_ICON_ANCHOR;
437 } else {
438 messageID = MSG_CS_ICON_AIRSHIP;
439 }
440 break;
441 case dWmLib::COURSE_TYPE_PEACH_CASTLE:
443 messageID = MSG_CS_ICON_PEACH_CASTLE;
444 break;
445 case dWmLib::COURSE_TYPE_INVALID:
446 if (dWmLib::getStartPointKinokoHouseKindNum() == 0 || dWmLib::IsCourseClear(mWorldNo, STAGE_START_KINOKO_HOUSE)) {
447 messageID = sc_startPointIcons[mWorldNo];
448 break;
449 }
450 if (dWmLib::isStartPointKinokoHouseStar()) {
451 messageID = MSG_CS_ICON_KINOKO_HOUSE_STAR;
452 } else if (dWmLib::isStartPointKinokoHouseRed()) {
453 messageID = MSG_CS_ICON_KINOKO_HOUSE_RED;
454 } else {
455 messageID = MSG_CS_ICON_KINOKO_HOUSE_1UP;
456 }
457 break;
458 }
459 mpTextBoxes[T_cSelect_pic]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, messageID, 0);
460 mpTextBoxes[T_cSelect_00]->SetVisible(false);
461 mpTextBoxes[T_cSelect_pic]->SetVisible(true);
462}
463
465 dMj2dGame_c *saveGame = dSaveMng_c::m_instance->getSaveGame(-1);
466 dCyuukan_c *checkpoint = dInfo_c::m_instance->getCyuukan();
467 for (unsigned int i = 0; i < STAR_COIN_COUNT; i++) {
468 mpPicturePanes[P_cC_1s_00 + i]->SetVisible(true);
469 mpPicturePanes[P_cC_1s_00 + i]->SetAlpha(255);
470 mpPicturePanes[P_cC_1_00 + i]->SetAlpha(255);
471 if (mCourseNo < 0 || !dScWMap_c::IsCourseType(mWorldNo, mCourseNo, dScWMap_c::COURSE_TYPE_NO_STAR_COINS)) {
472 mpPicturePanes[P_cC_1s_00 + i]->SetVisible(false);
473 } else {
474 u8 collectCoin = saveGame->isCollectCoin(mWorldNo, mCourseNo, i);
475 if (collectCoin != 0) {
476 mpPicturePanes[P_cC_1_00 + i]->SetVisible(true);
477 } else if (
478 mWorldNo == checkpoint->mWorldNo
479 && mCourseNo == checkpoint->mCourseNo
480 && checkpoint->mCoinCollection[i] != 4
481 ) {
482 mpPicturePanes[P_cC_1s_00 + i]->SetAlpha(0);
483 mpPicturePanes[P_cC_1_00 + i]->SetVisible(true);
484 mpPicturePanes[P_cC_1_00 + i]->SetAlpha(70);
485 } else {
486 mpPicturePanes[P_cC_1_00 + i]->SetVisible(false);
487 }
488 }
489 }
490}
491
493 static const u8 flags[] = {
494 BIT_FLAG(DIR_UP),
495 BIT_FLAG(DIR_DOWN),
496 BIT_FLAG(DIR_LEFT),
497 BIT_FLAG(DIR_RIGHT)
498 };
499 return (mMoveDirection & flags[dir]) != 0;
500}
501
502void dCourseSelectGuide_c::initializeState_WorldCourseOnStageWait() {}
503void dCourseSelectGuide_c::executeState_WorldCourseOnStageWait() {
505 return;
506 }
507
508 if (mWorldCourseOnStageTimer > 0) {
510 return;
511 }
513
514 if (mShowCourseInfo) {
515 mStateMgrWorldCourse.changeState(StateID_WorldCourseOnStageAnimeEndCheck);
516 }
517}
518void dCourseSelectGuide_c::finalizeState_WorldCourseOnStageWait() {}
519
520void dCourseSelectGuide_c::initializeState_WorldCourseOnStageAnimeEndCheck() {
521 mCourseInfoAnim = true;
522 mShowCourseInfo = false;
523 mLayout.AnimeStartSetup(ANIM_IN_COURSE_INFO, mNoAnimCourseInfoIn);
524}
525void dCourseSelectGuide_c::executeState_WorldCourseOnStageAnimeEndCheck() {
526 if (mHideCourseInfo) {
527 mLayout.AnimeEndSetup(ANIM_IN_COURSE_INFO);
528 mStateMgrWorldCourse.changeState(StateID_WorldCourseExitAnimeEndCheck);
529 } else if (!mLayout.isAnime(ANIM_IN_COURSE_INFO)) {
530 mStateMgrWorldCourse.changeState(StateID_WorldCourseDisp);
531 }
532}
533void dCourseSelectGuide_c::finalizeState_WorldCourseOnStageAnimeEndCheck() {
534 mCourseInfoAnim = false;
535}
536
537void dCourseSelectGuide_c::initializeState_WorldCourseDisp() {
538 mLayout.LoopAnimeStartSetup(ANIM_LOOP_COURSE_INFO);
539}
540void dCourseSelectGuide_c::executeState_WorldCourseDisp() {
541 if (mHideHUD) {
542 return;
543 }
544 mShowCourseInfo = false;
545 if (mHideCourseInfo) {
546 mStateMgrWorldCourse.changeState(StateID_WorldCourseExitAnimeEndCheck);
547 }
548}
549void dCourseSelectGuide_c::finalizeState_WorldCourseDisp() {}
550
551void dCourseSelectGuide_c::initializeState_WorldCourseExitAnimeEndCheck() {
552 mCourseInfoAnim = true;
553 mHideCourseInfo = false;
554 mLayout.AnimeEndSetup(ANIM_LOOP_COURSE_INFO);
555 mLayout.AnimeStartSetup(ANIM_OUT_COURSE_INFO, false);
556}
557void dCourseSelectGuide_c::executeState_WorldCourseExitAnimeEndCheck() {
558 if (mShowCourseInfo) {
559 mLayout.AnimeEndSetup(ANIM_OUT_COURSE_INFO);
560 mStateMgrWorldCourse.changeState(StateID_WorldCourseOnStageAnimeEndCheck);
561 } else if (!mLayout.isAnime(ANIM_OUT_COURSE_INFO)) {
562 mIsCourseInfoOutAnime = false;
563 mStateMgrWorldCourse.changeState(StateID_WorldCourseOnStageWait);
564 }
565}
566void dCourseSelectGuide_c::finalizeState_WorldCourseExitAnimeEndCheck() {
567 mCourseInfoAnim = false;
568}
569
570void dCourseSelectGuide_c::initializeState_GuideOnStageWait() {}
571void dCourseSelectGuide_c::executeState_GuideOnStageWait() {
573 return;
574 }
575
576 if (mGuideOnStageTimer > 0) {
578 return;
579 }
581
582 if (mBeginGuide) {
583 mStateMgrGuide.changeState(StateID_GuideOnStageAnimeEndCheck);
584 }
585}
586void dCourseSelectGuide_c::finalizeState_GuideOnStageWait() {
588}
589
590void dCourseSelectGuide_c::initializeState_GuideOnStageAnimeEndCheck() {
591 mBeginGuide = false;
592 mLayout.AnimeStartSetup(ANIM_IN_UNDER, mNoHUDAppearAnim);
593 mLayout.AnimeStartSetup(ANIM_IN_ZANKI, mNoHUDAppearAnim);
594}
595void dCourseSelectGuide_c::executeState_GuideOnStageAnimeEndCheck() {
596 if (mEndGuide) {
597 mLayout.AnimeEndSetup(ANIM_IN_UNDER);
598 mLayout.AnimeEndSetup(ANIM_IN_ZANKI);
599 mStateMgrGuide.changeState(StateID_GuideExitAnimeEndCheck);
600 } else {
601 if (mLayout.isAnime(ANIM_IN_UNDER) || mLayout.isAnime(ANIM_IN_ZANKI)) {
602 return;
603 }
604 mStateMgrGuide.changeState(StateID_GuideDisp);
605 }
606}
607void dCourseSelectGuide_c::finalizeState_GuideOnStageAnimeEndCheck() {}
608
609void dCourseSelectGuide_c::initializeState_GuideDisp() {
610 mLayout.LoopAnimeStartSetup(ANIM_LOOP_UNDER);
611 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ZANKI);
612}
613void dCourseSelectGuide_c::executeState_GuideDisp() {
614 if (!mHideHUD) {
615 mBeginGuide = false;
616 if (mEndGuide) {
617 mStateMgrGuide.changeState(StateID_GuideExitAnimeEndCheck);
618 }
619 }
620}
621void dCourseSelectGuide_c::finalizeState_GuideDisp() {}
622
623void dCourseSelectGuide_c::initializeState_GuideExitAnimeEndCheck() {
624 mEndGuide = false;
625 mLayout.AnimeEndSetup(ANIM_LOOP_UNDER);
626 mLayout.AnimeEndSetup(ANIM_LOOP_ZANKI);
627 mLayout.AnimeStartSetup(ANIM_OUT_UNDER, false);
628 mLayout.AnimeStartSetup(ANIM_OUT_ZANKI, false);
629}
630void dCourseSelectGuide_c::executeState_GuideExitAnimeEndCheck() {
631 if (mBeginGuide) {
632 mLayout.AnimeEndSetup(ANIM_OUT_UNDER);
633 mLayout.AnimeEndSetup(ANIM_OUT_ZANKI);
634 mStateMgrGuide.changeState(StateID_GuideOnStageAnimeEndCheck);
635 } else {
636 if (mLayout.isAnime(ANIM_OUT_UNDER) || mLayout.isAnime(ANIM_OUT_ZANKI)) {
637 return;
638 }
639 mGuideRelated = false;
640 mStateMgrGuide.changeState(StateID_GuideOnStageWait);
641 }
642}
643void dCourseSelectGuide_c::finalizeState_GuideExitAnimeEndCheck() {}
644
645void dCourseSelectGuide_c::initializeState_UpOnStageWait() {}
646void dCourseSelectGuide_c::executeState_UpOnStageWait() {
648 mStateMgrUp.changeState(StateID_UpOnStageAnimeEndCheck);
649 }
650}
651void dCourseSelectGuide_c::finalizeState_UpOnStageWait() {}
652
653void dCourseSelectGuide_c::initializeState_UpOnStageAnimeEndCheck() {
654 mUpAnim = true;
655 mLayout.AnimeStartSetup(ANIM_IN_ARROW_U, false);
656}
657void dCourseSelectGuide_c::executeState_UpOnStageAnimeEndCheck() {
658 if (!IsDirectionAllowed(DIR_UP) || mDisableArrows) {
659 mLayout.AnimeEndSetup(ANIM_IN_ARROW_U);
660 mStateMgrUp.changeState(StateID_UpExitAnimeEndCheck);
661 } else {
662 if (mLayout.isAnime(ANIM_IN_ARROW_U) || mLayout.isAnime(ANIM_IN_UNDER)) {
663 return;
664 }
665 mStateMgrUp.changeState(StateID_UpDisp);
666 }
667}
668void dCourseSelectGuide_c::finalizeState_UpOnStageAnimeEndCheck() {
669 mUpAnim = false;
670}
671
672void dCourseSelectGuide_c::initializeState_UpDisp() {
673 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_U);
674}
675void dCourseSelectGuide_c::executeState_UpDisp() {
676 if (!IsDirectionAllowed(DIR_UP) || mDisableArrows) {
677 mStateMgrUp.changeState(StateID_UpExitAnimeEndCheck);
678 }
679}
680void dCourseSelectGuide_c::finalizeState_UpDisp() {}
681
682void dCourseSelectGuide_c::initializeState_UpExitAnimeEndCheck() {
683 mUpAnim = true;
684 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_U);
685 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_U, false);
686}
687void dCourseSelectGuide_c::executeState_UpExitAnimeEndCheck() {
688 if (IsDirectionAllowed(DIR_UP)) {
689 mStateMgrUp.changeState(StateID_UpOnStageAnimeEndCheck);
690 } else if (!mLayout.isAnime(ANIM_OUT_ARROW_U)) {
691 mStateMgrUp.changeState(StateID_UpOnStageWait);
692 }
693}
694void dCourseSelectGuide_c::finalizeState_UpExitAnimeEndCheck() {
695 mUpAnim = false;
696}
697
698void dCourseSelectGuide_c::initializeState_DownOnStageWait() {}
699void dCourseSelectGuide_c::executeState_DownOnStageWait() {
700 if (!mDisableArrows && (IsDirectionAllowed(DIR_DOWN) || mEnableAllArrows)) {
701 mStateMgrDown.changeState(StateID_DownOnStageAnimeEndCheck);
702 }
703}
704void dCourseSelectGuide_c::finalizeState_DownOnStageWait() {}
705
706void dCourseSelectGuide_c::initializeState_DownOnStageAnimeEndCheck() {
707 mDownAnim = true;
708 mLayout.AnimeStartSetup(ANIM_IN_ARROW_D, false);
709}
710void dCourseSelectGuide_c::executeState_DownOnStageAnimeEndCheck() {
711 if (!IsDirectionAllowed(DIR_DOWN) || mDisableArrows) {
712 mLayout.AnimeEndSetup(ANIM_IN_ARROW_D);
713 mStateMgrDown.changeState(StateID_DownExitAnimeEndCheck);
714 } else if (!mLayout.isAnime(ANIM_IN_ARROW_D)) {
715 mStateMgrDown.changeState(StateID_DownDisp);
716 }
717}
718void dCourseSelectGuide_c::finalizeState_DownOnStageAnimeEndCheck() {
719 mDownAnim = false;
720}
721
722void dCourseSelectGuide_c::initializeState_DownDisp() {
723 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_D);
724}
725void dCourseSelectGuide_c::executeState_DownDisp() {
726 if (!IsDirectionAllowed(DIR_DOWN) || mDisableArrows) {
727 mStateMgrDown.changeState(StateID_DownExitAnimeEndCheck);
728 }
729}
730void dCourseSelectGuide_c::finalizeState_DownDisp() {}
731
732void dCourseSelectGuide_c::initializeState_DownExitAnimeEndCheck() {
733 mDownAnim = true;
734 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_D);
735 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_D, false);
736}
737void dCourseSelectGuide_c::executeState_DownExitAnimeEndCheck() {
738 if (IsDirectionAllowed(DIR_DOWN)) {
739 mStateMgrDown.changeState(StateID_DownOnStageAnimeEndCheck);
740 } else if (!mLayout.isAnime(ANIM_OUT_ARROW_D)) {
741 mStateMgrDown.changeState(StateID_DownOnStageWait);
742 }
743}
744void dCourseSelectGuide_c::finalizeState_DownExitAnimeEndCheck() {
745 mDownAnim = false;
746}
747
748void dCourseSelectGuide_c::initializeState_LeftOnStageWait() {}
749void dCourseSelectGuide_c::executeState_LeftOnStageWait() {
750 if (!mDisableArrows && (IsDirectionAllowed(DIR_LEFT) || mEnableAllArrows)) {
751 mStateMgrLeft.changeState(StateID_LeftOnStageAnimeEndCheck);
752 }
753}
754void dCourseSelectGuide_c::finalizeState_LeftOnStageWait() {}
755
756void dCourseSelectGuide_c::initializeState_LeftOnStageAnimeEndCheck() {
757 mLeftAnim = true;
758 mLayout.AnimeStartSetup(ANIM_IN_ARROW_L, false);
759}
760void dCourseSelectGuide_c::executeState_LeftOnStageAnimeEndCheck() {
761 if (!IsDirectionAllowed(DIR_LEFT) || mDisableArrows) {
762 mLayout.AnimeEndSetup(ANIM_IN_ARROW_L);
763 mStateMgrLeft.changeState(StateID_LeftExitAnimeEndCheck);
764 } else if (!mLayout.isAnime(ANIM_IN_ARROW_L)) {
765 mStateMgrLeft.changeState(StateID_LeftDisp);
766 }
767}
768void dCourseSelectGuide_c::finalizeState_LeftOnStageAnimeEndCheck() {
769 mLeftAnim = false;
770}
771
772void dCourseSelectGuide_c::initializeState_LeftDisp() {
773 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_L);
774}
775void dCourseSelectGuide_c::executeState_LeftDisp() {
776 if (!IsDirectionAllowed(DIR_LEFT) || mDisableArrows) {
777 mStateMgrLeft.changeState(StateID_LeftExitAnimeEndCheck);
778 }
779}
780void dCourseSelectGuide_c::finalizeState_LeftDisp() {}
781
782void dCourseSelectGuide_c::initializeState_LeftExitAnimeEndCheck() {
783 mLeftAnim = true;
784 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_L);
785 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_L, false);
786}
787void dCourseSelectGuide_c::executeState_LeftExitAnimeEndCheck() {
788 if (IsDirectionAllowed(DIR_LEFT)) {
789 mStateMgrLeft.changeState(StateID_LeftOnStageAnimeEndCheck);
790 } else if (!mLayout.isAnime(ANIM_OUT_ARROW_L)) {
791 mStateMgrLeft.changeState(StateID_LeftOnStageWait);
792 }
793}
794void dCourseSelectGuide_c::finalizeState_LeftExitAnimeEndCheck() {
795 mLeftAnim = false;
796}
797
798void dCourseSelectGuide_c::initializeState_RightOnStageWait() {}
799void dCourseSelectGuide_c::executeState_RightOnStageWait() {
800 if (!mDisableArrows && (IsDirectionAllowed(DIR_RIGHT) || mEnableAllArrows)) {
801 mStateMgrRight.changeState(StateID_RightOnStageAnimeEndCheck);
802 }
803}
804void dCourseSelectGuide_c::finalizeState_RightOnStageWait() {}
805
806void dCourseSelectGuide_c::initializeState_RightOnStageAnimeEndCheck() {
807 mRightAnim = true;
808 mLayout.AnimeStartSetup(ANIM_IN_ARROW_R, false);
809}
810void dCourseSelectGuide_c::executeState_RightOnStageAnimeEndCheck() {
811 if (!IsDirectionAllowed(DIR_RIGHT) || mDisableArrows) {
812 mLayout.AnimeEndSetup(ANIM_IN_ARROW_R);
813 mStateMgrRight.changeState(StateID_RightExitAnimeEndCheck);
814 } else if (!mLayout.isAnime(ANIM_IN_ARROW_R)) {
815 mStateMgrRight.changeState(StateID_RightDisp);
816 }
817}
818void dCourseSelectGuide_c::finalizeState_RightOnStageAnimeEndCheck() {
819 mRightAnim = false;
820}
821
822void dCourseSelectGuide_c::initializeState_RightDisp() {
823 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_R);
824}
825void dCourseSelectGuide_c::executeState_RightDisp() {
826 if (!IsDirectionAllowed(DIR_RIGHT) || mDisableArrows) {
827 mStateMgrRight.changeState(StateID_RightExitAnimeEndCheck);
828 }
829}
830void dCourseSelectGuide_c::finalizeState_RightDisp() {}
831
832void dCourseSelectGuide_c::initializeState_RightExitAnimeEndCheck() {
833 mRightAnim = true;
834 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_R);
835 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_R, false);
836}
837void dCourseSelectGuide_c::executeState_RightExitAnimeEndCheck() {
838 if (IsDirectionAllowed(DIR_RIGHT)) {
839 mStateMgrRight.changeState(StateID_RightOnStageAnimeEndCheck);
840 } else if (!mLayout.isAnime(ANIM_OUT_ARROW_R)) {
841 mStateMgrRight.changeState(StateID_RightOnStageWait);
842 }
843}
844void dCourseSelectGuide_c::finalizeState_RightExitAnimeEndCheck() {
845 mRightAnim = false;
846}
847
848void dCourseSelectGuide_c::initializeState_ShadowOnStageWait() {}
849void dCourseSelectGuide_c::executeState_ShadowOnStageWait() {
850 if (mShowShadow) {
851 mStateMgrShadow.changeState(StateID_ShadowOnStageAnimeEndCheck);
852 }
853}
854void dCourseSelectGuide_c::finalizeState_ShadowOnStageWait() {
855 mShowShadow = false;
856}
857
858void dCourseSelectGuide_c::initializeState_ShadowOnStageAnimeEndCheck() {
859 mLayout.AnimeStartSetup(ANIM_IN_SHADOW, false);
860}
861void dCourseSelectGuide_c::executeState_ShadowOnStageAnimeEndCheck() {
862 if (!mLayout.isAnime(-1)) {
863 mStateMgrShadow.changeState(StateID_ShadowDisp);
864 }
865}
866void dCourseSelectGuide_c::finalizeState_ShadowOnStageAnimeEndCheck() {}
867
868void dCourseSelectGuide_c::initializeState_ShadowDisp() {}
869void dCourseSelectGuide_c::executeState_ShadowDisp() {
870 if (mHideShadow) {
871 mStateMgrShadow.changeState(StateID_ShadowExitAnimeEndCheck);
872 }
873}
874void dCourseSelectGuide_c::finalizeState_ShadowDisp() {
875 mHideShadow = false;
876}
877
878void dCourseSelectGuide_c::initializeState_ShadowExitAnimeEndCheck() {
879 mLayout.AnimeStartSetup(ANIM_OUT_SHADOW, false);
880}
881void dCourseSelectGuide_c::executeState_ShadowExitAnimeEndCheck() {
882 if (!mLayout.isAnime(-1)) {
883 mStateMgrShadow.changeState(StateID_ShadowOnStageWait);
884 }
885}
886void dCourseSelectGuide_c::finalizeState_ShadowExitAnimeEndCheck() {}
887
888void dCourseSelectGuide_c::initializeState_ScrollGuideOnStageWait() {
889 mScrollGuideRelated = false;
890}
891void dCourseSelectGuide_c::executeState_ScrollGuideOnStageWait() {
893 mEndScrollGuide = false;
894 mScrollGuideRelated = false;
895 mGuideRelated = false;
896 mInMapView = false;
897#if (defined(VERSION_K) || defined(VERSION_W))
898 // Don't transition to the next state until the animation is finished.
899 // Otherwise, the "View Map" text would change to "Back to Mario" too early.
900 } else if (mShowScrollGuide && !mLayout.isAnime(ANIM_OUT_UNDER)) {
901#else
902 } else if (mShowScrollGuide) {
903#endif
904 mStateMgrScrollGuide.changeState(StateID_ScrollGuideOnStageAnimeEndCheck);
905 }
906}
907void dCourseSelectGuide_c::finalizeState_ScrollGuideOnStageWait() {
908 mShowScrollGuide = false;
909}
910
911void dCourseSelectGuide_c::initializeState_ScrollGuideOnStageAnimeEndCheck() {
913 mInMapView = true;
914 mpNullPanes[N_guideViewC_00]->SetVisible(false);
915 mpNullPanes[N_guideViewR_01]->SetVisible(false);
916 mpNullPanes[N_left_00]->SetVisible(false);
917 mLayout.AnimeStartSetup(ANIM_IN_UNDER, false);
918 mScrollGuideRelated = true;
919}
920void dCourseSelectGuide_c::executeState_ScrollGuideOnStageAnimeEndCheck() {
921 if (mEndScrollGuide) {
922 mLayout.AnimeEndSetup(ANIM_IN_UNDER);
923 mStateMgrScrollGuide.changeState(StateID_ScrollGuideExitAnimeEndCheck);
924 } else if (!mLayout.isAnime(-1)) {
925 // [Bug: The above should probably be !mLayout.isAnime(ANIM_IN_UNDER).
926 // But since ScrollGuideDisp doesn't really do anything, no difference is visible.]
927 mStateMgrScrollGuide.changeState(StateID_ScrollGuideDisp);
928 }
929}
930void dCourseSelectGuide_c::finalizeState_ScrollGuideOnStageAnimeEndCheck() {}
931
932void dCourseSelectGuide_c::initializeState_ScrollGuideDisp() {
933 mLayout.LoopAnimeStartSetup(ANIM_LOOP_UNDER);
934}
935void dCourseSelectGuide_c::executeState_ScrollGuideDisp() {
936 if (mEndScrollGuide) {
937 mStateMgrScrollGuide.changeState(StateID_ScrollGuideExitAnimeEndCheck);
938 }
939}
940void dCourseSelectGuide_c::finalizeState_ScrollGuideDisp() {}
941
942void dCourseSelectGuide_c::initializeState_ScrollGuideExitAnimeEndCheck() {
943 mEndScrollGuide = false;
944 mLayout.AnimeEndSetup(ANIM_LOOP_UNDER);
945 mLayout.AnimeStartSetup(ANIM_OUT_UNDER, false);
946}
947void dCourseSelectGuide_c::executeState_ScrollGuideExitAnimeEndCheck() {
948 if (!mLayout.isAnime(-1)) {
949 mStateMgrScrollGuide.changeState(StateID_ScrollGuideOnStageWait);
950 }
951}
952void dCourseSelectGuide_c::finalizeState_ScrollGuideExitAnimeEndCheck() {
954 mScrollGuideRelated = false;
955 mpNullPanes[N_guideViewC_00]->SetVisible(true);
956 mpNullPanes[N_guideViewR_01]->SetVisible(true);
957 mpNullPanes[N_left_00]->SetVisible(true);
958 mInMapView = false;
959}
960
961void dCourseSelectGuide_c::UpdateGuide(short courseNo, dWmLib::PointType_e type) {
962 if (mCourseNo == courseNo) {
963 return;
964 }
965 mCourseType = dWmLib::GetCourseTypeFromCourseNo(courseNo);
966 mCourseNo = courseNo;
967 CourseSelectSet(type);
968 if (type != dWmLib::POINT_TYPE_PATH) {
970 }
971 dInfo_c *info = dInfo_c::m_instance;
972 dCyuukan_c *checkpoint = &info->mCyuukan;
973 u8 wNo = mWorldNo;
974 u8 cNo = courseNo;
975 mpPicturePanes[P_flagSkull_00]->SetVisible(false);
976 for (int i = 0; i < CHECKPOINT_COUNT; i++) {
977 if (checkpoint->isCyuukanStart(i, wNo, cNo)) {
978 mpPicturePanes[P_flagSkull_00]->SetVisible(true);
979 break;
980 }
981 }
982}
983
985 Remocon::EXTENSION_TYPE_e attachedExtension = dGameKey_c::m_instance->mRemocon[0]->mAttachedExtension;
986 if (attachedExtension != mExtension) {
987 mExtension = attachedExtension;
988
989 MsgRes_c *msgRes = dMessage_c::getMesRes();
990 bool attached = true;
991 if (attachedExtension == Remocon::EXTENSION_NONE) {
992 attached = false;
993 }
994 dInfo_c::m_instance->mExtensionAttached = attached;
995 if (mInMapView) {
996 mpTextBoxes[T_guideViewLS_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_BACK_TO_MARIO, 0);
997 } else {
998 mpTextBoxes[T_guideViewLS_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_VIEW_MAP, 0);
999 }
1000 mpTextBoxes[T_guideViewL_01]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_ITEMS, 0);
1001 }
1002}
A text box class with BMG message support.
@ 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:9
A three-dimensional floating point vector.
Definition m_vec.hpp:100
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
Stores clipping settings for a layout.
Definition multi.hpp:11