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>
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"
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",
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,
107 static const char *NPANE_NAME_DT[N_COUNT] = {
108 "N_IconPos1P_00",
"N_IconPos2P_00",
"N_IconPos3P_00",
"N_IconPos4P_00",
110 "N_proportionL_00",
"N_proportionR_00",
"N_proportionC_00",
111 "N_guideViewC_00",
"N_guideViewR_01",
115 static const char *T_PANE_NAME_TBL[T_COUNT] = {
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"
122 static const char *T_PANE_FIXED_NAME_TBL[T_FIXED_COUNT] = {
128 static const int MESSAGE_DATA_TBL[T_FIXED_COUNT] = {
134 static const char *P_PANE_NAME_TBL[P_COUNT] = {
152 if (!
mLayout.ReadResource(
"corseSelectUIGuide/corseSelectUIGuide.arc",
false)) {
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);
161 mLayout.TPaneNameRegister(T_PANE_FIXED_NAME_TBL, MESSAGE_DATA_TBL, BMG_CATEGORY_COURSE_SELECT_GUIDE, T_FIXED_COUNT);
164 mLayout.mDrawOrder = m2d::DRAW_ORDER_COURSE_SELECT_GUIDE;
169 for (
int i = 0; i < ARRAY_SIZE(
mRest); i++) {
222 mLayout.ReverseAnimeStartSetup(ANIM_OUT_UNDER,
false);
223 mLayout.ReverseAnimeStartSetup(ANIM_OUT_ZANKI,
false);
224 mLayout.ReverseAnimeStartSetup(ANIM_OUT_COURSE_INFO,
false);
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);
236 dGameCom::DispSizeScale(scale);
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;
259 mLayout.mScissorMask = scissorMask;
263 static const int picPaneNums[PLAYER_COUNT] = { P_marioFace_00, P_luigiFace_00, P_BkinoFace_00, P_YkinoFace_00 };
265 for (
int i = 0; i < PLAYER_COUNT; i++) {
269 int currPane = N_IconPos1P_00;
270 int playerCount = -1;
271 for (
int i = 0; i < PLAYER_COUNT; i++) {
274 if (dGameCom::PlayerEnterCheck(playerIndex)) {
284 for (
int i = 0; i < PLAYER_COUNT; i++) {
285 mpNullPanes[N_IconPos1P_00 + i]->SetVisible(
false);
287 mpNullPanes[N_IconPos1P_00 + playerCount]->SetVisible(
true);
291 static const int textBoxIdxs[PLAYER_COUNT] = { T_lifeNumber_00, T_lifeNumber_01, T_lifeNumber_03, T_lifeNumber_02 };
293 for (
int i = 0; i < PLAYER_COUNT; i++) {
296 int rest = daPyMng_c::getRest(playerType);
297 if (
mRest[i] != rest) {
299 int textIdx = textBoxIdxs[i];
301 dGameCom::LayoutDispNumber(rest, dGameDisplay_c::c_PLAYNUM_DIGIT, textBox,
true);
324 for (
int i = 0; i < PLAYER_COUNT; i++) {
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)
380 static const int sc_startPointIcons[WORLD_USED_COUNT] = {
381 MSG_CS_ICON_START_RIGHT,
382 MSG_CS_ICON_START_UP,
383 MSG_CS_ICON_START_RIGHT,
384 MSG_CS_ICON_START_UP,
385 MSG_CS_ICON_START_RIGHT,
386 MSG_CS_ICON_START_UP,
387 MSG_CS_ICON_START_RIGHT,
388 MSG_CS_ICON_START_UP,
389 MSG_CS_ICON_START_UP,
391 dInfo_c *info = dInfo_c::m_instance;
392 MsgRes_c *msgRes = dMessage_c::getMesRes();
395 if (type == dWmLib::POINT_TYPE_PATH) {
398 }
else if (type == dWmLib::POINT_TYPE_REGULAR_COURSE || type == dWmLib::POINT_TYPE_OTHER) {
400 }
else if (type == dWmLib::POINT_TYPE_START_NODE) {
405 info->mDisplayCourseWorld = actualWNo;
406 mpTextBoxes[T_worldNum_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_CURR_WORLD, 0);
411 info->mDisplayCourseNum = actualLevelNo;
412 mpTextBoxes[T_cSelect_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_COURSE_NUM, 0);
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:
420 messageID = MSG_CS_ICON_CASTLE;
422 messageID = MSG_CS_ICON_W8_CASTLE;
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;
431 messageID = MSG_CS_ICON_KINOKO_HOUSE_RED;
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;
440 messageID = MSG_CS_ICON_AIRSHIP;
443 case dWmLib::COURSE_TYPE_PEACH_CASTLE:
445 messageID = MSG_CS_ICON_PEACH_CASTLE;
447 case dWmLib::COURSE_TYPE_INVALID:
449 messageID = sc_startPointIcons[
mWorldNo];
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;
457 messageID = MSG_CS_ICON_KINOKO_HOUSE_1UP;
461 mpTextBoxes[T_cSelect_pic]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, messageID, 0);
467 dMj2dGame_c *saveGame = dSaveMng_c::m_instance->getSaveGame(-1);
468 dCyuukan_c *checkpoint = dInfo_c::m_instance->getCyuukan();
477 if (collectCoin != 0) {
482 && checkpoint->mCoinCollection[i] != 4
495 static const u8 flags[] = {
504void dCourseSelectGuide_c::initializeState_WorldCourseOnStageWait() {}
505void dCourseSelectGuide_c::executeState_WorldCourseOnStageWait() {
520void dCourseSelectGuide_c::finalizeState_WorldCourseOnStageWait() {}
522void dCourseSelectGuide_c::initializeState_WorldCourseOnStageAnimeEndCheck() {
527void dCourseSelectGuide_c::executeState_WorldCourseOnStageAnimeEndCheck() {
529 mLayout.AnimeEndSetup(ANIM_IN_COURSE_INFO);
531 }
else if (!
mLayout.isAnime(ANIM_IN_COURSE_INFO)) {
535void dCourseSelectGuide_c::finalizeState_WorldCourseOnStageAnimeEndCheck() {
539void dCourseSelectGuide_c::initializeState_WorldCourseDisp() {
540 mLayout.LoopAnimeStartSetup(ANIM_LOOP_COURSE_INFO);
542void dCourseSelectGuide_c::executeState_WorldCourseDisp() {
551void dCourseSelectGuide_c::finalizeState_WorldCourseDisp() {}
553void dCourseSelectGuide_c::initializeState_WorldCourseExitAnimeEndCheck() {
556 mLayout.AnimeEndSetup(ANIM_LOOP_COURSE_INFO);
557 mLayout.AnimeStartSetup(ANIM_OUT_COURSE_INFO,
false);
559void dCourseSelectGuide_c::executeState_WorldCourseExitAnimeEndCheck() {
561 mLayout.AnimeEndSetup(ANIM_OUT_COURSE_INFO);
563 }
else if (!
mLayout.isAnime(ANIM_OUT_COURSE_INFO)) {
568void dCourseSelectGuide_c::finalizeState_WorldCourseExitAnimeEndCheck() {
572void dCourseSelectGuide_c::initializeState_GuideOnStageWait() {}
573void dCourseSelectGuide_c::executeState_GuideOnStageWait() {
588void dCourseSelectGuide_c::finalizeState_GuideOnStageWait() {
592void dCourseSelectGuide_c::initializeState_GuideOnStageAnimeEndCheck() {
597void dCourseSelectGuide_c::executeState_GuideOnStageAnimeEndCheck() {
599 mLayout.AnimeEndSetup(ANIM_IN_UNDER);
600 mLayout.AnimeEndSetup(ANIM_IN_ZANKI);
603 if (
mLayout.isAnime(ANIM_IN_UNDER) ||
mLayout.isAnime(ANIM_IN_ZANKI)) {
609void dCourseSelectGuide_c::finalizeState_GuideOnStageAnimeEndCheck() {}
611void dCourseSelectGuide_c::initializeState_GuideDisp() {
612 mLayout.LoopAnimeStartSetup(ANIM_LOOP_UNDER);
613 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ZANKI);
615void dCourseSelectGuide_c::executeState_GuideDisp() {
623void dCourseSelectGuide_c::finalizeState_GuideDisp() {}
625void dCourseSelectGuide_c::initializeState_GuideExitAnimeEndCheck() {
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);
632void dCourseSelectGuide_c::executeState_GuideExitAnimeEndCheck() {
634 mLayout.AnimeEndSetup(ANIM_OUT_UNDER);
635 mLayout.AnimeEndSetup(ANIM_OUT_ZANKI);
638 if (
mLayout.isAnime(ANIM_OUT_UNDER) ||
mLayout.isAnime(ANIM_OUT_ZANKI)) {
645void dCourseSelectGuide_c::finalizeState_GuideExitAnimeEndCheck() {}
647void dCourseSelectGuide_c::initializeState_UpOnStageWait() {}
648void dCourseSelectGuide_c::executeState_UpOnStageWait() {
650 mStateMgrUp.changeState(StateID_UpOnStageAnimeEndCheck);
653void dCourseSelectGuide_c::finalizeState_UpOnStageWait() {}
655void dCourseSelectGuide_c::initializeState_UpOnStageAnimeEndCheck() {
657 mLayout.AnimeStartSetup(ANIM_IN_ARROW_U,
false);
659void dCourseSelectGuide_c::executeState_UpOnStageAnimeEndCheck() {
661 mLayout.AnimeEndSetup(ANIM_IN_ARROW_U);
662 mStateMgrUp.changeState(StateID_UpExitAnimeEndCheck);
664 if (
mLayout.isAnime(ANIM_IN_ARROW_U) ||
mLayout.isAnime(ANIM_IN_UNDER)) {
670void dCourseSelectGuide_c::finalizeState_UpOnStageAnimeEndCheck() {
674void dCourseSelectGuide_c::initializeState_UpDisp() {
675 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_U);
677void dCourseSelectGuide_c::executeState_UpDisp() {
679 mStateMgrUp.changeState(StateID_UpExitAnimeEndCheck);
682void dCourseSelectGuide_c::finalizeState_UpDisp() {}
684void dCourseSelectGuide_c::initializeState_UpExitAnimeEndCheck() {
686 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_U);
687 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_U,
false);
689void dCourseSelectGuide_c::executeState_UpExitAnimeEndCheck() {
691 mStateMgrUp.changeState(StateID_UpOnStageAnimeEndCheck);
692 }
else if (!
mLayout.isAnime(ANIM_OUT_ARROW_U)) {
696void dCourseSelectGuide_c::finalizeState_UpExitAnimeEndCheck() {
700void dCourseSelectGuide_c::initializeState_DownOnStageWait() {}
701void dCourseSelectGuide_c::executeState_DownOnStageWait() {
706void dCourseSelectGuide_c::finalizeState_DownOnStageWait() {}
708void dCourseSelectGuide_c::initializeState_DownOnStageAnimeEndCheck() {
710 mLayout.AnimeStartSetup(ANIM_IN_ARROW_D,
false);
712void dCourseSelectGuide_c::executeState_DownOnStageAnimeEndCheck() {
714 mLayout.AnimeEndSetup(ANIM_IN_ARROW_D);
716 }
else if (!
mLayout.isAnime(ANIM_IN_ARROW_D)) {
720void dCourseSelectGuide_c::finalizeState_DownOnStageAnimeEndCheck() {
724void dCourseSelectGuide_c::initializeState_DownDisp() {
725 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_D);
727void dCourseSelectGuide_c::executeState_DownDisp() {
732void dCourseSelectGuide_c::finalizeState_DownDisp() {}
734void dCourseSelectGuide_c::initializeState_DownExitAnimeEndCheck() {
736 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_D);
737 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_D,
false);
739void dCourseSelectGuide_c::executeState_DownExitAnimeEndCheck() {
742 }
else if (!
mLayout.isAnime(ANIM_OUT_ARROW_D)) {
746void dCourseSelectGuide_c::finalizeState_DownExitAnimeEndCheck() {
750void dCourseSelectGuide_c::initializeState_LeftOnStageWait() {}
751void dCourseSelectGuide_c::executeState_LeftOnStageWait() {
756void dCourseSelectGuide_c::finalizeState_LeftOnStageWait() {}
758void dCourseSelectGuide_c::initializeState_LeftOnStageAnimeEndCheck() {
760 mLayout.AnimeStartSetup(ANIM_IN_ARROW_L,
false);
762void dCourseSelectGuide_c::executeState_LeftOnStageAnimeEndCheck() {
764 mLayout.AnimeEndSetup(ANIM_IN_ARROW_L);
766 }
else if (!
mLayout.isAnime(ANIM_IN_ARROW_L)) {
770void dCourseSelectGuide_c::finalizeState_LeftOnStageAnimeEndCheck() {
774void dCourseSelectGuide_c::initializeState_LeftDisp() {
775 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_L);
777void dCourseSelectGuide_c::executeState_LeftDisp() {
782void dCourseSelectGuide_c::finalizeState_LeftDisp() {}
784void dCourseSelectGuide_c::initializeState_LeftExitAnimeEndCheck() {
786 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_L);
787 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_L,
false);
789void dCourseSelectGuide_c::executeState_LeftExitAnimeEndCheck() {
792 }
else if (!
mLayout.isAnime(ANIM_OUT_ARROW_L)) {
796void dCourseSelectGuide_c::finalizeState_LeftExitAnimeEndCheck() {
800void dCourseSelectGuide_c::initializeState_RightOnStageWait() {}
801void dCourseSelectGuide_c::executeState_RightOnStageWait() {
806void dCourseSelectGuide_c::finalizeState_RightOnStageWait() {}
808void dCourseSelectGuide_c::initializeState_RightOnStageAnimeEndCheck() {
810 mLayout.AnimeStartSetup(ANIM_IN_ARROW_R,
false);
812void dCourseSelectGuide_c::executeState_RightOnStageAnimeEndCheck() {
814 mLayout.AnimeEndSetup(ANIM_IN_ARROW_R);
816 }
else if (!
mLayout.isAnime(ANIM_IN_ARROW_R)) {
820void dCourseSelectGuide_c::finalizeState_RightOnStageAnimeEndCheck() {
824void dCourseSelectGuide_c::initializeState_RightDisp() {
825 mLayout.LoopAnimeStartSetup(ANIM_LOOP_ARROW_R);
827void dCourseSelectGuide_c::executeState_RightDisp() {
832void dCourseSelectGuide_c::finalizeState_RightDisp() {}
834void dCourseSelectGuide_c::initializeState_RightExitAnimeEndCheck() {
836 mLayout.AnimeEndSetup(ANIM_LOOP_ARROW_R);
837 mLayout.AnimeStartSetup(ANIM_OUT_ARROW_R,
false);
839void dCourseSelectGuide_c::executeState_RightExitAnimeEndCheck() {
842 }
else if (!
mLayout.isAnime(ANIM_OUT_ARROW_R)) {
846void dCourseSelectGuide_c::finalizeState_RightExitAnimeEndCheck() {
850void dCourseSelectGuide_c::initializeState_ShadowOnStageWait() {}
851void dCourseSelectGuide_c::executeState_ShadowOnStageWait() {
856void dCourseSelectGuide_c::finalizeState_ShadowOnStageWait() {
860void dCourseSelectGuide_c::initializeState_ShadowOnStageAnimeEndCheck() {
861 mLayout.AnimeStartSetup(ANIM_IN_SHADOW,
false);
863void dCourseSelectGuide_c::executeState_ShadowOnStageAnimeEndCheck() {
868void dCourseSelectGuide_c::finalizeState_ShadowOnStageAnimeEndCheck() {}
870void dCourseSelectGuide_c::initializeState_ShadowDisp() {}
871void dCourseSelectGuide_c::executeState_ShadowDisp() {
876void dCourseSelectGuide_c::finalizeState_ShadowDisp() {
880void dCourseSelectGuide_c::initializeState_ShadowExitAnimeEndCheck() {
881 mLayout.AnimeStartSetup(ANIM_OUT_SHADOW,
false);
883void dCourseSelectGuide_c::executeState_ShadowExitAnimeEndCheck() {
888void dCourseSelectGuide_c::finalizeState_ShadowExitAnimeEndCheck() {}
890void dCourseSelectGuide_c::initializeState_ScrollGuideOnStageWait() {
893void dCourseSelectGuide_c::executeState_ScrollGuideOnStageWait() {
899#if (defined(VERSION_K) || defined(VERSION_W))
909void dCourseSelectGuide_c::finalizeState_ScrollGuideOnStageWait() {
913void dCourseSelectGuide_c::initializeState_ScrollGuideOnStageAnimeEndCheck() {
919 mLayout.AnimeStartSetup(ANIM_IN_UNDER,
false);
922void dCourseSelectGuide_c::executeState_ScrollGuideOnStageAnimeEndCheck() {
924 mLayout.AnimeEndSetup(ANIM_IN_UNDER);
926 }
else if (!
mLayout.isAnime(-1)) {
932void dCourseSelectGuide_c::finalizeState_ScrollGuideOnStageAnimeEndCheck() {}
934void dCourseSelectGuide_c::initializeState_ScrollGuideDisp() {
935 mLayout.LoopAnimeStartSetup(ANIM_LOOP_UNDER);
937void dCourseSelectGuide_c::executeState_ScrollGuideDisp() {
942void dCourseSelectGuide_c::finalizeState_ScrollGuideDisp() {}
944void dCourseSelectGuide_c::initializeState_ScrollGuideExitAnimeEndCheck() {
946 mLayout.AnimeEndSetup(ANIM_LOOP_UNDER);
947 mLayout.AnimeStartSetup(ANIM_OUT_UNDER,
false);
949void dCourseSelectGuide_c::executeState_ScrollGuideExitAnimeEndCheck() {
954void dCourseSelectGuide_c::finalizeState_ScrollGuideExitAnimeEndCheck() {
967 mCourseType = dWmLib::GetCourseTypeFromCourseNo(courseNo);
970 if (type != dWmLib::POINT_TYPE_PATH) {
973 dInfo_c *info = dInfo_c::m_instance;
979 if (checkpoint->isCyuukanStart(i, wNo, cNo)) {
991 MsgRes_c *msgRes = dMessage_c::getMesRes();
992 bool attached =
true;
996 dInfo_c::m_instance->mExtensionAttached = attached;
998 mpTextBoxes[T_guideViewLS_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_BACK_TO_MARIO, 0);
1000 mpTextBoxes[T_guideViewLS_00]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_VIEW_MAP, 0);
1002 mpTextBoxes[T_guideViewL_01]->setMessage(msgRes, BMG_CATEGORY_COURSE_SELECT_GUIDE, MSG_CS_ITEMS, 0);
A text box class with BMG message support.
@ EXTENSION_NONE
No Wii remote extension is connected.
@ 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.
A three-dimensional floating point vector.
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.
Stores clipping settings for a layout.