mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-04 14:12:41 +00:00
GT_TUTORIAL
- Replaces `tutorialmode`.
- Forces gamespeed to Easy, with no POSITION.
- Laps are currently disabled as well, but this can be changed if necessary.
- Hides Free Play.
- Does not count as a played round (except for Chao Keys).
`tutorialmap` has also been removed. This will be replaced in a later commit with something that plays nicer with Ring Racers' existing systems.
This commit is contained in:
parent
a0cdc6b71a
commit
24d8b20124
10 changed files with 41 additions and 39 deletions
|
|
@ -1049,9 +1049,6 @@ void D_ClearState(void)
|
|||
if (rendermode != render_none)
|
||||
V_SetPaletteLump("PLAYPAL");
|
||||
|
||||
// The title screen is obviously not a tutorial! (Unless I'm mistaken)
|
||||
tutorialmode = false;
|
||||
|
||||
cursongcredit.def = NULL;
|
||||
S_StopSounds();
|
||||
|
||||
|
|
|
|||
|
|
@ -3016,8 +3016,6 @@ static void Command_Map_f(void)
|
|||
}
|
||||
}
|
||||
|
||||
tutorialmode = false; // warping takes us out of tutorial mode
|
||||
|
||||
D_MapChange(newmapnum, newgametype, newencoremode, newresetplayers, 0, false, fromlevelselect);
|
||||
|
||||
Z_Free(realmapname);
|
||||
|
|
|
|||
|
|
@ -3211,11 +3211,6 @@ void readmaincfg(MYFILE *f, boolean mainfile)
|
|||
bootmap = Z_StrDup(word2);
|
||||
//titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TUTORIALMAP"))
|
||||
{
|
||||
Z_Free(tutorialmap);
|
||||
tutorialmap = Z_StrDup(word2);
|
||||
}
|
||||
else if (fastcmp(word, "PODIUMMAP"))
|
||||
{
|
||||
Z_Free(podiummap);
|
||||
|
|
|
|||
|
|
@ -222,9 +222,6 @@ extern char * titlemap;
|
|||
extern boolean hidetitlepics;
|
||||
extern char * bootmap; //bootmap for loading a map on startup
|
||||
|
||||
extern char * tutorialmap; // map to load for tutorial
|
||||
extern boolean tutorialmode; // are we in a tutorial right now?
|
||||
|
||||
extern char * podiummap; // map to load for podium
|
||||
|
||||
extern boolean looptitle;
|
||||
|
|
@ -499,6 +496,7 @@ enum GameType
|
|||
GT_BATTLE,
|
||||
GT_SPECIAL,
|
||||
GT_VERSUS,
|
||||
GT_TUTORIAL,
|
||||
|
||||
GT_FIRSTFREESLOT,
|
||||
GT_LASTFREESLOT = 127, // Previously (GT_FIRSTFREESLOT + NUMGAMETYPEFREESLOTS - 1) - it would be necessary to rewrite VOTEMODIFIER_ENCORE to go higher than this.
|
||||
|
|
@ -578,10 +576,11 @@ enum GameTypeRules
|
|||
enum TypeOfLevel
|
||||
{
|
||||
// Gametypes
|
||||
TOL_RACE = 0x0001, ///< Race
|
||||
TOL_BATTLE = 0x0002, ///< Battle
|
||||
TOL_BOSS = 0x0004, ///< Boss (variant of battle, but forbidden)
|
||||
TOL_SPECIAL = 0x0008, ///< Special Stage (variant of race, but forbidden)
|
||||
TOL_RACE = 0x0001, ///< Race
|
||||
TOL_BATTLE = 0x0002, ///< Battle
|
||||
TOL_BOSS = 0x0004, ///< Boss (variant of battle, but forbidden)
|
||||
TOL_SPECIAL = 0x0008, ///< Special Stage (variant of race, but forbidden)
|
||||
TOL_TUTORIAL = 0x0010, ///< Tutorial (variant of race, but forbidden)
|
||||
|
||||
// Modifiers
|
||||
TOL_TV = 0x0100 ///< Midnight Channel specific: draw TV like overlay on HUD
|
||||
|
|
|
|||
|
|
@ -2826,7 +2826,7 @@ static boolean F_GetTextPromptTutorialTag(char *tag, INT32 length)
|
|||
INT32 gcs = 0;
|
||||
boolean suffixed = true;
|
||||
|
||||
if (!tag || !tag[0] || !tutorialmode)
|
||||
if (!tag || !tag[0] || gametype == GT_TUTORIAL)
|
||||
return false;
|
||||
|
||||
/*
|
||||
|
|
@ -2859,7 +2859,7 @@ static boolean F_GetTextPromptTutorialTag(char *tag, INT32 length)
|
|||
void F_GetPromptPageByNamedTag(const char *tag, INT32 *promptnum, INT32 *pagenum)
|
||||
{
|
||||
INT32 nosuffixpromptnum = INT32_MAX, nosuffixpagenum = INT32_MAX;
|
||||
INT32 tutorialpromptnum = (tutorialmode) ? TUTORIAL_PROMPT-1 : 0;
|
||||
INT32 tutorialpromptnum = (gametype == GT_TUTORIAL) ? TUTORIAL_PROMPT-1 : 0;
|
||||
boolean suffixed = false, found = false;
|
||||
char suffixedtag[33];
|
||||
|
||||
|
|
@ -2871,7 +2871,7 @@ void F_GetPromptPageByNamedTag(const char *tag, INT32 *promptnum, INT32 *pagenum
|
|||
strncpy(suffixedtag, tag, 33);
|
||||
suffixedtag[32] = 0;
|
||||
|
||||
if (tutorialmode)
|
||||
if (gametype == GT_TUTORIAL)
|
||||
suffixed = F_GetTextPromptTutorialTag(suffixedtag, 33);
|
||||
|
||||
for (*promptnum = 0 + tutorialpromptnum; *promptnum < MAX_PROMPTS; (*promptnum)++)
|
||||
|
|
|
|||
35
src/g_game.c
35
src/g_game.c
|
|
@ -166,9 +166,6 @@ char * titlemap = NULL;
|
|||
boolean hidetitlepics = false;
|
||||
char * bootmap = NULL; //bootmap for loading a map on startup
|
||||
|
||||
char * tutorialmap = NULL; // map to load for tutorial
|
||||
boolean tutorialmode = false; // are we in a tutorial right now?
|
||||
|
||||
char * podiummap = NULL; // map to load for podium
|
||||
|
||||
boolean looptitle = true;
|
||||
|
|
@ -3359,6 +3356,17 @@ static gametype_t defaultgametypes[] =
|
|||
0,
|
||||
0,
|
||||
},
|
||||
|
||||
// GT_TUTORIAL
|
||||
{
|
||||
"Tutorial",
|
||||
"GT_TUTORIAL",
|
||||
GTR_NOMP|GTR_NOCUPSELECT|GTR_NOPOSITION,
|
||||
TOL_TUTORIAL,
|
||||
int_none,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
};
|
||||
|
||||
gametype_t *gametypes[MAXGAMETYPES+1] =
|
||||
|
|
@ -3367,6 +3375,7 @@ gametype_t *gametypes[MAXGAMETYPES+1] =
|
|||
&defaultgametypes[GT_BATTLE],
|
||||
&defaultgametypes[GT_SPECIAL],
|
||||
&defaultgametypes[GT_VERSUS],
|
||||
&defaultgametypes[GT_TUTORIAL],
|
||||
};
|
||||
|
||||
//
|
||||
|
|
@ -3502,6 +3511,7 @@ tolinfo_t TYPEOFLEVEL[NUMTOLNAMES] = {
|
|||
{"BATTLE",TOL_BATTLE},
|
||||
{"BOSS",TOL_BOSS},
|
||||
{"SPECIAL",TOL_SPECIAL},
|
||||
{"TUTORIAL",TOL_TUTORIAL},
|
||||
{"TV",TOL_TV},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
|
@ -4207,16 +4217,19 @@ static void G_DoCompleted(void)
|
|||
|
||||
if (legitimateexit && !demo.playback && !mapreset) // (yes you're allowed to unlock stuff this way when the game is modified)
|
||||
{
|
||||
UINT8 roundtype = GDGT_CUSTOM;
|
||||
if (gametype != GT_TUTORIAL)
|
||||
{
|
||||
UINT8 roundtype = GDGT_CUSTOM;
|
||||
|
||||
if (gametype == GT_RACE)
|
||||
roundtype = GDGT_RACE;
|
||||
else if (gametype == GT_BATTLE)
|
||||
roundtype = (battleprisons ? GDGT_PRISONS : GDGT_BATTLE);
|
||||
else if (gametype == GT_SPECIAL || gametype == GT_VERSUS)
|
||||
roundtype = GDGT_SPECIAL;
|
||||
if (gametype == GT_RACE)
|
||||
roundtype = GDGT_RACE;
|
||||
else if (gametype == GT_BATTLE)
|
||||
roundtype = (battleprisons ? GDGT_PRISONS : GDGT_BATTLE);
|
||||
else if (gametype == GT_SPECIAL || gametype == GT_VERSUS)
|
||||
roundtype = GDGT_SPECIAL;
|
||||
|
||||
gamedata->roundsplayed[roundtype]++;
|
||||
gamedata->roundsplayed[roundtype]++;
|
||||
}
|
||||
gamedata->pendingkeyrounds++;
|
||||
|
||||
// Done before forced addition of PF_NOCONTEST to make UCRP_NOCONTEST harder to achieve
|
||||
|
|
|
|||
|
|
@ -715,6 +715,12 @@ boolean K_CanChangeRules(boolean allowdemos)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (gametype == GT_TUTORIAL)
|
||||
{
|
||||
// Tutorials are locked down.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!allowdemos && demo.playback)
|
||||
{
|
||||
// We've already got our important settings!
|
||||
|
|
|
|||
|
|
@ -5181,7 +5181,7 @@ void K_drawKartHUD(void)
|
|||
V_DrawScaledPatch(BASEVIDWIDTH/2 - (SHORT(kp_yougotem->width)/2), 32, V_HUDTRANS, kp_yougotem);
|
||||
|
||||
// Draw FREE PLAY.
|
||||
if (islonesome && K_Cooperative() == false)
|
||||
if (islonesome && K_Cooperative() == false && gametype != GT_TUTORIAL)
|
||||
K_drawKartFreePlay();
|
||||
|
||||
if (r_splitscreen == 0 && (stplyr->pflags & PF_WRONGWAY) && ((leveltime / 8) & 1))
|
||||
|
|
|
|||
|
|
@ -216,12 +216,6 @@ int LUA_PushGlobals(lua_State *L, const char *word)
|
|||
} else if (fastcmp(word,"bootmap")) {
|
||||
lua_pushstring(L, bootmap);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"tutorialmap")) {
|
||||
lua_pushstring(L, tutorialmap);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"tutorialmode")) {
|
||||
lua_pushboolean(L, tutorialmode);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"podiummap")) {
|
||||
lua_pushstring(L, podiummap);
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -1407,7 +1407,7 @@ boolean R_ViewpointHasChasecam(player_t *player)
|
|||
}
|
||||
}
|
||||
|
||||
if (player->playerstate == PST_DEAD || gamestate == GS_TITLESCREEN || tutorialmode)
|
||||
if (player->playerstate == PST_DEAD || gamestate == GS_TITLESCREEN)
|
||||
chasecam = true; // force chasecam on
|
||||
else if (player->spectator) // no spectator chasecam
|
||||
chasecam = false; // force chasecam off
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue