small cleanup intermission drawer
This commit is contained in:
1 parent
a6c28245be
commit
e272885f26
2 files changed
+10
-84
No files matched your search
@@ -536,7 +536,6 @@ static boolean D_Display(void)
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
VID_BlitLinearScreen(screens[0], screens[1], vid.width*vid.bpp, vid.height, vid.width*vid.bpp, vid.rowbytes);
|
||||
usebuffer = true;
|
||||
}
|
||||
lastdraw = false;
|
||||
}
|
||||
|
||||
+10
-83
@@ -80,10 +80,6 @@ static y_data data;
|
||||
static patch_t *bgpatch = NULL; // INTERSCR
|
||||
static patch_t *widebgpatch = NULL; // INTERSCW
|
||||
static patch_t *bgtile = NULL; // SPECTILE/SRB2BACK
|
||||
//static patch_t *interpic = NULL; // custom picture defined in map header
|
||||
//static boolean usetile;
|
||||
boolean usebuffer = false;
|
||||
//static boolean useinterpic;
|
||||
static INT32 timer;
|
||||
|
||||
static INT32 intertic;
|
||||
@@ -369,41 +365,24 @@ void Y_IntermissionDrawer(void)
|
||||
if (intertype == int_none || rendermode == render_none)
|
||||
return;
|
||||
|
||||
if (!usebuffer)
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
||||
if (cv_betainterscreen.value
|
||||
#ifdef HWRENDER
|
||||
|| (rendermode == render_opengl && cv_grscreentextures.value != 2) // use the neato kart bg for intermission on disabled screen textures
|
||||
#endif
|
||||
)
|
||||
V_DrawPatchFill(bgtile); // use the neato kart bg for intermission on disabled screen textures
|
||||
//else if (useinterpic)
|
||||
//V_DrawScaledPatch(0, 0, 0, interpic);
|
||||
//else if (!usetile)
|
||||
else
|
||||
{
|
||||
if (rendermode == render_soft && usebuffer)
|
||||
if (rendermode == render_soft)
|
||||
VID_BlitLinearScreen(screens[1], screens[0], vid.width*vid.bpp, vid.height, vid.width*vid.bpp, vid.rowbytes);
|
||||
#ifdef HWRENDER
|
||||
else if(rendermode != render_soft && usebuffer)
|
||||
{
|
||||
else if(rendermode == render_opengl)
|
||||
HWR_DrawIntermissionBG();
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
if (widebgpatch && rendermode == render_soft && vid.width / vid.dupx == 400)
|
||||
V_DrawScaledPatch(0, 0, V_SNAPTOLEFT, widebgpatch);
|
||||
else if (bgpatch)
|
||||
V_DrawScaledPatch(0, 0, 0, bgpatch);
|
||||
}
|
||||
}
|
||||
//else if (bgtile)
|
||||
//V_DrawPatchFill(bgtile);
|
||||
|
||||
if (usebuffer) // Fade everything out
|
||||
V_DrawFadeScreen(0xFF00, 22);
|
||||
// Fade everything out
|
||||
V_DrawFadeScreen(0xFF00, 22);
|
||||
|
||||
if (!splitscreen)
|
||||
whiteplayer = demo.playback ? displayplayers[0] : consoleplayer;
|
||||
@@ -417,6 +396,7 @@ void Y_IntermissionDrawer(void)
|
||||
|
||||
if (sorttic != -1 && intertic >= sorttic && !demo.playback)
|
||||
{
|
||||
// yes this may actually overflow
|
||||
INT64 count = (intertic - sorttic);
|
||||
|
||||
if (count < 8)
|
||||
@@ -425,48 +405,7 @@ void Y_IntermissionDrawer(void)
|
||||
x += (((((16 - count)<<FRACBITS) - R_GetHudUncap()) * vid.width)>>FRACBITS) / (8 * vid.dupx);
|
||||
}
|
||||
|
||||
// SRB2kart 290117 - compeltely replaced this block.
|
||||
/*if (intertype == int_timeattack)
|
||||
{
|
||||
// draw time
|
||||
ST_DrawPatchFromHud(HUD_TIME, sbotime);
|
||||
if (cv_timetic.value)
|
||||
ST_DrawNumFromHud(HUD_SECONDS, data.coop.tics);
|
||||
else
|
||||
{
|
||||
INT32 seconds, minutes, tictrn;
|
||||
|
||||
seconds = G_TicsToSeconds(data.coop.tics);
|
||||
minutes = G_TicsToMinutes(data.coop.tics, true);
|
||||
tictrn = G_TicsToCentiseconds(data.coop.tics);
|
||||
|
||||
ST_DrawNumFromHud(HUD_MINUTES, minutes); // Minutes
|
||||
ST_DrawPatchFromHud(HUD_TIMECOLON, sbocolon); // Colon
|
||||
ST_DrawPadNumFromHud(HUD_SECONDS, seconds, 2); // Seconds
|
||||
|
||||
// SRB2kart - pulled from old coop block, just in case we need it
|
||||
// we should show centiseconds on the intermission screen too, if the conditions are right.
|
||||
if (modeattacking || cv_timetic.value == 2)
|
||||
{
|
||||
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period
|
||||
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
|
||||
}
|
||||
|
||||
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period
|
||||
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
|
||||
}
|
||||
|
||||
// draw the "got through act" lines and act number
|
||||
V_DrawLevelTitle(data.coop.passedx1, 49, 0, data.coop.passed1);
|
||||
V_DrawLevelTitle(data.coop.passedx2, 49+V_LevelNameHeight(data.coop.passed2)+2, 0, data.coop.passed2);
|
||||
|
||||
if (strlen(mapheaderinfo[prevmap]->actnum) > 0)
|
||||
V_DrawScaledPatch(244, 57, 0, data.coop.ttlnum);
|
||||
|
||||
//if (gottimebonus && endtic != -1)
|
||||
// V_DrawCenteredString(BASEVIDWIDTH/2, 172, V_YELLOWMAP, "TIME BONUS UNLOCKED!");
|
||||
}
|
||||
else*/ if (intertype == int_race || intertype == int_match)
|
||||
if (intertype == int_race || intertype == int_match)
|
||||
{
|
||||
#define NUMFORNEWCOLUMN 8
|
||||
INT32 y = 41, gutter = ((data.match.numplayers > NUMFORNEWCOLUMN) ? 0 : (BASEVIDWIDTH/2));
|
||||
@@ -631,6 +570,7 @@ void Y_IntermissionDrawer(void)
|
||||
}
|
||||
|
||||
if ((demo.recording || demo.savemode == DSM_SAVED) && !demo.playback)
|
||||
{
|
||||
switch (demo.savemode)
|
||||
{
|
||||
case DSM_NOTSAVING:
|
||||
@@ -648,10 +588,7 @@ void Y_IntermissionDrawer(void)
|
||||
default: // Don't render any text here
|
||||
break;
|
||||
}
|
||||
|
||||
// Make it obvious that scrambling is happening next round.
|
||||
if (cv_scrambleonchange.value && cv_teamscramble.value && (intertic/TICRATE % 2 == 0))
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, hilicol, M_GetText("Teams will be scrambled next round!"));
|
||||
}
|
||||
|
||||
if (renderisnewtic)
|
||||
{
|
||||
@@ -876,14 +813,10 @@ void Y_StartIntermission(void)
|
||||
|
||||
if (gametype == GT_MATCH)
|
||||
intertype = int_match;
|
||||
else //if (gametype == GT_RACE)
|
||||
else
|
||||
intertype = int_race;
|
||||
}
|
||||
|
||||
// We couldn't display the intermission even if we wanted to.
|
||||
// But we still need to give the players their score bonuses, dummy.
|
||||
//if (dedicated) return;
|
||||
|
||||
// This should always exist, but just in case...
|
||||
if(!mapheaderinfo[prevmap])
|
||||
P_AllocMapHeader(prevmap);
|
||||
@@ -920,12 +853,7 @@ void Y_StartIntermission(void)
|
||||
break;
|
||||
}
|
||||
|
||||
//if (intertype == int_race || intertype == int_match)
|
||||
{
|
||||
bgtile = W_CachePatchName("SRB2BACK", PU_STATIC);
|
||||
//usetile = useinterpic = false;
|
||||
usebuffer = true;
|
||||
}
|
||||
bgtile = W_CachePatchName("SRB2BACK", PU_STATIC);
|
||||
|
||||
LUA_HUD_DestroyDrawList(luahuddrawlist_intermission);
|
||||
luahuddrawlist_intermission = LUA_HUD_CreateDrawList();
|
||||
@@ -943,7 +871,6 @@ void Y_EndIntermission(void)
|
||||
endtic = -1;
|
||||
sorttic = -1;
|
||||
intertype = int_none;
|
||||
usebuffer = false;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user