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