From cb8dc04660fe8b83f400be2a80a2cffdbe8c2076 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 19 Jun 2017 23:07:23 +0000 Subject: [PATCH] Make menutext use MF_Redfont fields. git-svn-id: https://svn.eduke32.com/eduke32@6209 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/menus.cpp | 4 ++-- source/duke3d/src/menus.h | 2 ++ source/duke3d/src/screentext.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 33ffc1a99..a62b78f6a 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -109,7 +109,7 @@ static void Menu_DrawBackground(const vec2_t origin) static void Menu_DrawTopBar(const vec2_t origin) { - rotatesprite_fs(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (19<<16), 65536L,0,MENUBAR,16,0,10); + rotatesprite_fs(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (19<<16), MF_Redfont.cursorScale, 0,MENUBAR,16,0,10); } static void Menu_DrawTopBarCaption(const char *caption, const vec2_t origin) @@ -148,7 +148,7 @@ they effectively stand in for curly braces as struct initializers. // common font types // tilenums are set after namesdyn runs -static MenuFont_t MF_Redfont = { { 5<<16, 15<<16 }, { 0, 0 }, 65536, 20<<16, 110<<16, 65536, TEXT_BIGALPHANUM | TEXT_UPPERCASE, -1, 10, 0, 1 }; +MenuFont_t MF_Redfont = { { 5<<16, 15<<16 }, { 0, 0 }, 65536, 20<<16, 110<<16, 65536, TEXT_BIGALPHANUM | TEXT_UPPERCASE, -1, 10, 0, 1 }; static MenuFont_t MF_Bluefont = { { 5<<16, 7<<16 }, { -(1<<16), 0 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 16 }; static MenuFont_t MF_BluefontRed = { { 5<<16, 7<<16 }, { -(1<<16), 0 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 10, 16 }; static MenuFont_t MF_Minifont = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 16 }; diff --git a/source/duke3d/src/menus.h b/source/duke3d/src/menus.h index edb839f18..05ca53650 100644 --- a/source/duke3d/src/menus.h +++ b/source/duke3d/src/menus.h @@ -455,6 +455,8 @@ void Menu_Open(size_t playerID); void Menu_Close(size_t playerID); void M_DisplayMenus(void); +extern MenuFont_t MF_Redfont; + #define M_MOUSETIMEOUT 210 extern int32_t m_mouselastactivity; diff --git a/source/duke3d/src/screentext.cpp b/source/duke3d/src/screentext.cpp index 670809762..202a85995 100644 --- a/source/duke3d/src/screentext.cpp +++ b/source/duke3d/src/screentext.cpp @@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "duke3d.h" #include "compat.h" #include "sbar.h" +#include "menus.h" int32_t quotebot, quotebotgoal; int32_t user_quote_time[MAXUSERQUOTES]; @@ -1009,7 +1010,7 @@ int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int void menutext_(int32_t x, int32_t y, int32_t s, char const *t, int32_t o, int32_t f) { - G_ScreenText(BIGALPHANUM, x, y - (12<<16), 65536L, 0, 0, t, s, 0, o|ROTATESPRITE_FULL16, 0, 5<<16, 16<<16, 0, 0, f|TEXT_BIGALPHANUM|TEXT_UPPERCASE|TEXT_LITERALESCAPE, 0, 0, xdim-1, ydim-1); + G_ScreenText(MF_Redfont.tilenum, x, y - (12<<16), MF_Redfont.zoom, 0, 0, t, s, MF_Redfont.pal, o|ROTATESPRITE_FULL16, 0, MF_Redfont.emptychar.x, MF_Redfont.emptychar.y, MF_Redfont.between.x, MF_Redfont.between.y, f|MF_Redfont.textflags|TEXT_LITERALESCAPE, 0, 0, xdim-1, ydim-1); } void G_AddUserQuote(const char *daquote)