Add "tutorialmode" var to help the game know when we're in a tutorial or not, add placeholder for tutorial HUD to test it works

This commit is contained in:
Monster Iestyn 2018-09-04 16:58:49 +01:00
parent bcc9e58d0e
commit aba9bd13bb
6 changed files with 20 additions and 0 deletions

View file

@ -714,6 +714,9 @@ void D_StartTitle(void)
// reset modeattacking
modeattacking = ATTACKING_NONE;
// The title screen is obviously not a tutorial! (Unless I'm mistaken)
tutorialmode = false;
// empty maptol so mario/etc sounds don't play in sound test when they shouldn't
maptol = 0;

View file

@ -1815,6 +1815,8 @@ static void Command_Map_f(void)
else
fromlevelselect = ((netgame || multiplayer) && ((gametype == newgametype) && (newgametype == GT_COOP)));
tutorialmode = false; // warping takes us out of tutorial mode
D_MapChange(newmapnum, newgametype, false, newresetplayers, 0, false, fromlevelselect);
}

View file

@ -133,6 +133,7 @@ extern boolean hidetitlepics;
extern INT16 bootmap; //bootmap for loading a map on startup
extern INT16 tutorialmap; // map to load for tutorial
extern boolean tutorialmode; // are we in a tutorial right now?
extern boolean looptitle;

View file

@ -128,6 +128,7 @@ boolean hidetitlepics = false;
INT16 bootmap; //bootmap for loading a map on startup
INT16 tutorialmap = 0; // map to load for tutorial
boolean tutorialmode = false; // are we in a tutorial right now?
boolean looptitle = false;

View file

@ -6139,6 +6139,8 @@ static void M_StartTutorial(INT32 choice)
if (!tutorialmap)
return; // no map to go to, don't bother
tutorialmode = true; // turn on tutorial mode
emeralds = 0;
M_ClearMenus(true);
gamecomplete = false;

View file

@ -2465,6 +2465,13 @@ static void ST_overlayDrawer(void)
ST_drawDebugInfo();
}
static void ST_drawTutorial(void)
{
// Nothing, ...yet
// Except this for now, just to check it works
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, 0, "Tutorial placeholder");
}
void ST_Drawer(void)
{
#ifdef SEENAMES
@ -2538,4 +2545,8 @@ void ST_Drawer(void)
ST_overlayDrawer();
}
}
// Draw tutorial text over everything else
if (tutorialmode)
ST_drawTutorial();
}