mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-13 14:20:59 +00:00
Make "Tutorial" warp directly to MAPZ0 (not configurable yet)
This commit is contained in:
parent
0b88c364bc
commit
51b8d6e01a
1 changed files with 18 additions and 1 deletions
19
src/m_menu.c
19
src/m_menu.c
|
@ -273,6 +273,7 @@ menu_t SP_MainDef, OP_MainDef;
|
||||||
menu_t MISC_ScrambleTeamDef, MISC_ChangeTeamDef;
|
menu_t MISC_ScrambleTeamDef, MISC_ChangeTeamDef;
|
||||||
|
|
||||||
// Single Player
|
// Single Player
|
||||||
|
static void M_StartTutorial(INT32 choice);
|
||||||
static void M_LoadGame(INT32 choice);
|
static void M_LoadGame(INT32 choice);
|
||||||
static void M_TimeAttackLevelSelect(INT32 choice);
|
static void M_TimeAttackLevelSelect(INT32 choice);
|
||||||
static void M_TimeAttack(INT32 choice);
|
static void M_TimeAttack(INT32 choice);
|
||||||
|
@ -731,7 +732,7 @@ static menuitem_t SR_EmblemHintMenu[] =
|
||||||
// Single Player Main
|
// Single Player Main
|
||||||
static menuitem_t SP_MainMenu[] =
|
static menuitem_t SP_MainMenu[] =
|
||||||
{
|
{
|
||||||
{IT_STRING, NULL, "Tutorial", NULL, 84},
|
{IT_STRING, NULL, "Tutorial", M_StartTutorial, 84},
|
||||||
{IT_CALL | IT_STRING, NULL, "Start Game", M_LoadGame, 92},
|
{IT_CALL | IT_STRING, NULL, "Start Game", M_LoadGame, 92},
|
||||||
{IT_SECRET, NULL, "Record Attack", M_TimeAttack, 100},
|
{IT_SECRET, NULL, "Record Attack", M_TimeAttack, 100},
|
||||||
{IT_SECRET, NULL, "NiGHTS Mode", M_NightsAttack, 108},
|
{IT_SECRET, NULL, "NiGHTS Mode", M_NightsAttack, 108},
|
||||||
|
@ -6131,6 +6132,22 @@ static void M_LoadGameLevelSelect(INT32 choice)
|
||||||
M_SetupNextMenu(&SP_LevelSelectDef);
|
M_SetupNextMenu(&SP_LevelSelectDef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INT32 tutorialmap = 1000; // MAPZ0, temporary value
|
||||||
|
|
||||||
|
// Starts up the tutorial immediately (tbh I wasn't sure where else to put this)
|
||||||
|
static void M_StartTutorial(INT32 choice)
|
||||||
|
{
|
||||||
|
(void)choice;
|
||||||
|
if (!tutorialmap)
|
||||||
|
return; // no map to go to, don't bother
|
||||||
|
|
||||||
|
emeralds = 0;
|
||||||
|
M_ClearMenus(true);
|
||||||
|
gamecomplete = false;
|
||||||
|
cursaveslot = 0;
|
||||||
|
G_DeferedInitNew(false, G_BuildMapName(tutorialmap), 0, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
// ==============
|
// ==============
|
||||||
// LOAD GAME MENU
|
// LOAD GAME MENU
|
||||||
// ==============
|
// ==============
|
||||||
|
|
Loading…
Reference in a new issue