Reorganization + kill old interfaces

This commit is contained in:
wolfy852 2019-02-19 18:52:57 -06:00
parent 82dbf45fa4
commit 1fb65c72ff
9 changed files with 17 additions and 41 deletions

View File

@ -41,7 +41,6 @@
#include "../m_argv.h"
#include "vid_vesa.h"
#include "../i_video.h"
#include "../hu_stuff.h"
//dosstuff -newly added
@ -94,10 +93,6 @@ void I_FinishUpdate (void)
// draw FPS if enabled
if (cv_ticrate.value)
SCR_DisplayTicRate();
// this is now handled here so that wipes and other things don't overlap it for the sake of consistency.
// no additional checks are needed here, this function does them all so no need to worry. :)
HU_drawLocalPing();
//blast it to the screen
// this code sucks

View File

@ -2199,21 +2199,6 @@ static void HU_DrawSongCredits(void)
V_DrawRightAlignedThinString(cursongcredit.x, y, V_ALLOWLOWERCASE|V_6WIDTHSPACE|V_SNAPTOLEFT|(cursongcredit.trans<<V_ALPHASHIFT), str);
}
// HU_drawLocalPing
// Used to draw the user's local ping next to the framerate for a quick check without having to hold TAB for instance. By default, it only shows up if your ping is too high and risks getting you kicked.
void HU_drawLocalPing(void)
{
if (!cv_showping.value || !netgame || consoleplayer == serverplayer) // we don't want to see it or aren't in a netgame, or are the server
return;
UINT32 ping = playerpingtable[consoleplayer]; // consoleplayer's ping is everyone's ping in a splitnetgame :P
if (cv_showping.value == 1 || (cv_showping.value == 2 && ping > servermaxping)) // only show 2 (warning) if our ping is at a bad level
{
INT32 dispy = cv_ticrate.value ? 160 : 181;
HU_drawPing(307, dispy, ping, V_SNAPTORIGHT|V_SNAPTOBOTTOM);
}
}
// Heads up displays drawer, call each frame
//

View File

@ -109,7 +109,6 @@ void HU_Start(void);
boolean HU_Responder(event_t *ev);
void HU_Ticker(void);
void HU_drawLocalPing(void);
void HU_Drawer(void);
char HU_dequeueChatChar(void);
void HU_Erase(void);

View File

@ -434,3 +434,16 @@ void SCR_DisplayTicRate(void)
lasttic = ontic;
}
// SCR_DisplayLocalPing
// Used to draw the user's local ping next to the framerate for a quick check without having to hold TAB for instance. By default, it only shows up if your ping is too high and risks getting you kicked.
void SCR_DisplayLocalPing(void)
{
UINT32 ping = playerpingtable[consoleplayer]; // consoleplayer's ping is everyone's ping in a splitnetgame :P
if (cv_showping.value == 1 || (cv_showping.value == 2 && ping > servermaxping)) // only show 2 (warning) if our ping is at a bad level
{
INT32 dispy = cv_ticrate.value ? 160 : 181;
HU_drawPing(307, dispy, ping, V_SNAPTORIGHT | V_SNAPTOBOTTOM);
}
}

View File

@ -180,5 +180,6 @@ FUNCMATH boolean SCR_IsAspectCorrect(INT32 width, INT32 height);
// move out to main code for consistency
void SCR_DisplayTicRate(void);
void SCR_DisplayLocalPing(void);
#undef DNWH
#endif //__SCREEN_H__

View File

@ -67,7 +67,6 @@
#include "../i_sound.h" // midi pause/unpause
#include "../i_joy.h"
#include "../st_stuff.h"
#include "../hu_stuff.h" // ping drawer
#include "../g_game.h"
#include "../i_video.h"
#include "../console.h"
@ -1361,10 +1360,9 @@ void I_FinishUpdate(void)
if (cv_ticrate.value)
SCR_DisplayTicRate();
// this is now handled here so that wipes and other things don't overlap it for the sake of consistency.
// no additional checks are needed here, this function does them all so no need to worry. :)
HU_drawLocalPing();
if (cv_showping.value && netgame && consoleplayer != serverplayer)
SCR_DisplayLocalPing();
if (rendermode == render_soft && screens[0])
{

View File

@ -99,7 +99,6 @@
#include "../i_sound.h" // midi pause/unpause
#include "../i_joy.h"
#include "../st_stuff.h"
#include "../hu_stuff.h"
#include "../g_game.h"
#include "../i_video.h"
#include "../console.h"
@ -1343,10 +1342,6 @@ void I_FinishUpdate(void)
if (cv_ticrate.value)
SCR_DisplayTicRate();
// this is now handled here so that wipes and other things don't overlap it for the sake of consistency.
// no additional checks are needed here, this function does them all so no need to worry. :)
HU_drawLocalPing();
if (render_soft == rendermode && screens[0])
{

View File

@ -28,7 +28,6 @@
#include "../m_argv.h"
#include "../v_video.h"
#include "../st_stuff.h"
#include "../hu_stuff.h"
#include "../i_video.h"
#include "../z_zone.h"
#include "fabdxlib.h"
@ -366,10 +365,6 @@ void I_FinishUpdate(void)
// display a graph of ticrate
if (cv_ticrate.value)
SCR_DisplayTicRate();
// this is now handled here so that wipes and other things don't overlap it for the sake of consistency.
// no additional checks are needed here, this function does them all so no need to worry. :)
HU_drawLocalPing();
//
if (bDIBMode)

View File

@ -26,7 +26,6 @@
#include "../m_argv.h"
#include "../v_video.h"
#include "../st_stuff.h"
#include "../hu_stuff.h"
#include "../i_video.h"
#include "../z_zone.h"
#include "fabdxlib.h"
@ -199,10 +198,6 @@ void I_FinishUpdate(void)
if (cv_ticrate.value)
SCR_DisplayTicRate();
// this is now handled here so that wipes and other things don't overlap it for the sake of consistency.
// no additional checks are needed here, this function does them all so no need to worry. :)
HU_drawLocalPing();
//
if (bDIBMode)
{