mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 15:21:48 +00:00
Connect minitext_ to MF_Minifont.
git-svn-id: https://svn.eduke32.com/eduke32@6390 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
652a56e3d3
commit
9eaf935757
3 changed files with 7 additions and 7 deletions
|
@ -160,7 +160,7 @@ MenuFont_t MF_BluefontRed = { { 5<<16, 7<<16 }, { -(1<<16), 2<<16 }, 65536
|
||||||
MenuFont_t MF_BluefontGame = { { 5<<16, 7<<16 }, { 0, 0 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 16 };
|
MenuFont_t MF_BluefontGame = { { 5<<16, 7<<16 }, { 0, 0 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 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 };
|
static MenuFont_t MF_Minifont = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 16 };
|
||||||
static MenuFont_t MF_MinifontRed = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 16, 21, 16 };
|
static MenuFont_t MF_MinifontRed = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 16, 21, 16 };
|
||||||
static MenuFont_t MF_MinifontSave = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 13 };
|
MenuFont_t MF_MinifontSave = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 13 };
|
||||||
|
|
||||||
|
|
||||||
static MenuMenuFormat_t MMF_Top_Main = { { MENU_MARGIN_CENTER<<16, 55<<16, }, -(170<<16) };
|
static MenuMenuFormat_t MMF_Top_Main = { { MENU_MARGIN_CENTER<<16, 55<<16, }, -(170<<16) };
|
||||||
|
@ -1672,6 +1672,7 @@ void Menu_Init(void)
|
||||||
// hack; should swap out pointers
|
// hack; should swap out pointers
|
||||||
MF_Minifont = MF_Bluefont;
|
MF_Minifont = MF_Bluefont;
|
||||||
MF_MinifontRed = MF_BluefontRed;
|
MF_MinifontRed = MF_BluefontRed;
|
||||||
|
MF_MinifontSave.zoom = 32768;
|
||||||
|
|
||||||
MMF_Top_Main.pos.x = 40<<16;
|
MMF_Top_Main.pos.x = 40<<16;
|
||||||
MMF_Top_Main.pos.y = 130<<16;
|
MMF_Top_Main.pos.y = 130<<16;
|
||||||
|
|
|
@ -457,6 +457,7 @@ void M_DisplayMenus(void);
|
||||||
|
|
||||||
extern MenuFont_t MF_Redfont;
|
extern MenuFont_t MF_Redfont;
|
||||||
extern MenuFont_t MF_Bluefont, MF_BluefontRed, MF_BluefontGame;
|
extern MenuFont_t MF_Bluefont, MF_BluefontRed, MF_BluefontGame;
|
||||||
|
extern MenuFont_t MF_MinifontSave;
|
||||||
|
|
||||||
#define M_MOUSETIMEOUT 210
|
#define M_MOUSETIMEOUT 210
|
||||||
extern int32_t m_mouselastactivity;
|
extern int32_t m_mouselastactivity;
|
||||||
|
|
|
@ -923,9 +923,10 @@ int32_t minitext_yofs = 0;
|
||||||
int32_t minitext_lowercase = 0;
|
int32_t minitext_lowercase = 0;
|
||||||
int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t sb)
|
int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t sb)
|
||||||
{
|
{
|
||||||
|
// hack: all MF_MinifontSave should be MF_Minifont, but pointer-swapping should be added in menus.cpp first
|
||||||
|
|
||||||
vec2_t dim;
|
vec2_t dim;
|
||||||
int32_t z = 65536L;
|
int32_t z = MF_MinifontSave.zoom;
|
||||||
int32_t f = 0;
|
|
||||||
|
|
||||||
if (t == NULL)
|
if (t == NULL)
|
||||||
{
|
{
|
||||||
|
@ -939,9 +940,6 @@ int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int
|
||||||
y<<=16;
|
y<<=16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!minitext_lowercase)
|
|
||||||
f |= TEXT_UPPERCASE;
|
|
||||||
|
|
||||||
if (sb & ROTATESPRITE_MAX)
|
if (sb & ROTATESPRITE_MAX)
|
||||||
{
|
{
|
||||||
x = sbarx16(x);
|
x = sbarx16(x);
|
||||||
|
@ -951,7 +949,7 @@ int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int
|
||||||
|
|
||||||
sb &= (ROTATESPRITE_MAX-1)|RS_CENTERORIGIN;
|
sb &= (ROTATESPRITE_MAX-1)|RS_CENTERORIGIN;
|
||||||
|
|
||||||
dim = G_ScreenText(MINIFONT, x, y, z, 0, 0, t, s, p, sb|ROTATESPRITE_FULL16, 0, (4<<16), (8<<16), (1<<16), 0, f, 0, 0, xdim-1, ydim-1);
|
dim = G_ScreenText(MINIFONT, x, y, z, 0, 0, t, s, p, sb|ROTATESPRITE_FULL16, 0, MF_MinifontSave.emptychar.x, MF_MinifontSave.emptychar.y, MF_MinifontSave.between.x, MF_MinifontSave.between.y, MF_MinifontSave.textflags, 0, 0, xdim-1, ydim-1);
|
||||||
|
|
||||||
x += dim.x;
|
x += dim.x;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue