From d2d10a4c4c7f4a9d7a4fd904d98d26f87198699a Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 21 Aug 2012 17:39:00 +0000 Subject: [PATCH] splitscreen: print "reserved" quotes in the upper half of the screen. Reverved quotes are ones like "Killed by xxx". Since they're only shown for the first player for now, printing them in the upper part makes more sense (in above/below split, the first player is above). git-svn-id: https://svn.eduke32.com/eduke32@2950 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index aa3cd8214..a8a73baf8 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -1759,7 +1759,8 @@ static int32_t calc_ybase(int32_t begy) { int32_t k = begy; - if (GTFLAGS(GAMETYPE_FRAGBAR) && ud.screen_size > 0 && (g_netServer || ud.multimode > 1)) + if (GTFLAGS(GAMETYPE_FRAGBAR) && (ud.screen_size > 0 && !g_fakeMultiMode) + && (g_netServer || ud.multimode > 1)) { int32_t i, j = 0; @@ -1783,14 +1784,13 @@ void G_PrintGameQuotes(int32_t snum) int32_t i, j, k; const DukePlayer_t *const ps = g_player[snum].ps; + const int32_t reserved_quote = (ps->ftq >= QUOTE_RESERVED && ps->ftq <= QUOTE_RESERVED3); k = calc_ybase(1); - if (ps->fta > 1 && (ps->ftq < QUOTE_RESERVED || ps->ftq > QUOTE_RESERVED3)) + if (ps->fta > 1 && !reserved_quote) { - if (ps->fta > 6) - k += 7; - else k += ps->fta; + k += min(7, ps->fta); } j = scale(k, ydim, 200); @@ -1801,6 +1801,7 @@ void G_PrintGameQuotes(int32_t snum) if (user_quote_time[i] <= 0) continue; + k = user_quote_time[i]; sh = hud_glowingquotes ? (sintable[((totalclock+(i<<2))<<5)&2047]>>11) : 0; @@ -1812,7 +1813,6 @@ void G_PrintGameQuotes(int32_t snum) while (l > (ud.config.ScreenWidth - USERQUOTE_RIGHTOFFSET)) { l -= (ud.config.ScreenWidth-USERQUOTE_RIGHTOFFSET); - j += textsc(k > 4 ? 8 : (k<<1)); } } @@ -1822,7 +1822,8 @@ void G_PrintGameQuotes(int32_t snum) else quotebot = quotebotgoal; - if (ps->fta <= 1) return; + if (ps->fta <= 1) + return; if (ScriptQuotes[ps->ftq] == NULL) { @@ -1834,9 +1835,12 @@ void G_PrintGameQuotes(int32_t snum) if (k == 0) { - if (ps->ftq >= QUOTE_RESERVED && ps->ftq <= QUOTE_RESERVED3) + if (reserved_quote) { - k = 140;//quotebot-8-4; + if (!g_fakeMultiMode) + k = 140;//quotebot-8-4; + else + k = 50; } else {