From 21da0816c5b49095322d91d7675d83165c929477 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 2 Jul 2020 21:28:09 +0200 Subject: [PATCH] - removed the overhead scoreboard because it's EDuke code. This should reuse the summary screen's output if redone. - removed voting code for the same reason. --- source/games/duke/src/player.h | 2 +- source/games/duke/src/zz_game.cpp | 10 ---- source/games/duke/src/zz_premap.cpp | 1 - source/games/duke/src/zz_screens.cpp | 76 ---------------------------- source/games/duke/src/zz_text.cpp | 2 +- 5 files changed, 2 insertions(+), 89 deletions(-) diff --git a/source/games/duke/src/player.h b/source/games/duke/src/player.h index 82536fe18..e60ec4dc9 100644 --- a/source/games/duke/src/player.h +++ b/source/games/duke/src/player.h @@ -320,7 +320,7 @@ typedef struct // NOTE: wchoice[HANDREMOTE_WEAPON .. MAX_WEAPONS-1] unused uint8_t frags[MAXPLAYERS]; - char vote, gotvote, playerreadyflag, playerquitflag, connected; + char playerreadyflag, playerquitflag, connected; char user_name[32]; char syncval[SYNCFIFOSIZ][MAXSYNCBYTES]; diff --git a/source/games/duke/src/zz_game.cpp b/source/games/duke/src/zz_game.cpp index c9db6af2a..ef773b0e5 100644 --- a/source/games/duke/src/zz_game.cpp +++ b/source/games/duke/src/zz_game.cpp @@ -1240,16 +1240,6 @@ void G_HandleLocalKeys(void) CONTROL_GetInput(&noshareinfo); } - if (g_player[myconnectindex].gotvote == 0 && voting != -1 && voting != myconnectindex) - { - if (inputState.UnboundKeyPressed(sc_F1) || inputState.UnboundKeyPressed(sc_F2) || cl_autovote) - { - Net_SendMapVote(inputState.UnboundKeyPressed(sc_F1) || cl_autovote ? cl_autovote-1 : 0); - inputState.ClearKeyStatus(sc_F1); - inputState.ClearKeyStatus(sc_F2); - } - } - if (!ALT_IS_PRESSED && ud.overhead_on == 0 && (g_player[myconnectindex].ps->gm & MODE_TYPE) == 0) { if (buttonMap.ButtonDown(gamefunc_Enlarge_Screen)) diff --git a/source/games/duke/src/zz_premap.cpp b/source/games/duke/src/zz_premap.cpp index 4f8eaf8e9..65a637fd7 100644 --- a/source/games/duke/src/zz_premap.cpp +++ b/source/games/duke/src/zz_premap.cpp @@ -343,7 +343,6 @@ void G_ClearFIFO(void) { if (g_player[p].input != NULL) Bmemset(g_player[p].input, 0, sizeof(input_t)); - g_player[p].vote = g_player[p].gotvote = 0; } } diff --git a/source/games/duke/src/zz_screens.cpp b/source/games/duke/src/zz_screens.cpp index 62454efef..289903a67 100644 --- a/source/games/duke/src/zz_screens.cpp +++ b/source/games/duke/src/zz_screens.cpp @@ -50,32 +50,6 @@ double g_moveActorsTime, g_moveWorldTime; // in ms, smoothed int32_t g_noLogoAnim = 0; int32_t g_noLogo = 0; -////////// OFTEN-USED FEW-LINERS ////////// -static void G_HandleEventsWhileNoInput(void) -{ - inputState.ClearAllInput(); - - while (!inputState.CheckAllInput()) - G_HandleAsync(); - -} - -static int32_t G_PlaySoundWhileNoInput(int32_t soundnum) -{ - S_PlaySound(soundnum, CHAN_AUTO, CHANF_UI); - inputState.ClearAllInput(); - while (S_CheckSoundPlaying(-1, soundnum)) - { - G_HandleAsync(); - if (inputState.CheckAllInput()) - { - return 1; - } - } - - return 0; -} -////////// void P_SetGamePalette(DukePlayer_t *player, uint32_t palid, ESetPalFlags set) { @@ -91,44 +65,6 @@ void P_SetGamePalette(DukePlayer_t *player, uint32_t palid, ESetPalFlags set) } -#define SCORESHEETOFFSET -20 -static void G_ShowScores(void) -{ - int32_t t, i; - - if (playerswhenstarted > 1 && (g_gametypeFlags[ud.coop]&GAMETYPE_SCORESHEET)) - { - gametext_center(SCORESHEETOFFSET+58+2, GStrings("Multiplayer Totals")); - gametext_center(SCORESHEETOFFSET+58+10, currentLevel->DisplayName()); - - t = 0; - minitext(70, SCORESHEETOFFSET+80, GStrings("Name"), 8, 2+8+16+ROTATESPRITE_MAX); - minitext(170, SCORESHEETOFFSET+80, GStrings("Frags"), 8, 2+8+16+ROTATESPRITE_MAX); - minitext(200, SCORESHEETOFFSET+80, GStrings("Deaths"), 8, 2+8+16+ROTATESPRITE_MAX); - minitext(235, SCORESHEETOFFSET+80, GStrings("Ping"), 8, 2+8+16+ROTATESPRITE_MAX); - - for (i=playerswhenstarted-1; i>=0; i--) - { - if (!g_player[i].playerquitflag) - continue; - - minitext(70, SCORESHEETOFFSET+90+t, g_player[i].user_name, g_player[i].ps->palookup, 2+8+16+ROTATESPRITE_MAX); - - Bsprintf(tempbuf, "%-4d", g_player[i].ps->frag); - minitext(170, SCORESHEETOFFSET+90+t, tempbuf, 2, 2+8+16+ROTATESPRITE_MAX); - - Bsprintf(tempbuf, "%-4d", g_player[i].frags[i] + g_player[i].ps->fraggedself); - minitext(200, SCORESHEETOFFSET+90+t, tempbuf, 2, 2+8+16+ROTATESPRITE_MAX); - - //Bsprintf(tempbuf, "%-4d", g_player[i].ping); - //minitext(235, SCORESHEETOFFSET+90+t, tempbuf, 2, 2+8+16+ROTATESPRITE_MAX); - - t += 7; - } - } -} -#undef SCORESHEETOFFSET - ////////// TINT ACCUMULATOR ////////// typedef struct { @@ -590,18 +526,6 @@ void G_DisplayRest(int32_t smoothratio) G_ScreenText(MF_Bluefont.tilenum, 2<<16, i-gtextsc(ystep), gtextsc(MF_Bluefont.zoom), 0, 0, tempbuf, 0, 10, 2|8|16|256|ROTATESPRITE_FULL16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, xbetween, MF_Bluefont.between.y, MF_Bluefont.textflags|TEXT_XOFFSETZERO|TEXT_GAMETEXTNUMHACK, 0, 0, xdim-1, ydim-1); } - if (g_player[myconnectindex].gotvote == 0 && voting != -1 && voting != myconnectindex) - { - Bsprintf(tempbuf, "%s^00 has called a vote for map", g_player[voting].user_name); - gametext_center(40, tempbuf); - Bsprintf(tempbuf, "%s (E%dL%d)", mapList[vote_episode*MAXLEVELS + vote_map].DisplayName(), vote_episode+1, vote_map+1); - gametext_center(48, tempbuf); - gametext_center(70, "Press F1 to Accept, F2 to Decline"); - } - - if (buttonMap.ButtonDown(gamefunc_Show_DukeMatch_Scores)) - G_ShowScores(); - Net_DisplaySyncMsg(); if (VOLUMEONE) diff --git a/source/games/duke/src/zz_text.cpp b/source/games/duke/src/zz_text.cpp index c80ca1731..e2d7c9de4 100644 --- a/source/games/duke/src/zz_text.cpp +++ b/source/games/duke/src/zz_text.cpp @@ -208,7 +208,7 @@ int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int x = sbarxr16(x); else x = sbarx16(x); - y = minitext_yofs+sbary16(y); + y = minitext_yofs; z = sbarsc(z); }