From fb3722a6f37e1e0182762e3fbee001b3a4c37ea5 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Sat, 22 Dec 2018 20:52:32 -0500 Subject: [PATCH] Accommodate Kart splitscreen code for CHAT via #define NETSPLITSCREEN --- src/d_net.h | 1 + src/hu_stuff.c | 32 ++++++++++++++++---------------- src/hu_stuff.h | 4 ++++ 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/d_net.h b/src/d_net.h index 55ea308b3..61c669dbb 100644 --- a/src/d_net.h +++ b/src/d_net.h @@ -22,6 +22,7 @@ #define MAXNETNODES 32 #define BROADCASTADDR MAXNETNODES #define MAXSPLITSCREENPLAYERS 2 // Max number of players on a single computer +//#define NETSPLITSCREEN // Kart's splitscreen netgame feature #define STATLENGTH (TICRATE*2) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 094db29e7..1f474d226 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1488,27 +1488,27 @@ static void HU_drawChatLog(INT32 offset) if (chat_scroll > chat_maxscroll) chat_scroll = chat_maxscroll; - /*if (splitscreen) +#ifdef NETSPLITSCREEN + if (splitscreen) { boxh = max(6, boxh/2); if (splitscreen > 1) boxw = max(64, boxw/2); - }*/ - - // Unused SRB2KART splitscreen stuff. I'll leave it here in case it ever happens in Vanilla? + } +#endif y = chaty - offset*charheight - (chat_scroll*charheight) - boxh*charheight - 12; - /*if (splitscreen) +#ifdef NETSPLITSCREEN + if (splitscreen) { y -= BASEVIDHEIGHT/2; if (splitscreen > 1) y += 16; - }*/ + } +#endif y -= (G_RingSlingerGametype() ? 16 : 0); - // Unused SRB2KART splitscreen stuff. I'll leave it here in case it ever happens in Vanilla? (x2) - chat_topy = y + chat_scroll*charheight; chat_bottomy = chat_topy + boxh*charheight; @@ -1607,7 +1607,8 @@ static void HU_DrawChat(void) const char *talk = ntalk; const char *mute = "Chat has been muted."; - /*if (splitscreen) +#ifdef NETSPLITSCREEN + if (splitscreen) { y -= BASEVIDHEIGHT/2; if (splitscreen > 1) @@ -1615,11 +1616,10 @@ static void HU_DrawChat(void) y += 16; boxw = max(64, boxw/2); } - }*/ + } +#endif y -= (G_RingSlingerGametype() ? 16 : 0); - // More unused SRB2KART stuff. - if (teamtalk) { talk = ttalk; @@ -1703,16 +1703,16 @@ static void HU_DrawChat(void) { INT32 count = 0; INT32 p_dispy = chaty - charheight -1; - /*if (splitscreen) +#ifdef NETSPLITSCREEN + if (splitscreen) { p_dispy -= BASEVIDHEIGHT/2; if (splitscreen > 1) p_dispy += 16; - }*/ + } +#endif p_dispy -= (G_RingSlingerGametype() ? 16 : 0); - // more kart leftovers. - i = 0; for(i=0; (i