mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-19 14:32:34 +00:00
Re-add mid-game rankings
- gc_rankings, bound to TAB by default - Now a toggle, rather than a hold behaviour - Rearrange HU_Drawer to have chat (and cecho/music credits) render over everything else (like, say, tab rankings) - Update PROFILEVER to 2 so we can add the new control to old profiles
This commit is contained in:
parent
45604a05c3
commit
db95e3144d
6 changed files with 73 additions and 68 deletions
|
|
@ -538,6 +538,7 @@ void G_DefineDefaultControls(void)
|
||||||
gamecontroldefault[gc_l ][0] = 'q';
|
gamecontroldefault[gc_l ][0] = 'q';
|
||||||
gamecontroldefault[gc_r ][0] = 'e';
|
gamecontroldefault[gc_r ][0] = 'e';
|
||||||
gamecontroldefault[gc_start ][0] = KEY_ESCAPE; // *
|
gamecontroldefault[gc_start ][0] = KEY_ESCAPE; // *
|
||||||
|
gamecontroldefault[gc_rankings][0] = KEY_TAB;
|
||||||
|
|
||||||
// Gamepad controls
|
// Gamepad controls
|
||||||
gamecontroldefault[gc_up ][1] = KEY_HAT1+0; // D-Pad Up
|
gamecontroldefault[gc_up ][1] = KEY_HAT1+0; // D-Pad Up
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ typedef enum
|
||||||
gc_console,
|
gc_console,
|
||||||
gc_talk,
|
gc_talk,
|
||||||
gc_teamtalk,
|
gc_teamtalk,
|
||||||
|
gc_rankings,
|
||||||
gc_screenshot,
|
gc_screenshot,
|
||||||
gc_recordgif,
|
gc_recordgif,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -980,18 +980,27 @@ static void HU_TickSongCredits(void)
|
||||||
|
|
||||||
void HU_Ticker(void)
|
void HU_Ticker(void)
|
||||||
{
|
{
|
||||||
|
static boolean hu_holdscores = false;
|
||||||
|
|
||||||
if (dedicated)
|
if (dedicated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hu_tick++;
|
hu_tick++;
|
||||||
hu_tick &= 7; // currently only to blink chat input cursor
|
hu_tick &= 7; // currently only to blink chat input cursor
|
||||||
|
|
||||||
/*
|
// Rankings
|
||||||
if (PlayerInputDown(1, gc_scores))
|
if (G_PlayerInputDown(0, gc_rankings, 0))
|
||||||
hu_showscores = !chat_on;
|
{
|
||||||
|
if (!hu_holdscores)
|
||||||
|
{
|
||||||
|
hu_showscores ^= true;
|
||||||
|
}
|
||||||
|
hu_holdscores = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
hu_showscores = false;
|
{
|
||||||
*/
|
hu_holdscores = false;
|
||||||
|
}
|
||||||
|
|
||||||
hu_keystrokes = false;
|
hu_keystrokes = false;
|
||||||
|
|
||||||
|
|
@ -2066,35 +2075,8 @@ void HU_DrawSongCredits(void)
|
||||||
//
|
//
|
||||||
void HU_Drawer(void)
|
void HU_Drawer(void)
|
||||||
{
|
{
|
||||||
if (cv_vhseffect.value && (paused || (demo.playback && cv_playbackspeed.value > 1)))
|
if (gamestate != GS_LEVEL)
|
||||||
V_DrawVhsEffect(demo.rewinding);
|
goto drawchat;
|
||||||
|
|
||||||
// draw chat string plus cursor
|
|
||||||
if (chat_on)
|
|
||||||
{
|
|
||||||
if (!OLDCHAT)
|
|
||||||
HU_DrawChat();
|
|
||||||
else
|
|
||||||
HU_DrawChat_Old();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
typelines = 1;
|
|
||||||
chat_scrolltime = 0;
|
|
||||||
|
|
||||||
if (!OLDCHAT && cv_consolechat.value < 2 && netgame) // Don't display minimized chat if you set the mode to Window (Hidden)
|
|
||||||
HU_drawMiniChat(); // draw messages in a cool fashion.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cechotimer)
|
|
||||||
HU_DrawCEcho();
|
|
||||||
|
|
||||||
if (!( Playing() || demo.playback )
|
|
||||||
|| gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE
|
|
||||||
|| gamestate == GS_CREDITS || gamestate == GS_EVALUATION
|
|
||||||
|| gamestate == GS_ENDING || gamestate == GS_GAMEEND
|
|
||||||
|| gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS) // SRB2kart
|
|
||||||
return;
|
|
||||||
|
|
||||||
// draw multiplayer rankings
|
// draw multiplayer rankings
|
||||||
if (hu_showscores)
|
if (hu_showscores)
|
||||||
|
|
@ -2117,12 +2099,8 @@ void HU_Drawer(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gamestate != GS_LEVEL)
|
if (cv_vhseffect.value && (paused || (demo.playback && cv_playbackspeed.value > 1)))
|
||||||
return;
|
V_DrawVhsEffect(demo.rewinding);
|
||||||
|
|
||||||
// draw song credits
|
|
||||||
if (cv_songcredits.value && !( hu_showscores && (netgame || multiplayer) ))
|
|
||||||
HU_DrawSongCredits();
|
|
||||||
|
|
||||||
// draw desynch text
|
// draw desynch text
|
||||||
if (hu_redownloadinggamestate)
|
if (hu_redownloadinggamestate)
|
||||||
|
|
@ -2138,20 +2116,30 @@ void HU_Drawer(void)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 180, V_YELLOWMAP | V_ALLOWLOWERCASE, resynch_text);
|
V_DrawCenteredString(BASEVIDWIDTH/2, 180, V_YELLOWMAP | V_ALLOWLOWERCASE, resynch_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modeattacking && pausedelay > 0 && !pausebreakkey)
|
drawchat:
|
||||||
|
// draw chat string plus cursor
|
||||||
|
if (chat_on)
|
||||||
{
|
{
|
||||||
INT32 strength = ((pausedelay - 1 - NEWTICRATE/2)*10)/(NEWTICRATE/3);
|
if (!OLDCHAT)
|
||||||
INT32 x = BASEVIDWIDTH/2, y = BASEVIDHEIGHT/2; // obviously incorrect values while we scrap hudinfo
|
HU_DrawChat();
|
||||||
|
else
|
||||||
V_DrawThinString(x, y,
|
HU_DrawChat_Old();
|
||||||
((leveltime & 4) ? V_SKYMAP : V_BLUEMAP),
|
|
||||||
"HOLD TO RETRY...");
|
|
||||||
|
|
||||||
if (strength > 9)
|
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 0);
|
|
||||||
else if (strength > 0)
|
|
||||||
V_DrawFadeScreen(0, strength);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
typelines = 1;
|
||||||
|
chat_scrolltime = 0;
|
||||||
|
|
||||||
|
if (!OLDCHAT && cv_consolechat.value < 2 && netgame) // Don't display minimized chat if you set the mode to Window (Hidden)
|
||||||
|
HU_drawMiniChat(); // draw messages in a cool fashion.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cechotimer)
|
||||||
|
HU_DrawCEcho();
|
||||||
|
|
||||||
|
// draw song credits
|
||||||
|
if (cv_songcredits.value && !( hu_showscores && (netgame || multiplayer) ))
|
||||||
|
HU_DrawSongCredits();
|
||||||
}
|
}
|
||||||
|
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
|
|
||||||
|
|
@ -653,6 +653,9 @@ menuitem_t OPTIONS_ProfileControls[] = {
|
||||||
{IT_CONTROL, "OPEN TEAM CHAT", "Do we even have team gamemodes?",
|
{IT_CONTROL, "OPEN TEAM CHAT", "Do we even have team gamemodes?",
|
||||||
NULL, {.routine = M_ProfileSetControl}, gc_teamtalk, 0},
|
NULL, {.routine = M_ProfileSetControl}, gc_teamtalk, 0},
|
||||||
|
|
||||||
|
{IT_CONTROL, "SHOW RANKINGS", "Show mid-game rankings.",
|
||||||
|
NULL, {.routine = M_ProfileSetControl}, gc_rankings, 0},
|
||||||
|
|
||||||
{IT_CONTROL, "OPEN CONSOLE", "Opens the developer options console.",
|
{IT_CONTROL, "OPEN CONSOLE", "Opens the developer options console.",
|
||||||
NULL, {.routine = M_ProfileSetControl}, gc_console, 0},
|
NULL, {.routine = M_ProfileSetControl}, gc_console, 0},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -327,8 +327,8 @@ void PR_LoadProfiles(void)
|
||||||
{
|
{
|
||||||
profilesList[i] = Z_Malloc(sizeof(profile_t), PU_STATIC, NULL);
|
profilesList[i] = Z_Malloc(sizeof(profile_t), PU_STATIC, NULL);
|
||||||
|
|
||||||
// Version.
|
// Version. (We always update this on successful forward step)
|
||||||
profilesList[i]->version = version;
|
profilesList[i]->version = PROFILEVER;
|
||||||
|
|
||||||
// Names.
|
// Names.
|
||||||
READSTRINGN(save_p, profilesList[i]->profilename, PROFILENAMELEN);
|
READSTRINGN(save_p, profilesList[i]->profilename, PROFILENAMELEN);
|
||||||
|
|
@ -382,6 +382,18 @@ void PR_LoadProfiles(void)
|
||||||
// Controls.
|
// Controls.
|
||||||
for (j = 0; j < num_gamecontrols; j++)
|
for (j = 0; j < num_gamecontrols; j++)
|
||||||
{
|
{
|
||||||
|
#ifdef DEVELOP
|
||||||
|
// Profile update 1-->2: Add gc_rankings.
|
||||||
|
if (j == gc_rankings && version < 2)
|
||||||
|
{
|
||||||
|
for (k = 0; k < MAXINPUTMAPPING; k++)
|
||||||
|
{
|
||||||
|
profilesList[i]->controls[j][k] = gamecontroldefault[j][k];
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (k = 0; k < MAXINPUTMAPPING; k++)
|
for (k = 0; k < MAXINPUTMAPPING; k++)
|
||||||
{
|
{
|
||||||
profilesList[i]->controls[j][k] = READINT32(save_p);
|
profilesList[i]->controls[j][k] = READINT32(save_p);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#define SKINNAMESIZE 16
|
#define SKINNAMESIZE 16
|
||||||
|
|
||||||
#define PROFILENAMELEN 6
|
#define PROFILENAMELEN 6
|
||||||
#define PROFILEVER 1
|
#define PROFILEVER 2
|
||||||
#define MAXPROFILES 16
|
#define MAXPROFILES 16
|
||||||
#define PROFILESFILE "ringprofiles.prf"
|
#define PROFILESFILE "ringprofiles.prf"
|
||||||
#define PROFILE_GUEST 0
|
#define PROFILE_GUEST 0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue