mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-10 00:34:32 +00:00
Merge branch 'rankings-return' into 'master'
Re-add mid-game rankings See merge request KartKrew/Kart!779
This commit is contained in:
commit
ba5c42452c
6 changed files with 68 additions and 60 deletions
|
|
@ -392,6 +392,7 @@ static const char *gamecontrolname[num_gamecontrols] =
|
|||
"console",
|
||||
"talk",
|
||||
"teamtalk",
|
||||
"rankings",
|
||||
"screenshot",
|
||||
"recordgif",
|
||||
};
|
||||
|
|
@ -525,19 +526,20 @@ void G_DefineDefaultControls(void)
|
|||
{
|
||||
// These defaults are bad & temporary.
|
||||
// Keyboard controls
|
||||
gamecontroldefault[gc_up ][0] = KEY_UPARROW;
|
||||
gamecontroldefault[gc_down ][0] = KEY_DOWNARROW;
|
||||
gamecontroldefault[gc_left ][0] = KEY_LEFTARROW;
|
||||
gamecontroldefault[gc_right][0] = KEY_RIGHTARROW;
|
||||
gamecontroldefault[gc_a ][0] = 'z';
|
||||
gamecontroldefault[gc_b ][0] = 'x';
|
||||
gamecontroldefault[gc_c ][0] = 'c';
|
||||
gamecontroldefault[gc_x ][0] = 'a';
|
||||
gamecontroldefault[gc_y ][0] = 's';
|
||||
gamecontroldefault[gc_z ][0] = 'd';
|
||||
gamecontroldefault[gc_l ][0] = 'q';
|
||||
gamecontroldefault[gc_r ][0] = 'e';
|
||||
gamecontroldefault[gc_start][0] = KEY_ESCAPE; // *
|
||||
gamecontroldefault[gc_up ][0] = KEY_UPARROW;
|
||||
gamecontroldefault[gc_down ][0] = KEY_DOWNARROW;
|
||||
gamecontroldefault[gc_left ][0] = KEY_LEFTARROW;
|
||||
gamecontroldefault[gc_right ][0] = KEY_RIGHTARROW;
|
||||
gamecontroldefault[gc_a ][0] = 'z';
|
||||
gamecontroldefault[gc_b ][0] = 'x';
|
||||
gamecontroldefault[gc_c ][0] = 'c';
|
||||
gamecontroldefault[gc_x ][0] = 'a';
|
||||
gamecontroldefault[gc_y ][0] = 's';
|
||||
gamecontroldefault[gc_z ][0] = 'd';
|
||||
gamecontroldefault[gc_l ][0] = 'q';
|
||||
gamecontroldefault[gc_r ][0] = 'e';
|
||||
gamecontroldefault[gc_start ][0] = KEY_ESCAPE; // *
|
||||
gamecontroldefault[gc_rankings][0] = KEY_TAB;
|
||||
|
||||
// Gamepad controls
|
||||
gamecontroldefault[gc_up ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ typedef enum
|
|||
gc_console,
|
||||
gc_talk,
|
||||
gc_teamtalk,
|
||||
gc_rankings,
|
||||
gc_screenshot,
|
||||
gc_recordgif,
|
||||
|
||||
|
|
|
|||
|
|
@ -980,18 +980,27 @@ static void HU_TickSongCredits(void)
|
|||
|
||||
void HU_Ticker(void)
|
||||
{
|
||||
static boolean hu_holdscores = false;
|
||||
|
||||
if (dedicated)
|
||||
return;
|
||||
|
||||
hu_tick++;
|
||||
hu_tick &= 7; // currently only to blink chat input cursor
|
||||
|
||||
/*
|
||||
if (PlayerInputDown(1, gc_scores))
|
||||
hu_showscores = !chat_on;
|
||||
// Rankings
|
||||
if (G_PlayerInputDown(0, gc_rankings, 0))
|
||||
{
|
||||
if (!hu_holdscores)
|
||||
{
|
||||
hu_showscores ^= true;
|
||||
}
|
||||
hu_holdscores = true;
|
||||
}
|
||||
else
|
||||
hu_showscores = false;
|
||||
*/
|
||||
{
|
||||
hu_holdscores = false;
|
||||
}
|
||||
|
||||
hu_keystrokes = false;
|
||||
|
||||
|
|
@ -2066,18 +2075,8 @@ void HU_DrawSongCredits(void)
|
|||
//
|
||||
void HU_Drawer(void)
|
||||
{
|
||||
if (cv_vhseffect.value && (paused || (demo.playback && cv_playbackspeed.value > 1)))
|
||||
V_DrawVhsEffect(demo.rewinding);
|
||||
|
||||
// draw chat string plus cursor
|
||||
if (chat_on)
|
||||
{
|
||||
if (!OLDCHAT)
|
||||
HU_DrawChat();
|
||||
else
|
||||
HU_DrawChat_Old();
|
||||
}
|
||||
else
|
||||
// Closed chat
|
||||
if (!chat_on)
|
||||
{
|
||||
typelines = 1;
|
||||
chat_scrolltime = 0;
|
||||
|
|
@ -2086,15 +2085,8 @@ void HU_Drawer(void)
|
|||
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;
|
||||
if (gamestate != GS_LEVEL)
|
||||
goto drawontop;
|
||||
|
||||
// draw multiplayer rankings
|
||||
if (hu_showscores)
|
||||
|
|
@ -2117,12 +2109,8 @@ void HU_Drawer(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (gamestate != GS_LEVEL)
|
||||
return;
|
||||
|
||||
// draw song credits
|
||||
if (cv_songcredits.value && !( hu_showscores && (netgame || multiplayer) ))
|
||||
HU_DrawSongCredits();
|
||||
if (cv_vhseffect.value && (paused || (demo.playback && cv_playbackspeed.value > 1)))
|
||||
V_DrawVhsEffect(demo.rewinding);
|
||||
|
||||
// draw desynch text
|
||||
if (hu_redownloadinggamestate)
|
||||
|
|
@ -2138,20 +2126,22 @@ void HU_Drawer(void)
|
|||
V_DrawCenteredString(BASEVIDWIDTH/2, 180, V_YELLOWMAP | V_ALLOWLOWERCASE, resynch_text);
|
||||
}
|
||||
|
||||
if (modeattacking && pausedelay > 0 && !pausebreakkey)
|
||||
drawontop:
|
||||
// Opened chat
|
||||
if (chat_on)
|
||||
{
|
||||
INT32 strength = ((pausedelay - 1 - NEWTICRATE/2)*10)/(NEWTICRATE/3);
|
||||
INT32 x = BASEVIDWIDTH/2, y = BASEVIDHEIGHT/2; // obviously incorrect values while we scrap hudinfo
|
||||
|
||||
V_DrawThinString(x, y,
|
||||
((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);
|
||||
if (!OLDCHAT)
|
||||
HU_DrawChat();
|
||||
else
|
||||
HU_DrawChat_Old();
|
||||
}
|
||||
|
||||
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?",
|
||||
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.",
|
||||
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);
|
||||
|
||||
// Version.
|
||||
profilesList[i]->version = version;
|
||||
// Version. (We always update this on successful forward step)
|
||||
profilesList[i]->version = PROFILEVER;
|
||||
|
||||
// Names.
|
||||
READSTRINGN(save_p, profilesList[i]->profilename, PROFILENAMELEN);
|
||||
|
|
@ -382,6 +382,18 @@ void PR_LoadProfiles(void)
|
|||
// Controls.
|
||||
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++)
|
||||
{
|
||||
profilesList[i]->controls[j][k] = READINT32(save_p);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#define SKINNAMESIZE 16
|
||||
|
||||
#define PROFILENAMELEN 6
|
||||
#define PROFILEVER 1
|
||||
#define PROFILEVER 2
|
||||
#define MAXPROFILES 16
|
||||
#define PROFILESFILE "ringprofiles.prf"
|
||||
#define PROFILE_GUEST 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue