Added "Tutorialmap" MainCfg option for SOC

This commit is contained in:
Monster Iestyn 2018-08-12 14:30:49 +01:00
parent 51b8d6e01a
commit 0da21244c0
4 changed files with 17 additions and 2 deletions

View file

@ -2863,6 +2863,19 @@ static void readmaincfg(MYFILE *f)
startchar = (INT16)value; startchar = (INT16)value;
char_on = -1; char_on = -1;
} }
else if (fastcmp(word, "TUTORIALMAP"))
{
// Support using the actual map name,
// i.e., Level AB, Level FZ, etc.
// Convert to map number
if (word2[0] >= 'A' && word2[0] <= 'Z')
value = M_MapNumber(word2[0], word2[1]);
else
value = get_number(word2);
tutorialmap = (INT16)value;
}
else else
deh_warning("Maincfg: unknown word '%s'", word); deh_warning("Maincfg: unknown word '%s'", word);
} }

View file

@ -132,6 +132,8 @@ extern INT16 titlemap;
extern boolean hidetitlepics; extern boolean hidetitlepics;
extern INT16 bootmap; //bootmap for loading a map on startup extern INT16 bootmap; //bootmap for loading a map on startup
extern INT16 tutorialmap; // map to load for tutorial
extern boolean looptitle; extern boolean looptitle;
// CTF colors. // CTF colors.

View file

@ -127,6 +127,8 @@ INT16 titlemap = 0;
boolean hidetitlepics = false; boolean hidetitlepics = false;
INT16 bootmap; //bootmap for loading a map on startup INT16 bootmap; //bootmap for loading a map on startup
INT16 tutorialmap = 0; // map to load for tutorial
boolean looptitle = false; boolean looptitle = false;
UINT8 skincolor_redteam = SKINCOLOR_RED; UINT8 skincolor_redteam = SKINCOLOR_RED;

View file

@ -6132,8 +6132,6 @@ 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) // Starts up the tutorial immediately (tbh I wasn't sure where else to put this)
static void M_StartTutorial(INT32 choice) static void M_StartTutorial(INT32 choice)
{ {