mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
Systematize the appearance of the menu fonts using the DOS version as a reference.
New events: "EVENT_MENUCURSORLEFT" "EVENT_MENUCURSORRIGHT" "EVENT_MENUCURSORSHADE" "EVENT_MENUSHADESELECTED" New userdef structures: "menu_shadedeselected" "menu_shadedisabled" "menutext_zoom" "menutext_xspace" "menutext_pal" "menutext_palselected" "menutext_paldeselected" "menutext_paldisabled" "menutext_palselected_right" "menutext_paldeselected_right" "menutext_paldisabled_right" "gametext_zoom" "gametext_xspace" "gametext_pal" "gametext_palselected" "gametext_paldeselected" "gametext_paldisabled" "gametext_palselected_right" "gametext_paldeselected_right" "gametext_paldisabled_right" "minitext_zoom" "minitext_xspace" "minitext_tracking" "minitext_pal" "minitext_palselected" "minitext_paldeselected" "minitext_paldisabled" "minitext_palselected_right" "minitext_paldeselected_right" "minitext_paldisabled_right" "menutitle_pal" "slidebar_palselected" "slidebar_paldisabled" Self-explanatory. Use in conjunction with "menutext_tracking" and "gametext_tracking" ("mgametext_tracking" is now ignored). The values for disabled shade is added to the selected or deselected shades. The palettes have a disabled > selected > deselected hierarchy, and are applied if not zero. Patch from Fox git-svn-id: https://svn.eduke32.com/eduke32@6613 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c7edef4f43
commit
2cdf98f07a
10 changed files with 296 additions and 118 deletions
|
@ -255,6 +255,7 @@ void CONFIG_SetDefaults(void)
|
||||||
ud.menubackground = 1;
|
ud.menubackground = 1;
|
||||||
ud.hudontop = 0;
|
ud.hudontop = 0;
|
||||||
ud.default_skill = 1;
|
ud.default_skill = 1;
|
||||||
|
ud.slidebar_paldisabled = 1;
|
||||||
|
|
||||||
ud.config.CheckForUpdates = 1;
|
ud.config.CheckForUpdates = 1;
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,10 @@ enum GameEvent_t {
|
||||||
EVENT_EXITPROGRAMSCREEN,
|
EVENT_EXITPROGRAMSCREEN,
|
||||||
EVENT_ALTWEAPON,
|
EVENT_ALTWEAPON,
|
||||||
EVENT_DISPLAYOVERHEADMAPPLAYER,
|
EVENT_DISPLAYOVERHEADMAPPLAYER,
|
||||||
|
EVENT_MENUCURSORLEFT,
|
||||||
|
EVENT_MENUCURSORRIGHT,
|
||||||
|
EVENT_MENUCURSORSHADE,
|
||||||
|
EVENT_MENUSHADESELECTED,
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
EVENT_ANIMATEALLSPRITES,
|
EVENT_ANIMATEALLSPRITES,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -192,6 +192,8 @@ typedef struct {
|
||||||
int16_t camerasprite,last_camsprite;
|
int16_t camerasprite,last_camsprite;
|
||||||
int16_t last_level,secretlevel;
|
int16_t last_level,secretlevel;
|
||||||
|
|
||||||
|
int8_t menutitle_pal, slidebar_palselected, slidebar_paldisabled;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
int32_t UseJoystick;
|
int32_t UseJoystick;
|
||||||
int32_t UseMouse;
|
int32_t UseMouse;
|
||||||
|
|
|
@ -742,6 +742,10 @@ const char *EventNames[MAXEVENTS] =
|
||||||
"EVENT_EXITPROGRAMSCREEN",
|
"EVENT_EXITPROGRAMSCREEN",
|
||||||
"EVENT_ALTWEAPON",
|
"EVENT_ALTWEAPON",
|
||||||
"EVENT_DISPLAYOVERHEADMAPPLAYER",
|
"EVENT_DISPLAYOVERHEADMAPPLAYER",
|
||||||
|
"EVENT_MENUCURSORLEFT",
|
||||||
|
"EVENT_MENUCURSORRIGHT",
|
||||||
|
"EVENT_MENUCURSORSHADE",
|
||||||
|
"EVENT_MENUSHADESELECTED",
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
"EVENT_ANIMATEALLSPRITES",
|
"EVENT_ANIMATEALLSPRITES",
|
||||||
#endif
|
#endif
|
||||||
|
@ -1254,6 +1258,39 @@ const memberlabel_t UserdefsLabels[]=
|
||||||
{ "global_b", USERDEFS_GLOBAL_B, 0, 0 },
|
{ "global_b", USERDEFS_GLOBAL_B, 0, 0 },
|
||||||
{ "default_volume", USERDEFS_DEFAULT_VOLUME, 0, 0 },
|
{ "default_volume", USERDEFS_DEFAULT_VOLUME, 0, 0 },
|
||||||
{ "default_skill", USERDEFS_DEFAULT_SKILL, 0, 0 },
|
{ "default_skill", USERDEFS_DEFAULT_SKILL, 0, 0 },
|
||||||
|
{ "menu_shadedeselected", USERDEFS_MENU_SHADEDESELECTED, 0, 0 },
|
||||||
|
{ "menu_shadedisabled", USERDEFS_MENU_SHADEDISABLED, 0, 0 },
|
||||||
|
{ "menutext_zoom", USERDEFS_MENUTEXT_ZOOM, 0, 0 },
|
||||||
|
{ "menutext_xspace", USERDEFS_MENUTEXT_XSPACE, 0, 0 },
|
||||||
|
{ "menutext_pal", USERDEFS_MENUTEXT_PAL, 0, 0 },
|
||||||
|
{ "menutext_palselected", USERDEFS_MENUTEXT_PALSELECTED, 0, 0 },
|
||||||
|
{ "menutext_paldeselected", USERDEFS_MENUTEXT_PALDESELECTED, 0, 0 },
|
||||||
|
{ "menutext_paldisabled", USERDEFS_MENUTEXT_PALDISABLED, 0, 0 },
|
||||||
|
{ "menutext_palselected_right", USERDEFS_MENUTEXT_PALSELECTED_RIGHT, 0, 0 },
|
||||||
|
{ "menutext_paldeselected_right", USERDEFS_MENUTEXT_PALDESELECTED_RIGHT, 0, 0 },
|
||||||
|
{ "menutext_paldisabled_right", USERDEFS_MENUTEXT_PALDISABLED_RIGHT, 0, 0 },
|
||||||
|
{ "gametext_zoom", USERDEFS_GAMETEXT_ZOOM, 0, 0 },
|
||||||
|
{ "gametext_xspace", USERDEFS_GAMETEXT_XSPACE, 0, 0 },
|
||||||
|
{ "gametext_pal", USERDEFS_GAMETEXT_PAL, 0, 0 },
|
||||||
|
{ "gametext_palselected", USERDEFS_GAMETEXT_PALSELECTED, 0, 0 },
|
||||||
|
{ "gametext_paldeselected", USERDEFS_GAMETEXT_PALDESELECTED, 0, 0 },
|
||||||
|
{ "gametext_paldisabled", USERDEFS_GAMETEXT_PALDISABLED, 0, 0 },
|
||||||
|
{ "gametext_palselected_right", USERDEFS_GAMETEXT_PALSELECTED_RIGHT, 0, 0 },
|
||||||
|
{ "gametext_paldeselected_right", USERDEFS_GAMETEXT_PALDESELECTED_RIGHT, 0, 0 },
|
||||||
|
{ "gametext_paldisabled_right", USERDEFS_GAMETEXT_PALDISABLED_RIGHT, 0, 0 },
|
||||||
|
{ "minitext_zoom", USERDEFS_MINITEXT_ZOOM, 0, 0 },
|
||||||
|
{ "minitext_xspace", USERDEFS_MINITEXT_XSPACE, 0, 0 },
|
||||||
|
{ "minitext_tracking", USERDEFS_MINITEXT_TRACKING, 0, 0 },
|
||||||
|
{ "minitext_pal", USERDEFS_MINITEXT_PAL, 0, 0 },
|
||||||
|
{ "minitext_palselected", USERDEFS_MINITEXT_PALSELECTED, 0, 0 },
|
||||||
|
{ "minitext_paldeselected", USERDEFS_MINITEXT_PALDESELECTED, 0, 0 },
|
||||||
|
{ "minitext_paldisabled", USERDEFS_MINITEXT_PALDISABLED, 0, 0 },
|
||||||
|
{ "minitext_palselected_right", USERDEFS_MINITEXT_PALSELECTED_RIGHT, 0, 0 },
|
||||||
|
{ "minitext_paldeselected_right", USERDEFS_MINITEXT_PALDESELECTED_RIGHT, 0, 0 },
|
||||||
|
{ "minitext_paldisabled_right", USERDEFS_MINITEXT_PALDISABLED_RIGHT, 0, 0 },
|
||||||
|
{ "menutitle_pal", USERDEFS_MENUTITLE_PAL, 0, 0 },
|
||||||
|
{ "slidebar_palselected", USERDEFS_SLIDEBAR_PALSELECTED, 0, 0 },
|
||||||
|
{ "slidebar_paldisabled", USERDEFS_SLIDEBAR_PALDISABLED, 0, 0 },
|
||||||
{ NULL, -1, 0, 0 } // END OF LIST
|
{ NULL, -1, 0, 0 } // END OF LIST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -546,6 +546,39 @@ enum UserdefsLabel_t
|
||||||
USERDEFS_GLOBAL_B,
|
USERDEFS_GLOBAL_B,
|
||||||
USERDEFS_DEFAULT_VOLUME,
|
USERDEFS_DEFAULT_VOLUME,
|
||||||
USERDEFS_DEFAULT_SKILL,
|
USERDEFS_DEFAULT_SKILL,
|
||||||
|
USERDEFS_MENU_SHADEDESELECTED,
|
||||||
|
USERDEFS_MENU_SHADEDISABLED,
|
||||||
|
USERDEFS_MENUTEXT_ZOOM,
|
||||||
|
USERDEFS_MENUTEXT_XSPACE,
|
||||||
|
USERDEFS_MENUTEXT_PAL,
|
||||||
|
USERDEFS_MENUTEXT_PALSELECTED,
|
||||||
|
USERDEFS_MENUTEXT_PALDESELECTED,
|
||||||
|
USERDEFS_MENUTEXT_PALDISABLED,
|
||||||
|
USERDEFS_MENUTEXT_PALSELECTED_RIGHT,
|
||||||
|
USERDEFS_MENUTEXT_PALDESELECTED_RIGHT,
|
||||||
|
USERDEFS_MENUTEXT_PALDISABLED_RIGHT,
|
||||||
|
USERDEFS_GAMETEXT_ZOOM,
|
||||||
|
USERDEFS_GAMETEXT_XSPACE,
|
||||||
|
USERDEFS_GAMETEXT_PAL,
|
||||||
|
USERDEFS_GAMETEXT_PALSELECTED,
|
||||||
|
USERDEFS_GAMETEXT_PALDESELECTED,
|
||||||
|
USERDEFS_GAMETEXT_PALDISABLED,
|
||||||
|
USERDEFS_GAMETEXT_PALSELECTED_RIGHT,
|
||||||
|
USERDEFS_GAMETEXT_PALDESELECTED_RIGHT,
|
||||||
|
USERDEFS_GAMETEXT_PALDISABLED_RIGHT,
|
||||||
|
USERDEFS_MINITEXT_ZOOM,
|
||||||
|
USERDEFS_MINITEXT_XSPACE,
|
||||||
|
USERDEFS_MINITEXT_TRACKING,
|
||||||
|
USERDEFS_MINITEXT_PAL,
|
||||||
|
USERDEFS_MINITEXT_PALSELECTED,
|
||||||
|
USERDEFS_MINITEXT_PALDESELECTED,
|
||||||
|
USERDEFS_MINITEXT_PALDISABLED,
|
||||||
|
USERDEFS_MINITEXT_PALSELECTED_RIGHT,
|
||||||
|
USERDEFS_MINITEXT_PALDESELECTED_RIGHT,
|
||||||
|
USERDEFS_MINITEXT_PALDISABLED_RIGHT,
|
||||||
|
USERDEFS_MENUTITLE_PAL,
|
||||||
|
USERDEFS_SLIDEBAR_PALSELECTED,
|
||||||
|
USERDEFS_SLIDEBAR_PALDISABLED,
|
||||||
USERDEFS_END
|
USERDEFS_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -168,8 +168,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum)
|
||||||
case USERDEFS_VM_SPRITE: labelNum = vm.spriteNum; break;
|
case USERDEFS_VM_SPRITE: labelNum = vm.spriteNum; break;
|
||||||
case USERDEFS_VM_DISTANCE: labelNum = vm.playerDist; break;
|
case USERDEFS_VM_DISTANCE: labelNum = vm.playerDist; break;
|
||||||
case USERDEFS_SOUNDTOGGLE: labelNum = ud.config.SoundToggle; break;
|
case USERDEFS_SOUNDTOGGLE: labelNum = ud.config.SoundToggle; break;
|
||||||
case USERDEFS_GAMETEXT_TRACKING: labelNum = MF_BluefontGame.between.x; break;
|
case USERDEFS_GAMETEXT_TRACKING: labelNum = MF_Bluefont.between.x; break;
|
||||||
case USERDEFS_MGAMETEXT_TRACKING: labelNum = MF_Bluefont.between.x; break;
|
|
||||||
case USERDEFS_MENUTEXT_TRACKING: labelNum = MF_Redfont.between.x; break;
|
case USERDEFS_MENUTEXT_TRACKING: labelNum = MF_Redfont.between.x; break;
|
||||||
case USERDEFS_MAXSPRITESONSCREEN: labelNum = maxspritesonscreen; break;
|
case USERDEFS_MAXSPRITESONSCREEN: labelNum = maxspritesonscreen; break;
|
||||||
case USERDEFS_SCREENAREA_X1: labelNum = ud.screenarea_x1; break;
|
case USERDEFS_SCREENAREA_X1: labelNum = ud.screenarea_x1; break;
|
||||||
|
@ -190,6 +189,27 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum)
|
||||||
case USERDEFS_GLOBAL_B: labelNum = globalb; break;
|
case USERDEFS_GLOBAL_B: labelNum = globalb; break;
|
||||||
case USERDEFS_DEFAULT_VOLUME: labelNum = ud.default_volume; break;
|
case USERDEFS_DEFAULT_VOLUME: labelNum = ud.default_volume; break;
|
||||||
case USERDEFS_DEFAULT_SKILL: labelNum = ud.default_skill; break;
|
case USERDEFS_DEFAULT_SKILL: labelNum = ud.default_skill; break;
|
||||||
|
case USERDEFS_MENU_SHADEDESELECTED: labelNum = MF_Redfont.shade_deselected; break;
|
||||||
|
case USERDEFS_MENU_SHADEDISABLED: labelNum = MF_Redfont.shade_disabled; break;
|
||||||
|
case USERDEFS_MENUTEXT_ZOOM: labelNum = MF_Redfont.zoom; break;
|
||||||
|
case USERDEFS_MENUTEXT_XSPACE: labelNum = MF_Redfont.emptychar.x; break;
|
||||||
|
case USERDEFS_MENUTEXT_PALSELECTED: labelNum = MF_Redfont.pal_selected; break;
|
||||||
|
case USERDEFS_MENUTEXT_PALDESELECTED: labelNum = MF_Redfont.pal_deselected; break;
|
||||||
|
case USERDEFS_MENUTEXT_PALDISABLED: labelNum = MF_Redfont.pal_disabled; break;
|
||||||
|
case USERDEFS_GAMETEXT_ZOOM: labelNum = MF_Bluefont.zoom; break;
|
||||||
|
case USERDEFS_GAMETEXT_XSPACE: labelNum = MF_Bluefont.emptychar.x; break;
|
||||||
|
case USERDEFS_GAMETEXT_PALSELECTED: labelNum = MF_Bluefont.pal_selected; break;
|
||||||
|
case USERDEFS_GAMETEXT_PALDESELECTED: labelNum = MF_Bluefont.pal_deselected; break;
|
||||||
|
case USERDEFS_GAMETEXT_PALDISABLED: labelNum = MF_Bluefont.pal_disabled; break;
|
||||||
|
case USERDEFS_MINITEXT_ZOOM: labelNum = MF_Minifont.zoom; break;
|
||||||
|
case USERDEFS_MINITEXT_XSPACE: labelNum = MF_Minifont.emptychar.x; break;
|
||||||
|
case USERDEFS_MINITEXT_TRACKING: labelNum = MF_Minifont.between.x; break;
|
||||||
|
case USERDEFS_MINITEXT_PALSELECTED: labelNum = MF_Minifont.pal_selected; break;
|
||||||
|
case USERDEFS_MINITEXT_PALDESELECTED: labelNum = MF_Minifont.pal_deselected; break;
|
||||||
|
case USERDEFS_MINITEXT_PALDISABLED: labelNum = MF_Minifont.pal_disabled; break;
|
||||||
|
case USERDEFS_MENUTITLE_PAL: labelNum = ud.menutitle_pal; break;
|
||||||
|
case USERDEFS_SLIDEBAR_PALSELECTED: labelNum = ud.slidebar_palselected; break;
|
||||||
|
case USERDEFS_SLIDEBAR_PALDISABLED: labelNum = ud.slidebar_paldisabled; break;
|
||||||
default: labelNum = -1; break;
|
default: labelNum = -1; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,8 +328,7 @@ void __fastcall VM_SetUserdef(int32_t const labelNum, int32_t const iSet)
|
||||||
case USERDEFS_VM_PLAYER: vm.playerNum = iSet; vm.pPlayer = g_player[iSet].ps; break;
|
case USERDEFS_VM_PLAYER: vm.playerNum = iSet; vm.pPlayer = g_player[iSet].ps; break;
|
||||||
case USERDEFS_VM_SPRITE: vm.spriteNum = iSet; vm.pSprite = &sprite[iSet]; vm.pActor = &actor[iSet]; vm.pData = &actor[iSet].t_data[0]; break;
|
case USERDEFS_VM_SPRITE: vm.spriteNum = iSet; vm.pSprite = &sprite[iSet]; vm.pActor = &actor[iSet]; vm.pData = &actor[iSet].t_data[0]; break;
|
||||||
case USERDEFS_VM_DISTANCE: vm.playerDist = iSet; break;
|
case USERDEFS_VM_DISTANCE: vm.playerDist = iSet; break;
|
||||||
case USERDEFS_GAMETEXT_TRACKING: MF_BluefontGame.between.x = iSet; break;
|
case USERDEFS_GAMETEXT_TRACKING: MF_Bluefont.between.x = iSet; break;
|
||||||
case USERDEFS_MGAMETEXT_TRACKING: MF_BluefontRed.between.x = MF_Bluefont.between.x = iSet; break;
|
|
||||||
case USERDEFS_MENUTEXT_TRACKING: MF_Redfont.between.x = iSet; break;
|
case USERDEFS_MENUTEXT_TRACKING: MF_Redfont.between.x = iSet; break;
|
||||||
case USERDEFS_MAXSPRITESONSCREEN: maxspritesonscreen = clamp(iSet, MAXSPRITESONSCREEN>>2, MAXSPRITESONSCREEN); break;
|
case USERDEFS_MAXSPRITESONSCREEN: maxspritesonscreen = clamp(iSet, MAXSPRITESONSCREEN>>2, MAXSPRITESONSCREEN); break;
|
||||||
case USERDEFS_SCREENAREA_X1: ud.screenarea_x1 = iSet; break;
|
case USERDEFS_SCREENAREA_X1: ud.screenarea_x1 = iSet; break;
|
||||||
|
@ -330,6 +349,39 @@ void __fastcall VM_SetUserdef(int32_t const labelNum, int32_t const iSet)
|
||||||
case USERDEFS_GLOBAL_B: globalb = iSet; break;
|
case USERDEFS_GLOBAL_B: globalb = iSet; break;
|
||||||
case USERDEFS_DEFAULT_VOLUME: ud.default_volume = iSet; break;
|
case USERDEFS_DEFAULT_VOLUME: ud.default_volume = iSet; break;
|
||||||
case USERDEFS_DEFAULT_SKILL: ud.default_skill = iSet; break;
|
case USERDEFS_DEFAULT_SKILL: ud.default_skill = iSet; break;
|
||||||
|
case USERDEFS_MENU_SHADEDESELECTED: MF_Redfont.shade_deselected = MF_Bluefont.shade_deselected = MF_Minifont.shade_deselected = iSet; break;
|
||||||
|
case USERDEFS_MENU_SHADEDISABLED: MF_Redfont.shade_disabled = MF_Bluefont.shade_disabled = MF_Minifont.shade_disabled = iSet; break;
|
||||||
|
case USERDEFS_MENUTEXT_ZOOM: MF_Redfont.zoom = iSet; break;
|
||||||
|
case USERDEFS_MENUTEXT_XSPACE: MF_Redfont.emptychar.x = iSet; break;
|
||||||
|
case USERDEFS_MENUTEXT_PAL: MF_Redfont.pal = iSet; break;
|
||||||
|
case USERDEFS_MENUTEXT_PALSELECTED: MF_Redfont.pal_selected = iSet; break;
|
||||||
|
case USERDEFS_MENUTEXT_PALDESELECTED: MF_Redfont.pal_deselected = iSet; break;
|
||||||
|
case USERDEFS_MENUTEXT_PALDISABLED: MF_Redfont.pal_disabled = iSet; break;
|
||||||
|
case USERDEFS_MENUTEXT_PALSELECTED_RIGHT: MF_Redfont.pal_selected_right = iSet; break;
|
||||||
|
case USERDEFS_MENUTEXT_PALDESELECTED_RIGHT: MF_Redfont.pal_deselected_right = iSet; break;
|
||||||
|
case USERDEFS_MENUTEXT_PALDISABLED_RIGHT: MF_Redfont.pal_disabled_right = iSet; break;
|
||||||
|
case USERDEFS_GAMETEXT_ZOOM: MF_Bluefont.zoom = iSet; break;
|
||||||
|
case USERDEFS_GAMETEXT_XSPACE: MF_Bluefont.emptychar.x = iSet; break;
|
||||||
|
case USERDEFS_GAMETEXT_PAL: MF_Bluefont.pal = iSet; break;
|
||||||
|
case USERDEFS_GAMETEXT_PALSELECTED: MF_Bluefont.pal_selected = iSet; break;
|
||||||
|
case USERDEFS_GAMETEXT_PALDESELECTED: MF_Bluefont.pal_deselected = iSet; break;
|
||||||
|
case USERDEFS_GAMETEXT_PALDISABLED: MF_Bluefont.pal_disabled = iSet; break;
|
||||||
|
case USERDEFS_GAMETEXT_PALSELECTED_RIGHT: MF_Bluefont.pal_selected_right = iSet; break;
|
||||||
|
case USERDEFS_GAMETEXT_PALDESELECTED_RIGHT: MF_Bluefont.pal_deselected_right = iSet; break;
|
||||||
|
case USERDEFS_GAMETEXT_PALDISABLED_RIGHT: MF_Bluefont.pal_disabled_right = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_ZOOM: MF_Minifont.zoom = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_XSPACE: MF_Minifont.emptychar.x = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_TRACKING: MF_Minifont.between.x = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_PAL: MF_Minifont.pal = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_PALSELECTED: MF_Minifont.pal_selected = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_PALDESELECTED: MF_Minifont.pal_deselected = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_PALDISABLED: MF_Minifont.pal_disabled = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_PALSELECTED_RIGHT: MF_Minifont.pal_selected_right = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_PALDESELECTED_RIGHT: MF_Minifont.pal_deselected_right = iSet; break;
|
||||||
|
case USERDEFS_MINITEXT_PALDISABLED_RIGHT: MF_Minifont.pal_disabled_right = iSet; break;
|
||||||
|
case USERDEFS_MENUTITLE_PAL: ud.menutitle_pal = iSet; break;
|
||||||
|
case USERDEFS_SLIDEBAR_PALSELECTED: ud.slidebar_palselected = iSet; break;
|
||||||
|
case USERDEFS_SLIDEBAR_PALDISABLED: ud.slidebar_paldisabled = iSet; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,12 +74,11 @@ static FORCE_INLINE void rotatesprite_ybounds(int32_t sx, int32_t sy, int32_t z,
|
||||||
rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, 0, ydim_upper, xdim-1, ydim_lower);
|
rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, 0, ydim_upper, xdim-1, ydim_lower);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef EDUKE32_STANDALONE
|
|
||||||
static void mgametext(int32_t x, int32_t y, char const * t)
|
static void mgametext(int32_t x, int32_t y, char const * t)
|
||||||
{
|
{
|
||||||
G_ScreenText(MF_Bluefont.tilenum, x, y, MF_Bluefont.zoom, 0, 0, t, 0, MF_Bluefont.pal, 2|8|16|ROTATESPRITE_FULL16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags, 0, 0, xdim-1, ydim-1);
|
G_ScreenText(MF_Bluefont.tilenum, x, y, MF_Bluefont.zoom, 0, 0, t, 0, MF_Bluefont.pal, 2|8|16|ROTATESPRITE_FULL16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags, 0, 0, xdim-1, ydim-1);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
static vec2_t mgametextcenter(int32_t x, int32_t y, char const * t, int32_t f = 0)
|
static vec2_t mgametextcenter(int32_t x, int32_t y, char const * t, int32_t f = 0)
|
||||||
{
|
{
|
||||||
return G_ScreenText(MF_Bluefont.tilenum, (MENU_MARGIN_CENTER<<16) + x, y, MF_Bluefont.zoom, 0, 0, t, 0, MF_Bluefont.pal, 2|8|16|ROTATESPRITE_FULL16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags|f|TEXT_XCENTER, 0, 0, xdim-1, ydim-1);
|
return G_ScreenText(MF_Bluefont.tilenum, (MENU_MARGIN_CENTER<<16) + x, y, MF_Bluefont.zoom, 0, 0, t, 0, MF_Bluefont.pal, 2|8|16|ROTATESPRITE_FULL16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags|f|TEXT_XCENTER, 0, 0, xdim-1, ydim-1);
|
||||||
|
@ -126,15 +125,20 @@ static void Menu_DrawTopBar(const vec2_t origin)
|
||||||
|
|
||||||
static void Menu_DrawTopBarCaption(const char *caption, const vec2_t origin)
|
static void Menu_DrawTopBarCaption(const char *caption, const vec2_t origin)
|
||||||
{
|
{
|
||||||
char *s = Bstrdup(caption), p = Bstrlen(caption)-1;
|
static char t[64];
|
||||||
if (s[p] == ':') s[p] = 0;
|
size_t const srclen = strlen(caption);
|
||||||
menutext_(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (24<<16) + (15<<15), 0, s, 10|16, TEXT_XCENTER|TEXT_YCENTER);
|
size_t const dstlen = min(srclen, ARRAY_SIZE(t)-1);
|
||||||
Bfree(s);
|
memcpy(t, caption, dstlen);
|
||||||
|
t[dstlen] = '\0';
|
||||||
|
char *p = &t[dstlen-1];
|
||||||
|
if (*p == ':')
|
||||||
|
*p = '\0';
|
||||||
|
captionmenutext(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (24<<16) + (15<<15), t);
|
||||||
}
|
}
|
||||||
|
|
||||||
static FORCE_INLINE int32_t Menu_CursorShade(void)
|
static FORCE_INLINE int32_t Menu_CursorShade(void)
|
||||||
{
|
{
|
||||||
return 4-(sintable[(totalclock<<4)&2047]>>11);
|
return VM_OnEventWithReturn(EVENT_MENUCURSORSHADE, -1, myconnectindex, 4-(sintable[(totalclock<<4)&2047]>>11));
|
||||||
}
|
}
|
||||||
static void Menu_DrawCursorCommon(int32_t x, int32_t y, int32_t z, int32_t picnum, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
|
static void Menu_DrawCursorCommon(int32_t x, int32_t y, int32_t z, int32_t picnum, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
|
||||||
{
|
{
|
||||||
|
@ -143,12 +147,12 @@ static void Menu_DrawCursorCommon(int32_t x, int32_t y, int32_t z, int32_t picnu
|
||||||
static void Menu_DrawCursorLeft(int32_t x, int32_t y, int32_t z)
|
static void Menu_DrawCursorLeft(int32_t x, int32_t y, int32_t z)
|
||||||
{
|
{
|
||||||
if (KXDWN) return;
|
if (KXDWN) return;
|
||||||
Menu_DrawCursorCommon(x, y, z, SPINNINGNUKEICON+((totalclock>>3)%7));
|
Menu_DrawCursorCommon(x, y, z, VM_OnEventWithReturn(EVENT_MENUCURSORLEFT, -1, myconnectindex, SPINNINGNUKEICON+((totalclock>>3)%7)));
|
||||||
}
|
}
|
||||||
static void Menu_DrawCursorRight(int32_t x, int32_t y, int32_t z)
|
static void Menu_DrawCursorRight(int32_t x, int32_t y, int32_t z)
|
||||||
{
|
{
|
||||||
if (KXDWN) return;
|
if (KXDWN) return;
|
||||||
Menu_DrawCursorCommon(x, y, z, SPINNINGNUKEICON+6-((6+(totalclock>>3))%7));
|
Menu_DrawCursorCommon(x, y, z, VM_OnEventWithReturn(EVENT_MENUCURSORRIGHT, -1, myconnectindex, SPINNINGNUKEICON+6-((6+(totalclock>>3))%7)));
|
||||||
}
|
}
|
||||||
static void Menu_DrawCursorTextTile(int32_t x, int32_t y, int32_t h, int32_t picnum, vec2s_t const & siz, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
|
static void Menu_DrawCursorTextTile(int32_t x, int32_t y, int32_t h, int32_t picnum, vec2s_t const & siz, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
|
||||||
{
|
{
|
||||||
|
@ -196,13 +200,18 @@ they effectively stand in for curly braces as struct initializers.
|
||||||
|
|
||||||
// common font types
|
// common font types
|
||||||
// tilenums are set after namesdyn runs
|
// tilenums are set after namesdyn runs
|
||||||
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_Bluefont = { { 5<<16, 7<<16 }, { -(1<<16), 2<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 16 };
|
// emptychar x,y between x,y zoom cursorLeft cursorCenter cursorScale textflags
|
||||||
MenuFont_t MF_BluefontRed = { { 5<<16, 7<<16 }, { -(1<<16), 2<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 10, 16 };
|
// tilenum shade_deselected shade_disabled pal pal_selected pal_deselected pal_disabled
|
||||||
MenuFont_t MF_BluefontGame = { { 5<<16, 7<<16 }, { 0, 0 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 16 };
|
MenuFont_t MF_Redfont = { { 5<<16, 15<<16 }, { 0, 0 }, 65536, 20<<16, 110<<16, 65536, TEXT_BIGALPHANUM | TEXT_UPPERCASE,
|
||||||
static MenuFont_t MF_Minifont = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 10, 0, 16 };
|
-1, 10, 0, 0, 0, 0, 1,
|
||||||
static MenuFont_t MF_MinifontRed = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, -1, 16, 21, 16 };
|
0, 0, 1 };
|
||||||
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_Bluefont = { { 5<<16, 7<<16 }, { 0, 0 }, 65536, 10<<16, 110<<16, 32768, 0,
|
||||||
|
-1, 10, 0, 0, 10, 10, 16,
|
||||||
|
0, 0, 16 };
|
||||||
|
MenuFont_t MF_Minifont = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0,
|
||||||
|
-1, 10, 0, 0, 2, 2, 0,
|
||||||
|
0, 0, 16 };
|
||||||
|
|
||||||
|
|
||||||
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) };
|
||||||
|
@ -750,7 +759,7 @@ static MenuEntry_t *MEL_DISPLAYSETUP_GL_POLYMER[] = {
|
||||||
static char const *MenuKeyNone = " -";
|
static char const *MenuKeyNone = " -";
|
||||||
static char const *MEOSN_Keys[NUMKEYS];
|
static char const *MEOSN_Keys[NUMKEYS];
|
||||||
|
|
||||||
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS_TEMPLATE = { { NULL, NULL, }, MEOSN_Keys, &MF_MinifontRed, NUMKEYS, 54<<16, 0 };
|
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS_TEMPLATE = { { NULL, NULL, }, MEOSN_Keys, &MF_Minifont, NUMKEYS, 54<<16, 0 };
|
||||||
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
|
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
|
||||||
static MenuEntry_t ME_KEYBOARDSETUPFUNCS_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_FuncList, &MEO_KEYBOARDSETUPFUNCS_TEMPLATE, Custom2Col );
|
static MenuEntry_t ME_KEYBOARDSETUPFUNCS_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_FuncList, &MEO_KEYBOARDSETUPFUNCS_TEMPLATE, Custom2Col );
|
||||||
static MenuEntry_t ME_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
|
static MenuEntry_t ME_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
|
||||||
|
@ -915,13 +924,13 @@ static char MenuJoystickAxes[MAXJOYAXES][MAXJOYBUTTONSTRINGLENGTH];
|
||||||
|
|
||||||
static MenuEntry_t *MEL_JOYSTICKAXES[MAXJOYAXES];
|
static MenuEntry_t *MEL_JOYSTICKAXES[MAXJOYAXES];
|
||||||
|
|
||||||
static MenuOption_t MEO_MOUSEADVANCED_DAXES_UP = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[1][0] );
|
static MenuOption_t MEO_MOUSEADVANCED_DAXES_UP = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[1][0] );
|
||||||
static MenuEntry_t ME_MOUSEADVANCED_DAXES_UP = MAKE_MENUENTRY( "Digital Up", &MF_Redfont, &MEF_BigSliders, &MEO_MOUSEADVANCED_DAXES_UP, Option );
|
static MenuEntry_t ME_MOUSEADVANCED_DAXES_UP = MAKE_MENUENTRY( "Digital Up", &MF_Redfont, &MEF_BigSliders, &MEO_MOUSEADVANCED_DAXES_UP, Option );
|
||||||
static MenuOption_t MEO_MOUSEADVANCED_DAXES_DOWN = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[1][1] );
|
static MenuOption_t MEO_MOUSEADVANCED_DAXES_DOWN = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[1][1] );
|
||||||
static MenuEntry_t ME_MOUSEADVANCED_DAXES_DOWN = MAKE_MENUENTRY( "Digital Down", &MF_Redfont, &MEF_BigSliders, &MEO_MOUSEADVANCED_DAXES_DOWN, Option );
|
static MenuEntry_t ME_MOUSEADVANCED_DAXES_DOWN = MAKE_MENUENTRY( "Digital Down", &MF_Redfont, &MEF_BigSliders, &MEO_MOUSEADVANCED_DAXES_DOWN, Option );
|
||||||
static MenuOption_t MEO_MOUSEADVANCED_DAXES_LEFT = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[0][0] );
|
static MenuOption_t MEO_MOUSEADVANCED_DAXES_LEFT = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[0][0] );
|
||||||
static MenuEntry_t ME_MOUSEADVANCED_DAXES_LEFT = MAKE_MENUENTRY( "Digital Left", &MF_Redfont, &MEF_BigSliders, &MEO_MOUSEADVANCED_DAXES_LEFT, Option );
|
static MenuEntry_t ME_MOUSEADVANCED_DAXES_LEFT = MAKE_MENUENTRY( "Digital Left", &MF_Redfont, &MEF_BigSliders, &MEO_MOUSEADVANCED_DAXES_LEFT, Option );
|
||||||
static MenuOption_t MEO_MOUSEADVANCED_DAXES_RIGHT = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[0][1] );
|
static MenuOption_t MEO_MOUSEADVANCED_DAXES_RIGHT = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[0][1] );
|
||||||
static MenuEntry_t ME_MOUSEADVANCED_DAXES_RIGHT = MAKE_MENUENTRY( "Digital Right", &MF_Redfont, &MEF_BigSliders, &MEO_MOUSEADVANCED_DAXES_RIGHT, Option );
|
static MenuEntry_t ME_MOUSEADVANCED_DAXES_RIGHT = MAKE_MENUENTRY( "Digital Right", &MF_Redfont, &MEF_BigSliders, &MEO_MOUSEADVANCED_DAXES_RIGHT, Option );
|
||||||
|
|
||||||
static MenuEntry_t *MEL_MOUSEADVANCED[] = {
|
static MenuEntry_t *MEL_MOUSEADVANCED[] = {
|
||||||
|
@ -956,9 +965,9 @@ static MenuRangeInt32_t MEO_JOYSTICKAXIS_SATU = MAKE_MENURANGE( NULL, &MF_Bluefo
|
||||||
static MenuEntry_t ME_JOYSTICKAXIS_SATU = MAKE_MENUENTRY( "Saturation", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_SATU, RangeInt32 );
|
static MenuEntry_t ME_JOYSTICKAXIS_SATU = MAKE_MENUENTRY( "Saturation", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_SATU, RangeInt32 );
|
||||||
|
|
||||||
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
|
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
|
||||||
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUENTRY( "Digital -", &MF_BluefontRed, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DIGITALNEGATIVE, Option );
|
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUENTRY( "Digital -", &MF_Bluefont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DIGITALNEGATIVE, Option );
|
||||||
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
|
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
|
||||||
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUENTRY( "Digital +", &MF_BluefontRed, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DIGITALPOSITIVE, Option );
|
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUENTRY( "Digital +", &MF_Bluefont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DIGITALPOSITIVE, Option );
|
||||||
|
|
||||||
static MenuEntry_t *MEL_JOYSTICKAXIS[] = {
|
static MenuEntry_t *MEL_JOYSTICKAXIS[] = {
|
||||||
&ME_JOYSTICKAXIS_ANALOG,
|
&ME_JOYSTICKAXIS_ANALOG,
|
||||||
|
@ -977,51 +986,51 @@ static MenuEntry_t *MEL_INTERNAL_JOYSTICKAXIS_DIGITAL[] = {
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
static MenuOption_t MEO_RENDERERSETUP_HIGHTILE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usehightile );
|
static MenuOption_t MEO_RENDERERSETUP_HIGHTILE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usehightile );
|
||||||
static MenuEntry_t ME_RENDERERSETUP_HIGHTILE = MAKE_MENUENTRY( "True color textures:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_HIGHTILE, Option );
|
static MenuEntry_t ME_RENDERERSETUP_HIGHTILE = MAKE_MENUENTRY( "True color textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_HIGHTILE, Option );
|
||||||
|
|
||||||
static char const *MEOSN_RENDERERSETUP_TEXQUALITY [] = { "Full", "Half", "Barf", };
|
static char const *MEOSN_RENDERERSETUP_TEXQUALITY [] = { "Full", "Half", "Barf", };
|
||||||
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTIONSET(MEOSN_RENDERERSETUP_TEXQUALITY, NULL, 0x2);
|
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTIONSET(MEOSN_RENDERERSETUP_TEXQUALITY, NULL, 0x2);
|
||||||
static MenuOption_t MEO_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_RENDERERSETUP_TEXQUALITY, &r_downsize);
|
static MenuOption_t MEO_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_RENDERERSETUP_TEXQUALITY, &r_downsize);
|
||||||
static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY("GL texture quality:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXQUALITY, Option);
|
static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY("GL texture quality:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXQUALITY, Option);
|
||||||
|
|
||||||
|
|
||||||
static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.config.useprecache );
|
static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.config.useprecache );
|
||||||
static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( "Pre-load map textures:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_PRECACHE, Option );
|
static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( "Pre-load map textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_PRECACHE, Option );
|
||||||
# ifndef EDUKE32_GLES
|
# ifndef EDUKE32_GLES
|
||||||
static char const *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compr.", };
|
static char const *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compr.", };
|
||||||
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTIONSET( MEOSN_RENDERERSETUP_TEXCACHE, NULL, 0x2 );
|
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTIONSET( MEOSN_RENDERERSETUP_TEXCACHE, NULL, 0x2 );
|
||||||
static MenuOption_t MEO_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_RENDERERSETUP_TEXCACHE, &glusetexcache );
|
static MenuOption_t MEO_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_RENDERERSETUP_TEXCACHE, &glusetexcache );
|
||||||
static MenuEntry_t ME_RENDERERSETUP_TEXCACHE = MAKE_MENUENTRY( "On-disk texture cache:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXCACHE, Option );
|
static MenuEntry_t ME_RENDERERSETUP_TEXCACHE = MAKE_MENUENTRY( "On-disk texture cache:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXCACHE, Option );
|
||||||
# endif
|
# endif
|
||||||
# ifdef USE_GLEXT
|
# ifdef USE_GLEXT
|
||||||
static MenuOption_t MEO_RENDERERSETUP_DETAILTEX = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &r_detailmapping );
|
static MenuOption_t MEO_RENDERERSETUP_DETAILTEX = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &r_detailmapping );
|
||||||
static MenuEntry_t ME_RENDERERSETUP_DETAILTEX = MAKE_MENUENTRY( "Detail textures:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_DETAILTEX, Option );
|
static MenuEntry_t ME_RENDERERSETUP_DETAILTEX = MAKE_MENUENTRY( "Detail textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_DETAILTEX, Option );
|
||||||
static MenuOption_t MEO_RENDERERSETUP_GLOWTEX = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_NoYes, &r_glowmapping);
|
static MenuOption_t MEO_RENDERERSETUP_GLOWTEX = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_NoYes, &r_glowmapping);
|
||||||
static MenuEntry_t ME_RENDERERSETUP_GLOWTEX = MAKE_MENUENTRY("Glow textures:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_GLOWTEX, Option);
|
static MenuEntry_t ME_RENDERERSETUP_GLOWTEX = MAKE_MENUENTRY("Glow textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_GLOWTEX, Option);
|
||||||
# endif
|
# endif
|
||||||
static MenuOption_t MEO_RENDERERSETUP_MODELS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usemodels );
|
static MenuOption_t MEO_RENDERERSETUP_MODELS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usemodels );
|
||||||
static MenuEntry_t ME_RENDERERSETUP_MODELS = MAKE_MENUENTRY( "3D models:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_MODELS, Option );
|
static MenuEntry_t ME_RENDERERSETUP_MODELS = MAKE_MENUENTRY( "3D models:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_MODELS, Option );
|
||||||
static MenuOption_t MEO_RENDERERSETUP_PALETTEEMULATION = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_NoYes, &r_usetileshades);
|
static MenuOption_t MEO_RENDERERSETUP_PALETTEEMULATION = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_NoYes, &r_usetileshades);
|
||||||
static MenuEntry_t ME_RENDERERSETUP_PALETTEEMULATION = MAKE_MENUENTRY("Palette emulation:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_PALETTEEMULATION, Option);
|
static MenuEntry_t ME_RENDERERSETUP_PALETTEEMULATION = MAKE_MENUENTRY("Palette emulation:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_PALETTEEMULATION, Option);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
static char const *MEOSN_POLYMER_LIGHTS [] = { "Off", "Full", "Map only", };
|
static char const *MEOSN_POLYMER_LIGHTS [] = { "Off", "Full", "Map only", };
|
||||||
static MenuOptionSet_t MEOS_POLYMER_LIGHTS = MAKE_MENUOPTIONSET(MEOSN_POLYMER_LIGHTS, NULL, 0x2);
|
static MenuOptionSet_t MEOS_POLYMER_LIGHTS = MAKE_MENUOPTIONSET(MEOSN_POLYMER_LIGHTS, NULL, 0x2);
|
||||||
static MenuOption_t MEO_POLYMER_LIGHTS = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_POLYMER_LIGHTS, &pr_lighting);
|
static MenuOption_t MEO_POLYMER_LIGHTS = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_POLYMER_LIGHTS, &pr_lighting);
|
||||||
static MenuEntry_t ME_POLYMER_LIGHTS = MAKE_MENUENTRY("Dynamic lights:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_POLYMER_LIGHTS, Option);
|
static MenuEntry_t ME_POLYMER_LIGHTS = MAKE_MENUENTRY("Dynamic lights:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_LIGHTS, Option);
|
||||||
|
|
||||||
static MenuRangeInt32_t MEO_POLYMER_LIGHTPASSES = MAKE_MENURANGE(&r_pr_maxlightpasses, &MF_Bluefont, 1, 10, 1, 10, 1);
|
static MenuRangeInt32_t MEO_POLYMER_LIGHTPASSES = MAKE_MENURANGE(&r_pr_maxlightpasses, &MF_Bluefont, 1, 10, 1, 10, 1);
|
||||||
static MenuEntry_t ME_POLYMER_LIGHTPASSES = MAKE_MENUENTRY("Lights per surface:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_POLYMER_LIGHTPASSES, RangeInt32);
|
static MenuEntry_t ME_POLYMER_LIGHTPASSES = MAKE_MENUENTRY("Lights per surface:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_LIGHTPASSES, RangeInt32);
|
||||||
|
|
||||||
static MenuOption_t MEO_POLYMER_SHADOWS = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_OffOn, &pr_shadows);
|
static MenuOption_t MEO_POLYMER_SHADOWS = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_OffOn, &pr_shadows);
|
||||||
static MenuEntry_t ME_POLYMER_SHADOWS = MAKE_MENUENTRY("Dynamic shadows:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_POLYMER_SHADOWS, Option);
|
static MenuEntry_t ME_POLYMER_SHADOWS = MAKE_MENUENTRY("Dynamic shadows:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_SHADOWS, Option);
|
||||||
|
|
||||||
static MenuRangeInt32_t MEO_POLYMER_SHADOWCOUNT = MAKE_MENURANGE(&pr_shadowcount, &MF_Bluefont, 1, 10, 1, 10, 1);
|
static MenuRangeInt32_t MEO_POLYMER_SHADOWCOUNT = MAKE_MENURANGE(&pr_shadowcount, &MF_Bluefont, 1, 10, 1, 10, 1);
|
||||||
static MenuEntry_t ME_POLYMER_SHADOWCOUNT = MAKE_MENUENTRY("Shadows per surface:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_POLYMER_SHADOWCOUNT, RangeInt32);
|
static MenuEntry_t ME_POLYMER_SHADOWCOUNT = MAKE_MENUENTRY("Shadows per surface:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_SHADOWCOUNT, RangeInt32);
|
||||||
|
|
||||||
static MenuOption_t MEO_POLYMER_PALETTEEMULATION = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_NoYes, &pr_artmapping);
|
static MenuOption_t MEO_POLYMER_PALETTEEMULATION = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_NoYes, &pr_artmapping);
|
||||||
static MenuEntry_t ME_POLYMER_PALETTEEMULATION = MAKE_MENUENTRY("Palette emulation:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_POLYMER_PALETTEEMULATION, Option);
|
static MenuEntry_t ME_POLYMER_PALETTEEMULATION = MAKE_MENUENTRY("Palette emulation:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_PALETTEEMULATION, Option);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1120,17 +1129,17 @@ static MenuEntry_t *MEL_SCREENSETUP[] = {
|
||||||
|
|
||||||
// Save and load will be filled in before every viewing of the save/load screen.
|
// Save and load will be filled in before every viewing of the save/load screen.
|
||||||
static MenuLink_t MEO_LOAD = { MENU_LOADVERIFY, MA_None, };
|
static MenuLink_t MEO_LOAD = { MENU_LOADVERIFY, MA_None, };
|
||||||
static MenuEntry_t ME_LOAD_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_MinifontSave, &MEF_LoadSave, &MEO_LOAD, Link );
|
static MenuEntry_t ME_LOAD_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_LoadSave, &MEO_LOAD, Link );
|
||||||
static MenuEntry_t ME_LOAD_EMPTY = MAKE_MENUENTRY( NULL, &MF_MinifontSave, &MEF_LoadSave, nullptr, Dummy );
|
static MenuEntry_t ME_LOAD_EMPTY = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_LoadSave, nullptr, Dummy );
|
||||||
static MenuEntry_t *ME_LOAD;
|
static MenuEntry_t *ME_LOAD;
|
||||||
static MenuEntry_t **MEL_LOAD;
|
static MenuEntry_t **MEL_LOAD;
|
||||||
|
|
||||||
static char const s_NewSaveGame[] = "(New Save Game)";
|
static char const s_NewSaveGame[] = "(New Save Game)";
|
||||||
static MenuString_t MEO_SAVE_TEMPLATE = MAKE_MENUSTRING( NULL, &MF_MinifontSave, MAXSAVEGAMENAME, 0 );
|
static MenuString_t MEO_SAVE_TEMPLATE = MAKE_MENUSTRING( NULL, &MF_Minifont, MAXSAVEGAMENAME, 0 );
|
||||||
static MenuString_t MEO_SAVE_NEW = MAKE_MENUSTRING( NULL, &MF_MinifontSave, MAXSAVEGAMENAME, 0 );
|
static MenuString_t MEO_SAVE_NEW = MAKE_MENUSTRING( NULL, &MF_Minifont, MAXSAVEGAMENAME, 0 );
|
||||||
static MenuString_t *MEO_SAVE;
|
static MenuString_t *MEO_SAVE;
|
||||||
static MenuEntry_t ME_SAVE_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_MinifontSave, &MEF_LoadSave, &MEO_SAVE_TEMPLATE, String );
|
static MenuEntry_t ME_SAVE_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_LoadSave, &MEO_SAVE_TEMPLATE, String );
|
||||||
static MenuEntry_t ME_SAVE_NEW = MAKE_MENUENTRY( s_NewSaveGame, &MF_MinifontSave, &MEF_LoadSave, &MEO_SAVE_NEW, String );
|
static MenuEntry_t ME_SAVE_NEW = MAKE_MENUENTRY( s_NewSaveGame, &MF_Minifont, &MEF_LoadSave, &MEO_SAVE_NEW, String );
|
||||||
static MenuEntry_t *ME_SAVE;
|
static MenuEntry_t *ME_SAVE;
|
||||||
static MenuEntry_t **MEL_SAVE;
|
static MenuEntry_t **MEL_SAVE;
|
||||||
|
|
||||||
|
@ -1208,19 +1217,19 @@ static MenuEntry_t *MEL_NETWORK[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static MenuString_t MEO_PLAYER_NAME = MAKE_MENUSTRING( szPlayerName, &MF_Bluefont, MAXPLAYERNAME, 0 );
|
static MenuString_t MEO_PLAYER_NAME = MAKE_MENUSTRING( szPlayerName, &MF_Bluefont, MAXPLAYERNAME, 0 );
|
||||||
static MenuEntry_t ME_PLAYER_NAME = MAKE_MENUENTRY( "Name", &MF_BluefontRed, &MEF_PlayerNarrow, &MEO_PLAYER_NAME, String );
|
static MenuEntry_t ME_PLAYER_NAME = MAKE_MENUENTRY( "Name", &MF_Bluefont, &MEF_PlayerNarrow, &MEO_PLAYER_NAME, String );
|
||||||
static char const *MEOSN_PLAYER_COLOR[] = { "Auto", "Blue", "Red", "Green", "Gray", "Dark gray", "Dark green", "Brown", "Dark blue", "Bright red", "Yellow", };
|
static char const *MEOSN_PLAYER_COLOR[] = { "Auto", "Blue", "Red", "Green", "Gray", "Dark gray", "Dark green", "Brown", "Dark blue", "Bright red", "Yellow", };
|
||||||
static int32_t MEOSV_PLAYER_COLOR[] = { 0, 9, 10, 11, 12, 13, 14, 15, 16, 21, 23, };
|
static int32_t MEOSV_PLAYER_COLOR[] = { 0, 9, 10, 11, 12, 13, 14, 15, 16, 21, 23, };
|
||||||
static MenuOptionSet_t MEOS_PLAYER_COLOR = MAKE_MENUOPTIONSET( MEOSN_PLAYER_COLOR, MEOSV_PLAYER_COLOR, 0x2 );
|
static MenuOptionSet_t MEOS_PLAYER_COLOR = MAKE_MENUOPTIONSET( MEOSN_PLAYER_COLOR, MEOSV_PLAYER_COLOR, 0x2 );
|
||||||
static MenuOption_t MEO_PLAYER_COLOR = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_COLOR, &ud.color );
|
static MenuOption_t MEO_PLAYER_COLOR = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_COLOR, &ud.color );
|
||||||
static MenuEntry_t ME_PLAYER_COLOR = MAKE_MENUENTRY( "Color", &MF_BluefontRed, &MEF_PlayerNarrow, &MEO_PLAYER_COLOR, Option );
|
static MenuEntry_t ME_PLAYER_COLOR = MAKE_MENUENTRY( "Color", &MF_Bluefont, &MEF_PlayerNarrow, &MEO_PLAYER_COLOR, Option );
|
||||||
static char const *MEOSN_PLAYER_TEAM[] = { "Blue", "Red", "Green", "Gray", };
|
static char const *MEOSN_PLAYER_TEAM[] = { "Blue", "Red", "Green", "Gray", };
|
||||||
static MenuOptionSet_t MEOS_PLAYER_TEAM = MAKE_MENUOPTIONSET( MEOSN_PLAYER_TEAM, NULL, 0x2 );
|
static MenuOptionSet_t MEOS_PLAYER_TEAM = MAKE_MENUOPTIONSET( MEOSN_PLAYER_TEAM, NULL, 0x2 );
|
||||||
static MenuOption_t MEO_PLAYER_TEAM = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_TEAM, &ud.team );
|
static MenuOption_t MEO_PLAYER_TEAM = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_TEAM, &ud.team );
|
||||||
static MenuEntry_t ME_PLAYER_TEAM = MAKE_MENUENTRY( "Team", &MF_BluefontRed, &MEF_PlayerNarrow, &MEO_PLAYER_TEAM, Option );
|
static MenuEntry_t ME_PLAYER_TEAM = MAKE_MENUENTRY( "Team", &MF_Bluefont, &MEF_PlayerNarrow, &MEO_PLAYER_TEAM, Option );
|
||||||
#ifndef EDUKE32_SIMPLE_MENU
|
#ifndef EDUKE32_SIMPLE_MENU
|
||||||
static MenuLink_t MEO_PLAYER_MACROS = { MENU_MACROS, MA_Advance, };
|
static MenuLink_t MEO_PLAYER_MACROS = { MENU_MACROS, MA_Advance, };
|
||||||
static MenuEntry_t ME_PLAYER_MACROS = MAKE_MENUENTRY( "Multiplayer macros", &MF_BluefontRed, &MEF_SmallOptions, &MEO_PLAYER_MACROS, Link );
|
static MenuEntry_t ME_PLAYER_MACROS = MAKE_MENUENTRY( "Multiplayer macros", &MF_Bluefont, &MEF_SmallOptions, &MEO_PLAYER_MACROS, Link );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static MenuEntry_t *MEL_PLAYER[] = {
|
static MenuEntry_t *MEL_PLAYER[] = {
|
||||||
|
@ -1394,7 +1403,7 @@ static MenuTextForm_t M_CHEATENTRY = { NULL, "Enter Cheat Code:", MAXCHEATLEN, 0
|
||||||
static MenuTextForm_t M_CHEAT_WARP = { NULL, "Enter Warp #:", 3, 0 };
|
static MenuTextForm_t M_CHEAT_WARP = { NULL, "Enter Warp #:", 3, 0 };
|
||||||
static MenuTextForm_t M_CHEAT_SKILL = { NULL, "Enter Skill #:", 1, 0 };
|
static MenuTextForm_t M_CHEAT_SKILL = { NULL, "Enter Skill #:", 1, 0 };
|
||||||
|
|
||||||
#define MAKE_MENUFILESELECT(a, b, c) { a, { &MMF_FileSelectLeft, &MMF_FileSelectRight }, { &MF_Minifont, &MF_MinifontRed }, b, c, { NULL, NULL }, { 0, 0 }, { 3<<16, 3<<16 }, FNLIST_INITIALIZER, 0 }
|
#define MAKE_MENUFILESELECT(a, b, c) { a, { &MMF_FileSelectLeft, &MMF_FileSelectRight }, { &MF_Minifont, &MF_Minifont }, b, c, { NULL, NULL }, { 0, 0 }, { 3<<16, 3<<16 }, FNLIST_INITIALIZER, 0 }
|
||||||
|
|
||||||
static MenuFileSelect_t M_USERMAP = MAKE_MENUFILESELECT( "Select A User Map", "*.map", boardfilename );
|
static MenuFileSelect_t M_USERMAP = MAKE_MENUFILESELECT( "Select A User Map", "*.map", boardfilename );
|
||||||
|
|
||||||
|
@ -1538,20 +1547,15 @@ void Menu_Init(void)
|
||||||
int32_t i, j, k;
|
int32_t i, j, k;
|
||||||
|
|
||||||
// prepare menu fonts
|
// prepare menu fonts
|
||||||
MF_Redfont.tilenum = BIGALPHANUM;
|
// check if tilenum is -1 in case it was set in EVENT_SETDEFAULTS
|
||||||
MF_Bluefont.tilenum = MF_BluefontRed.tilenum = MF_BluefontGame.tilenum = STARTALPHANUM;
|
if ((unsigned)MF_Redfont.tilenum >= MAXTILES) MF_Redfont.tilenum = BIGALPHANUM;
|
||||||
MF_Minifont.tilenum = MF_MinifontRed.tilenum = MF_MinifontSave.tilenum = MINIFONT;
|
if ((unsigned)MF_Bluefont.tilenum >= MAXTILES) MF_Bluefont.tilenum = STARTALPHANUM;
|
||||||
MF_Redfont.emptychar.y = tilesiz[BIGALPHANUM].y<<16;
|
if ((unsigned)MF_Minifont.tilenum >= MAXTILES) MF_Minifont.tilenum = MINIFONT;
|
||||||
MF_Bluefont.emptychar.y = MF_BluefontRed.emptychar.y = MF_BluefontGame.emptychar.y = tilesiz[STARTALPHANUM].y<<16;
|
MF_Redfont.emptychar.y = tilesiz[MF_Redfont.tilenum].y<<16;
|
||||||
MF_Minifont.emptychar.y = MF_MinifontRed.emptychar.y = MF_MinifontSave.emptychar.y = tilesiz[MINIFONT].y<<16;
|
MF_Bluefont.emptychar.y = tilesiz[MF_Bluefont.tilenum].y<<16;
|
||||||
if (NAM_WW2GI)
|
MF_Minifont.emptychar.y = tilesiz[MF_Minifont.tilenum].y<<16;
|
||||||
MF_Bluefont.between.x = MF_BluefontRed.between.x = 0;
|
|
||||||
if (!minitext_lowercase)
|
if (!minitext_lowercase)
|
||||||
{
|
|
||||||
MF_Minifont.textflags |= TEXT_UPPERCASE;
|
MF_Minifont.textflags |= TEXT_UPPERCASE;
|
||||||
MF_MinifontRed.textflags |= TEXT_UPPERCASE;
|
|
||||||
MF_MinifontSave.textflags |= TEXT_UPPERCASE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// prepare gamefuncs and keys
|
// prepare gamefuncs and keys
|
||||||
MEOSN_Gamefuncs[0] = MenuGameFuncNone;
|
MEOSN_Gamefuncs[0] = MenuGameFuncNone;
|
||||||
|
@ -1771,13 +1775,10 @@ void Menu_Init(void)
|
||||||
MF_Redfont.between.x = 2<<16;
|
MF_Redfont.between.x = 2<<16;
|
||||||
MF_Redfont.cursorScale = 32768;
|
MF_Redfont.cursorScale = 32768;
|
||||||
MF_Redfont.zoom = 16384;
|
MF_Redfont.zoom = 16384;
|
||||||
MF_Bluefont.between.x = MF_BluefontRed.between.x = 0;
|
MF_Bluefont.zoom = 16384;
|
||||||
MF_Bluefont.zoom = MF_BluefontRed.zoom = MF_BluefontGame.zoom = 16384;
|
|
||||||
|
|
||||||
// hack; should swap out pointers
|
// hack; should swap out pointers
|
||||||
MF_Minifont = MF_Bluefont;
|
MF_Minifont = MF_Bluefont;
|
||||||
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;
|
||||||
|
@ -2116,32 +2117,32 @@ static void Menu_PreDraw(MenuID_t cm, MenuEntry_t *entry, const vec2_t origin)
|
||||||
|
|
||||||
case MENU_NETSETUP:
|
case MENU_NETSETUP:
|
||||||
case MENU_NETHOST:
|
case MENU_NETHOST:
|
||||||
mminitext(origin.x + (90<<16), origin.y + (90<<16), "Game Type", 2);
|
mminitext(origin.x + (90<<16), origin.y + (90<<16), "Game Type", MF_Minifont.pal_deselected);
|
||||||
mminitext(origin.x + (90<<16), origin.y + ((90+8)<<16), "Episode", 2);
|
mminitext(origin.x + (90<<16), origin.y + ((90+8)<<16), "Episode", MF_Minifont.pal_deselected);
|
||||||
mminitext(origin.x + (90<<16), origin.y + ((90+8+8)<<16), "Level", 2);
|
mminitext(origin.x + (90<<16), origin.y + ((90+8+8)<<16), "Level", MF_Minifont.pal_deselected);
|
||||||
mminitext(origin.x + (90<<16), origin.y + ((90+8+8+8)<<16), ME_NETOPTIONS_MONSTERS.name, 2);
|
mminitext(origin.x + (90<<16), origin.y + ((90+8+8+8)<<16), ME_NETOPTIONS_MONSTERS.name, MF_Minifont.pal_deselected);
|
||||||
if (ud.m_coop == 0)
|
if (ud.m_coop == 0)
|
||||||
mminitext(origin.x + (90<<16), origin.y + ((90+8+8+8+8)<<16), "Markers", 2);
|
mminitext(origin.x + (90<<16), origin.y + ((90+8+8+8+8)<<16), "Markers", MF_Minifont.pal_deselected);
|
||||||
else if (ud.m_coop == 1)
|
else if (ud.m_coop == 1)
|
||||||
mminitext(origin.x + (90<<16), origin.y + ((90+8+8+8+8)<<16), "Friendly Fire", 2);
|
mminitext(origin.x + (90<<16), origin.y + ((90+8+8+8+8)<<16), "Friendly Fire", MF_Minifont.pal_deselected);
|
||||||
mminitext(origin.x + (90<<16), origin.y + ((90+8+8+8+8+8)<<16), "User Map", 2);
|
mminitext(origin.x + (90<<16), origin.y + ((90+8+8+8+8+8)<<16), "User Map", MF_Minifont.pal_deselected);
|
||||||
|
|
||||||
mminitext(origin.x + ((90+60)<<16), origin.y + (90<<16), g_gametypeNames[ud.m_coop], 0);
|
mminitext(origin.x + ((90+60)<<16), origin.y + (90<<16), g_gametypeNames[ud.m_coop], MF_Minifont.pal_deselected_right);
|
||||||
|
|
||||||
mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8)<<16), g_volumeNames[ud.m_volume_number], 0);
|
mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8)<<16), g_volumeNames[ud.m_volume_number], MF_Minifont.pal_deselected_right);
|
||||||
mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8)<<16), g_mapInfo[MAXLEVELS*ud.m_volume_number+ud.m_level_number].name, 0);
|
mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8)<<16), g_mapInfo[MAXLEVELS*ud.m_volume_number+ud.m_level_number].name, MF_Minifont.pal_deselected_right);
|
||||||
if (ud.m_monsters_off == 0 || ud.m_player_skill > 0)
|
if (ud.m_monsters_off == 0 || ud.m_player_skill > 0)
|
||||||
mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8)<<16), g_skillNames[ud.m_player_skill], 0);
|
mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8)<<16), g_skillNames[ud.m_player_skill], MF_Minifont.pal_deselected_right);
|
||||||
else mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8)<<16), "None", 0);
|
else mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8)<<16), "None", MF_Minifont.pal_deselected_right);
|
||||||
if (ud.m_coop == 0)
|
if (ud.m_coop == 0)
|
||||||
{
|
{
|
||||||
if (ud.m_marker) mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8+8)<<16), "On", 0);
|
if (ud.m_marker) mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8+8)<<16), "On", MF_Minifont.pal_deselected_right);
|
||||||
else mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8+8)<<16), "Off", 0);
|
else mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8+8)<<16), "Off", MF_Minifont.pal_deselected_right);
|
||||||
}
|
}
|
||||||
else if (ud.m_coop == 1)
|
else if (ud.m_coop == 1)
|
||||||
{
|
{
|
||||||
if (ud.m_ffire) mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8+8)<<16), "On", 0);
|
if (ud.m_ffire) mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8+8)<<16), "On", MF_Minifont.pal_deselected_right);
|
||||||
else mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8+8)<<16), "Off", 0);
|
else mminitext(origin.x + ((90+60)<<16), origin.y + ((90+8+8+8+8)<<16), "Off", MF_Minifont.pal_deselected_right);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -4190,13 +4191,21 @@ enum MenuTextFlags_t
|
||||||
MT_XRight = 1<<3,
|
MT_XRight = 1<<3,
|
||||||
MT_YCenter = 1<<4,
|
MT_YCenter = 1<<4,
|
||||||
MT_Literal = 1<<5,
|
MT_Literal = 1<<5,
|
||||||
|
MT_RightSide = 1<<6,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void Menu_GetFmt(const MenuFont_t *font, uint8_t const status, int32_t *s, int32_t *p, int32_t *z)
|
static void Menu_GetFmt(const MenuFont_t *font, uint8_t const status, int32_t *s, int32_t *z)
|
||||||
{
|
{
|
||||||
if (KXDWN) *z = (status & MT_Selected) ? *z + (*z >> 4) : *z;
|
if (status & MT_Selected)
|
||||||
*s = (status & MT_Selected) ? (sintable[(totalclock<<5)&2047]>>12) : font->shade_deselected;
|
*s = VM_OnEventWithReturn(EVENT_MENUSHADESELECTED, -1, myconnectindex, sintable[(totalclock<<5)&2047]>>12);
|
||||||
*p = (status & MT_Disabled) ? font->pal_disabled : font->pal;
|
else
|
||||||
|
*s = font->shade_deselected;
|
||||||
|
// sum shade values
|
||||||
|
if (status & MT_Disabled)
|
||||||
|
s += font->shade_disabled;
|
||||||
|
|
||||||
|
if (KXDWN && status & MT_Selected)
|
||||||
|
*z += (*z >> 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static vec2_t Menu_Text(int32_t x, int32_t y, const MenuFont_t *font, const char *t, uint8_t status, int32_t ydim_upper, int32_t ydim_lower)
|
static vec2_t Menu_Text(int32_t x, int32_t y, const MenuFont_t *font, const char *t, uint8_t status, int32_t ydim_upper, int32_t ydim_lower)
|
||||||
|
@ -4217,7 +4226,14 @@ static vec2_t Menu_Text(int32_t x, int32_t y, const MenuFont_t *font, const char
|
||||||
|
|
||||||
int32_t z = font->zoom;
|
int32_t z = font->zoom;
|
||||||
|
|
||||||
Menu_GetFmt(font, status, &s, &p, &z);
|
if (status & MT_Disabled)
|
||||||
|
p = (status & MT_RightSide) ? font->pal_disabled_right : font->pal_disabled;
|
||||||
|
else if (status & MT_Selected)
|
||||||
|
p = (status & MT_RightSide) ? font->pal_selected_right : font->pal_selected;
|
||||||
|
else
|
||||||
|
p = (status & MT_RightSide) ? font->pal_deselected_right : font->pal_deselected;
|
||||||
|
|
||||||
|
Menu_GetFmt(font, status, &s, &z);
|
||||||
|
|
||||||
return G_ScreenText(font->tilenum, x, y, z, 0, 0, t, s, p, 2|8|16|ROTATESPRITE_FULL16, 0, font->emptychar.x, font->emptychar.y, font->between.x, ybetween, f, 0, ydim_upper, xdim-1, ydim_lower);
|
return G_ScreenText(font->tilenum, x, y, z, 0, 0, t, s, p, 2|8|16|ROTATESPRITE_FULL16, 0, font->emptychar.x, font->emptychar.y, font->between.x, ybetween, f, 0, ydim_upper, xdim-1, ydim_lower);
|
||||||
}
|
}
|
||||||
|
@ -4453,6 +4469,9 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
|
||||||
Menu_DrawCursorLeft(origin.x + x - entry->font->cursorLeftPosition, y_internal, entry->font->cursorScale);
|
Menu_DrawCursorLeft(origin.x + x - entry->font->cursorLeftPosition, y_internal, entry->font->cursorScale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entry->name != nullptr && entry->name[0] != '\0')
|
||||||
|
status |= MT_RightSide;
|
||||||
|
|
||||||
// need this up here to avoid race conditions
|
// need this up here to avoid race conditions
|
||||||
entry->ybottom = (entry->ytop = y_upper + y) + height;
|
entry->ybottom = (entry->ytop = y_upper + y) + height;
|
||||||
|
|
||||||
|
@ -4631,7 +4650,14 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
|
||||||
|
|
||||||
int32_t s, p;
|
int32_t s, p;
|
||||||
int32_t z = entry->font->cursorScale;
|
int32_t z = entry->font->cursorScale;
|
||||||
Menu_GetFmt(object->font, status, &s, &p, &z);
|
Menu_GetFmt(object->font, status|MT_RightSide, &s, &z);
|
||||||
|
|
||||||
|
if (status & MT_Disabled)
|
||||||
|
p = ud.slidebar_paldisabled;
|
||||||
|
else if (status & MT_Selected)
|
||||||
|
p = ud.slidebar_palselected;
|
||||||
|
else
|
||||||
|
p = 0;
|
||||||
|
|
||||||
const int32_t slidebarwidth = mulscale16(tilesiz[SLIDEBAR].x * ud.menu_slidebarz, z);
|
const int32_t slidebarwidth = mulscale16(tilesiz[SLIDEBAR].x * ud.menu_slidebarz, z);
|
||||||
const int32_t slidebarheight = mulscale16(tilesiz[SLIDEBAR].y * ud.menu_slidebarz, z);
|
const int32_t slidebarheight = mulscale16(tilesiz[SLIDEBAR].y * ud.menu_slidebarz, z);
|
||||||
|
@ -4644,13 +4670,13 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
|
||||||
const int32_t slidebarx = origin.x + x;
|
const int32_t slidebarx = origin.x + x;
|
||||||
const int32_t slidebary = origin.y + y_upper + y + ((height - slidebarheight)>>1) - menu->scrollPos;
|
const int32_t slidebary = origin.y + y_upper + y + ((height - slidebarheight)>>1) - menu->scrollPos;
|
||||||
|
|
||||||
rotatesprite_ybounds(slidebarx, slidebary, mulscale16(ud.menu_slidebarz, z), 0, SLIDEBAR, s, (entry->flags & (MEF_Disabled|MEF_LookDisabled)) ? 1 : 0, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
rotatesprite_ybounds(slidebarx, slidebary, mulscale16(ud.menu_slidebarz, z), 0, SLIDEBAR, s, p, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
||||||
|
|
||||||
const int32_t slideregionwidth = mulscale16((tilesiz[SLIDEBAR].x * ud.menu_slidebarz) - (ud.menu_slidebarmargin<<1) - (tilesiz[SLIDEBAR+1].x * ud.menu_slidecursorz), z);
|
const int32_t slideregionwidth = mulscale16((tilesiz[SLIDEBAR].x * ud.menu_slidebarz) - (ud.menu_slidebarmargin<<1) - (tilesiz[SLIDEBAR+1].x * ud.menu_slidecursorz), z);
|
||||||
const int32_t slidepointx = slidebarx + mulscale16(ud.menu_slidebarmargin, z) + scale(slideregionwidth, *object->variable - object->min, object->max - object->min);
|
const int32_t slidepointx = slidebarx + mulscale16(ud.menu_slidebarmargin, z) + scale(slideregionwidth, *object->variable - object->min, object->max - object->min);
|
||||||
const int32_t slidepointy = slidebary + mulscale16(((tilesiz[SLIDEBAR].y * ud.menu_slidebarz) - (tilesiz[SLIDEBAR+1].y * ud.menu_slidecursorz))>>1, z);
|
const int32_t slidepointy = slidebary + mulscale16(((tilesiz[SLIDEBAR].y * ud.menu_slidebarz) - (tilesiz[SLIDEBAR+1].y * ud.menu_slidecursorz))>>1, z);
|
||||||
|
|
||||||
rotatesprite_ybounds(slidepointx, slidepointy, mulscale16(ud.menu_slidecursorz, z), 0, SLIDEBAR+1, s, (entry->flags & (MEF_Disabled|MEF_LookDisabled)) ? 1 : 0, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
rotatesprite_ybounds(slidepointx, slidepointy, mulscale16(ud.menu_slidecursorz, z), 0, SLIDEBAR+1, s, p, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
||||||
|
|
||||||
if (object->flags & DisplayTypeMask)
|
if (object->flags & DisplayTypeMask)
|
||||||
{
|
{
|
||||||
|
@ -4723,7 +4749,14 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
|
||||||
|
|
||||||
int32_t s, p;
|
int32_t s, p;
|
||||||
int32_t z = entry->font->cursorScale;
|
int32_t z = entry->font->cursorScale;
|
||||||
Menu_GetFmt(object->font, status, &s, &p, &z);
|
Menu_GetFmt(object->font, status|MT_RightSide, &s, &z);
|
||||||
|
|
||||||
|
if (status & MT_Disabled)
|
||||||
|
p = ud.slidebar_paldisabled;
|
||||||
|
else if (status & MT_Selected)
|
||||||
|
p = ud.slidebar_palselected;
|
||||||
|
else
|
||||||
|
p = 0;
|
||||||
|
|
||||||
const int32_t slidebarwidth = mulscale16(tilesiz[SLIDEBAR].x * ud.menu_slidebarz, z);
|
const int32_t slidebarwidth = mulscale16(tilesiz[SLIDEBAR].x * ud.menu_slidebarz, z);
|
||||||
const int32_t slidebarheight = mulscale16(tilesiz[SLIDEBAR].y * ud.menu_slidebarz, z);
|
const int32_t slidebarheight = mulscale16(tilesiz[SLIDEBAR].y * ud.menu_slidebarz, z);
|
||||||
|
@ -4736,13 +4769,13 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
|
||||||
const int32_t slidebarx = origin.x + x;
|
const int32_t slidebarx = origin.x + x;
|
||||||
const int32_t slidebary = origin.y + y_upper + y + ((height - slidebarheight)>>1) - menu->scrollPos;
|
const int32_t slidebary = origin.y + y_upper + y + ((height - slidebarheight)>>1) - menu->scrollPos;
|
||||||
|
|
||||||
rotatesprite_ybounds(slidebarx, slidebary, mulscale16(ud.menu_slidebarz, z), 0, SLIDEBAR, s, (entry->flags & (MEF_Disabled|MEF_LookDisabled)) ? 1 : 0, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
rotatesprite_ybounds(slidebarx, slidebary, mulscale16(ud.menu_slidebarz, z), 0, SLIDEBAR, s, p, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
||||||
|
|
||||||
const int32_t slideregionwidth = mulscale16((tilesiz[SLIDEBAR].x * ud.menu_slidebarz) - (ud.menu_slidebarmargin<<1) - (tilesiz[SLIDEBAR+1].x * ud.menu_slidecursorz), z);
|
const int32_t slideregionwidth = mulscale16((tilesiz[SLIDEBAR].x * ud.menu_slidebarz) - (ud.menu_slidebarmargin<<1) - (tilesiz[SLIDEBAR+1].x * ud.menu_slidecursorz), z);
|
||||||
const int32_t slidepointx = slidebarx + mulscale16(ud.menu_slidebarmargin, z) + Blrintf((float) slideregionwidth * (*object->variable - object->min) / (object->max - object->min));
|
const int32_t slidepointx = slidebarx + mulscale16(ud.menu_slidebarmargin, z) + Blrintf((float) slideregionwidth * (*object->variable - object->min) / (object->max - object->min));
|
||||||
const int32_t slidepointy = slidebary + mulscale16(((tilesiz[SLIDEBAR].y * ud.menu_slidebarz) - (tilesiz[SLIDEBAR+1].y * ud.menu_slidecursorz))>>1, z);
|
const int32_t slidepointy = slidebary + mulscale16(((tilesiz[SLIDEBAR].y * ud.menu_slidebarz) - (tilesiz[SLIDEBAR+1].y * ud.menu_slidecursorz))>>1, z);
|
||||||
|
|
||||||
rotatesprite_ybounds(slidepointx, slidepointy, mulscale16(ud.menu_slidecursorz, z), 0, SLIDEBAR+1, s, (entry->flags & (MEF_Disabled|MEF_LookDisabled)) ? 1 : 0, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
rotatesprite_ybounds(slidepointx, slidepointy, mulscale16(ud.menu_slidecursorz, z), 0, SLIDEBAR+1, s, p, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
||||||
|
|
||||||
if (object->flags & DisplayTypeMask)
|
if (object->flags & DisplayTypeMask)
|
||||||
{
|
{
|
||||||
|
@ -4816,7 +4849,14 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
|
||||||
|
|
||||||
int32_t s, p;
|
int32_t s, p;
|
||||||
int32_t z = entry->font->cursorScale;
|
int32_t z = entry->font->cursorScale;
|
||||||
Menu_GetFmt(object->font, status, &s, &p, &z);
|
Menu_GetFmt(object->font, status|MT_RightSide, &s, &z);
|
||||||
|
|
||||||
|
if (status & MT_Disabled)
|
||||||
|
p = ud.slidebar_paldisabled;
|
||||||
|
else if (status & MT_Selected)
|
||||||
|
p = ud.slidebar_palselected;
|
||||||
|
else
|
||||||
|
p = 0;
|
||||||
|
|
||||||
const int32_t slidebarwidth = mulscale16(tilesiz[SLIDEBAR].x * ud.menu_slidebarz, z);
|
const int32_t slidebarwidth = mulscale16(tilesiz[SLIDEBAR].x * ud.menu_slidebarz, z);
|
||||||
const int32_t slidebarheight = mulscale16(tilesiz[SLIDEBAR].y * ud.menu_slidebarz, z);
|
const int32_t slidebarheight = mulscale16(tilesiz[SLIDEBAR].y * ud.menu_slidebarz, z);
|
||||||
|
@ -4829,13 +4869,13 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
|
||||||
const int32_t slidebarx = origin.x + x;
|
const int32_t slidebarx = origin.x + x;
|
||||||
const int32_t slidebary = origin.y + y_upper + y + ((height - slidebarheight)>>1) - menu->scrollPos;
|
const int32_t slidebary = origin.y + y_upper + y + ((height - slidebarheight)>>1) - menu->scrollPos;
|
||||||
|
|
||||||
rotatesprite_ybounds(slidebarx, slidebary, mulscale16(ud.menu_slidebarz, z), 0, SLIDEBAR, s, (entry->flags & (MEF_Disabled|MEF_LookDisabled)) ? 1 : 0, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
rotatesprite_ybounds(slidebarx, slidebary, mulscale16(ud.menu_slidebarz, z), 0, SLIDEBAR, s, p, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
||||||
|
|
||||||
const int32_t slideregionwidth = mulscale16((tilesiz[SLIDEBAR].x * ud.menu_slidebarz) - (ud.menu_slidebarmargin<<1) - (tilesiz[SLIDEBAR+1].x * ud.menu_slidecursorz), z);
|
const int32_t slideregionwidth = mulscale16((tilesiz[SLIDEBAR].x * ud.menu_slidebarz) - (ud.menu_slidebarmargin<<1) - (tilesiz[SLIDEBAR+1].x * ud.menu_slidecursorz), z);
|
||||||
const int32_t slidepointx = slidebarx + mulscale16(ud.menu_slidebarmargin, z) + lrint((double) slideregionwidth * (*object->variable - object->min) / (object->max - object->min));
|
const int32_t slidepointx = slidebarx + mulscale16(ud.menu_slidebarmargin, z) + lrint((double) slideregionwidth * (*object->variable - object->min) / (object->max - object->min));
|
||||||
const int32_t slidepointy = slidebary + mulscale16(((tilesiz[SLIDEBAR].y * ud.menu_slidebarz) - (tilesiz[SLIDEBAR+1].y * ud.menu_slidecursorz))>>1, z);
|
const int32_t slidepointy = slidebary + mulscale16(((tilesiz[SLIDEBAR].y * ud.menu_slidebarz) - (tilesiz[SLIDEBAR+1].y * ud.menu_slidecursorz))>>1, z);
|
||||||
|
|
||||||
rotatesprite_ybounds(slidepointx, slidepointy, mulscale16(ud.menu_slidecursorz, z), 0, SLIDEBAR+1, s, (entry->flags & (MEF_Disabled|MEF_LookDisabled)) ? 1 : 0, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
rotatesprite_ybounds(slidepointx, slidepointy, mulscale16(ud.menu_slidecursorz, z), 0, SLIDEBAR+1, s, p, 2|8|16|ROTATESPRITE_FULL16, ydim_upper, ydim_lower);
|
||||||
|
|
||||||
if (object->flags & DisplayTypeMask)
|
if (object->flags & DisplayTypeMask)
|
||||||
{
|
{
|
||||||
|
@ -5266,7 +5306,9 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
|
||||||
|
|
||||||
// path
|
// path
|
||||||
Bsnprintf(tempbuf, sizeof(tempbuf), "Path: %s", object->destination);
|
Bsnprintf(tempbuf, sizeof(tempbuf), "Path: %s", object->destination);
|
||||||
Menu_Text(origin.x + object->format[0]->pos.x, origin.y + (32<<16) + (MF_Bluefont.get_yline()>>1), &MF_Bluefont, tempbuf, MT_YCenter, 0, ydim-1);
|
mgametext(origin.x + object->format[0]->pos.x, origin.y + (32<<16), tempbuf);
|
||||||
|
|
||||||
|
uint8_t column_status[2] = { 0, MT_RightSide };
|
||||||
|
|
||||||
for (i = 0; i < 2; ++i)
|
for (i = 0; i < 2; ++i)
|
||||||
{
|
{
|
||||||
|
@ -5300,7 +5342,9 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
|
||||||
|
|
||||||
for (dir = object->findhigh[i]->usera; dir; dir = dir->next)
|
for (dir = object->findhigh[i]->usera; dir; dir = dir->next)
|
||||||
{
|
{
|
||||||
uint8_t status = (dir == object->findhigh[i] && object->currentList == i) ? MT_Selected : 0;
|
uint8_t status = column_status[i];
|
||||||
|
if (dir == object->findhigh[i] && object->currentList == i)
|
||||||
|
status |= MT_Selected;
|
||||||
|
|
||||||
// pal = dir->source==CACHE1D_SOURCE_ZIP ? 8 : 2
|
// pal = dir->source==CACHE1D_SOURCE_ZIP ? 8 : 2
|
||||||
|
|
||||||
|
|
|
@ -119,13 +119,17 @@ typedef enum MenuAnimationType_t
|
||||||
// a subset of screentext parameters, restricted because menus require accessibility
|
// a subset of screentext parameters, restricted because menus require accessibility
|
||||||
typedef struct MenuFont_t
|
typedef struct MenuFont_t
|
||||||
{
|
{
|
||||||
|
// int32_t xspace, yline;
|
||||||
vec2_t emptychar, between;
|
vec2_t emptychar, between;
|
||||||
int32_t zoom;
|
int32_t zoom;
|
||||||
int32_t cursorLeftPosition, cursorCenterPosition, cursorScale;
|
int32_t cursorLeftPosition, cursorCenterPosition, cursorScale;
|
||||||
int32_t textflags;
|
int32_t textflags;
|
||||||
int16_t tilenum;
|
int16_t tilenum;
|
||||||
int8_t shade_deselected; // selected entries are mandated to glow
|
// selected shade glows, deselected shade is used by Blood, disabled shade is used by SW
|
||||||
uint8_t pal, pal_disabled;
|
int8_t shade_deselected, shade_disabled;
|
||||||
|
uint8_t pal;
|
||||||
|
uint8_t pal_selected, pal_deselected, pal_disabled;
|
||||||
|
uint8_t pal_selected_right, pal_deselected_right, pal_disabled_right;
|
||||||
|
|
||||||
int32_t get_yline() const { return mulscale16(emptychar.y, zoom); }
|
int32_t get_yline() const { return mulscale16(emptychar.y, zoom); }
|
||||||
} MenuFont_t;
|
} MenuFont_t;
|
||||||
|
@ -458,9 +462,7 @@ void Menu_Open(size_t playerID);
|
||||||
void Menu_Close(size_t playerID);
|
void Menu_Close(size_t playerID);
|
||||||
void M_DisplayMenus(void);
|
void M_DisplayMenus(void);
|
||||||
|
|
||||||
extern MenuFont_t MF_Redfont;
|
extern MenuFont_t MF_Redfont, MF_Bluefont, MF_Minifont;
|
||||||
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;
|
||||||
|
|
|
@ -897,24 +897,24 @@ void G_PrintGameText(int32_t tile, int32_t x, int32_t y, const char *t,
|
||||||
if (x == (160<<16))
|
if (x == (160<<16))
|
||||||
f |= TEXT_XCENTER;
|
f |= TEXT_XCENTER;
|
||||||
|
|
||||||
G_ScreenText(tile, x, y, z, 0, 0, t, s, p, 2|o|ROTATESPRITE_FULL16, a, MF_BluefontGame.emptychar.x, MF_BluefontGame.emptychar.y, MF_BluefontGame.between.x, MF_BluefontGame.between.y, MF_BluefontGame.textflags|f, x1, y1, x2, y2);
|
G_ScreenText(tile, x, y, z, 0, 0, t, s, p, 2|o|ROTATESPRITE_FULL16, a, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags|f, x1, y1, x2, y2);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2_t gametext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t o, int32_t a, int32_t f)
|
vec2_t gametext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t o, int32_t a, int32_t f)
|
||||||
{
|
{
|
||||||
return G_ScreenText(MF_BluefontGame.tilenum, x, y, MF_BluefontGame.zoom, 0, 0, t, s, p, o|2|8|16|ROTATESPRITE_FULL16, a, MF_BluefontGame.emptychar.x, MF_BluefontGame.emptychar.y, MF_BluefontGame.between.x, MF_BluefontGame.between.y, MF_BluefontGame.textflags|f, 0, 0, xdim-1, ydim-1);
|
return G_ScreenText(MF_Bluefont.tilenum, x, y, MF_Bluefont.zoom, 0, 0, t, s, p, o|2|8|16|ROTATESPRITE_FULL16, a, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags|f, 0, 0, xdim-1, ydim-1);
|
||||||
}
|
}
|
||||||
void gametext_simple(int32_t x, int32_t y, const char *t)
|
void gametext_simple(int32_t x, int32_t y, const char *t)
|
||||||
{
|
{
|
||||||
G_ScreenText(MF_BluefontGame.tilenum, x, y, MF_BluefontGame.zoom, 0, 0, t, 0, MF_BluefontGame.pal, 2|8|16|ROTATESPRITE_FULL16, 0, MF_BluefontGame.emptychar.x, MF_BluefontGame.emptychar.y, MF_BluefontGame.between.x, MF_BluefontGame.between.y, MF_BluefontGame.textflags, 0, 0, xdim-1, ydim-1);
|
G_ScreenText(MF_Bluefont.tilenum, x, y, MF_Bluefont.zoom, 0, 0, t, 0, MF_Bluefont.pal, 2|8|16|ROTATESPRITE_FULL16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags, 0, 0, xdim-1, ydim-1);
|
||||||
}
|
}
|
||||||
vec2_t mpgametext(int32_t x, int32_t y, const char *t, int32_t s, int32_t o, int32_t a, int32_t f)
|
vec2_t mpgametext(int32_t x, int32_t y, const char *t, int32_t s, int32_t o, int32_t a, int32_t f)
|
||||||
{
|
{
|
||||||
return G_ScreenText(MF_BluefontGame.tilenum, x, y, textsc(MF_BluefontGame.zoom), 0, 0, t, s, MF_BluefontGame.pal, o|2|8|16|ROTATESPRITE_FULL16, a, MF_BluefontGame.emptychar.x, MF_BluefontGame.emptychar.y, MF_BluefontGame.between.x, MF_BluefontGame.between.y, MF_BluefontGame.textflags|f, 0, 0, xdim-1, ydim-1);
|
return G_ScreenText(MF_Bluefont.tilenum, x, y, textsc(MF_Bluefont.zoom), 0, 0, t, s, MF_Bluefont.pal, o|2|8|16|ROTATESPRITE_FULL16, a, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags|f, 0, 0, xdim-1, ydim-1);
|
||||||
}
|
}
|
||||||
vec2_t mpgametextsize(const char *t, int32_t f)
|
vec2_t mpgametextsize(const char *t, int32_t f)
|
||||||
{
|
{
|
||||||
return G_ScreenTextSize(MF_BluefontGame.tilenum, 0, 0, textsc(MF_BluefontGame.zoom), 0, t, 2|8|16|ROTATESPRITE_FULL16, MF_BluefontGame.emptychar.x, MF_BluefontGame.emptychar.y, MF_BluefontGame.between.x, MF_BluefontGame.between.y, MF_BluefontGame.textflags|f, 0, 0, xdim-1, ydim-1);
|
return G_ScreenTextSize(MF_Bluefont.tilenum, 0, 0, textsc(MF_Bluefont.zoom), 0, t, 2|8|16|ROTATESPRITE_FULL16, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags|f, 0, 0, xdim-1, ydim-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// minitext_yofs: in hud_scale-independent, (<<16)-scaled, 0-200-normalized y coords,
|
// minitext_yofs: in hud_scale-independent, (<<16)-scaled, 0-200-normalized y coords,
|
||||||
|
@ -923,10 +923,8 @@ 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 = MF_MinifontSave.zoom;
|
int32_t z = MF_Minifont.zoom;
|
||||||
|
|
||||||
if (t == NULL)
|
if (t == NULL)
|
||||||
{
|
{
|
||||||
|
@ -949,7 +947,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, 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);
|
dim = G_ScreenText(MF_Minifont.tilenum, x, y, z, 0, 0, t, s, p, sb|ROTATESPRITE_FULL16, 0, MF_Minifont.emptychar.x, MF_Minifont.emptychar.y, MF_Minifont.between.x, MF_Minifont.between.y, MF_Minifont.textflags, 0, 0, xdim-1, ydim-1);
|
||||||
|
|
||||||
x += dim.x;
|
x += dim.x;
|
||||||
|
|
||||||
|
@ -964,6 +962,10 @@ void menutext_(int32_t x, int32_t y, int32_t s, char const *t, int32_t o, int32_
|
||||||
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);
|
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 captionmenutext(int32_t x, int32_t y, char const *t)
|
||||||
|
{
|
||||||
|
G_ScreenText(MF_Redfont.tilenum, x, y - (12<<16), MF_Redfont.zoom, 0, 0, t, 0, ud.menutitle_pal, 2|8|16|ROTATESPRITE_FULL16, 0, MF_Redfont.emptychar.x, MF_Redfont.emptychar.y, MF_Redfont.between.x, MF_Redfont.between.y, MF_Redfont.textflags|TEXT_LITERALESCAPE|TEXT_XCENTER|TEXT_YCENTER, 0, 0, xdim-1, ydim-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t user_quote_time[MAXUSERQUOTES];
|
int32_t user_quote_time[MAXUSERQUOTES];
|
||||||
|
|
|
@ -61,6 +61,7 @@ enum ScreenTextFlags_t {
|
||||||
|
|
||||||
extern int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t sb);
|
extern int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t sb);
|
||||||
extern void menutext_(int32_t x, int32_t y, int32_t s, char const *t, int32_t o, int32_t f);
|
extern void menutext_(int32_t x, int32_t y, int32_t s, char const *t, int32_t o, int32_t f);
|
||||||
|
extern void captionmenutext(int32_t x, int32_t y, char const *t);
|
||||||
extern vec2_t gametext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t o, int32_t a, int32_t f);
|
extern vec2_t gametext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t o, int32_t a, int32_t f);
|
||||||
extern void gametext_simple(int32_t x, int32_t y, const char *t);
|
extern void gametext_simple(int32_t x, int32_t y, const char *t);
|
||||||
#define mpgametext_x (5<<16)
|
#define mpgametext_x (5<<16)
|
||||||
|
@ -73,12 +74,12 @@ extern int32_t textsc(int32_t sc);
|
||||||
#define menutext(x, y, t) menutext_((x), (y), 0, (t), 10|16, 0)
|
#define menutext(x, y, t) menutext_((x), (y), 0, (t), 10|16, 0)
|
||||||
#define menutext_center(y, t) menutext_(160<<16, (y)<<16, 0, (t), 10|16, TEXT_XCENTER)
|
#define menutext_center(y, t) menutext_(160<<16, (y)<<16, 0, (t), 10|16, TEXT_XCENTER)
|
||||||
#define gametext(x, y, t) gametext_simple((x)<<16, (y)<<16, (t))
|
#define gametext(x, y, t) gametext_simple((x)<<16, (y)<<16, (t))
|
||||||
#define gametext_widenumber(x, y, t) gametext_((x)<<16, (y)<<16, (t), 0, MF_BluefontGame.pal, 1024, 0, TEXT_GAMETEXTNUMHACK)
|
#define gametext_widenumber(x, y, t) gametext_((x)<<16, (y)<<16, (t), 0, MF_Bluefont.pal, 1024, 0, TEXT_GAMETEXTNUMHACK)
|
||||||
#define gametext_number(x, y, t) gametext_((x)<<16, (y)<<16, (t), 0, MF_BluefontGame.pal, 0, 0, TEXT_GAMETEXTNUMHACK)
|
#define gametext_number(x, y, t) gametext_((x)<<16, (y)<<16, (t), 0, MF_Bluefont.pal, 0, 0, TEXT_GAMETEXTNUMHACK)
|
||||||
#define gametext_pal(x, y, t, p) gametext_((x)<<16, (y)<<16, (t), 0, (p), 0, 0, 0)
|
#define gametext_pal(x, y, t, p) gametext_((x)<<16, (y)<<16, (t), 0, (p), 0, 0, 0)
|
||||||
#define gametext_center(y, t) gametext_(160<<16, (y)<<16, (t), 0, MF_BluefontGame.pal, 0, 0, TEXT_XCENTER)
|
#define gametext_center(y, t) gametext_(160<<16, (y)<<16, (t), 0, MF_Bluefont.pal, 0, 0, TEXT_XCENTER)
|
||||||
#define gametext_center_number(y, t) gametext_(160<<16, (y)<<16, (t), 0, MF_BluefontGame.pal, 0, 0, TEXT_XCENTER|TEXT_GAMETEXTNUMHACK)
|
#define gametext_center_number(y, t) gametext_(160<<16, (y)<<16, (t), 0, MF_Bluefont.pal, 0, 0, TEXT_XCENTER|TEXT_GAMETEXTNUMHACK)
|
||||||
#define gametext_center_shade(y, t, s) gametext_(160<<16, (y)<<16, (t), (s), MF_BluefontGame.pal, 0, 0, TEXT_XCENTER)
|
#define gametext_center_shade(y, t, s) gametext_(160<<16, (y)<<16, (t), (s), MF_Bluefont.pal, 0, 0, TEXT_XCENTER)
|
||||||
#define gametext_center_shade_pal(y, t, s, p) gametext_(160<<16, (y)<<16, (t), (s), (p), 0, 0, TEXT_XCENTER)
|
#define gametext_center_shade_pal(y, t, s, p) gametext_(160<<16, (y)<<16, (t), (s), (p), 0, 0, TEXT_XCENTER)
|
||||||
|
|
||||||
extern void G_PrintGameText(int32_t tile, int32_t x, int32_t y, const char *t,
|
extern void G_PrintGameText(int32_t tile, int32_t x, int32_t y, const char *t,
|
||||||
|
|
Loading…
Reference in a new issue