From 7e9411f320b75f7f90cc9f16a501d7aed7e88ae4 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Sat, 22 Dec 2018 21:17:01 -0500 Subject: [PATCH] Minor code cleanup, CHAT --- src/hu_stuff.c | 238 ++++++++++++++++++++++++------------------------- 1 file changed, 119 insertions(+), 119 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 40c06538..1fea28f0 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -73,7 +73,7 @@ patch_t *cred_font[CRED_FONTSIZE]; static player_t *plr; boolean chat_on; // entering a chat message? static char w_chat[HU_MAXMSGLEN]; -static size_t c_input = 0; // let's try to make the chat input less shitty. +static size_t c_input = 0; // let's try to make the chat input less shitty. static boolean headsupactive = false; boolean hu_showscores; // draw rankings static char hu_tick; @@ -328,20 +328,20 @@ static UINT32 chat_nummsg_min = 0; static UINT32 chat_scroll = 0; static tic_t chat_scrolltime = 0; -static UINT32 chat_maxscroll = 0; // how far can we scroll? +static UINT32 chat_maxscroll = 0; // how far can we scroll? -//static chatmsg_t chat_mini[CHAT_BUFSIZE]; // Display the last few messages sent. -//static chatmsg_t chat_log[CHAT_BUFSIZE]; // Keep every message sent to us in memory so we can scroll n shit, it's cool. +//static chatmsg_t chat_mini[CHAT_BUFSIZE]; // Display the last few messages sent. +//static chatmsg_t chat_log[CHAT_BUFSIZE]; // Keep every message sent to us in memory so we can scroll n shit, it's cool. -static char chat_log[CHAT_BUFSIZE][255]; // hold the last 48 or so messages in that log. -static char chat_mini[8][255]; // display up to 8 messages that will fade away / get overwritten +static char chat_log[CHAT_BUFSIZE][255]; // hold the last 48 or so messages in that log. +static char chat_mini[8][255]; // display up to 8 messages that will fade away / get overwritten static tic_t chat_timers[8]; -static boolean chat_scrollmedown = false; // force instant scroll down on the chat log. Happens when you open it / send a message. +static boolean chat_scrollmedown = false; // force instant scroll down on the chat log. Happens when you open it / send a message. // remove text from minichat table -static INT16 addy = 0; // use this to make the messages scroll smoothly when one fades away +static INT16 addy = 0; // use this to make the messages scroll smoothly when one fades away static void HU_removeChatText_Mini(void) { @@ -351,7 +351,7 @@ static void HU_removeChatText_Mini(void) strcpy(chat_mini[i], chat_mini[i+1]); chat_timers[i] = chat_timers[i+1]; } - chat_nummsg_min--; // lost 1 msg. + chat_nummsg_min--; // lost 1 msg. // use addy and make shit slide smoothly af. addy += (vid.width < 640) ? 8 : 6; @@ -366,16 +366,16 @@ static void HU_removeChatText_Log(void) for(i=0;i