- fixed status bar initialization for all games.

Also deleted a few obsolete config variables for the old menu.
This commit is contained in:
Christoph Oelckers 2019-12-19 09:31:39 +01:00
parent e348fcb843
commit ef01c34346
12 changed files with 22 additions and 41 deletions

View file

@ -1191,7 +1191,7 @@ int GameInterface::app_main()
netInitialize(true);
scrSetGameMode( ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP);
scrSetGamma(gGamma);
viewResizeView(gViewSize);
hud_size.Callback();
initprintf("Initializing sound system\n");
sndInit();
gChoke.sub_83ff0(518, sub_84230);

View file

@ -52,7 +52,6 @@ BEGIN_BLD_NS
int32_t gTurnSpeed;
int32_t gDetail;
int32_t cl_weaponswitch;
int32_t gAutoRun;
int32_t gFollowMap;
int32_t gOverlayMap;
int32_t gRotateMap;
@ -104,7 +103,6 @@ void CONFIG_SetDefaults(void)
gViewSize = 2;
gTurnSpeed = 92;
gDetail = 4;
gAutoRun = 0;
gFollowMap = 1;
gOverlayMap = 0;
gRotateMap = 0;

View file

@ -34,7 +34,6 @@ BEGIN_BLD_NS
extern int32_t gTurnSpeed;
extern int32_t gDetail;
extern int32_t gAutoRun;
extern int32_t gFollowMap;
extern int32_t gOverlayMap;
extern int32_t gRotateMap;

View file

@ -77,14 +77,7 @@ void CONFIG_SetDefaults(void)
ud.display_bonus_screen = 1;
hud_position = 0;
ud.menu_scrollbartilenum = -1;
ud.menu_scrollbarz = 65536;
ud.menu_scrollcursorz = 65536;
ud.menu_slidebarmargin = 65536;
ud.menu_slidebarz = 65536;
ud.menu_slidecursorz = 65536;
ud.menubackground = 1;
ud.runkey_mode = 0;
ud.screen_size = 4;
ud.screen_tilting = 1;
ud.screenfade = 1;

View file

@ -5805,6 +5805,7 @@ int GameInterface::app_main()
{
I_Error("app_main: There was a problem initializing the Build engine: %s\n", engineerrstr);
}
hud_size.Callback();
S_InitSound();

View file

@ -141,13 +141,11 @@ typedef struct {
int32_t camera_time,folfvel,folavel,folx,foly,fola;
int32_t reccnt;
int32_t runkey_mode,statusbarscale,weaponswitch; // JBF 20031125
int32_t statusbarscale,weaponswitch; // JBF 20031125
int32_t statusbarmode;
int32_t noexits;
int32_t althud;
int32_t statusbarflags, statusbarrange;
int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz;
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
int32_t entered_name,screen_tilting;
int32_t coop,screen_size;

View file

@ -1473,7 +1473,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_SHOW_LEVEL_TEXT: labelNum = ud.show_level_text; 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_RUNKEY_MODE: labelNum = cl_runmode; break;
case USERDEFS_M_ORIGIN_X: labelNum = ud.returnvar[0]; break;
case USERDEFS_M_ORIGIN_Y: labelNum = ud.returnvar[1]; break;
case USERDEFS_PLAYERBEST: labelNum = ud.playerbest; break;
@ -1502,9 +1502,9 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_STATUSBARRANGE: labelNum = ud.statusbarrange; break;
case USERDEFS_STATUSBARCUSTOM: labelNum = hud_custom; 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;
case USERDEFS_MENU_SLIDEBARZ: labelNum = 65536; break;
case USERDEFS_MENU_SLIDEBARMARGIN: labelNum = 65536; break;
case USERDEFS_MENU_SLIDECURSORZ: labelNum = 65536; break;
case USERDEFS_GLOBAL_R: labelNum = globalr; break;
case USERDEFS_GLOBAL_G: labelNum = globalg; break;
case USERDEFS_GLOBAL_B: labelNum = globalb; break;
@ -1534,9 +1534,9 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_MUSIC_EPISODE: labelNum = ud.music_episode; break; // Problem: This info is utterly meaningless with the new music system.
case USERDEFS_MUSIC_LEVEL: labelNum = ud.music_level; break;
case USERDEFS_SHADOW_PAL: labelNum = ud.shadow_pal; break;
case USERDEFS_MENU_SCROLLBARTILENUM: labelNum = ud.menu_scrollbartilenum; break;
case USERDEFS_MENU_SCROLLBARZ: labelNum = ud.menu_scrollbarz; break;
case USERDEFS_MENU_SCROLLCURSORZ: labelNum = ud.menu_scrollcursorz; break;
case USERDEFS_MENU_SCROLLBARTILENUM: labelNum = -1; break;
case USERDEFS_MENU_SCROLLBARZ: labelNum = 65536; break;
case USERDEFS_MENU_SCROLLCURSORZ: labelNum = 65536; break;
case USERDEFS_RETURN:
if (lParm2 == 0)
labelNum = aGameVars[g_returnVarID].global;
@ -1666,7 +1666,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
case USERDEFS_SHOW_LEVEL_TEXT: ud.show_level_text = iSet; break;
case USERDEFS_WEAPONSCALE: hud_weaponscale.SetGenericRepDefault(iSet, CVAR_Int); break;
case USERDEFS_TEXTSCALE: hud_textscale.SetGenericRepDefault(iSet, CVAR_Int); break;
case USERDEFS_RUNKEY_MODE: ud.runkey_mode = iSet; break;
case USERDEFS_RUNKEY_MODE: cl_runmode.SetGenericRepDefault(iSet, CVAR_Int); break;
case USERDEFS_M_ORIGIN_X: ud.returnvar[0] = iSet; break;
case USERDEFS_M_ORIGIN_Y: ud.returnvar[1] = iSet; break;
case USERDEFS_GLOBALFLAGS: globalflags = iSet; break;
@ -1695,9 +1695,9 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
case USERDEFS_STATUSBARRANGE: ud.statusbarrange = iSet; break;
case USERDEFS_STATUSBARCUSTOM: hud_custom.SetGenericRepDefault(iSet, CVAR_Int); break;
case USERDEFS_HUDONTOP: hud_position.SetGenericRepDefault(iSet, CVAR_Int); 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;
case USERDEFS_MENU_SLIDEBARZ: break;
case USERDEFS_MENU_SLIDEBARMARGIN: break;
case USERDEFS_MENU_SLIDECURSORZ: break;
case USERDEFS_GLOBAL_R: globalr = iSet; break;
case USERDEFS_GLOBAL_G: globalg = iSet; break;
case USERDEFS_GLOBAL_B: globalb = iSet; break;
@ -1737,9 +1737,9 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
case USERDEFS_SLIDEBAR_PALSELECTED: ud.slidebar_palselected = iSet; break;
case USERDEFS_SLIDEBAR_PALDISABLED: ud.slidebar_paldisabled = iSet; break;
case USERDEFS_SHADOW_PAL: ud.shadow_pal = iSet; break;
case USERDEFS_MENU_SCROLLBARTILENUM: ud.menu_scrollbartilenum = iSet; break;
case USERDEFS_MENU_SCROLLBARZ: ud.menu_scrollbarz = iSet; break;
case USERDEFS_MENU_SCROLLCURSORZ: ud.menu_scrollcursorz = iSet; break;
case USERDEFS_MENU_SCROLLBARTILENUM: break;
case USERDEFS_MENU_SCROLLBARZ: break;
case USERDEFS_MENU_SCROLLCURSORZ: break;
case USERDEFS_RETURN:
if (lParm2 == 0)
aGameVars[g_returnVarID].global = iSet;

View file

@ -62,20 +62,13 @@ void CONFIG_SetDefaults(void)
ScreenBPP = 32;
g_player[0].ps->aim_mode = 1;
ud.config.ShowOpponentWeapons = 0;
ud.althud = 1;
ud.automsg = 0;
ud.camerasprite = -1;
ud.camera_time = 0;//4;
ud.menu_slidebarz = 65536;
ud.menu_slidebarmargin = RR ? 6 * 65536 : 65536;
ud.menu_slidecursorz = RR ? 32768 : 65536;
ud.runkey_mode = 0;
ud.screen_size = 4;
ud.screen_tilting = 1;
ud.statusbarflags = STATUSBAR_NOSHRINK;
ud.statusbarmode = 1;
ud.statusbarscale = 100;
playerteam = 0;
ud.angleinterpolation = 0;
@ -88,9 +81,6 @@ void CONFIG_SetDefaults(void)
ud.menubackground = 1;
ud.slidebar_paldisabled = 1;
ud.shadow_pal = 4;
ud.menu_scrollbartilenum = -1;
ud.menu_scrollbarz = 65536;
ud.menu_scrollcursorz = 65536;
}

View file

@ -7261,6 +7261,7 @@ int GameInterface::app_main()
{
I_Error("app_main: There was a problem initializing the Build engine: %s\n", engineerrstr);
}
hud_size.Callback();
S_InitSound();

View file

@ -143,13 +143,11 @@ typedef struct {
int32_t camera_time,folfvel,folavel,folx,foly,fola;
int32_t reccnt;
int32_t runkey_mode,statusbarscale,weaponswitch; // JBF 20031125
int32_t statusbarscale,weaponswitch; // JBF 20031125
int32_t statusbarmode;
int32_t noexits,automsg;
int32_t althud;
int32_t statusbarflags, statusbarrange;
int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz;
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
int32_t entered_name,screen_tilting;
int32_t coop,screen_size,lockout,crosshair;

View file

@ -545,6 +545,7 @@ void SetBorder(PLAYERp pp, int value)
gs.BorderNum = SIZ(BorderInfoValues) - 1;
return;
}
if (xdim == 0) return; // game not set up yet.
BorderSetView(pp, &Xdim, &Ydim, &ScreenSize);

View file

@ -1905,6 +1905,7 @@ void MenuLevel(void)
//drawscreen as fast as you can
DrawMenuLevelScreen();
DoUpdateSounds();
videoNextPage();
}
@ -2881,6 +2882,7 @@ int32_t GameInterface::app_main()
{
I_Error("There was a problem initialising the Build engine: %s", engineerrstr);
}
hud_size.Callback();
if (!DetectShareware())
{