From 7d9f1381601ba303ae8ebf53008893ac2d7de6c2 Mon Sep 17 00:00:00 2001 From: GoldenTails Date: Tue, 8 Oct 2019 22:11:40 -0500 Subject: [PATCH] Make V_DrawRightAlignedSmallThinString() a less precise wrapper for V_DrawRightAlignedSmallThinStringAtFixed() for new "small-thin-right" option in v.drawString() --- src/lua_hudlib.c | 5 +++++ src/v_video.c | 4 ++-- src/v_video.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 60d4d1c21..5c2cd6e32 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -122,6 +122,7 @@ enum align { align_smallcenter, align_smallright, align_smallthin, + align_smallthinright, align_smallthinfixed, align_smallthinfixedcenter, align_smallthinfixedright, @@ -146,6 +147,7 @@ static const char *const align_opt[] = { "small-center", "small-right", "small-thin", + "small-thin-right", "small-thin-fixed", "small-thin-fixed-center", "small-thin-fixed-right", @@ -785,6 +787,9 @@ static int libd_drawString(lua_State *L) case align_smallthin: V_DrawSmallThinString(x, y, flags, str); break; + case align_smallthinright: + V_DrawRightAlignedSmallThinString(x, y, flags, str); + break; case align_smallthinfixed: V_DrawSmallThinStringAtFixed(x, y, flags, str); break; diff --git a/src/v_video.c b/src/v_video.c index cdacd8127..e7cf845d8 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -2435,12 +2435,12 @@ void V_DrawSmallThinString(INT32 x, INT32 y, INT32 option, const char *string) V_DrawSmallThinStringAtFixed((fixed_t)x, (fixed_t)y, option, string); } -/*void V_DrawRightAlignedSmallThinString(INT32 x, INT32 y, INT32 option, const char *string) +void V_DrawRightAlignedSmallThinString(INT32 x, INT32 y, INT32 option, const char *string) { x <<= FRACBITS; y <<= FRACBITS; V_DrawRightAlignedSmallThinStringAtFixed((fixed_t)x, (fixed_t)y, option, string); -}*/ +} // Draws a string at a fixed_t location. void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string) diff --git a/src/v_video.h b/src/v_video.h index 9c7d67b11..169687183 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -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_DrawRightAlignedSmallThinString(INT32 x, INT32 y, INT32 option, const char *string); // draw a string using the hu_font at fixed_t coordinates void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string);