mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
SECRET_ALTTITLE
My final indulgence for this branch. One cvar that swaps a patch
This commit is contained in:
parent
e10df0ee68
commit
88d41f6721
7 changed files with 55 additions and 2 deletions
|
|
@ -466,6 +466,7 @@ consvar_t cv_autobalance = CVAR_INIT ("autobalance", "Off", CV_SAVE|CV_NETVAR|CV
|
||||||
consvar_t cv_teamscramble = CVAR_INIT ("teamscramble", "Off", CV_SAVE|CV_NETVAR|CV_CALL|CV_NOINIT, teamscramble_cons_t, TeamScramble_OnChange);
|
consvar_t cv_teamscramble = CVAR_INIT ("teamscramble", "Off", CV_SAVE|CV_NETVAR|CV_CALL|CV_NOINIT, teamscramble_cons_t, TeamScramble_OnChange);
|
||||||
consvar_t cv_scrambleonchange = CVAR_INIT ("scrambleonchange", "Off", CV_SAVE|CV_NETVAR, teamscramble_cons_t, NULL);
|
consvar_t cv_scrambleonchange = CVAR_INIT ("scrambleonchange", "Off", CV_SAVE|CV_NETVAR, teamscramble_cons_t, NULL);
|
||||||
|
|
||||||
|
consvar_t cv_alttitle = CVAR_INIT ("alttitle", "Off", CV_CALL|CV_NOSHOWHELP|CV_NOINIT|CV_SAVE, CV_OnOff, AltTitle_OnChange);
|
||||||
consvar_t cv_itemfinder = CVAR_INIT ("itemfinder", "Off", CV_CALL|CV_NOSHOWHELP, CV_OnOff, ItemFinder_OnChange);
|
consvar_t cv_itemfinder = CVAR_INIT ("itemfinder", "Off", CV_CALL|CV_NOSHOWHELP, CV_OnOff, ItemFinder_OnChange);
|
||||||
|
|
||||||
// Scoring type options
|
// Scoring type options
|
||||||
|
|
@ -938,6 +939,7 @@ void D_RegisterClientCommands(void)
|
||||||
CV_RegisterVar(&cv_mindelay);
|
CV_RegisterVar(&cv_mindelay);
|
||||||
|
|
||||||
// HUD
|
// HUD
|
||||||
|
CV_RegisterVar(&cv_alttitle);
|
||||||
CV_RegisterVar(&cv_itemfinder);
|
CV_RegisterVar(&cv_itemfinder);
|
||||||
CV_RegisterVar(&cv_showinputjoy);
|
CV_RegisterVar(&cv_showinputjoy);
|
||||||
|
|
||||||
|
|
@ -4843,6 +4845,19 @@ FUNCNORETURN static ATTRNORETURN void Command_Quit_f(void)
|
||||||
I_Quit();
|
I_Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AltTitle_OnChange(void)
|
||||||
|
{
|
||||||
|
if (!cv_alttitle.value)
|
||||||
|
return; // it's fine.
|
||||||
|
|
||||||
|
if (!M_SecretUnlocked(SECRET_ALTTITLE, true))
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("You haven't earned this yet.\n"));
|
||||||
|
CV_StealthSetValue(&cv_itemfinder, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ItemFinder_OnChange(void)
|
void ItemFinder_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!cv_itemfinder.value)
|
if (!cv_itemfinder.value)
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ extern consvar_t cv_kartdebugnodes, cv_kartdebugcolorize, cv_kartdebugdirector;
|
||||||
extern consvar_t cv_spbtest, cv_gptest, cv_reducevfx;
|
extern consvar_t cv_spbtest, cv_gptest, cv_reducevfx;
|
||||||
extern consvar_t cv_kartdebugwaypoints, cv_kartdebugbotpredict;
|
extern consvar_t cv_kartdebugwaypoints, cv_kartdebugbotpredict;
|
||||||
|
|
||||||
extern consvar_t cv_itemfinder;
|
extern consvar_t cv_alttitle, cv_itemfinder;
|
||||||
|
|
||||||
extern consvar_t cv_inttime, cv_advancemap;
|
extern consvar_t cv_inttime, cv_advancemap;
|
||||||
extern consvar_t cv_overtime;
|
extern consvar_t cv_overtime;
|
||||||
|
|
@ -267,6 +267,7 @@ boolean IsPlayerAdmin(INT32 playernum);
|
||||||
void SetAdminPlayer(INT32 playernum);
|
void SetAdminPlayer(INT32 playernum);
|
||||||
void ClearAdminPlayers(void);
|
void ClearAdminPlayers(void);
|
||||||
void RemoveAdminPlayer(INT32 playernum);
|
void RemoveAdminPlayer(INT32 playernum);
|
||||||
|
void AltTitle_OnChange(void);
|
||||||
void ItemFinder_OnChange(void);
|
void ItemFinder_OnChange(void);
|
||||||
void D_SetPassword(const char *pw);
|
void D_SetPassword(const char *pw);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2269,6 +2269,8 @@ void readunlockable(MYFILE *f, INT32 num)
|
||||||
unlockables[num].type = SECRET_BREAKTHECAPSULES;
|
unlockables[num].type = SECRET_BREAKTHECAPSULES;
|
||||||
else if (fastcmp(word2, "SOUNDTEST"))
|
else if (fastcmp(word2, "SOUNDTEST"))
|
||||||
unlockables[num].type = SECRET_SOUNDTEST;
|
unlockables[num].type = SECRET_SOUNDTEST;
|
||||||
|
else if (fastcmp(word2, "ALTTITLE"))
|
||||||
|
unlockables[num].type = SECRET_ALTTITLE;
|
||||||
else if (fastcmp(word2, "ITEMFINDER"))
|
else if (fastcmp(word2, "ITEMFINDER"))
|
||||||
unlockables[num].type = SECRET_ITEMFINDER;
|
unlockables[num].type = SECRET_ITEMFINDER;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1777,7 +1777,14 @@ static void F_CacheTitleScreen(void)
|
||||||
break; // idk do we still want this?
|
break; // idk do we still want this?
|
||||||
|
|
||||||
case TTMODE_RINGRACERS:
|
case TTMODE_RINGRACERS:
|
||||||
kts_bumper = W_CachePatchName("KTSBUMPR1", PU_PATCH_LOWPRIORITY);
|
if (!M_SecretUnlocked(SECRET_ALTTITLE, true))
|
||||||
|
{
|
||||||
|
CV_StealthSetValue(&cv_alttitle, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
kts_bumper = W_CachePatchName(
|
||||||
|
(cv_alttitle.value ? "KTSJUMPR1" : "KTSBUMPR1"),
|
||||||
|
PU_PATCH_LOWPRIORITY);
|
||||||
kts_eggman = W_CachePatchName("KTSEGG01", PU_PATCH_LOWPRIORITY);
|
kts_eggman = W_CachePatchName("KTSEGG01", PU_PATCH_LOWPRIORITY);
|
||||||
kts_tails = W_CachePatchName("KTSTAL01", PU_PATCH_LOWPRIORITY);
|
kts_tails = W_CachePatchName("KTSTAL01", PU_PATCH_LOWPRIORITY);
|
||||||
kts_tails_tails = W_CachePatchName("KTSTAL02", PU_PATCH_LOWPRIORITY);
|
kts_tails_tails = W_CachePatchName("KTSTAL02", PU_PATCH_LOWPRIORITY);
|
||||||
|
|
|
||||||
|
|
@ -4707,6 +4707,13 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
|
||||||
specialmap = hardmapcache;
|
specialmap = hardmapcache;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SECRET_ALTTITLE:
|
||||||
|
{
|
||||||
|
x = 8;
|
||||||
|
y = BASEVIDHEIGHT-16;
|
||||||
|
V_DrawGamemodeString(x, y - 32, V_ALLOWLOWERCASE, R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_PLAGUE, GTC_MENUCACHE), cv_alttitle.string);
|
||||||
|
V_DrawThinString(x, y, V_ALLOWLOWERCASE|highlightflags, "Press (A) to toggle");
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -7382,6 +7382,26 @@ boolean M_ChallengesInputs(INT32 ch)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (M_MenuConfirmPressed(pid)
|
||||||
|
&& challengesmenu.currentunlock < MAXUNLOCKABLES
|
||||||
|
&& gamedata->unlocked[challengesmenu.currentunlock])
|
||||||
|
{
|
||||||
|
switch (unlockables[challengesmenu.currentunlock].type)
|
||||||
|
{
|
||||||
|
case SECRET_ALTTITLE:
|
||||||
|
CV_AddValue(&cv_alttitle, 1);
|
||||||
|
S_StartSound(NULL, sfx_s3kc3s);
|
||||||
|
M_SetMenuDelay(pid);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ typedef enum
|
||||||
SECRET_TIMEATTACK, // Permit Time attack
|
SECRET_TIMEATTACK, // Permit Time attack
|
||||||
SECRET_BREAKTHECAPSULES, // Permit SP Capsules
|
SECRET_BREAKTHECAPSULES, // Permit SP Capsules
|
||||||
SECRET_SOUNDTEST, // Permit Sound Test
|
SECRET_SOUNDTEST, // Permit Sound Test
|
||||||
|
SECRET_ALTTITLE, // Permit alternate titlescreen
|
||||||
|
|
||||||
// Assist restrictions
|
// Assist restrictions
|
||||||
SECRET_ITEMFINDER, // Permit locating in-level secrets
|
SECRET_ITEMFINDER, // Permit locating in-level secrets
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue