mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 21:20:54 +00:00
Make V_DrawCenteredSmallThinString() a less precise wrapper for V_DrawCenteredSmallThinStringAtFixed() for new "small-thin-center" option in v.drawString()
This commit is contained in:
parent
7d9f138160
commit
fe17933156
3 changed files with 13 additions and 0 deletions
|
@ -122,6 +122,7 @@ enum align {
|
|||
align_smallcenter,
|
||||
align_smallright,
|
||||
align_smallthin,
|
||||
align_smallthincenter,
|
||||
align_smallthinright,
|
||||
align_smallthinfixed,
|
||||
align_smallthinfixedcenter,
|
||||
|
@ -147,6 +148,7 @@ static const char *const align_opt[] = {
|
|||
"small-center",
|
||||
"small-right",
|
||||
"small-thin",
|
||||
"small-thin-center",
|
||||
"small-thin-right",
|
||||
"small-thin-fixed",
|
||||
"small-thin-fixed-center",
|
||||
|
@ -787,6 +789,9 @@ static int libd_drawString(lua_State *L)
|
|||
case align_smallthin:
|
||||
V_DrawSmallThinString(x, y, flags, str);
|
||||
break;
|
||||
case align_smallthincenter:
|
||||
V_DrawCenteredSmallThinString(x, y, flags, str);
|
||||
break;
|
||||
case align_smallthinright:
|
||||
V_DrawRightAlignedSmallThinString(x, y, flags, str);
|
||||
break;
|
||||
|
|
|
@ -2435,6 +2435,13 @@ void V_DrawSmallThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
V_DrawSmallThinStringAtFixed((fixed_t)x, (fixed_t)y, option, string);
|
||||
}
|
||||
|
||||
void V_DrawCenteredSmallThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||
{
|
||||
x <<= FRACBITS;
|
||||
y <<= FRACBITS;
|
||||
V_DrawCenteredSmallThinStringAtFixed((fixed_t)x, (fixed_t)y, option, string);
|
||||
}
|
||||
|
||||
void V_DrawRightAlignedSmallThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||
{
|
||||
x <<= FRACBITS;
|
||||
|
|
|
@ -215,6 +215,7 @@ void V_DrawRightAlignedThinString(INT32 x, INT32 y, INT32 option, const char *st
|
|||
|
||||
// draw a string using the tny_font, 0.5x scale
|
||||
void V_DrawSmallThinString(INT32 x, INT32 y, INT32 option, const char *string);
|
||||
void V_DrawCenteredSmallThinString(INT32 x, INT32 y, INT32 option, const char *string);
|
||||
void V_DrawRightAlignedSmallThinString(INT32 x, INT32 y, INT32 option, const char *string);
|
||||
|
||||
// draw a string using the hu_font at fixed_t coordinates
|
||||
|
|
Loading…
Reference in a new issue