From 6953dbd964ffe28e974bf8d01d2c4d6f163d193c Mon Sep 17 00:00:00 2001 From: helixhorned Date: Mon, 20 Aug 2012 21:32:11 +0000 Subject: [PATCH] Print quotes for both players in fake multi, remove quote code in splitscr.con. git-svn-id: https://svn.eduke32.com/eduke32@2948 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/samples/splitscr.con | 15 ------------ polymer/eduke32/source/demo.c | 2 +- polymer/eduke32/source/game.c | 36 +++++++++++++++++++++++----- polymer/eduke32/source/game.h | 2 +- 4 files changed, 32 insertions(+), 23 deletions(-) diff --git a/polymer/eduke32/samples/splitscr.con b/polymer/eduke32/samples/splitscr.con index c2da59b4f..f8494d7ad 100644 --- a/polymer/eduke32/samples/splitscr.con +++ b/polymer/eduke32/samples/splitscr.con @@ -55,9 +55,6 @@ gamevar pinput 0 0 // Set to input, used in the PROCESSINPUT event gamevar pcrosshair 0 0 // Do you like crosshairs? Game options will tell. gamevar crossscale 0 0 // crosshair scale gamevar pweapon 0 0 // Player weapon -gamevar pfta 0 0 // Both used for quotes -gamevar pftq 0 0 -gamevar pcolor 0 0 // Used to display quotes with player color gamevar p1heat 0 0 // Common night vision googles gamevar p2heat 0 0 @@ -371,16 +368,4 @@ onevent EVENT_DISPLAYROOMS setgamepalette 0 else setgamepalette 2 - - getactor[THISACTOR].pal pcolor - getplayer[THISACTOR].ftq pftq - getplayer[THISACTOR].fta pfta - ifvarn pfta 0 - gametext STARTALPHANUM P1X 2 pftq 0 pcolor 26 0 0 xdim ydim - - getactor[pnum].pal pcolor - getplayer[pid].ftq pftq - getplayer[pid].fta pfta - ifvarn pfta 0 - gametext STARTALPHANUM P2X 2 pftq 0 pcolor 26 0 0 xdim ydim endevent diff --git a/polymer/eduke32/source/demo.c b/polymer/eduke32/source/demo.c index 3ac4954e2..7ca1692b7 100644 --- a/polymer/eduke32/source/demo.c +++ b/polymer/eduke32/source/demo.c @@ -673,7 +673,7 @@ nextdemo: } } - G_PrintGameQuotes(); + G_PrintGameQuotes(screenpeek); if (ud.last_camsprite != ud.camerasprite) { diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index dd59b6bf0..aa3cd8214 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -1778,11 +1778,11 @@ static int32_t calc_ybase(int32_t begy) // this handles both multiplayer and item pickup message type text // both are passed on to gametext -void G_PrintGameQuotes(void) +void G_PrintGameQuotes(int32_t snum) { int32_t i, j, k; - const DukePlayer_t *const ps = g_player[screenpeek].ps; + const DukePlayer_t *const ps = g_player[snum].ps; k = calc_ybase(1); @@ -1848,9 +1848,30 @@ void G_PrintGameQuotes(void) } } - gametext(320>>1, k, ScriptQuotes[ps->ftq], - hud_glowingquotes ? quotepulseshade : 0, - texto(ps->fta)); + { + int32_t pal = 0; + + if (g_fakeMultiMode) + { + pal = g_player[snum].pcolor; + + if (snum==1) + { + const int32_t sidebyside = (ud.screen_size != 0); + + // NOTE: setting gametext's x -= 80 doesn't do the expected thing. + // Needs looking into. + if (sidebyside) + k += 9; + else + k += 101; + } + } + + gametextpalbits(160, k, ScriptQuotes[ps->ftq], + hud_glowingquotes ? quotepulseshade : 0, + pal, texto(ps->fta)); + } } void P_DoQuote(int32_t q, DukePlayer_t *p) @@ -2760,9 +2781,12 @@ void G_DisplayRest(int32_t smoothratio) // HACK if (g_fakeMultiMode && ud.multimode==2) + { G_DrawStatusBar(1); + G_PrintGameQuotes(1); + } - G_PrintGameQuotes(); + G_PrintGameQuotes(screenpeek); if (ud.show_level_text && hud_showmapname && g_levelTextTime > 1) { diff --git a/polymer/eduke32/source/game.h b/polymer/eduke32/source/game.h index 5e2eddd34..e2ce46f52 100644 --- a/polymer/eduke32/source/game.h +++ b/polymer/eduke32/source/game.h @@ -286,7 +286,7 @@ void G_GameQuit(void); void G_GetCrosshairColor(void); void G_HandleLocalKeys(void); void G_HandleSpecialKeys(void); -void G_PrintGameQuotes(void); +void G_PrintGameQuotes(int32_t snum); //void G_SE40(int32_t smoothratio); void G_SetCrosshairColor(int32_t r,int32_t g,int32_t b); void G_SetStatusBarScale(int32_t sc);