Accommodate Kart splitscreen code for CHAT via #define NETSPLITSCREEN

This commit is contained in:
mazmazz 2018-12-22 20:52:32 -05:00
parent 0f0e30924f
commit fb3722a6f3
3 changed files with 21 additions and 16 deletions

View file

@ -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)

View file

@ -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<MAXPLAYERS); i++)
{

View file

@ -58,7 +58,11 @@ typedef struct
//------------------------------------
#define HU_MAXMSGLEN 224
#define CHAT_BUFSIZE 64 // that's enough messages, right? We'll delete the older ones when that gets out of hand.
#ifdef NETSPLITSCREEN
#define OLDCHAT (cv_consolechat.value == 1 || dedicated || vid.width < 640)
#else
#define OLDCHAT (!splitscreen && (cv_consolechat.value == 1 || dedicated || vid.width < 640))
#endif
#define CHAT_MUTE (cv_mute.value && !(server || IsPlayerAdmin(consoleplayer))) // this still allows to open the chat but not to type. That's used for scrolling and whatnot.
#define OLD_MUTE (OLDCHAT && cv_mute.value && !(server || IsPlayerAdmin(consoleplayer))) // this is used to prevent oldchat from opening when muted.