- hooked up hud_custom.

This commit is contained in:
Christoph Oelckers 2019-10-22 23:43:16 +02:00
parent fe2bb036b7
commit d476037f45
7 changed files with 7 additions and 27 deletions

View file

@ -2011,14 +2011,6 @@ static void Menu_Pre(MenuID_t cm)
}
MenuEntry_HideOnCondition(&ME_SCREENSETUP_SCREENSIZE, (MEO_SCREENSETUP_SCREENSIZE.steps < 2));
vpsize = !(ud.statusbarflags & STATUSBAR_NONONE) +
(ud.screen_size >= 4 && !(ud.statusbarflags & STATUSBAR_NOMODERN)) +
(ud.screen_size >= 4 && ud.althud == 0 && !(ud.statusbarflags & STATUSBAR_NOMINI)) * (ud.statusbarcustom + 1) +
(ud.screen_size >= 8 && !(ud.statusbarflags & STATUSBAR_NOOVERLAY)) +
(ud.screen_size >= 8 && ud.statusbarmode == 0 && !(ud.statusbarflags & STATUSBAR_NOFULL)) +
(ud.screen_size > 8 && !(ud.statusbarflags & STATUSBAR_NOSHRINK)) * ((ud.screen_size - 8) >> 2)
-1;
#ifndef EDUKE32_STANDALONE
#ifdef TEXFILTER_MENU_OPTIONS
if (videoGetRenderMode() != REND_CLASSIC)

View file

@ -201,7 +201,7 @@ bool G_ChangeHudLayout(int direction)
}
int hud_statusbarrange; // will be set by the game's configuration setup.
CUSTOM_CVARD(Int, hud_custom, 0, CVAR_ARCHIVE|CVAR_NOINITCALL, "change the custom hud")// not implemented by Blood , (void*)&ud.statusbarcustom, CVAR_INT, 0, ud.statusbarrange },
CUSTOM_CVARD(Int, hud_custom, 0, CVAR_ARCHIVE|CVAR_NOINITCALL, "change the custom hud") // this has no backing implementation, it seems to be solely for scripted HUDs.
{
if (self < 0) self = 0;
else if (self >= hud_statusbarrange) self = hud_statusbarrange - 1;

View file

@ -181,7 +181,7 @@ typedef struct {
int32_t color,msgdisptime,statusbarmode;
int32_t m_noexits,noexits;
int32_t team, althud, weaponscale, textscale;
int32_t statusbarflags, statusbarrange, statusbarcustom;
int32_t statusbarflags, statusbarrange;
int32_t hudontop;
int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz;
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;

View file

@ -1506,7 +1506,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_MENUBACKGROUND: labelNum = ud.menubackground; break;
case USERDEFS_STATUSBARFLAGS: labelNum = 0/*ud.statusbarflags*/; break;
case USERDEFS_STATUSBARRANGE: labelNum = ud.statusbarrange; break;
case USERDEFS_STATUSBARCUSTOM: labelNum = ud.statusbarcustom; break;
case USERDEFS_STATUSBARCUSTOM: labelNum = hud_custom; break;
case USERDEFS_HUDONTOP: labelNum = ud.hudontop; break;
case USERDEFS_MENU_SLIDEBARZ: labelNum = ud.menu_slidebarz; break;
case USERDEFS_MENU_SLIDEBARMARGIN: labelNum = ud.menu_slidebarmargin; break;
@ -1699,7 +1699,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
case USERDEFS_MENUBACKGROUND: ud.menubackground = iSet; break;
case USERDEFS_STATUSBARFLAGS: ud.statusbarflags = iSet; break; // Sigh... Ion Fury needs this. :(
case USERDEFS_STATUSBARRANGE: ud.statusbarrange = iSet; break;
case USERDEFS_STATUSBARCUSTOM: ud.statusbarcustom = iSet; break;
case USERDEFS_STATUSBARCUSTOM: hud_custom = iSet; break; //!!!
case USERDEFS_HUDONTOP: ud.hudontop = iSet; break;
case USERDEFS_MENU_SLIDEBARZ: ud.menu_slidebarz = iSet; break;
case USERDEFS_MENU_SLIDEBARMARGIN: ud.menu_slidebarmargin = iSet; break;

View file

@ -2025,13 +2025,7 @@ static void Menu_Pre(MenuID_t cm)
}
MenuEntry_HideOnCondition(&ME_SCREENSETUP_SCREENSIZE, (MEO_SCREENSETUP_SCREENSIZE.steps < 2));
vpsize = !(ud.statusbarflags & STATUSBAR_NONONE) +
(ud.screen_size >= 4 && !(ud.statusbarflags & STATUSBAR_NOMODERN)) +
(ud.screen_size >= 4 && ud.althud == 0 && !(ud.statusbarflags & STATUSBAR_NOMINI)) * (ud.statusbarcustom + 1) +
(ud.screen_size >= 8 && !(ud.statusbarflags & STATUSBAR_NOOVERLAY)) +
(ud.screen_size >= 8 && ud.statusbarmode == 0 && !(ud.statusbarflags & STATUSBAR_NOFULL)) +
(ud.screen_size > 8 && !(ud.statusbarflags & STATUSBAR_NOSHRINK)) * ((ud.screen_size - 8) >> 2)
-1;
vpsize = -1;
#ifndef EDUKE32_STANDALONE
#ifdef TEXFILTER_MENU_OPTIONS

View file

@ -160,7 +160,7 @@ typedef struct {
int32_t color,msgdisptime,statusbarmode;
int32_t m_noexits,noexits,automsg;
int32_t team, althud, weaponscale, textscale;
int32_t statusbarflags, statusbarrange, statusbarcustom;
int32_t statusbarflags, statusbarrange;
int32_t hudontop;
int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz;
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;

View file

@ -1995,13 +1995,7 @@ static void Menu_Pre(MenuID_t cm)
MEO_SCREENSETUP_SCREENSIZE.max = MEO_SCREENSETUP_SCREENSIZE.steps - 1;
MenuEntry_DisableOnCondition(&ME_SCREENSETUP_SCREENSIZE, (MEO_SCREENSETUP_SCREENSIZE.steps < 2));
vpsize = !(ud.statusbarflags & STATUSBAR_NONONE) +
(ud.screen_size >= 4 && !(ud.statusbarflags & STATUSBAR_NOMODERN)) +
(ud.screen_size >= 4 && ud.althud == 0 && !(ud.statusbarflags & STATUSBAR_NOMINI)) * (ud.statusbarcustom + 1) +
(ud.screen_size >= 8 && !(ud.statusbarflags & STATUSBAR_NOOVERLAY)) +
(ud.screen_size >= 8 && ud.statusbarmode == 0 && !(ud.statusbarflags & STATUSBAR_NOFULL)) +
(ud.screen_size > 8 && !(ud.statusbarflags & STATUSBAR_NOSHRINK)) * ((ud.screen_size - 8) >> 2)
-1;
vpsize = -1;
if (videoGetRenderMode() != REND_CLASSIC)
{