mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Create V_DrawRightAlignedThinStringAtFixed() for new "thin-fixed-right" option in v.drawString()
These function names are starting to become rediculous...
This commit is contained in:
parent
a091cf2e31
commit
e221e0b314
3 changed files with 14 additions and 0 deletions
|
|
@ -122,6 +122,7 @@ enum align {
|
||||||
align_smallthin,
|
align_smallthin,
|
||||||
align_thin,
|
align_thin,
|
||||||
align_thinfixed,
|
align_thinfixed,
|
||||||
|
align_thinfixedright,
|
||||||
align_thincenter,
|
align_thincenter,
|
||||||
align_thinright
|
align_thinright
|
||||||
};
|
};
|
||||||
|
|
@ -139,6 +140,7 @@ static const char *const align_opt[] = {
|
||||||
"small-thin",
|
"small-thin",
|
||||||
"thin",
|
"thin",
|
||||||
"thin-fixed",
|
"thin-fixed",
|
||||||
|
"thin-fixed-right",
|
||||||
"thin-center",
|
"thin-center",
|
||||||
"thin-right",
|
"thin-right",
|
||||||
NULL};
|
NULL};
|
||||||
|
|
@ -778,6 +780,9 @@ static int libd_drawString(lua_State *L)
|
||||||
case align_thinfixed:
|
case align_thinfixed:
|
||||||
V_DrawThinStringAtFixed(x, y, flags, str);
|
V_DrawThinStringAtFixed(x, y, flags, str);
|
||||||
break;
|
break;
|
||||||
|
case align_thinfixedright:
|
||||||
|
V_DrawRightAlignedThinStringAtFixed(x, y, flags, str);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2848,6 +2848,12 @@ void V_DrawThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void V_DrawRightAlignedThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
|
||||||
|
{
|
||||||
|
x -= V_ThinStringWidth(string, option)<<FRACBITS;
|
||||||
|
V_DrawThinStringAtFixed(x, y, option, string);
|
||||||
|
}
|
||||||
|
|
||||||
// Draws a tallnum. Replaces two functions in y_inter and st_stuff
|
// Draws a tallnum. Replaces two functions in y_inter and st_stuff
|
||||||
void V_DrawTallNum(INT32 x, INT32 y, INT32 flags, INT32 num)
|
void V_DrawTallNum(INT32 x, INT32 y, INT32 flags, INT32 num)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,10 @@ void V_DrawCenteredStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char
|
||||||
void V_DrawRightAlignedStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string);
|
void V_DrawRightAlignedStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string);
|
||||||
|
|
||||||
void V_DrawSmallStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string);
|
void V_DrawSmallStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string);
|
||||||
|
|
||||||
|
// draw a string using the tny_font at fixed_t coordinates
|
||||||
void V_DrawThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string);
|
void V_DrawThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string);
|
||||||
|
void V_DrawRightAlignedThinStringAtFixed(INT32 x, INT32 y, INT32 option, const char *string);
|
||||||
|
|
||||||
// Draw tall nums, used for menu, HUD, intermission
|
// Draw tall nums, used for menu, HUD, intermission
|
||||||
void V_DrawTallNum(INT32 x, INT32 y, INT32 flags, INT32 num);
|
void V_DrawTallNum(INT32 x, INT32 y, INT32 flags, INT32 num);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue