diff --git a/source/blood/src/config.cpp b/source/blood/src/config.cpp index 96cec98a9..ada29cc37 100644 --- a/source/blood/src/config.cpp +++ b/source/blood/src/config.cpp @@ -283,7 +283,6 @@ void CONFIG_SetDefaults(void) //ud.default_skill = 1; gUpscaleFactor = 0; //ud.display_bonus_screen = 1; - //ud.hudontop = 0; = 1; gPowerupDuration = 1; //ud.lockout = 0; //ud.m_marker = 1; @@ -294,7 +293,6 @@ void CONFIG_SetDefaults(void) //ud.menu_slidebarmargin = 65536; //ud.menu_slidebarz = 65536; //ud.menu_slidecursorz = 65536; - //ud.msgdisptime = 120; //ud.pwlockout[0] = '\0'; //ud.screen_size = 4; //ud.screen_tilting = 1; @@ -306,8 +304,6 @@ void CONFIG_SetDefaults(void) //ud.statusbarmode = 1; //ud.statusbarscale = 100; //ud.team = 0; - //ud.textscale = 200; - //ud.weaponscale = 100; //cl_weaponswitch = 3; // new+empty gDeliriumBlur = 1; gViewSize = 2; diff --git a/source/blood/src/macros.h b/source/blood/src/macros.h index f8ab7eed5..b50c6e1a1 100644 --- a/source/blood/src/macros.h +++ b/source/blood/src/macros.h @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Macros, some from SW source -#define BGSTRETCH (ud.bgstretch ? 1024 : 0) +#define BGSTRETCH (hud_bgstretch ? 1024 : 0) #define WIN_IS_PRESSED ( KB_KeyPressed( sc_RightWin ) || KB_KeyPressed( sc_LeftWin ) ) #define ALT_IS_PRESSED ( KB_KeyPressed( sc_RightAlt ) || KB_KeyPressed( sc_LeftAlt ) ) diff --git a/source/blood/src/screentext.cpp b/source/blood/src/screentext.cpp index 570e083ff..7084156f0 100644 --- a/source/blood/src/screentext.cpp +++ b/source/blood/src/screentext.cpp @@ -938,16 +938,15 @@ void G_AddUserQuote(const char *daquote) Bstrcpy(user_quote[0], daquote); OSD_Printf("%s\n", daquote); - user_quote_time[0] = ud.msgdisptime; + user_quote_time[0] = hud_messagetime; pub = NUMPAGES; } int32_t textsc(int32_t sc) { - return scale(sc, ud.textscale, 400); + return scale(sc, hud_textscale, 400); } -int32_t hud_glowingquotes = 1; #define FTAOPAQUETIME 30 @@ -981,7 +980,7 @@ static inline int32_t texta(int32_t t) static FORCE_INLINE int32_t text_ypos(void) { - if (ud.hudontop == 1 && ud.screen_size == 4 && ud.althud == 1) + if (hud_position == 1 && ud.screen_size == 4 && ud.althud == 1) return 32<<16; #ifdef GEKKO diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index 7ce9b1a6b..b40dd94d2 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -214,7 +214,29 @@ CUSTOM_CVARD(Int, hud_custom, 0, CVAR_ARCHIVE|CVAR_NOINITCALL, "change the custo CVARD(Bool, hud_stats, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable level statistics display") CVARD(Bool, hud_showmapname, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable map name display on load") -CUSTOM_CVARD(Int, r_fov, 90, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "change the field of view") //, (void*)r_fov.Value, CVAR_INT, 60, 140 +CVARD(Bool, hud_position, false, CVAR_ARCHIVE, "aligns the status bar to the bottom/top") +CVARD(Bool, hud_bgstretch, false, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "enable/disable background image stretching in wide resolutions") +CVARD(Int, hud_messagetime, 120, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "length of time to display multiplayer chat messages") + +CVARD_NAMED(Int, hud_numbertile, althud_numbertile, 2930, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "first tile in alt hud number set") +CVARD_NAMED(Int, hud_numberpal, althud_numberpal, 0, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "pal for alt hud numbers") +CVARD_NAMED(Int, hud_shadows, althud_shadows, true, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "enable/disable althud shadows") +CVARD_NAMED(Int, hud_flashing, althud_flashing, true, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "enable/disable althud flashing") +CVARD(Bool, hud_glowingquotes, true, CVAR_ARCHIVE, "enable/disable \"glowing\" quote text") + +CUSTOM_CVARD(Int, hud_textscale, 200, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "sets multiplayer chat message size") +{ + if (self < 100) self = 100; + else if (self > 400) self = 400; +} + +CUSTOM_CVARD(Int, hud_weaponscale, 100, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "changes the weapon scale") +{ + if (self < 30) self = 30; + else if (self > 100) self = 100; +} + +CUSTOM_CVARD(Int, r_fov, 90, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "change the field of view") { if (self < 60) self = 60; else if (self < 140) self = 140; @@ -374,16 +396,6 @@ CVARD(Bool, r_voxels, true, CVAR_ARCHIVE, "enable/disable automatic sprite->voxe // These have to wait until the HUD code is cleaned up (no idea which may survive and which won't.) /* - { "hud_position", "aligns the status bar to the bottom/top", (void*)&ud.hudontop, CVAR_BOOL, 0, 1 }, - { "hud_bgstretch", "enable/disable background image stretching in wide resolutions", (void*)&ud.bgstretch, CVAR_BOOL, 0, 1 }, - { "hud_messagetime", "length of time to display multiplayer chat messages", (void*)&ud.msgdisptime, CVAR_INT, 0, 3600 }, - { "hud_numbertile", "first tile in alt hud number set", (void*)&althud_numbertile, CVAR_INT, 0, MAXUSERTILES - 10 }, - { "hud_numberpal", "pal for alt hud numbers", (void*)&althud_numberpal, CVAR_INT, 0, MAXPALOOKUPS - 1 }, - { "hud_shadows", "enable/disable althud shadows", (void*)&althud_shadows, CVAR_BOOL, 0, 1 }, - { "hud_flashing", "enable/disable althud flashing", (void*)&althud_flashing, CVAR_BOOL, 0, 1 }, - { "hud_glowingquotes", "enable/disable \"glowing\" quote text", (void*)&hud_glowingquotes, CVAR_BOOL, 0, 1 }, - { "hud_textscale", "sets multiplayer chat message size", (void*)&ud.textscale, CVAR_INT, 100, 400 }, - { "hud_weaponscale","changes the weapon scale", (void*)&ud.weaponscale, CVAR_INT, 10, 100 }, { "hud_messages", "enable/disable showing messages", (void*)&gMessageState, CVAR_BOOL, 0, 1 }, { "hud_powerupduration", "enable/disable displaying the remaining seconds for power-ups", (void*)&gPowerupDuration, CVAR_BOOL, 0, 1 }, diff --git a/source/common/gamecvars.h b/source/common/gamecvars.h index cffb64262..aee371c25 100644 --- a/source/common/gamecvars.h +++ b/source/common/gamecvars.h @@ -54,8 +54,20 @@ EXTERN_CVAR(Int, hud_scale) EXTERN_CVAR(Int, hud_custom) EXTERN_CVAR(Bool, hud_stats) EXTERN_CVAR(Bool, hud_showmapname) -EXTERN_CVAR(Int, r_fov) +EXTERN_CVAR(Bool, hud_position) +EXTERN_CVAR(Bool, hud_bgstretch) +EXTERN_CVAR(Int, hud_messagetime) +EXTERN_CVAR(Bool, hud_glowingquotes) +EXTERN_CVAR(Int, hud_textscale) +EXTERN_CVAR(Int, hud_weaponscale) +EXTERN_CVAR(Int, althud_numbertile) +EXTERN_CVAR(Int, althud_numberpal) +EXTERN_CVAR(Int, althud_shadows) +EXTERN_CVAR(Int, althud_flashing) + + +EXTERN_CVAR(Int, r_fov) EXTERN_CVAR(Bool, r_horizcenter) EXTERN_CVAR(Int, r_drawweapon) EXTERN_CVAR(Int, r_showfps) diff --git a/source/duke3d/src/config.cpp b/source/duke3d/src/config.cpp index a047dd60e..db218abca 100644 --- a/source/duke3d/src/config.cpp +++ b/source/duke3d/src/config.cpp @@ -245,7 +245,7 @@ void CONFIG_SetDefaults(void) ud.detail = 0; ud.display_bonus_screen = 1; - ud.hudontop = 0; + hud_position = 0; ud.lockout = 0; ud.m_marker = 1; ud.menu_scrollbartilenum = -1; @@ -255,7 +255,6 @@ void CONFIG_SetDefaults(void) ud.menu_slidebarz = 65536; ud.menu_slidecursorz = 65536; ud.menubackground = 1; - ud.msgdisptime = 120; ud.pwlockout[0] = '\0'; ud.runkey_mode = 0; ud.screen_size = 4; @@ -268,8 +267,6 @@ void CONFIG_SetDefaults(void) ud.statusbarmode = 1; ud.statusbarscale = 100; ud.team = 0; - ud.textscale = 200; - ud.weaponscale = 100; Bstrcpy(ud.rtsname, G_DefaultRtsFile()); diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index aa4913fa9..7a283d9c2 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -6921,8 +6921,8 @@ int G_DoMoveThings(void) { if (i) { - if (--i > ud.msgdisptime) - i = ud.msgdisptime; + if (--i > hud_messagetime) + i = hud_messagetime; if (!i) pub = NUMPAGES; } } diff --git a/source/duke3d/src/game.h b/source/duke3d/src/game.h index 97f95d2fe..0e426b70d 100644 --- a/source/duke3d/src/game.h +++ b/source/duke3d/src/game.h @@ -176,11 +176,10 @@ typedef struct { int32_t reccnt; int32_t runkey_mode,statusbarscale,weaponswitch; // JBF 20031125 - int32_t color,msgdisptime,statusbarmode; + int32_t color,statusbarmode; int32_t m_noexits,noexits; - int32_t team, althud, weaponscale, textscale; + int32_t team, althud; int32_t statusbarflags, statusbarrange; - int32_t hudontop; int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz; int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz; @@ -196,7 +195,7 @@ typedef struct { int32_t playerbest; - int32_t configversion, bgstretch; + int32_t configversion; int32_t default_volume, default_skill; @@ -296,7 +295,6 @@ extern int32_t g_doQuickSave; extern int32_t g_levelTextTime; extern int32_t g_quitDeadline; extern int32_t g_restorePalette; -extern int32_t hud_glowingquotes; extern int32_t tempwallptr; extern int32_t ticrandomseed; extern int32_t vote_map; diff --git a/source/duke3d/src/gamestructures.cpp b/source/duke3d/src/gamestructures.cpp index a6c014629..db84dc0a0 100644 --- a/source/duke3d/src/gamestructures.cpp +++ b/source/duke3d/src/gamestructures.cpp @@ -1257,7 +1257,7 @@ const memberlabel_t UserdefsLabels[]= { "weaponswitch", USERDEFS_WEAPONSWITCH, 0, 0, -1 }, { "democams", USERDEFS_DEMOCAMS, 0, 0, -1 }, { "color", USERDEFS_COLOR, 0, 0, -1 }, - { "msgdisptime", USERDEFS_MSGDISPTIME, 0, 0, -1 }, + { "hud_messagetime", USERDEFS_MSGDISPTIME, 0, 0, -1 }, { "statusbarmode", USERDEFS_STATUSBARMODE, 0, 0, -1 }, { "m_noexits", USERDEFS_M_NOEXITS, 0, 0, -1 }, { "noexits", USERDEFS_NOEXITS, 0, 0, -1 }, @@ -1452,7 +1452,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2) case USERDEFS_WEAPONSWITCH: labelNum = cl_weaponswitch; break; case USERDEFS_DEMOCAMS: labelNum = cl_democams; break; case USERDEFS_COLOR: labelNum = ud.color; break; - case USERDEFS_MSGDISPTIME: labelNum = ud.msgdisptime; break; + case USERDEFS_MSGDISPTIME: labelNum = hud_messagetime; break; case USERDEFS_STATUSBARMODE: labelNum = ud.statusbarmode; break; case USERDEFS_M_NOEXITS: labelNum = ud.m_noexits; break; case USERDEFS_NOEXITS: labelNum = ud.noexits; break; @@ -1469,8 +1469,8 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2) case USERDEFS_ALTHUD: labelNum = ud.althud; break; case USERDEFS_DISPLAY_BONUS_SCREEN: labelNum = ud.display_bonus_screen; break; case USERDEFS_SHOW_LEVEL_TEXT: labelNum = ud.show_level_text; break; - case USERDEFS_WEAPONSCALE: labelNum = ud.weaponscale; break; - case USERDEFS_TEXTSCALE: labelNum = ud.textscale; break; + case USERDEFS_WEAPONSCALE: labelNum = hud_weaponscale; break; + case USERDEFS_TEXTSCALE: labelNum = hud_textscale; break; case USERDEFS_RUNKEY_MODE: labelNum = ud.runkey_mode; break; case USERDEFS_M_ORIGIN_X: labelNum = ud.returnvar[0]; break; case USERDEFS_M_ORIGIN_Y: labelNum = ud.returnvar[1]; break; @@ -1499,7 +1499,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2) case USERDEFS_STATUSBARFLAGS: labelNum = ud.statusbarflags; break; case USERDEFS_STATUSBARRANGE: labelNum = ud.statusbarrange; break; case USERDEFS_STATUSBARCUSTOM: labelNum = hud_custom; break; - case USERDEFS_HUDONTOP: labelNum = ud.hudontop; break; + case USERDEFS_HUDONTOP: labelNum = hud_position; break; case USERDEFS_MENU_SLIDEBARZ: labelNum = ud.menu_slidebarz; break; case USERDEFS_MENU_SLIDEBARMARGIN: labelNum = ud.menu_slidebarmargin; break; case USERDEFS_MENU_SLIDECURSORZ: labelNum = ud.menu_slidecursorz; break; @@ -1645,7 +1645,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons case USERDEFS_WEAPONSWITCH: cl_weaponswitch = iSet; break; //!!! case USERDEFS_DEMOCAMS: cl_democams = iSet; break; case USERDEFS_COLOR: ud.color = iSet; break; - case USERDEFS_MSGDISPTIME: ud.msgdisptime = iSet; break; + case USERDEFS_MSGDISPTIME: hud_messagetime = iSet; break; //!!! case USERDEFS_STATUSBARMODE: ud.statusbarmode = iSet; break; case USERDEFS_M_NOEXITS: ud.m_noexits = iSet; break; case USERDEFS_NOEXITS: ud.noexits = iSet; break; @@ -1662,8 +1662,8 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons case USERDEFS_ALTHUD: ud.althud = iSet; break; case USERDEFS_DISPLAY_BONUS_SCREEN: ud.display_bonus_screen = iSet; break; case USERDEFS_SHOW_LEVEL_TEXT: ud.show_level_text = iSet; break; - case USERDEFS_WEAPONSCALE: ud.weaponscale = iSet; break; - case USERDEFS_TEXTSCALE: ud.textscale = iSet; break; + case USERDEFS_WEAPONSCALE: hud_weaponscale = iSet; break; //!!! + case USERDEFS_TEXTSCALE: hud_textscale = iSet; break; //!!! case USERDEFS_RUNKEY_MODE: ud.runkey_mode = iSet; break; case USERDEFS_M_ORIGIN_X: ud.returnvar[0] = iSet; break; case USERDEFS_M_ORIGIN_Y: ud.returnvar[1] = iSet; break; @@ -1692,7 +1692,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons case USERDEFS_STATUSBARFLAGS: ud.statusbarflags = iSet; break; // Sigh... Ion Fury needs this. :( case USERDEFS_STATUSBARRANGE: ud.statusbarrange = iSet; break; case USERDEFS_STATUSBARCUSTOM: hud_custom = iSet; break; //!!! - case USERDEFS_HUDONTOP: ud.hudontop = iSet; break; + case USERDEFS_HUDONTOP: hud_position = iSet; break; //!!! case USERDEFS_MENU_SLIDEBARZ: ud.menu_slidebarz = iSet; break; case USERDEFS_MENU_SLIDEBARMARGIN: ud.menu_slidebarmargin = iSet; break; case USERDEFS_MENU_SLIDECURSORZ: ud.menu_slidecursorz = iSet; break; diff --git a/source/duke3d/src/macros.h b/source/duke3d/src/macros.h index cd38645b2..f9d3c3234 100644 --- a/source/duke3d/src/macros.h +++ b/source/duke3d/src/macros.h @@ -30,7 +30,7 @@ BEGIN_DUKE_NS // Macros, some from SW source -#define BGSTRETCH (ud.bgstretch ? 1024 : 0) +#define BGSTRETCH (hud_bgstretch ? 1024 : 0) #define WIN_IS_PRESSED ( KB_KeyPressed( sc_RightWin ) || KB_KeyPressed( sc_LeftWin ) ) #define ALT_IS_PRESSED ( KB_KeyPressed( sc_RightAlt ) || KB_KeyPressed( sc_LeftAlt ) ) diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 529ff3e39..a4077b0e0 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -603,7 +603,7 @@ static int32_t vpsize; static MenuRangeInt32_t MEO_SCREENSETUP_SCREENSIZE = MAKE_MENURANGE( &vpsize, &MF_Redfont, 0, 0, 0, 1, EnforceIntervals ); static MenuOption_t MEO_SCREENSETUP_SCREENSIZE_TWO = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &vpsize ); static MenuEntry_t ME_SCREENSETUP_SCREENSIZE = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_SCREENSIZE, RangeInt32 ); -static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE( &ud.textscale, &MF_Redfont, 100, 400, 0, 16, 2 ); +static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE( &hud_textscale.Value, &MF_Redfont, 100, 400, 0, 16, 2 ); static MenuEntry_t ME_SCREENSETUP_TEXTSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_TEXTSIZE, RangeInt32 ); static MenuOption_t MEO_SCREENSETUP_LEVELSTATS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &hud_stats.Value); static MenuEntry_t ME_SCREENSETUP_LEVELSTATS = MAKE_MENUENTRY( "Level stats:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_LEVELSTATS, Option ); @@ -618,7 +618,7 @@ static MenuEntry_t ME_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUENTRY( "Game mes static char const *MEOSN_SCREENSETUP_STATUSBARONTOP[] = { "Bottom", "Top" }; static int32_t MEOSV_SCREENSETUP_STATUSBARONTOP[] = { 0, 1 }; static MenuOptionSet_t MEOS_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTIONSET( MEOSN_SCREENSETUP_STATUSBARONTOP, MEOSV_SCREENSETUP_STATUSBARONTOP, 0x2 ); -static MenuOption_t MEO_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTION(&MF_Redfont, &MEOS_SCREENSETUP_STATUSBARONTOP, &ud.hudontop); +static MenuOption_t MEO_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTION(&MF_Redfont, &MEOS_SCREENSETUP_STATUSBARONTOP, &hud_position.Value); static MenuEntry_t ME_SCREENSETUP_STATUSBARONTOP = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_STATUSBARONTOP, Option ); #endif diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 0f9ec5989..ed48b52ca 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -1746,7 +1746,7 @@ static int P_DisplayFist(int const fistShade) } #define DRAWEAP_CENTER 262144 -#define weapsc(sc) scale(sc, ud.weaponscale, 100) +#define weapsc(sc) scale(sc, hud_weaponscale, 100) static int32_t g_dts_yadd; diff --git a/source/duke3d/src/sbar.cpp b/source/duke3d/src/sbar.cpp index 5cf5841b2..9c5043a49 100644 --- a/source/duke3d/src/sbar.cpp +++ b/source/duke3d/src/sbar.cpp @@ -28,17 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_DUKE_NS - -int32_t althud_flashing = 1; -int32_t althud_numbertile = 2930; -int32_t althud_numberpal = 0; - -#ifdef EDUKE32_TOUCH_DEVICES -int32_t althud_shadows = 0; -#else -int32_t althud_shadows = 1; -#endif - static int32_t sbarx(int32_t x) { if (ud.screen_size == 4) return sbarsc(x<<16); @@ -53,7 +42,7 @@ static int32_t sbarxr(int32_t x) static int32_t sbary(int32_t y) { - if (ud.hudontop == 1 && ud.screen_size == 4 && ud.althud == 1) return sbarsc(y << 16); + if (hud_position == 1 && ud.screen_size == 4 && ud.althud == 1) return sbarsc(y << 16); else return (200<<16) - sbarsc(200<<16) + sbarsc(y<<16); } @@ -613,7 +602,7 @@ void G_DrawStatusBar(int32_t snum) { // ALTERNATIVE STATUS BAR - int32_t hudoffset = ud.hudontop == 1 ? 32 : 200; + int32_t hudoffset = hud_position == 1 ? 32 : 200; static int32_t ammo_sprites[MAX_WEAPONS]; if (EDUKE32_PREDICT_FALSE(ammo_sprites[0] == 0)) @@ -708,7 +697,7 @@ void G_DrawStatusBar(int32_t snum) } } - if (ud.hudontop == 1) + if (hud_position == 1) hudoffset += 40; if (p->got_access&1) rotatesprite_althudr(39, hudoffset-43, sb15, 0, ACCESSCARD, 0, 0, 10+16+512); diff --git a/source/duke3d/src/sbar.h b/source/duke3d/src/sbar.h index 0651d488d..eaaeda637 100644 --- a/source/duke3d/src/sbar.h +++ b/source/duke3d/src/sbar.h @@ -24,11 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_DUKE_NS -extern int32_t althud_flashing; -extern int32_t althud_numberpal; -extern int32_t althud_numbertile; -extern int32_t althud_shadows; - static FORCE_INLINE int32_t sbarsc(int32_t sc) { return scale(sc, ud.statusbarscale, 100); diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 00591ce48..ca1ba935f 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -260,7 +260,7 @@ static void G_FadePalaccum(const palaccum_t *pa) static int32_t gtextsc(int32_t sc) { - return scale(sc, ud.textscale, 400); + return scale(sc, hud_textscale, 400); } ////////// DISPLAYREST ////////// @@ -1217,7 +1217,7 @@ void G_DisplayRest(int32_t smoothratio) if (ud.screen_size == 4) { - if (ud.althud == 0 || ud.hudontop == 0) + if (ud.althud == 0 || hud_position == 0) i -= sbarsc(ud.althud ? (tilesiz[BIGALPHANUM].y+8)<<16 : tilesiz[INVENTORYBOX].y<<16); } else if (ud.screen_size > 2) diff --git a/source/duke3d/src/screentext.cpp b/source/duke3d/src/screentext.cpp index 47be7e7fe..46092d6c4 100644 --- a/source/duke3d/src/screentext.cpp +++ b/source/duke3d/src/screentext.cpp @@ -994,16 +994,15 @@ void G_AddUserQuote(const char *daquote) Bstrcpy(user_quote[0], daquote); OSD_Printf("%s\n", daquote); - user_quote_time[0] = ud.msgdisptime; + user_quote_time[0] = hud_messagetime; pub = NUMPAGES; } int32_t textsc(int32_t sc) { - return scale(sc, ud.textscale, 400); + return scale(sc, hud_textscale, 400); } -int32_t hud_glowingquotes = 1; #define FTAOPAQUETIME 30 @@ -1037,7 +1036,7 @@ static inline int32_t texta(int32_t t) static FORCE_INLINE int32_t text_ypos(void) { - if (ud.hudontop == 1 && ud.screen_size == 4 && ud.althud == 1) + if (hud_position == 1 && ud.screen_size == 4 && ud.althud == 1) return 32<<16; #ifdef GEKKO diff --git a/source/rr/src/config.cpp b/source/rr/src/config.cpp index f76cd70e4..9650f639d 100644 --- a/source/rr/src/config.cpp +++ b/source/rr/src/config.cpp @@ -228,7 +228,6 @@ void CONFIG_SetDefaults(void) ud.menu_slidebarz = 65536; ud.menu_slidebarmargin = RR ? 6 * 65536 : 65536; ud.menu_slidecursorz = RR ? 32768 : 65536; - ud.msgdisptime = 120; ud.pwlockout[0] = '\0'; ud.runkey_mode = 0; ud.screen_size = 4; @@ -246,11 +245,8 @@ void CONFIG_SetDefaults(void) ud.display_bonus_screen = 1; ud.show_level_text = 1; ud.configversion = 0; - ud.weaponscale = 100; - ud.textscale = 200; ud.screenfade = 1; ud.menubackground = 1; - ud.hudontop = 0; ud.default_skill = 1; ud.slidebar_paldisabled = 1; ud.shadow_pal = 4; diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index 291791cb8..fa22823fb 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -8314,8 +8314,8 @@ int G_DoMoveThings(void) { if (i) { - if (--i > ud.msgdisptime) - i = ud.msgdisptime; + if (--i > hud_messagetime) + i = hud_messagetime; if (!i) pub = NUMPAGES; } } diff --git a/source/rr/src/game.h b/source/rr/src/game.h index 8c5e4ada1..a334b255b 100644 --- a/source/rr/src/game.h +++ b/source/rr/src/game.h @@ -155,11 +155,10 @@ typedef struct { int32_t reccnt; int32_t runkey_mode,statusbarscale,weaponswitch; // JBF 20031125 - int32_t color,msgdisptime,statusbarmode; + int32_t color,statusbarmode; int32_t m_noexits,noexits,automsg; - int32_t team, althud, weaponscale, textscale; + int32_t team, althud; int32_t statusbarflags, statusbarrange; - int32_t hudontop; int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz; int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz; @@ -175,7 +174,7 @@ typedef struct { int32_t playerbest; - int32_t configversion, bgstretch; + int32_t configversion; int32_t default_volume, default_skill; @@ -267,7 +266,6 @@ extern int32_t g_doQuickSave; extern int32_t g_levelTextTime; extern int32_t g_quitDeadline; extern int32_t g_restorePalette; -extern int32_t hud_glowingquotes; extern int32_t tempwallptr; extern int32_t ticrandomseed; extern int32_t vote_map; diff --git a/source/rr/src/macros.h b/source/rr/src/macros.h index bc372444d..c4087a43e 100644 --- a/source/rr/src/macros.h +++ b/source/rr/src/macros.h @@ -35,7 +35,7 @@ static FORCE_INLINE int32_t krand2(void) return ((uint32_t) randomseed)>>16; } -#define BGSTRETCH (ud.bgstretch ? 1024 : 0) +#define BGSTRETCH (hud_bgstretch ? 1024 : 0) #define WIN_IS_PRESSED ( KB_KeyPressed( sc_RightWin ) || KB_KeyPressed( sc_LeftWin ) ) #define ALT_IS_PRESSED ( KB_KeyPressed( sc_RightAlt ) || KB_KeyPressed( sc_LeftAlt ) ) diff --git a/source/rr/src/menus.cpp b/source/rr/src/menus.cpp index 5433a8cdb..9a9b2c483 100644 --- a/source/rr/src/menus.cpp +++ b/source/rr/src/menus.cpp @@ -580,7 +580,7 @@ static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_R static int32_t vpsize; static MenuRangeInt32_t MEO_SCREENSETUP_SCREENSIZE = MAKE_MENURANGE( &vpsize, &MF_Redfont, 0, 0, 0, 1, EnforceIntervals ); static MenuEntry_t ME_SCREENSETUP_SCREENSIZE = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_SCREENSIZE, RangeInt32 ); -static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE( &ud.textscale, &MF_Redfont, 100, 400, 0, 16, 2 ); +static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE( &hud_textscale.Value, &MF_Redfont, 100, 400, 0, 16, 2 ); static MenuEntry_t ME_SCREENSETUP_TEXTSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_TEXTSIZE, RangeInt32 ); static MenuOption_t MEO_SCREENSETUP_LEVELSTATS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &hud_stats.Value); static MenuEntry_t ME_SCREENSETUP_LEVELSTATS = MAKE_MENUENTRY( "Level stats:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_LEVELSTATS, Option ); @@ -595,7 +595,7 @@ static MenuEntry_t ME_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUENTRY( "Game mes static char const *MEOSN_SCREENSETUP_STATUSBARONTOP[] = { "Bottom", "Top" }; static int32_t MEOSV_SCREENSETUP_STATUSBARONTOP[] = { 0, 1 }; static MenuOptionSet_t MEOS_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTIONSET( MEOSN_SCREENSETUP_STATUSBARONTOP, MEOSV_SCREENSETUP_STATUSBARONTOP, 0x2 ); -static MenuOption_t MEO_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTION(&MF_Redfont, &MEOS_SCREENSETUP_STATUSBARONTOP, &ud.hudontop); +static MenuOption_t MEO_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTION(&MF_Redfont, &MEOS_SCREENSETUP_STATUSBARONTOP, &hud_position.Value); static MenuEntry_t ME_SCREENSETUP_STATUSBARONTOP = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_STATUSBARONTOP, Option ); #endif diff --git a/source/rr/src/player.cpp b/source/rr/src/player.cpp index 017f630d9..dae88ad3c 100644 --- a/source/rr/src/player.cpp +++ b/source/rr/src/player.cpp @@ -1427,7 +1427,7 @@ static int P_DisplayFist(int const fistShade) } #define DRAWEAP_CENTER 262144 -#define weapsc(sc) scale(sc, ud.weaponscale, 100) +#define weapsc(sc) scale(sc, hud_weaponscale, 100) static int32_t g_dts_yadd; diff --git a/source/rr/src/sbar.cpp b/source/rr/src/sbar.cpp index 048230ce4..3361575f5 100644 --- a/source/rr/src/sbar.cpp +++ b/source/rr/src/sbar.cpp @@ -27,16 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_RR_NS -int32_t althud_flashing = 1; -int32_t althud_numbertile = 2930; -int32_t althud_numberpal = 0; - -#ifdef EDUKE32_TOUCH_DEVICES -int32_t althud_shadows = 0; -#else -int32_t althud_shadows = 1; -#endif - static int32_t sbarx(int32_t x) { if (ud.screen_size == 4) return sbarsc(x<<16); @@ -51,7 +41,7 @@ static int32_t sbarxr(int32_t x) static int32_t sbary(int32_t y) { - if (ud.hudontop == 1 && ud.screen_size == 4 && ud.althud == 1) return sbarsc(y << 16); + if (hud_position == 1 && ud.screen_size == 4 && ud.althud == 1) return sbarsc(y << 16); else return (200<<16) - sbarsc(200<<16) + sbarsc(y<<16); } @@ -688,7 +678,7 @@ void G_DrawStatusBar(int32_t snum) if (RR) { - int32_t hudoffset = ud.hudontop == 1 ? 32 : 200; + int32_t hudoffset = hud_position == 1 ? 32 : 200; static int32_t ammo_sprites[MAX_WEAPONS]; if (EDUKE32_PREDICT_FALSE(ammo_sprites[0] == 0)) @@ -775,7 +765,7 @@ void G_DrawStatusBar(int32_t snum) } } - if (ud.hudontop == 1) + if (hud_position == 1) hudoffset += 40; if (p->keys[1]) rotatesprite_althudr(39, hudoffset-43, sb15, 0, ACCESSCARD, 0, 0, 10+16+512); @@ -784,7 +774,7 @@ void G_DrawStatusBar(int32_t snum) } else { - int32_t hudoffset = ud.hudontop == 1 ? 32 : 200; + int32_t hudoffset = hud_position == 1 ? 32 : 200; static int32_t ammo_sprites[MAX_WEAPONS]; if (EDUKE32_PREDICT_FALSE(ammo_sprites[0] == 0)) @@ -875,7 +865,7 @@ void G_DrawStatusBar(int32_t snum) } } - if (ud.hudontop == 1) + if (hud_position == 1) hudoffset += 40; if (p->got_access&1) rotatesprite_althudr(39, hudoffset-43, sb15, 0, ACCESSCARD, 0, 0, 10+16+512); diff --git a/source/rr/src/sbar.h b/source/rr/src/sbar.h index 6f3af8e67..5320a2f29 100644 --- a/source/rr/src/sbar.h +++ b/source/rr/src/sbar.h @@ -24,10 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_RR_NS -extern int32_t althud_flashing; -extern int32_t althud_numberpal; -extern int32_t althud_numbertile; -extern int32_t althud_shadows; static FORCE_INLINE int32_t sbarsc(int32_t sc) { diff --git a/source/rr/src/screens.cpp b/source/rr/src/screens.cpp index c3b933418..3bf8729cb 100644 --- a/source/rr/src/screens.cpp +++ b/source/rr/src/screens.cpp @@ -253,7 +253,7 @@ static void G_FadePalaccum(const palaccum_t *pa) static int32_t gtextsc(int32_t sc) { - return scale(sc, ud.textscale, 400); + return scale(sc, hud_textscale, 400); } ////////// DISPLAYREST ////////// @@ -1212,7 +1212,7 @@ void G_DisplayRest(int32_t smoothratio) if (ud.screen_size == 4) { - if (ud.althud == 0 || ud.hudontop == 0) + if (ud.althud == 0 || hud_position == 0) i -= sbarsc(ud.althud ? ((tilesiz[BIGALPHANUM].y< 256 / 8 = 32 --> round up to power of 2 --> 32 --> divide by 2 --> 16 alphatabs required @@ -1040,7 +1038,7 @@ static inline int32_t texta(int32_t t) static FORCE_INLINE int32_t text_ypos(void) { - if (ud.hudontop == 1 && ud.screen_size == 4 && ud.althud == 1) + if (hud_position == 1 && ud.screen_size == 4 && ud.althud == 1) return 32<<16; #ifdef GEKKO