diff --git a/source/blood/src/config.h b/source/blood/src/config.h index c26cb4ec6..b12578654 100644 --- a/source/blood/src/config.h +++ b/source/blood/src/config.h @@ -53,7 +53,6 @@ extern int32_t JoystickAnalogueSaturate[MAXJOYAXES]; extern uint8_t KeyboardKeys[NUMGAMEFUNCTIONS][2]; extern int32_t scripthandle; extern int32_t setupread; -extern int32_t mus_restartonload; extern int32_t configversion; extern int32_t CheckForUpdates; extern int32_t LastUpdateCheck; @@ -62,7 +61,6 @@ extern char CommbatMacro[MAXRIDECULE][MAXRIDECULELENGTH]; extern char szPlayerName[MAXPLAYERNAME]; extern int32_t gTurnSpeed; extern int32_t gDetail; -extern int32_t cl_weaponswitch; extern int32_t gAutoRun; extern int32_t gFollowMap; extern int32_t gOverlayMap; diff --git a/source/blood/src/menu.cpp b/source/blood/src/menu.cpp index 362f59b22..9ec3803ca 100644 --- a/source/blood/src/menu.cpp +++ b/source/blood/src/menu.cpp @@ -225,7 +225,7 @@ CGameMenuItemSlider sliderDetail("DETAIL:", 3, 66, 50, 180, gDetail, 0, 4, 1, Se CGameMenuItemSlider sliderGamma("GAMMA:", 3, 66, 60, 180, gGamma, 0, 15, 2, SetGamma, -1, -1); CGameMenuItemSlider sliderMusic("MUSIC:", 3, 66, 70, 180, mus_volume, 0, 256, 48, SetMusicVol, -1, -1); CGameMenuItemSlider sliderSound("SOUND:", 3, 66, 80, 180, snd_fxvolume, 0, 256, 48, SetSoundVol, -1, -1); -CGameMenuItemSlider sliderCDAudio("CD AUDIO:", 3, 66, 90, 180, CDVolume, 0, 256, 48, SetCDVol, -1, -1); +//CGameMenuItemSlider sliderCDAudio("CD AUDIO:", 3, 66, 90, 180, CDVolume, 0, 256, 48, SetCDVol, -1, -1); CGameMenuItemZBool bool3DAudio("3D AUDIO:", 3, 66, 100, 180, snd_doppler, SetDoppler, NULL, NULL); CGameMenuItemZBool boolCrosshair("CROSSHAIR:", 3, 66, 110, 180, cl_crosshair, SetCrosshair, NULL, NULL); CGameMenuItemZBool boolShowWeapons("SHOW WEAPONS:", 3, 66, 120, 180, cl_showweapon, SetShowWeapons, NULL, NULL); @@ -301,7 +301,7 @@ CGameMenuItemText itemLoadingText("LOADING...", 1, 160, 100, 1); CGameMenuItemTitle itemSoundsTitle("SOUNDS", 1, 160, 20, 2038); CGameMenuItemSlider itemSoundsMusic("MUSIC:", 3, 40, 60, 180, mus_volume, 0, 256, 48, SetMusicVol, -1, -1); CGameMenuItemSlider itemSoundsSound("SOUND:", 3, 40, 70, 180, snd_fxvolume, 0, 256, 48, SetSoundVol, -1, -1); -CGameMenuItemSlider itemSoundsCDAudio("CD AUDIO:", 3, 40, 80, 180, CDVolume, 0, 256, 48, SetCDVol, -1, -1); +//CGameMenuItemSlider itemSoundsCDAudio("CD AUDIO:", 3, 40, 80, 180, CDVolume, 0, 256, 48, SetCDVol, -1, -1); CGameMenuItemZBool itemSounds3DAudio("3D SOUND:", 3, 40, 90, 180, snd_doppler, SetDoppler, NULL, NULL); CGameMenuItemTitle itemQuitTitle("QUIT", 1, 160, 20, 2038); @@ -763,7 +763,7 @@ void SetupOptionsOldMenu(void) menuOptionsOld.Add(&sliderGamma, false); menuOptionsOld.Add(&sliderMusic, false); menuOptionsOld.Add(&sliderSound, false); - menuOptionsOld.Add(&sliderCDAudio, false); + //menuOptionsOld.Add(&sliderCDAudio, false); menuOptionsOld.Add(&bool3DAudio, false); menuOptionsOld.Add(&boolCrosshair, false); menuOptionsOld.Add(&boolShowWeapons, false); @@ -1011,7 +1011,7 @@ void SetupSoundsMenu(void) menuSounds.Add(&itemSoundsTitle, false); menuSounds.Add(&itemSoundsMusic, true); menuSounds.Add(&itemSoundsSound, false); - menuSounds.Add(&itemSoundsCDAudio, false); + //menuSounds.Add(&itemSoundsCDAudio, false); menuSounds.Add(&itemSounds3DAudio, false); menuSounds.Add(&itemBloodQAV, false); } @@ -1853,7 +1853,7 @@ void SetSound(CGameMenuItemChain *pItem) UNREFERENCED_PARAMETER(pItem); snd_mixrate = nSoundRateValues[itemOptionsSoundSampleRate.m_nFocus]; snd_numvoices = itemOptionsSoundNumVoices.nValue; - MusicDevice = itemOptionsSoundMusicDevice.m_nFocus; + //MusicDevice = itemOptionsSoundMusicDevice.m_nFocus; sfxTerm(); sndTerm(); @@ -1886,7 +1886,7 @@ void SetupOptionsSound(CGameMenuItemChain *pItem) } } itemOptionsSoundNumVoices.nValue = snd_numvoices; - itemOptionsSoundMusicDevice.m_nFocus = MusicDevice; + itemOptionsSoundMusicDevice.m_nFocus = 1;// MusicDevice; } void UpdatePlayerName(CGameMenuItemZEdit *pItem, CGameMenuEvent *pEvent) diff --git a/source/blood/src/menus.cpp b/source/blood/src/menus.cpp index 9578edfb2..ac1218887 100644 --- a/source/blood/src/menus.cpp +++ b/source/blood/src/menus.cpp @@ -604,7 +604,7 @@ static char const s_Scale[] = "Scale:"; static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair); static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option ); -static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl.crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 ); +static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl_crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 ); static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 ); static int32_t vpsize; diff --git a/source/blood/src/sound.cpp b/source/blood/src/sound.cpp index 1009c1804..845f976fd 100644 --- a/source/blood/src/sound.cpp +++ b/source/blood/src/sound.cpp @@ -437,7 +437,7 @@ void DeinitSoundDevice(void) void InitMusicDevice(void) { - int nStatus = MUSIC_Init(MusicDevice, 0); + int nStatus = MUSIC_Init(1/*MusicDevice*/, 0); if (nStatus != 0) { initprintf("InitMusicDevice: %s\n", MUSIC_ErrorString(nStatus)); diff --git a/source/common/console/c_cvars.h b/source/common/console/c_cvars.h index 14e205535..fbd768cf7 100644 --- a/source/common/console/c_cvars.h +++ b/source/common/console/c_cvars.h @@ -47,7 +47,7 @@ CVARS (console variables) enum { CVAR_ARCHIVE = 1, // set to cause it to be saved to config - //CVAR_USERINFO = 2, // added to userinfo when changed + CVAR_USERINFO = 2, // added to userinfo when changed CVAR_SERVERINFO = 4, // added to serverinfo when changed CVAR_NOSET = 8, // don't allow change from console at all, // but can be set from the command line diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index 3c2353ef4..6c9a94c05 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -32,16 +32,20 @@ CVARD(Bool, cl_viewvbob, true, CVAR_ARCHIVE, "enable/disable view vertical bobbi CVARD(Bool, cl_interpolate, true, CVAR_ARCHIVE, "enable/disable view interpolation") // only implemented in Blood CVARD(Bool, cl_slopetilting, false, CVAR_ARCHIVE, "enable/disable slope tilting") // only implemented in Blood CVARD(Bool, cl_showweapon, true, CVAR_ARCHIVE, "enable/disable show weapons") // only implemented in Blood -CVARD(Bool, cl_crosshairscale, 50, CVAR_ARCHIVE, "changes the size of the crosshair") +CUSTOM_CVARD(Int, cl_crosshairscale, 50, CVAR_ARCHIVE, "changes the size of the crosshair") +{ + if (self < 1) self = 1; + else if (self > 100) self = 100; +} -CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE, "enable/disable weapon autoaim") +CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim") { if (self < 0 || self > (playing_blood? 2 : 3)) self = 1; // The Shadow Warrior backend only has a bool for this. //UpdatePlayerFromMenu(); todo: networking (only operational in EDuke32 frontend anyway.) }; -CUSTOM_CVARD(Int, cl_weaponswitch, 3, CVAR_ARCHIVE, "enable/disable auto weapon switching")//, (void *)&cl_weaponswitch, CVAR_INT|CVAR_MULTI, 0, 7 }, (void *)&cl_weaponswitch, CVAR_INT|CVAR_MULTI, 0, 3 }, +CUSTOM_CVARD(Int, cl_weaponswitch, 3, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable auto weapon switching") { if (self < 0) self = 0; diff --git a/source/common/gamecvars.h b/source/common/gamecvars.h index fa168bb10..416125c97 100644 --- a/source/common/gamecvars.h +++ b/source/common/gamecvars.h @@ -21,6 +21,8 @@ EXTERN_CVAR(Bool, cl_viewvbob) EXTERN_CVAR(Bool, cl_interpolate) EXTERN_CVAR(Bool, cl_slopetilting) EXTERN_CVAR(Bool, cl_showweapon) +EXTERN_CVAR(Int, cl_weaponswitch) +EXTERN_CVAR(Int, cl_crosshairscale) EXTERN_CVAR(Bool, demorec_diffcompress_cvar) EXTERN_CVAR(Bool, demorec_synccompress_cvar) diff --git a/source/duke3d/src/common.cpp b/source/duke3d/src/common.cpp index a362aa84d..97b27b276 100644 --- a/source/duke3d/src/common.cpp +++ b/source/duke3d/src/common.cpp @@ -8,6 +8,7 @@ #include "build.h" #include "baselayer.h" #include "palette.h" +#include "gamecvars.h" #include "grpscan.h" diff --git a/source/duke3d/src/gamestructures.cpp b/source/duke3d/src/gamestructures.cpp index a92a6aee4..84bc11b0f 100644 --- a/source/duke3d/src/gamestructures.cpp +++ b/source/duke3d/src/gamestructures.cpp @@ -1659,7 +1659,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons case USERDEFS_NOEXITS: ud.noexits = iSet; break; case USERDEFS_AUTOVOTE: cl_autovote = iSet; break; //!!! case USERDEFS_AUTOMSG: cl_automsg = iSet; break; //!!! - case USERDEFS_IDPLAYERS: ud.idplayers = iSet; break; //!!! + case USERDEFS_IDPLAYERS: cl_idplayers = iSet; break; //!!! case USERDEFS_TEAM: ud.team = iSet; break; case USERDEFS_VIEWBOB: cl_viewbob = iSet; break; //!!! case USERDEFS_WEAPONSWAY: cl_weaponsway = iSet; break; //!!! diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 4b226e5b8..6da097f87 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -603,7 +603,7 @@ static char const s_Scale[] = "Scale:"; static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value); static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option ); -static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl.crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 ); +static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &cl_crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 ); static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 ); static int32_t vpsize; @@ -1144,7 +1144,7 @@ static int32_t soundrate, soundvoices; static MenuOption_t MEO_SOUND = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &snd_enabled.Value ); static MenuEntry_t ME_SOUND = MAKE_MENUENTRY( "Sound:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND, Option ); -static MenuOption_t MEO_SOUND_MUSIC = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, mus_enabled.Value ); +static MenuOption_t MEO_SOUND_MUSIC = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &mus_enabled.Value ); static MenuEntry_t ME_SOUND_MUSIC = MAKE_MENUENTRY( "Music:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_MUSIC, Option ); static char const s_Volume[] = "Volume:"; @@ -3878,7 +3878,7 @@ static void Menu_TextFormSubmit(char *input) } if (cheatID >= 0) - cl_cheatmask |= CheatFunctionFlags[cheatID]; + cl_cheatmask = cl_cheatmask | CheatFunctionFlags[cheatID]; if ((NAM_WW2GI && (cl_cheatmask & (1<team + 1); - if (vl_obituaries) + if (cl_obituaries) G_AddUserQuote(tempbuf); } pPlayer->frag_ps = playerNum; diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index d5e481838..1ce429bd0 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -1119,7 +1119,7 @@ void G_DisplayRest(int32_t smoothratio) vec2_t crosshairpos = { ud.returnvar[0], ud.returnvar[1] }; uint8_t crosshair_pal = CROSSHAIR_PAL; uint32_t crosshair_o = 1|2; - uint32_t crosshair_scale = divscale16(cl.crosshairscale, 100); + uint32_t crosshair_scale = divscale16(cl_crosshairscale, 100); auto const oyxaspect = yxaspect; if (FURY) diff --git a/source/duke3d/src/sounds.cpp b/source/duke3d/src/sounds.cpp index b819589cf..95758367a 100644 --- a/source/duke3d/src/sounds.cpp +++ b/source/duke3d/src/sounds.cpp @@ -72,8 +72,7 @@ void S_SoundStartup(void) return; } - initprintf("%d voices, %d channels, 16-bit %d Hz\n", snd_numvoices, snd_numchannels, - snd_mixrate); + initprintf("%d voices, %d channels, 16-bit %d Hz\n", *snd_numvoices, *snd_numchannels, *snd_mixrate); for (int i = 0; i <= g_highestSoundIdx; ++i) { diff --git a/source/rr/src/menus.cpp b/source/rr/src/menus.cpp index ff55746ac..532aa29f5 100644 --- a/source/rr/src/menus.cpp +++ b/source/rr/src/menus.cpp @@ -581,7 +581,7 @@ static char const s_Scale[] = "Scale:"; static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value); static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option ); -static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl.crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 ); +static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &cl_crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 ); static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 ); static int32_t vpsize; @@ -1102,7 +1102,7 @@ static int32_t soundrate, soundvoices; static MenuOption_t MEO_SOUND = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &snd_enabled.Value ); static MenuEntry_t ME_SOUND = MAKE_MENUENTRY( "Sound:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND, Option ); -static MenuOption_t MEO_SOUND_MUSIC = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, mus_enabled.Value ); +static MenuOption_t MEO_SOUND_MUSIC = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &mus_enabled.Value ); static MenuEntry_t ME_SOUND_MUSIC = MAKE_MENUENTRY( "Music:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_MUSIC, Option ); static MenuLink_t MEO_SOUND_CDPLAYER = { MENU_CDPLAYER, MA_Advance, }; @@ -2067,7 +2067,7 @@ static void Menu_Pre(MenuID_t cm) break; case MENU_SAVESETUP: - MenuEntry_DisableOnCondition(&ME_SAVESETUP_MAXAUTOSAVES, !ud.autosavedeletion); + MenuEntry_DisableOnCondition(&ME_SAVESETUP_MAXAUTOSAVES, !cl_autosavedeletion); break; #ifndef EDUKE32_SIMPLE_MENU @@ -4241,7 +4241,7 @@ static void Menu_TextFormSubmit(char *input) } if (cheatID >= 0) - cl_cheatmask |= CheatFunctionFlags[cheatID]; + cl_cheatmask = cl_cheatmask | CheatFunctionFlags[cheatID]; if (((cl_cheatmask & (1<= ud.maxautosaves) + if (numautosaves >= cl_maxautosaves) { G_DeleteSave(msv.brief); didDelete = true; diff --git a/source/rr/src/screens.cpp b/source/rr/src/screens.cpp index 34f1479f8..37f0de933 100644 --- a/source/rr/src/screens.cpp +++ b/source/rr/src/screens.cpp @@ -1143,7 +1143,7 @@ void G_DisplayRest(int32_t smoothratio) vec2_t crosshairpos = { (160<<16) - (g_player[myconnectindex].ps->look_ang<<15), 100<<16 }; uint8_t crosshair_pal = CROSSHAIR_PAL; uint32_t crosshair_o = 1|2; - uint32_t crosshair_scale = divscale16(cl.crosshairscale, 100); + uint32_t crosshair_scale = divscale16(cl_crosshairscale, 100); if (RR) crosshair_scale >>= 1; diff --git a/source/rr/src/sounds.cpp b/source/rr/src/sounds.cpp index cd1ace3bd..25ba5f646 100644 --- a/source/rr/src/sounds.cpp +++ b/source/rr/src/sounds.cpp @@ -58,8 +58,7 @@ void S_SoundStartup(void) return; } - initprintf("%d voices, %d channels, 16-bit %d Hz\n", snd_numvoices, snd_numchannels, - snd_mixrate); + initprintf("%d voices, %d channels, 16-bit %d Hz\n", *snd_numvoices, *snd_numchannels, *snd_mixrate); for (int i = 0; i <= g_highestSoundIdx; ++i) { diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index f885dbbb0..361fbe306 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -214,11 +214,6 @@ const GAME_SET gs_defaults = TRUE, // crosshair TRUE, // auto aim TRUE, // messages - TRUE, // fx on - TRUE, // Music on - TRUE, // talking - TRUE, // ambient - FALSE, // Flip Stereo // Network game settings 0, // GameType diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index 321738618..9acf8c351 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -1802,7 +1802,7 @@ DoUpdateSounds3D(void) //if (FX_SoundsPlaying() < snd_numvoices && dist <= 255) if (dist <= 255) { - for (i=0; ipriority >= TmpVocArray[i].priority) { @@ -1830,7 +1830,7 @@ DoUpdateSounds3D(void) // Only update these sounds 5x per second! Woo hoo!, aren't we optimized now? //if(MoveSkip8==0) // { - for (i=0; i