mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Merge branch 'fix-noscalepatch-with-string-drawers' into 'next'
Fix string drawing functions so they account for V_NOSCALEPATCH effectively… See merge request STJr/SRB2!1107
This commit is contained in:
commit
27b7b5efce
1 changed files with 34 additions and 4 deletions
|
@ -2118,6 +2118,9 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
scrwidth -= left;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
{
|
||||
case V_MONOSPACE:
|
||||
|
@ -2231,6 +2234,9 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
scrwidth -= left;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
|
@ -2346,6 +2352,9 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
scrwidth -= left;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
|
@ -2481,6 +2490,9 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
|
|||
scrwidth -= left;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
|
@ -2594,6 +2606,9 @@ void V_DrawSmallStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *st
|
|||
scrwidth -= left;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
|
@ -2708,6 +2723,9 @@ void V_DrawThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *str
|
|||
scrwidth -= left;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
|
@ -2822,6 +2840,9 @@ void V_DrawSmallThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char
|
|||
scrwidth -= left;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
|
@ -2915,7 +2936,7 @@ void V_DrawTallNum(INT32 x, INT32 y, INT32 flags, INT32 num)
|
|||
INT32 w = SHORT(tallnum[0]->width);
|
||||
boolean neg;
|
||||
|
||||
if (flags & V_NOSCALESTART)
|
||||
if (flags & (V_NOSCALESTART|V_NOSCALEPATCH))
|
||||
w *= vid.dupx;
|
||||
|
||||
if ((neg = num < 0))
|
||||
|
@ -2940,7 +2961,7 @@ void V_DrawPaddedTallNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 digits)
|
|||
{
|
||||
INT32 w = SHORT(tallnum[0]->width);
|
||||
|
||||
if (flags & V_NOSCALESTART)
|
||||
if (flags & (V_NOSCALESTART|V_NOSCALEPATCH))
|
||||
w *= vid.dupx;
|
||||
|
||||
if (num < 0)
|
||||
|
@ -2993,6 +3014,9 @@ void V_DrawCreditString(fixed_t x, fixed_t y, INT32 option, const char *string)
|
|||
else
|
||||
dupx = dupy = 1;
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
c = *ch++;
|
||||
|
@ -3050,6 +3074,9 @@ static void V_DrawNameTagLine(INT32 x, INT32 y, INT32 option, fixed_t scale, UIN
|
|||
scrwidth -= left;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
for (;;ch++)
|
||||
{
|
||||
if (!*ch)
|
||||
|
@ -3265,6 +3292,9 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
scrwidth -= left;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALEPATCH)
|
||||
scrwidth *= vid.dupx;
|
||||
|
||||
for (;;ch++)
|
||||
{
|
||||
if (!*ch)
|
||||
|
@ -3400,8 +3430,8 @@ INT32 V_StringWidth(const char *string, INT32 option)
|
|||
w += (charwidth ? charwidth : SHORT(hu_font[c]->width));
|
||||
}
|
||||
|
||||
if (option & V_NOSCALESTART)
|
||||
w *= vid.dupx;
|
||||
if (option & (V_NOSCALESTART|V_NOSCALEPATCH))
|
||||
w *= vid.dupx;
|
||||
|
||||
return w;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue