Merge hu_stuff.c

This commit is contained in:
Sally Coolatta 2020-08-10 14:21:22 -04:00
parent 9915d443dc
commit 3f68fa02d1

View file

@ -1923,172 +1923,6 @@ static void HU_DrawChat_Old(void)
} }
#endif #endif
// draw the Crosshair, at the exact center of the view.
//
// Crosshairs are pre-cached at HU_Init
/*static inline void HU_DrawCrosshair(void)
{
INT32 i, x, y;
i = cv_crosshair.value & 3;
if (!i)
return;
if ((netgame || multiplayer) && players[displayplayers[0]].spectator)
return;
#ifdef HWRENDER
if (rendermode != render_soft)
<<<<<<< HEAD
{
x = (INT32)gr_basewindowcenterx;
y = (INT32)gr_basewindowcentery;
}
=======
y = (INT32)gl_basewindowcentery;
>>>>>>> srb2/next
else
#endif
{
x = viewwindowx + (viewwidth>>1);
y = viewwindowy + (viewheight>>1);
}
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
}
static inline void HU_DrawCrosshair2(void)
{
INT32 i, x, y;
i = cv_crosshair2.value & 3;
if (!i)
return;
if ((netgame || multiplayer) && players[displayplayers[1]].spectator)
return;
#ifdef HWRENDER
if (rendermode != render_soft)
<<<<<<< HEAD
{
x = (INT32)gr_basewindowcenterx;
y = (INT32)gr_basewindowcentery;
}
=======
y = (INT32)gl_basewindowcentery;
>>>>>>> srb2/next
else
#endif
{
x = viewwindowx + (viewwidth>>1);
y = viewwindowy + (viewheight>>1);
}
if (splitscreen)
{
if (splitscreen > 1)
#ifdef HWRENDER
if (rendermode != render_soft)
x += (INT32)gr_viewwidth;
else
#endif
x += viewwidth;
else
{
#ifdef HWRENDER
if (rendermode != render_soft)
y += (INT32)gr_viewheight;
else
#endif
y += viewheight;
}
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
}
}
static inline void HU_DrawCrosshair3(void)
{
INT32 i, x, y;
i = cv_crosshair3.value & 3;
if (!i)
return;
if ((netgame || multiplayer) && players[displayplayers[2]].spectator)
return;
#ifdef HWRENDER
if (rendermode != render_soft)
{
x = (INT32)gr_basewindowcenterx;
y = (INT32)gr_basewindowcentery;
}
else
#endif
{
x = viewwindowx + (viewwidth>>1);
y = viewwindowy + (viewheight>>1);
}
if (splitscreen > 1)
{
#ifdef HWRENDER
if (rendermode != render_soft)
y += (INT32)gl_viewheight;
else
#endif
y += viewheight;
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
}
}
static inline void HU_DrawCrosshair4(void)
{
INT32 i, x, y;
i = cv_crosshair4.value & 3;
if (!i)
return;
if ((netgame || multiplayer) && players[displayplayers[3]].spectator)
return;
#ifdef HWRENDER
if (rendermode != render_soft)
{
x = (INT32)gr_basewindowcenterx;
y = (INT32)gr_basewindowcentery;
}
else
#endif
{
x = viewwindowx + (viewwidth>>1);
y = viewwindowy + (viewheight>>1);
}
if (splitscreen > 2)
{
#ifdef HWRENDER
if (rendermode != render_soft)
{
x += (INT32)gr_viewwidth;
y += (INT32)gr_viewheight;
}
else
#endif
{
x += viewwidth;
y += viewheight;
}
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
}
}*/
static void HU_DrawCEcho(void) static void HU_DrawCEcho(void)
{ {
INT32 i = 0; INT32 i = 0;
@ -2323,17 +2157,12 @@ void HU_Drawer(void)
{ {
if (LUA_HudEnabled(hud_rankings)) if (LUA_HudEnabled(hud_rankings))
HU_DrawRankings(); HU_DrawRankings();
<<<<<<< HEAD
LUAh_ScoresHUD(); LUAh_ScoresHUD();
} }
if (demo.playback) if (demo.playback)
{ {
HU_DrawDemoInfo(); HU_DrawDemoInfo();
=======
if (gametyperules & GTR_CAMPAIGN)
HU_DrawNetplayCoopOverlay();
>>>>>>> srb2/next
} }
} }
@ -2460,7 +2289,6 @@ void HU_Erase(void)
// IN-LEVEL MULTIPLAYER RANKINGS // IN-LEVEL MULTIPLAYER RANKINGS
//====================================================================== //======================================================================
<<<<<<< HEAD
static int static int
Ping_gfx_num (int ping) Ping_gfx_num (int ping)
{ {
@ -2475,10 +2303,6 @@ Ping_gfx_num (int ping)
else else
return 4; return 4;
} }
=======
#define supercheckdef (!(players[tab[i].num].charflags & SF_NOSUPERSPRITES) && ((players[tab[i].num].powers[pw_super] && players[tab[i].num].mo && (players[tab[i].num].mo->state < &states[S_PLAY_SUPER_TRANS1] || players[tab[i].num].mo->state >= &states[S_PLAY_SUPER_TRANS6])) || (players[tab[i].num].powers[pw_carry] == CR_NIGHTSMODE && skins[players[tab[i].num].skin].flags & SF_SUPER)))
#define greycheckdef (players[tab[i].num].spectator || players[tab[i].num].playerstate == PST_DEAD || (G_IsSpecialStage(gamemap) && players[tab[i].num].exiting))
>>>>>>> srb2/next
// //
// HU_drawPing // HU_drawPing
@ -2627,27 +2451,7 @@ static void HU_DrawRankings(void)
timeval = timelimitintics; timeval = timelimitintics;
timeval /= TICRATE; timeval /= TICRATE;
<<<<<<< HEAD
if (leveltime <= (timelimitintics + starttime)) if (leveltime <= (timelimitintics + starttime))
=======
//V_DrawSmallScaledPatch (x, y-4, 0, livesback);
if (tab[i].color == 0)
{
colormap = colormaps;
if (players[tab[i].num].powers[pw_super] && !(players[tab[i].num].charflags & SF_NOSUPERSPRITES))
V_DrawFixedPatch(x*FRACUNIT, y*FRACUNIT, FRACUNIT/4, 0, superprefix[players[tab[i].num].skin], 0);
else
{
if (greycheck)
V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, V_HUDTRANSHALF, faceprefix[players[tab[i].num].skin], 0);
else
V_DrawFixedPatch(x*FRACUNIT, (y)*FRACUNIT, FRACUNIT/4, 0, faceprefix[players[tab[i].num].skin], 0);
}
}
else
{
if (supercheck)
>>>>>>> srb2/next
{ {
V_DrawCenteredString(64, 8, 0, "TIME LEFT"); V_DrawCenteredString(64, 8, 0, "TIME LEFT");
V_DrawCenteredString(64, 16, hilicol, va("%u", timeval)); V_DrawCenteredString(64, 16, hilicol, va("%u", timeval));