Added ability to exit course, exiting out of the painting
This commit is contained in:
parent
29a7a1d1c4
commit
414e96cebc
|
@ -2493,6 +2493,9 @@ void render_pause_camera_options(s16 x, s16 y, s8 *index, s16 xIndex) {
|
|||
#endif
|
||||
|
||||
void render_pause_course_options(s16 x, s16 y, s8 *index, s16 yIndex) {
|
||||
u8 TEXT_EXIT_TO_CASTLE[15] = { DIALOG_CHAR_TERMINATOR };
|
||||
str_ascii_to_dialog("EXIT TO CASTLE", TEXT_EXIT_TO_CASTLE, 15);
|
||||
|
||||
#ifdef VERSION_EU
|
||||
u8 textContinue[][10] = {
|
||||
{ TEXT_CONTINUE },
|
||||
|
@ -2519,16 +2522,17 @@ void render_pause_course_options(s16 x, s16 y, s8 *index, s16 yIndex) {
|
|||
u8 textCameraAngleR[] = { TEXT_CAMERA_ANGLE_R };
|
||||
#endif
|
||||
|
||||
handle_menu_scrolling(MENU_SCROLL_VERTICAL, index, 1, 3);
|
||||
handle_menu_scrolling(MENU_SCROLL_VERTICAL, index, 1, 4);
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
|
||||
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha);
|
||||
|
||||
print_generic_string(x + 10, y - 2, textContinue);
|
||||
print_generic_string(x + 10, y - 17, textExitCourse);
|
||||
print_generic_string(x + 10, y - 32, TEXT_EXIT_TO_CASTLE);
|
||||
|
||||
if (index[0] != 3) {
|
||||
print_generic_string(x + 10, y - 33, textCameraAngleR);
|
||||
if (index[0] != 4) {
|
||||
print_generic_string(x + 10, y - 47, textCameraAngleR);
|
||||
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
|
||||
|
||||
create_dl_translation_matrix(MENU_MTX_PUSH, x - X_VAL8, (y - ((index[0] - 1) * yIndex)) - Y_VAL8, 0);
|
||||
|
@ -2537,7 +2541,7 @@ void render_pause_course_options(s16 x, s16 y, s8 *index, s16 yIndex) {
|
|||
gSPDisplayList(gDisplayListHead++, dl_draw_triangle);
|
||||
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
|
||||
} else {
|
||||
render_pause_camera_options(x - 42, y - 42, &gDialogCameraAngleIndex, 110);
|
||||
render_pause_camera_options(x - 42, y - 57, &gDialogCameraAngleIndex, 110);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2775,7 +2779,7 @@ s16 render_pause_courses_and_castle(void) {
|
|||
gDialogBoxState = DIALOG_STATE_OPENING;
|
||||
gMenuMode = -1;
|
||||
|
||||
if (gDialogLineNum == 2) {
|
||||
if (gDialogLineNum == 2 || gDialogLineNum == 3) {
|
||||
num = gDialogLineNum;
|
||||
} else {
|
||||
num = 1;
|
||||
|
|
|
@ -826,6 +826,15 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) {
|
|||
play_sound(SOUND_MENU_BOWSER_LAUGH, gDefaultSoundArgs);
|
||||
break;
|
||||
|
||||
case WARP_OP_EXIT:
|
||||
sSourceWarpNodeId = WARP_NODE_WARP_FLOOR;
|
||||
if (area_get_warp_node(sSourceWarpNodeId) == NULL) {
|
||||
sSourceWarpNodeId = WARP_NODE_DEATH;
|
||||
}
|
||||
sDelayedWarpTimer = 20;
|
||||
play_transition(WARP_TRANSITION_FADE_INTO_CIRCLE, 0x14, 0x00, 0x00, 0x00);
|
||||
break;
|
||||
|
||||
case WARP_OP_WARP_FLOOR:
|
||||
sSourceWarpNodeId = WARP_NODE_WARP_FLOOR;
|
||||
if (area_get_warp_node(sSourceWarpNodeId) == NULL) {
|
||||
|
@ -1127,6 +1136,9 @@ s32 play_mode_paused(void) {
|
|||
gCameraMovementFlags &= ~CAM_MOVE_PAUSE_SCREEN;
|
||||
set_play_mode(PLAY_MODE_NORMAL);
|
||||
} else if (gPauseScreenMode == 2) {
|
||||
level_trigger_warp(&gMarioStates[0], WARP_OP_EXIT);
|
||||
set_play_mode(PLAY_MODE_NORMAL);
|
||||
} else if (gPauseScreenMode == 3) {
|
||||
// Exit level
|
||||
if (gDebugLevelSelect) {
|
||||
fade_into_special_warp(-9, 1);
|
||||
|
@ -1136,12 +1148,12 @@ s32 play_mode_paused(void) {
|
|||
gSavedCourseNum = COURSE_NONE;
|
||||
}
|
||||
set_play_mode(PLAY_MODE_CHANGE_LEVEL);
|
||||
} else if (gPauseScreenMode == 3) {
|
||||
// We should only be getting "int 3" to here
|
||||
} /* else if (gPauseScreenMode == 4) {
|
||||
// We should only be getting "int 4" to here
|
||||
initiate_warp(LEVEL_CASTLE, 1, 0x1F, 0);
|
||||
fade_into_special_warp(0, 0);
|
||||
game_exit();
|
||||
}
|
||||
}*/
|
||||
|
||||
gCameraMovementFlags &= ~CAM_MOVE_PAUSE_SCREEN;
|
||||
return 0;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#define WARP_OP_CREDITS_NEXT 0x18
|
||||
#define WARP_OP_DEMO_END 0x19
|
||||
#define WARP_OP_FORCE_SYNC 0x20
|
||||
#define WARP_OP_EXIT 0x21
|
||||
|
||||
#define WARP_OP_TRIGGERS_LEVEL_SELECT 0x10
|
||||
|
||||
|
|
Loading…
Reference in New Issue