From 0a9d15ceb02a0201d8960330b16f62881ed1b60c Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 24 Aug 2023 04:34:19 -0700 Subject: [PATCH 1/3] Remove remnants of LJOYSTICK --- src/d_netcmd.c | 26 -------------------------- src/d_netcmd.h | 3 --- 2 files changed, 29 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 582f3d98d..cd523b0ca 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -242,11 +242,6 @@ static void Command_Eval(void); static CV_PossibleValue_t usemouse_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Force"}, {0, NULL}}; -#ifdef LJOYSTICK -static CV_PossibleValue_t joyport_cons_t[] = {{1, "/dev/js0"}, {2, "/dev/js1"}, {3, "/dev/js2"}, - {4, "/dev/js3"}, {0, NULL}}; -#endif - static CV_PossibleValue_t teamscramble_cons_t[] = {{0, "Off"}, {1, "Random"}, {2, "Points"}, {0, NULL}}; static CV_PossibleValue_t startingliveslimit_cons_t[] = {{1, "MIN"}, {99, "MAX"}, {0, NULL}}; @@ -344,7 +339,6 @@ consvar_t cv_skipmapcheck = CVAR_INIT ("skipmapcheck", "Off", CV_SAVE, CV_OnOff, consvar_t cv_usemouse = CVAR_INIT ("use_mouse", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse); -#if (defined (LJOYSTICK) || defined (HAVE_SDL)) consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS] = { CVAR_INIT ("padscale", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale), CVAR_INIT ("padscale2", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale2), @@ -352,23 +346,6 @@ consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS] = { CVAR_INIT ("padscale4", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale4) }; -#ifdef LJOYSTICK -consvar_t cv_joyport[MAXSPLITSCREENPLAYERS] = { //Alam: for later - CVAR_INIT ("padport", "/dev/js0", CV_SAVE, joyport_cons_t, NULL), - CVAR_INIT ("padport2", "/dev/js0", CV_SAVE, joyport_cons_t, NULL), - CVAR_INIT ("padport3", "/dev/js0", CV_SAVE, joyport_cons_t, NULL), - CVAR_INIT ("padport4", "/dev/js0", CV_SAVE, joyport_cons_t, NULL) -}; -#endif -#else -consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS] = { //Alam: Dummy for save - CVAR_INIT ("padscale", "1", CV_SAVE|CV_HIDEN, NULL, NULL), - CVAR_INIT ("padscale2", "1", CV_SAVE|CV_HIDEN, NULL, NULL), - CVAR_INIT ("padscale3", "1", CV_SAVE|CV_HIDEN, NULL, NULL), - CVAR_INIT ("padscale4", "1", CV_SAVE|CV_HIDEN, NULL, NULL) -}; -#endif - // SRB2kart consvar_t cv_items[NUMKARTRESULTS-1] = { CVAR_INIT ("sneaker", "On", CV_NETVAR, CV_OnOff, NULL), @@ -1079,9 +1056,6 @@ void D_RegisterClientCommands(void) for (i = 0; i < MAXSPLITSCREENPLAYERS; i++) { CV_RegisterVar(&cv_joyscale[i]); -#ifdef LJOYSTICK - CV_RegisterVar(&cv_joyport[i]); -#endif } // s_sound.c diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 1206bf7dc..acf6b8336 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -48,9 +48,6 @@ extern consvar_t cv_splitplayers; extern consvar_t cv_seenames; extern consvar_t cv_usemouse; extern consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS]; -#ifdef LJOYSTICK -extern consvar_t cv_joyport[MAXSPLITSCREENPLAYERS]; -#endif // normally in p_mobj but the .h is not read extern consvar_t cv_itemrespawntime; From c5e341769bff2389b1f75ff4aa4828c0ecdc3450 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 24 Aug 2023 04:52:41 -0700 Subject: [PATCH 2/3] Remove unused cvars - growmusicfade - invincmusicfade - music_resync_powerups_only - music_resync_threshold - renderstats (wasn't even registered in the console!) - resetspecialmusic - resume - samplerate - stretch - tailspickup --- src/d_netcmd.c | 6 ------ src/g_game.c | 7 ------- src/g_game.h | 7 ------- src/r_main.c | 4 ---- src/r_main.h | 1 - src/s_sound.c | 15 --------------- src/s_sound.h | 3 --- src/sdl/i_video.cpp | 2 -- 8 files changed, 45 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index cd523b0ca..bd33113a3 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1076,12 +1076,6 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_soundtest); - CV_RegisterVar(&cv_invincmusicfade); - CV_RegisterVar(&cv_growmusicfade); - - CV_RegisterVar(&cv_resetspecialmusic); - - CV_RegisterVar(&cv_resume); CV_RegisterVar(&cv_perfstats); // ingame object placing diff --git a/src/g_game.c b/src/g_game.c index 5e6546699..060dd84f1 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -395,13 +395,6 @@ consvar_t cv_pauseifunfocused = CVAR_INIT ("pauseifunfocused", "Yes", CV_SAVE, C // Display song credits consvar_t cv_songcredits = CVAR_INIT ("songcredits", "On", CV_SAVE, CV_OnOff, NULL); -consvar_t cv_invincmusicfade = CVAR_INIT ("invincmusicfade", "300", CV_SAVE, CV_Unsigned, NULL); -consvar_t cv_growmusicfade = CVAR_INIT ("growmusicfade", "500", CV_SAVE, CV_Unsigned, NULL); - -consvar_t cv_resetspecialmusic = CVAR_INIT ("resetspecialmusic", "Yes", CV_SAVE, CV_YesNo, NULL); - -consvar_t cv_resume = CVAR_INIT ("resume", "Yes", CV_SAVE, CV_YesNo, NULL); - consvar_t cv_kickstartaccel[MAXSPLITSCREENPLAYERS] = { CVAR_INIT ("kickstartaccel", "Off", CV_SAVE|CV_CALL, CV_OnOff, weaponPrefChange), CVAR_INIT ("kickstartaccel2", "Off", CV_SAVE|CV_CALL, CV_OnOff, weaponPrefChange2), diff --git a/src/g_game.h b/src/g_game.h index 0b922b4da..e781f17ee 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -101,13 +101,6 @@ extern consvar_t cv_deadzone[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff; -extern consvar_t cv_invincmusicfade; -extern consvar_t cv_growmusicfade; - -extern consvar_t cv_resetspecialmusic; - -extern consvar_t cv_resume; - // mouseaiming (looking up/down with the mouse or keyboard) #define KB_LOOKSPEED (1<<25) #define MAXPLMOVE (50) diff --git a/src/r_main.c b/src/r_main.c index d50c43644..50fee5b58 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -151,7 +151,6 @@ static void ChaseCam2_OnChange(void); static void ChaseCam3_OnChange(void); static void ChaseCam4_OnChange(void); -consvar_t cv_tailspickup = CVAR_INIT ("tailspickup", "On", CV_NETVAR|CV_NOSHOWHELP, CV_OnOff, NULL); consvar_t cv_chasecam[MAXSPLITSCREENPLAYERS] = { CVAR_INIT ("chasecam", "On", CV_CALL, CV_OnOff, ChaseCam_OnChange), CVAR_INIT ("chasecam2", "On", CV_CALL, CV_OnOff, ChaseCam2_OnChange), @@ -181,8 +180,6 @@ consvar_t cv_homremoval = CVAR_INIT ("homremoval", "Yes", CV_SAVE, homremoval_co consvar_t cv_maxportals = CVAR_INIT ("maxportals", "2", CV_SAVE, maxportals_cons_t, NULL); -consvar_t cv_renderstats = CVAR_INIT ("renderstats", "Off", 0, CV_OnOff, NULL); - consvar_t cv_drawpickups = CVAR_INIT ("drawpickups", "Yes", CV_CHEAT, CV_YesNo, NULL); consvar_t cv_debugfinishline = CVAR_INIT ("debugfinishline", "Off", CV_CHEAT, CV_OnOff, NULL); @@ -1693,7 +1690,6 @@ void R_RegisterEngineStuff(void) UINT8 i; CV_RegisterVar(&cv_gravity); - CV_RegisterVar(&cv_tailspickup); CV_RegisterVar(&cv_allowmlook); CV_RegisterVar(&cv_homremoval); diff --git a/src/r_main.h b/src/r_main.h index 0f5560308..c201a50be 100644 --- a/src/r_main.h +++ b/src/r_main.h @@ -133,7 +133,6 @@ extern consvar_t cv_ffloorclip; extern consvar_t cv_drawdist, cv_drawdist_precip; extern consvar_t cv_fov[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_skybox; -extern consvar_t cv_tailspickup; extern consvar_t cv_drawpickups; extern consvar_t cv_debugfinishline; diff --git a/src/s_sound.c b/src/s_sound.c index eb6c9a2e1..931040814 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -63,8 +63,6 @@ static void PlaySoundIfUnfocused_OnChange(void); static void ModFilter_OnChange(void); #endif -consvar_t cv_samplerate = CVAR_INIT ("samplerate", "22050", 0, CV_Unsigned, NULL); //Alam: For easy hacking? - // stereo reverse consvar_t stereoreverse = CVAR_INIT ("stereoreverse", "Off", CV_SAVE, CV_OnOff, NULL); @@ -93,15 +91,6 @@ consvar_t cv_closedcaptioning = CVAR_INIT ("closedcaptioning", "Off", CV_SAVE|CV consvar_t cv_gamedigimusic = CVAR_INIT ("music", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameDigiMusic_OnChange); consvar_t cv_gamesounds = CVAR_INIT ("sounds", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameSounds_OnChange); -static CV_PossibleValue_t music_resync_threshold_cons_t[] = { - {0, "MIN"}, - {1000, "MAX"}, - {0, NULL} -}; - -consvar_t cv_music_resync_threshold = CVAR_INIT ("music_resync_threshold", "100", CV_SAVE|CV_CALL, music_resync_threshold_cons_t, I_UpdateSongLagThreshold); -consvar_t cv_music_resync_powerups_only = CVAR_INIT ("music_resync_powerups_only", "No", CV_SAVE|CV_CALL, CV_YesNo, I_UpdateSongLagConditions); - // Window focus sound sytem toggles consvar_t cv_playmusicifunfocused = CVAR_INIT ("playmusicifunfocused", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, PlayMusicIfUnfocused_OnChange); consvar_t cv_playsoundifunfocused = CVAR_INIT ("playsoundsifunfocused", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, PlaySoundIfUnfocused_OnChange); @@ -249,15 +238,11 @@ void S_RegisterSoundStuff(void) CV_RegisterVar(&precachesound); CV_RegisterVar(&surround); - CV_RegisterVar(&cv_samplerate); CV_RegisterVar(&cv_playsoundifunfocused); CV_RegisterVar(&cv_playmusicifunfocused); CV_RegisterVar(&cv_gamesounds); CV_RegisterVar(&cv_gamedigimusic); - CV_RegisterVar(&cv_music_resync_threshold); - CV_RegisterVar(&cv_music_resync_powerups_only); - #ifdef HAVE_OPENMPT CV_RegisterVar(&cv_modfilter); #endif diff --git a/src/s_sound.h b/src/s_sound.h index 805413604..fd6e62e29 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -52,9 +52,6 @@ extern consvar_t cv_gamesounds; extern consvar_t cv_playmusicifunfocused; extern consvar_t cv_playsoundifunfocused; -extern consvar_t cv_music_resync_threshold; -extern consvar_t cv_music_resync_powerups_only; - #ifdef HAVE_OPENMPT extern consvar_t cv_modfilter; #endif diff --git a/src/sdl/i_video.cpp b/src/sdl/i_video.cpp index 88eb183e5..7a2a09d23 100644 --- a/src/sdl/i_video.cpp +++ b/src/sdl/i_video.cpp @@ -115,7 +115,6 @@ rendermode_t chosenrendermode = render_none; // set by command line arguments // synchronize page flipping with screen refresh consvar_t cv_vidwait = CVAR_INIT ("vid_wait", "Off", CV_SAVE, CV_OnOff, NULL); -static consvar_t cv_stretch = CVAR_INIT ("stretch", "Off", CV_SAVE|CV_NOSHOWHELP, CV_OnOff, NULL); static consvar_t cv_alwaysgrabmouse = CVAR_INIT ("alwaysgrabmouse", "Off", CV_SAVE, CV_OnOff, NULL); UINT8 graphics_started = 0; // Is used in console.c and screen.c @@ -1606,7 +1605,6 @@ void I_StartupGraphics(void) COM_AddCommand ("vid_modelist", VID_Command_ModeList_f); COM_AddCommand ("vid_mode", VID_Command_Mode_f); CV_RegisterVar (&cv_vidwait); - CV_RegisterVar (&cv_stretch); CV_RegisterVar (&cv_alwaysgrabmouse); disable_mouse = static_cast(M_CheckParm("-nomouse")); disable_fullscreen = M_CheckParm("-win") ? SDL_TRUE : SDL_FALSE; From f4ca6001d8e2fecbe48493c933883ca1093eefbf Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 24 Aug 2023 04:56:02 -0700 Subject: [PATCH 3/3] s_sound: remove unused OpenMPT stuff --- src/s_sound.c | 23 ----------------------- src/s_sound.h | 12 ------------ 2 files changed, 35 deletions(-) diff --git a/src/s_sound.c b/src/s_sound.c index 931040814..e6abc1791 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -59,10 +59,6 @@ static void GameDigiMusic_OnChange(void); static void PlayMusicIfUnfocused_OnChange(void); static void PlaySoundIfUnfocused_OnChange(void); -#ifdef HAVE_OPENMPT -static void ModFilter_OnChange(void); -#endif - // stereo reverse consvar_t stereoreverse = CVAR_INIT ("stereoreverse", "Off", CV_SAVE, CV_OnOff, NULL); @@ -95,13 +91,6 @@ consvar_t cv_gamesounds = CVAR_INIT ("sounds", "On", CV_SAVE|CV_CALL|CV_NOINIT, consvar_t cv_playmusicifunfocused = CVAR_INIT ("playmusicifunfocused", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, PlayMusicIfUnfocused_OnChange); consvar_t cv_playsoundifunfocused = CVAR_INIT ("playsoundsifunfocused", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, PlaySoundIfUnfocused_OnChange); -#ifdef HAVE_OPENMPT -openmpt_module *openmpt_mhandle = NULL; - -static CV_PossibleValue_t interpolationfilter_cons_t[] = {{0, "Default"}, {1, "None"}, {2, "Linear"}, {4, "Cubic"}, {8, "Windowed sinc"}, {0, NULL}}; -consvar_t cv_modfilter = CVAR_INIT ("modfilter", "0", CV_SAVE|CV_CALL, interpolationfilter_cons_t, ModFilter_OnChange); -#endif - #define S_MAX_VOLUME 127 // when to clip out sounds @@ -243,10 +232,6 @@ void S_RegisterSoundStuff(void) CV_RegisterVar(&cv_gamesounds); CV_RegisterVar(&cv_gamedigimusic); -#ifdef HAVE_OPENMPT - CV_RegisterVar(&cv_modfilter); -#endif - COM_AddCommand("tunes", Command_Tunes_f); COM_AddCommand("restartaudio", Command_RestartAudio_f); COM_AddCommand("playsound", Command_PlaySound); @@ -2494,11 +2479,3 @@ static void PlaySoundIfUnfocused_OnChange(void) if (window_notinfocus && !cv_playsoundifunfocused.value) S_StopSounds(); } - -#ifdef HAVE_OPENMPT -void ModFilter_OnChange(void) -{ - if (openmpt_mhandle) - openmpt_module_set_render_param(openmpt_mhandle, OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH, cv_modfilter.value); -} -#endif diff --git a/src/s_sound.h b/src/s_sound.h index fd6e62e29..d101f307c 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -19,18 +19,10 @@ #include "command.h" #include "tables.h" // angle_t -#ifdef HAVE_OPENMPT -#include "libopenmpt/libopenmpt.h" -#endif - #ifdef __cplusplus extern "C" { #endif -#ifdef HAVE_OPENMPT -extern openmpt_module *openmpt_mhandle; -#endif - // mask used to indicate sound origin is player item pickup #define PICKUP_SOUND 0x8000 @@ -52,10 +44,6 @@ extern consvar_t cv_gamesounds; extern consvar_t cv_playmusicifunfocused; extern consvar_t cv_playsoundifunfocused; -#ifdef HAVE_OPENMPT -extern consvar_t cv_modfilter; -#endif - extern CV_PossibleValue_t soundvolume_cons_t[]; typedef enum