diff --git a/src/y_inter.c b/src/y_inter.c index 2fd37ff33b9a3a64aa8ede438fd9ce4ed8874469..ff4b798f0f41b829c81dddb192f5c4f8f8f67fcd 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -159,6 +159,20 @@ static void Y_CalculateMatchWinners(void); static void Y_FollowIntermission(void); static void Y_UnloadData(void); +// Stuff copy+pasted from st_stuff.c +static INT32 SCX(INT32 x) +{ + return FixedInt(FixedMul(x<<FRACBITS, vid.fdupx)); +} +static INT32 SCY(INT32 z) +{ + return FixedInt(FixedMul(z<<FRACBITS, vid.fdupy)); +} + +#define ST_DrawNumFromHud(h,n) V_DrawTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART|V_HUDTRANS, n) +#define ST_DrawPadNumFromHud(h,n,q) V_DrawPaddedTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART|V_HUDTRANS, n, q) +#define ST_DrawPatchFromHud(h,p) V_DrawScaledPatch(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART|V_HUDTRANS, p) + // // Y_IntermissionDrawer // @@ -204,28 +218,31 @@ void Y_IntermissionDrawer(void) INT32 bonusy; // draw score - V_DrawScaledPatch(hudinfo[HUD_SCORE].x, hudinfo[HUD_SCORE].y, V_SNAPTOLEFT, sboscore); - V_DrawTallNum(hudinfo[HUD_SCORENUM].x, hudinfo[HUD_SCORENUM].y, V_SNAPTOLEFT, data.coop.score); + ST_DrawPatchFromHud(HUD_SCORE, sboscore); + ST_DrawNumFromHud(HUD_SCORENUM, data.coop.score); // draw time - V_DrawScaledPatch(hudinfo[HUD_TIME].x, hudinfo[HUD_TIME].y, V_SNAPTOLEFT, sbotime); + ST_DrawPatchFromHud(HUD_TIME, sbotime); if (cv_timetic.value == 1) - V_DrawTallNum(hudinfo[HUD_SECONDS].x, hudinfo[HUD_SECONDS].y, V_SNAPTOLEFT, data.coop.tics); + ST_DrawNumFromHud(HUD_SECONDS, data.coop.tics); else { + INT32 seconds, minutes, tictrn; + + seconds = G_TicsToSeconds(data.coop.tics); + minutes = G_TicsToMinutes(data.coop.tics, false); + 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 + // we should show centiseconds on the intermission screen too, if the conditions are right. if (modeattacking || cv_timetic.value == 2) { - V_DrawPaddedTallNum(hudinfo[HUD_TICS].x, hudinfo[HUD_TICS].y, V_SNAPTOLEFT, - G_TicsToCentiseconds(data.coop.tics), 2); - V_DrawScaledPatch(hudinfo[HUD_TIMETICCOLON].x, hudinfo[HUD_TIMETICCOLON].y, V_SNAPTOLEFT, sboperiod); + ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period + ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics } - - V_DrawPaddedTallNum(hudinfo[HUD_SECONDS].x, hudinfo[HUD_SECONDS].y, V_SNAPTOLEFT, - G_TicsToSeconds(data.coop.tics), 2); - V_DrawScaledPatch(hudinfo[HUD_TIMECOLON].x, hudinfo[HUD_TIMECOLON].y, V_SNAPTOLEFT, sbocolon); - V_DrawTallNum(hudinfo[HUD_MINUTES].x, hudinfo[HUD_MINUTES].y, V_SNAPTOLEFT, - G_TicsToMinutes(data.coop.tics, false)); } // draw the "got through act" lines and act number