suffering

This commit is contained in:
James R 2020-07-05 18:15:05 -07:00
parent c946c32c5c
commit 0647583071
6 changed files with 21 additions and 42 deletions

View file

@ -48,7 +48,6 @@ enum
{
X (HU),
X (TINY),
X (KART),
X (LT),
X (CRED),

View file

@ -14,6 +14,7 @@
#include "fastcmp.h"
#include "r_defs.h"
#include "r_local.h"
#include "hu_stuff.h" // fonts
#include "st_stuff.h" // hudinfo[]
#include "g_game.h"
#include "i_video.h" // rendermode

View file

@ -7807,7 +7807,7 @@ static void M_DrawSoundTest(void)
{
V_DrawFill(165+140-9, y-4, 8, 16, 150);
//V_DrawCharacter(165+140-8, y, '\x19' | V_YELLOWMAP, false);
V_DrawFixedPatch((165+140-9)<<FRACBITS, (y<<FRACBITS)-(bounce*4), FRACUNIT, 0, hu_font['\x19'-HU_FONTSTART], V_GetStringColormap(V_YELLOWMAP));
V_DrawFixedPatch((165+140-9)<<FRACBITS, (y<<FRACBITS)-(bounce*4), FRACUNIT, 0, fontv[HU_FONT].font['\x19'-HU_FONTSTART], V_GetStringColormap(V_YELLOWMAP));
}
}
t++;

View file

@ -1676,7 +1676,7 @@ static void ST_drawNightsRecords(void)
V_DrawString(BASEVIDWIDTH/2 - 56, 148, aflag, "BONUS:");
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 56, 140, V_ORANGEMAP|aflag, va("%d", stplyr->finishedspheres));
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 56, 148, V_ORANGEMAP|aflag, va("%d", stplyr->finishedspheres * 50));
ST_DrawNightsOverlayNum((BASEVIDWIDTH/2 + 56)<<FRACBITS, 160<<FRACBITS, FRACUNIT, aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_AZURE);
ST_DrawNightsOverlayNum((BASEVIDWIDTH/2 + 56)<<FRACBITS, 160<<FRACBITS, FRACUNIT, aflag, stplyr->lastmarescore, fontv[NIGHTSNUM_FONT].font, SKINCOLOR_AZURE);
// If new record, say so!
if (!(netgame || multiplayer) && G_GetBestNightsScore(gamemap, stplyr->lastmare + 1) <= stplyr->lastmarescore)
@ -1768,7 +1768,7 @@ static void ST_drawNiGHTSLink(void)
y -= (11*scale);
ST_DrawNightsOverlayNum(x-(4*scale), y, scale, aflag, (stplyr->linkcount-1), nightsnum, colornum);
ST_DrawNightsOverlayNum(x-(4*scale), y, scale, aflag, (stplyr->linkcount-1), fontv[NIGHTSNUM_FONT].font, colornum);
V_DrawFixedPatch(x+(4*scale), y, scale, aflag, nightslink,
colornum == 0 ? colormaps : R_GetTranslationColormap(TC_DEFAULT, colornum, GTC_CACHE));
@ -1983,7 +1983,7 @@ static void ST_drawNiGHTSHUD(void)
// Score
if (!stplyr->exiting && !oldspecialstage && LUA_HudEnabled(hud_nightsscore))
ST_DrawNightsOverlayNum(304<<FRACBITS, 14<<FRACBITS, FRACUNIT, V_PERPLAYER|V_SNAPTOTOP|V_SNAPTORIGHT, stplyr->marescore, nightsnum, SKINCOLOR_AZURE);
ST_DrawNightsOverlayNum(304<<FRACBITS, 14<<FRACBITS, FRACUNIT, V_PERPLAYER|V_SNAPTOTOP|V_SNAPTORIGHT, stplyr->marescore, fontv[NIGHTSNUM_FONT].font, SKINCOLOR_AZURE);
// TODO give this its own section for Lua
if (!stplyr->exiting && LUA_HudEnabled(hud_nightsscore))
@ -2049,7 +2049,7 @@ static void ST_drawNiGHTSHUD(void)
&& !(stplyr->powers[pw_shield] & SH_PROTECTWATER))
col = SKINCOLOR_ORANGE;
ST_DrawNightsOverlayNum((160 + numbersize)<<FRACBITS, 14<<FRACBITS, FRACUNIT, V_PERPLAYER|V_SNAPTOTOP, realnightstime, nightsnum, col);
ST_DrawNightsOverlayNum((160 + numbersize)<<FRACBITS, 14<<FRACBITS, FRACUNIT, V_PERPLAYER|V_SNAPTOTOP, realnightstime, fontv[NIGHTSNUM_FONT].font, col);
// Show exact time in debug
if (cv_debug & DBG_NIGHTSBASIC)
@ -2677,7 +2677,7 @@ static void ST_overlayDrawer(void)
else
{
tic_t num = time;
INT32 sz = SHORT(tallnum[0]->width)/2, width = 0;
INT32 sz = SHORT(fontv[TALLNUM_FONT].font[0]->width)/2, width = 0;
do
{
width += sz;

View file

@ -2013,7 +2013,7 @@ void V_DrawChatCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed, UI
if (c < 0 || c >= HU_FONTSIZE || !fontv[HU_FONT].font[c])
return;
w = (vid.width < 640 ) ? (SHORT(hu_font[c]->width)/2) : (SHORT(hu_font[c]->width)); // use normal sized characters if we're using a terribly low resolution.
w = (vid.width < 640 ) ? (SHORT(fontv[HU_FONT].font[c]->width)/2) : (SHORT(fontv[HU_FONT].font[c]->width)); // use normal sized characters if we're using a terribly low resolution.
if (x + w > vid.width)
return;
@ -2098,6 +2098,7 @@ static inline fixed_t FixedCharacterDim(
INT32 dupx,
fixed_t * cwp)
{
(void)scale;
(void)hchw;
(void)dupx;
(*cwp) = chw;
@ -2239,20 +2240,6 @@ void V_DrawStringScaled(
spacewidth = 3;*/
}
break;
case KART_FONT:
spacew = 12;
switch (spacing)
{
case V_MONOSPACE:
spacew = 12;
/* FALLTHRU */
case V_OLDSPACING:
chw = 12;
break;
case V_6WIDTHSPACE:
spacew = 6;
}
break;
case LT_FONT:
spacew = 12;
break;
@ -2265,7 +2252,6 @@ void V_DrawStringScaled(
default:
case HU_FONT:
case TINY_FONT:
case KART_FONT:
if (( flags & V_RETURN8 ))
lfh = 8;
else
@ -2426,13 +2412,6 @@ void V_DrawRightAlignedThinString(INT32 x, INT32 y, INT32 option, const char *st
// NOTE: the text is centered for screens larger than the base width
//
// Literally a wrapper. ~Golden
void V_DrawSmallThinString(INT32 x, INT32 y, INT32 option, const char *string)
{
x <<= FRACBITS;
y <<= FRACBITS;
V_DrawSmallThinStringAtFixed((fixed_t)x, (fixed_t)y, option, string);
}
void V_DrawCenteredSmallThinString(INT32 x, INT32 y, INT32 option, const char *string)
{
x <<= FRACBITS;
@ -2550,9 +2529,9 @@ void V_DrawLevelActNum(INT32 x, INT32 y, INT32 flags, UINT8 num)
while (num > 0)
{
if (num > 9) // if there are two digits, draw second digit first
V_DrawScaledPatch(x + (V_LevelActNumWidth(num) - V_LevelActNumWidth(num%10)), y, flags, ttlnum[num%10]);
V_DrawScaledPatch(x + (V_LevelActNumWidth(num) - V_LevelActNumWidth(num%10)), y, flags, fontv[TTLNUM_FONT].font[num%10]);
else
V_DrawScaledPatch(x, y, flags, ttlnum[num]);
V_DrawScaledPatch(x, y, flags, fontv[TTLNUM_FONT].font[num]);
num = num/10;
}
}
@ -2601,13 +2580,13 @@ static void V_DrawNameTagLine(INT32 x, INT32 y, INT32 option, fixed_t scale, UIN
c -= NT_FONTSTART;
// character does not exist or is a space
if (c < 0 || c >= NT_FONTSIZE || !ntb_font[c] || !nto_font[c])
if (c < 0 || c >= NT_FONTSIZE || !fontv[NTB_FONT].font[c] || !fontv[NTO_FONT].font[c])
{
cx += FixedMul((4 * dupx)*FRACUNIT, scale);
continue;
}
w = FixedMul((SHORT(ntb_font[c]->width)+2 * dupx) * FRACUNIT, scale);
w = FixedMul((SHORT(fontv[NTB_FONT].font[c]->width)+2 * dupx) * FRACUNIT, scale);
if (FixedInt(cx) > scrwidth)
continue;
@ -2617,8 +2596,8 @@ static void V_DrawNameTagLine(INT32 x, INT32 y, INT32 option, fixed_t scale, UIN
continue;
}
V_DrawFixedPatch(cx, cy, scale, option, nto_font[c], outlinecolormap);
V_DrawFixedPatch(cx, cy, scale, option, ntb_font[c], basecolormap);
V_DrawFixedPatch(cx, cy, scale, option, fontv[NTO_FONT].font[c], outlinecolormap);
V_DrawFixedPatch(cx, cy, scale, option, fontv[NTB_FONT].font[c], basecolormap);
cx += w;
}
@ -2745,10 +2724,10 @@ INT32 V_NameTagWidth(const char *string)
for (i = 0; i < strlen(string); i++)
{
c = toupper(string[i]) - NT_FONTSTART;
if (c < 0 || c >= NT_FONTSIZE || !ntb_font[c] || !nto_font[c])
if (c < 0 || c >= NT_FONTSIZE || !fontv[NTB_FONT].font[c] || !fontv[NTO_FONT].font[c])
w += 4;
else
w += SHORT(ntb_font[c]->width)+2;
w += SHORT(fontv[NTB_FONT].font[c]->width)+2;
}
return w;
@ -2826,11 +2805,11 @@ INT16 V_LevelActNumWidth(UINT8 num)
INT16 result = 0;
if (num == 0)
result = SHORT(ttlnum[num]->width);
result = SHORT(fontv[TTLNUM_FONT].font[num]->width);
while (num > 0 && num <= 99)
{
result = result + SHORT(ttlnum[num%10]->width);
result = result + SHORT(fontv[TTLNUM_FONT].font[num%10]->width);
num = num/10;
}

View file

@ -429,7 +429,7 @@ dontdrawbg:
V_DrawScaledPatch(152, bonusy, 0, data.coop.ptotal);
V_DrawTallNum(BASEVIDWIDTH - 68, bonusy + 1, 0, data.coop.total);
}
bonusy -= (3*SHORT(tallnum[0]->height)/2) + 1;
bonusy -= (3*SHORT(fontv[TALLNUM_FONT].font[0]->height)/2) + 1;
// Draw bonuses
for (i = 3; i >= 0; --i)
@ -439,7 +439,7 @@ dontdrawbg:
V_DrawScaledPatch(152, bonusy, 0, data.coop.bonuspatches[i]);
V_DrawTallNum(BASEVIDWIDTH - 68, bonusy + 1, 0, data.coop.bonuses[i].points);
}
bonusy -= (3*SHORT(tallnum[0]->height)/2) + 1;
bonusy -= (3*SHORT(fontv[TALLNUM_FONT].font[0]->height)/2) + 1;
}
}
else if (intertype == int_spec)