diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 9ff155e8b..d41bd60c9 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -255,6 +255,10 @@ void HU_Init(void) PR ("STCFN"); REG; + + PR ("MNUFN"); + REG; + PR ("TNYFN"); REG; diff --git a/src/hu_stuff.h b/src/hu_stuff.h index 86024d979..92ecdbc41 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -67,6 +67,7 @@ extern "C" { enum { X (HU), + X (MENU), X (TINY), X (FILE), diff --git a/src/v_video.cpp b/src/v_video.cpp index 971afa013..25903e390 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -2291,6 +2291,7 @@ void V_DrawStringScaled( { default: case HU_FONT: + case MENU_FONT: spacew = 4; switch (spacing) { @@ -2361,6 +2362,7 @@ void V_DrawStringScaled( { default: case HU_FONT: + case MENU_FONT: case TINY_FONT: case KART_FONT: lfh = 12; @@ -2603,6 +2605,7 @@ fixed_t V_StringScaledWidth( { default: case HU_FONT: + case MENU_FONT: spacew = 4; switch (spacing) { @@ -2671,6 +2674,7 @@ fixed_t V_StringScaledWidth( { default: case HU_FONT: + case MENU_FONT: case TINY_FONT: case KART_FONT: lfh = 12; @@ -2913,6 +2917,18 @@ void V_DrawRightAlignedTimerString(INT32 x, INT32 y, INT32 option, const char *s V_DrawTimerString(x, y, option, string); } +void V_DrawCenteredMenuString(INT32 x, INT32 y, INT32 option, const char *string) +{ + x -= V_MenuStringWidth(string, option)/2; + V_DrawMenuString(x, y, option, string); +} + +void V_DrawRightAlignedMenuString(INT32 x, INT32 y, INT32 option, const char *string) +{ + x -= V_MenuStringWidth(string, option); + V_DrawMenuString(x, y, option, string); +} + void V_DrawCenteredGamemodeString(INT32 x, INT32 y, INT32 option, const UINT8 *colormap, const char *string) { x -= V_GamemodeStringWidth(string, option)/2; diff --git a/src/v_video.h b/src/v_video.h index 441f23c0b..eeaf5d288 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -374,6 +374,15 @@ void V_DrawProfileNum(INT32 x, INT32 y, INT32 flags, UINT8 num); void V_DrawCenteredTimerString(INT32 x, INT32 y, INT32 option, const char *string); void V_DrawRightAlignedTimerString(INT32 x, INT32 y, INT32 option, const char *string); +#define V_DrawMenuString( x,y,option,string ) \ + V__DrawDupxString (x,y,FRACUNIT,option,NULL,MENU_FONT,string) + +#define V_MenuStringWidth( string,option ) \ + V__IntegerStringWidth ( FRACUNIT,option,MENU_FONT,string ) + +void V_DrawCenteredMenuString(INT32 x, INT32 y, INT32 option, const char *string); +void V_DrawRightAlignedMenuString(INT32 x, INT32 y, INT32 option, const char *string); + #define V_DrawGamemodeString( x,y,option,cm,string ) \ V__DrawDupxString (x,y,FRACUNIT,option,cm,GM_FONT,string)