diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 2ef99f8d..da91032e 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -244,7 +244,7 @@ consvar_t cv_competitionboxes = {"competitionboxes", "Random", CV_NETVAR|CV_CHEA #ifdef SEENAMES static CV_PossibleValue_t seenames_cons_t[] = {{0, "Off"}, {1, "Colorless"}, {2, "Team"}, {3, "Ally/Foe"}, {0, NULL}}; -consvar_t cv_seenames = {"seenames", "Ally/Foe", CV_SAVE, seenames_cons_t, 0, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_seenames = {"seenames", "Off", CV_SAVE, seenames_cons_t, 0, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_allowseenames = {"allowseenames", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; #endif @@ -354,16 +354,16 @@ consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, N static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}}; consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; -static CV_PossibleValue_t kartstarsfx_cons_t[] = {{0, "Music"}, {1, "SMK"}, {0, NULL}}; -consvar_t cv_kartstarsfx = {"kartstarsfx", "SMK", CV_SAVE, kartstarsfx_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +static CV_PossibleValue_t kartinvinsfx_cons_t[] = {{0, "Music"}, {1, "SFX"}, {0, NULL}}; +consvar_t cv_kartinvinsfx = {"kartinvinsfx", "SFX", CV_SAVE, kartinvinsfx_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartspeed = {"kartspeed", "Normal", CV_NETVAR|CV_CALL|CV_NOINIT, kartspeed_cons_t, KartSpeed_OnChange, 0, NULL, NULL, 0, 0, NULL}; static CV_PossibleValue_t kartballoons_cons_t[] = {{1, "MIN"}, {12, "MAX"}, {0, NULL}}; consvar_t cv_kartballoons = {"kartballoons", "3", CV_NETVAR|CV_CHEAT, kartballoons_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartfrantic = {"kartfrantic", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartFrantic_OnChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartcomeback = {"kartcomeback", "On", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartComeback_OnChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartmirror = {"kartmirror", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartMirror_OnChange, 0, NULL, NULL, 0, 0, NULL}; -static CV_PossibleValue_t speedometer_cons_t[] = {{0, "Off"}, {1, "Kilometers"}, {2, "Miles"}, {3, "Fracunits"}, {0, NULL}}; -consvar_t cv_speedometer = {"speedometer", "Off", CV_SAVE, speedometer_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display +static CV_PossibleValue_t kartspeedometer_cons_t[] = {{0, "Off"}, {1, "Kilometers"}, {2, "Miles"}, {3, "Fracunits"}, {0, NULL}}; +consvar_t cv_kartspeedometer = {"kartdisplayspeed", "Off", CV_SAVE, kartspeedometer_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display static CV_PossibleValue_t kartdebugitem_cons_t[] = {{-1, "MIN"}, {NUMKARTITEMS-1, "MAX"}, {0, NULL}}; consvar_t cv_kartdebugitem = {"kartdebugitem", "0", CV_NETVAR|CV_CHEAT, kartdebugitem_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; diff --git a/src/d_netcmd.h b/src/d_netcmd.h index a0cdafca..262e4122 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -119,13 +119,13 @@ extern consvar_t cv_triplesneaker, cv_triplebanana, cv_tripleorbinaut, cv_dualja extern consvar_t cv_karthud; extern consvar_t cv_kartminimap; extern consvar_t cv_kartcheck; -extern consvar_t cv_kartstarsfx; +extern consvar_t cv_kartinvinsfx; extern consvar_t cv_kartspeed; extern consvar_t cv_kartballoons; extern consvar_t cv_kartfrantic; extern consvar_t cv_kartcomeback; extern consvar_t cv_kartmirror; -extern consvar_t cv_speedometer; +extern consvar_t cv_kartspeedometer; extern consvar_t cv_votetime; diff --git a/src/k_kart.c b/src/k_kart.c index 9153edb5..4a1f6a9a 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -319,13 +319,13 @@ void K_RegisterKartStuff(void) CV_RegisterVar(&cv_kartminimap); CV_RegisterVar(&cv_kartcheck); - CV_RegisterVar(&cv_kartstarsfx); + CV_RegisterVar(&cv_kartinvinsfx); CV_RegisterVar(&cv_kartspeed); CV_RegisterVar(&cv_kartballoons); CV_RegisterVar(&cv_kartfrantic); CV_RegisterVar(&cv_kartcomeback); CV_RegisterVar(&cv_kartmirror); - CV_RegisterVar(&cv_speedometer); + CV_RegisterVar(&cv_kartspeedometer); CV_RegisterVar(&cv_votetime); CV_RegisterVar(&cv_kartdebugitem); @@ -2509,7 +2509,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) if (player->mo->health > 0 && (player->mo->player->kartstuff[k_invincibilitytimer] > 0 || player->mo->player->kartstuff[k_growshrinktimer] > 0)) { - if (leveltime % 13 == 0 && cv_kartstarsfx.value && !P_IsLocalPlayer(player)) + if (leveltime % 13 == 0 && cv_kartinvinsfx.value && !P_IsLocalPlayer(player)) S_StartSound(player->mo, sfx_smkinv); } else if (S_SoundPlaying(player->mo, sfx_smkinv)) @@ -2956,7 +2956,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { if (P_IsLocalPlayer(player) && !player->exiting) S_ChangeMusicInternal("kinvnc", true); - if (!cv_kartstarsfx.value && !P_IsLocalPlayer(player)) + if (!cv_kartinvinsfx.value && !P_IsLocalPlayer(player)) S_StartSound(player->mo, sfx_kinvnc); if (!player->kartstuff[k_invincibilitytimer]) { @@ -3279,7 +3279,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { if (P_IsLocalPlayer(player) && !player->exiting) S_ChangeMusicInternal("kgrow", true); - if (!cv_kartstarsfx.value && !P_IsLocalPlayer(player)) + if (!cv_kartinvinsfx.value && !P_IsLocalPlayer(player)) S_StartSound(player->mo, sfx_kgrow); K_PlayTauntSound(player->mo); player->mo->scalespeed = FRACUNIT/TICRATE; @@ -4394,17 +4394,17 @@ static void K_drawKartSpeedometer(void) fixed_t convSpeed; INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTOLEFT); - if (cv_speedometer.value == 1) + if (cv_kartspeedometer.value == 1) // Kilometers { convSpeed = FixedDiv(FixedMul(stplyr->speed, 142371), mapheaderinfo[gamemap-1]->mobj_scale)/FRACUNIT; // 2.172409058 V_DrawKartString(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, va("%3d km/h", convSpeed)); } - else if (cv_speedometer.value == 2) + else if (cv_kartspeedometer.value == 2) // Miles { convSpeed = FixedDiv(FixedMul(stplyr->speed, 88465), mapheaderinfo[gamemap-1]->mobj_scale)/FRACUNIT; // 1.349868774 V_DrawKartString(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, va("%3d mph", convSpeed)); } - else if (cv_speedometer.value == 3) + else if (cv_kartspeedometer.value == 3) // Fracunits { convSpeed = FixedDiv(stplyr->speed, mapheaderinfo[gamemap-1]->mobj_scale)/FRACUNIT; V_DrawKartString(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, va("%3d fu/t", convSpeed)); diff --git a/src/m_menu.c b/src/m_menu.c index 7146890f..f82ade5d 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -316,11 +316,13 @@ menu_t OP_SoundOptionsDef; static void M_ToggleSFX(void); static void M_ToggleDigital(void); static void M_ToggleMIDI(void); +static void M_RestartAudio(void); //Misc -menu_t OP_DataOptionsDef, OP_ScreenshotOptionsDef, OP_EraseDataDef; +menu_t /*OP_DataOptionsDef,*/ OP_ScreenshotOptionsDef, OP_EraseDataDef; +menu_t OP_HUDOptionsDef; menu_t OP_GameOptionsDef, OP_ServerOptionsDef; -menu_t OP_NetgameOptionsDef, OP_GametypeOptionsDef; +//menu_t OP_NetgameOptionsDef, OP_GametypeOptionsDef; menu_t OP_MonitorToggleDef; static void M_ScreenshotOptions(INT32 choice); static void M_EraseData(INT32 choice); @@ -1033,17 +1035,19 @@ static menuitem_t MP_PlayerSetupMenu[] = // Prefix: OP_ static menuitem_t OP_MainMenu[] = { - {IT_SUBMENU | IT_STRING, NULL, "Setup Controls...", &OP_ControlsDef, 10}, + {IT_SUBMENU|IT_STRING, NULL, "Control Setup...", &OP_ControlsDef, 10}, - {IT_SUBMENU | IT_STRING, NULL, "Video Options...", &OP_VideoOptionsDef, 30}, - {IT_SUBMENU | IT_STRING, NULL, "Sound Options...", &OP_SoundOptionsDef, 40}, - {IT_SUBMENU | IT_STRING, NULL, "Data Options...", &OP_DataOptionsDef, 50}, + {IT_SUBMENU|IT_STRING, NULL, "Video Options...", &OP_VideoOptionsDef, 30}, + {IT_SUBMENU|IT_STRING, NULL, "Sound Options...", &OP_SoundOptionsDef, 40}, - {IT_SUBMENU | IT_STRING, NULL, "Game Options...", &OP_GameOptionsDef, 70}, - {IT_SUBMENU | IT_STRING, NULL, "Server Options...", &OP_ServerOptionsDef, 80}, + {IT_SUBMENU|IT_STRING, NULL, "HUD Options...", &OP_HUDOptionsDef, 60}, + {IT_STRING|IT_CALL, NULL, "Screenshot Options...", M_ScreenshotOptions, 70}, - {IT_CALL | IT_STRING, NULL, "Play Credits", M_Credits, 100}, - {IT_KEYHANDLER | IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 110}, + {IT_SUBMENU|IT_STRING, NULL, "Gameplay Options...", &OP_GameOptionsDef, 90}, + {IT_SUBMENU|IT_STRING, NULL, "Server Options...", &OP_ServerOptionsDef, 100}, + + {IT_CALL|IT_STRING, NULL, "Play Credits", M_Credits, 120}, + {IT_SUBMENU|IT_STRING, NULL, "Erase Data...", &OP_EraseDataDef, 130}, }; static menuitem_t OP_ControlsMenu[] = @@ -1285,26 +1289,24 @@ static menuitem_t OP_Mouse2OptionsMenu[] = static menuitem_t OP_VideoOptionsMenu[] = { - {IT_STRING | IT_CALL, NULL, "Video Modes...", M_VideoModeMenu, 10}, - + {IT_STRING | IT_CALL, NULL, "Resolution Modes...", M_VideoModeMenu, 10}, #ifdef HWRENDER - {IT_SUBMENU|IT_STRING, NULL, "3D Card Options...", &OP_OpenGLOptionsDef, 20}, + {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 20}, #endif - #if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) - {IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 30}, + {IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 30}, #endif - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Brightness", &cv_usegamma, 50}, - {IT_STRING | IT_CVAR, NULL, "Draw Distance", &cv_drawdist, 60}, - {IT_STRING | IT_CVAR, NULL, "NiGHTS Draw Dist", &cv_drawdist_nights, 70}, - {IT_STRING | IT_CVAR, NULL, "Precip Draw Dist", &cv_drawdist_precip, 80}, - {IT_STRING | IT_CVAR, NULL, "Precip Density", &cv_precipdensity, 90}, + NULL, "Gamma", &cv_usegamma, 50}, - {IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 110}, - {IT_STRING | IT_CVAR, NULL, "Clear Before Redraw", &cv_homremoval, 120}, - {IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 130}, + {IT_STRING | IT_CVAR, NULL, "Draw Distance", &cv_drawdist, 70}, + {IT_STRING | IT_CVAR, NULL, "NiGHTS Draw Dist", &cv_drawdist_nights, 80}, + {IT_STRING | IT_CVAR, NULL, "Precip Draw Dist", &cv_drawdist_precip, 90}, + {IT_STRING | IT_CVAR, NULL, "Precip Density", &cv_precipdensity, 100}, + {IT_STRING | IT_CVAR, NULL, "Skyboxes", &cv_skybox, 110}, + + {IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 130}, + {IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 140}, }; static menuitem_t OP_VideoModeMenu[] = @@ -1315,7 +1317,7 @@ static menuitem_t OP_VideoModeMenu[] = #ifdef HWRENDER static menuitem_t OP_OpenGLOptionsMenu[] = { - {IT_STRING|IT_CVAR, NULL, "Field of view", &cv_grfov, 10}, + {IT_STRING|IT_CVAR, NULL, "Field of View", &cv_grfov, 10}, {IT_STRING|IT_CVAR, NULL, "Quality", &cv_scr_depth, 20}, {IT_STRING|IT_CVAR, NULL, "Texture Filter", &cv_grfiltermode, 30}, {IT_STRING|IT_CVAR, NULL, "Anisotropic", &cv_granisotropicmode,40}, @@ -1342,43 +1344,48 @@ static menuitem_t OP_OpenGLLightingMenu[] = static menuitem_t OP_OpenGLFogMenu[] = { {IT_STRING|IT_CVAR, NULL, "Fog", &cv_grfog, 10}, - {IT_STRING|IT_KEYHANDLER, NULL, "Fog color", M_HandleFogColor, 20}, - {IT_STRING|IT_CVAR, NULL, "Fog density", &cv_grfogdensity, 30}, + {IT_STRING|IT_KEYHANDLER, NULL, "Fog Color", M_HandleFogColor, 20}, + {IT_STRING|IT_CVAR, NULL, "Fog Density", &cv_grfogdensity, 30}, {IT_STRING|IT_CVAR, NULL, "Software Fog",&cv_grsoftwarefog,40}, }; static menuitem_t OP_OpenGLColorMenu[] = { - {IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "red", &cv_grgammared, 10}, - {IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "green", &cv_grgammagreen, 20}, - {IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "blue", &cv_grgammablue, 30}, + {IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "Red", &cv_grgammared, 10}, + {IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "Green", &cv_grgammagreen, 20}, + {IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "Blue", &cv_grgammablue, 30}, }; #endif static menuitem_t OP_SoundOptionsMenu[] = { - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Sound Volume" , &cv_soundvolume, 10}, - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Music Volume" , &cv_digmusicvolume, 20}, - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "MIDI Volume" , &cv_midimusicvolume, 30}, + {IT_STRING|IT_CVAR|IT_CV_SLIDER, + NULL, "SFX Volume", &cv_soundvolume, 10}, + {IT_STRING|IT_CVAR|IT_CV_SLIDER, + NULL, "Music Volume", &cv_digmusicvolume, 20}, + {IT_STRING|IT_CVAR|IT_CV_SLIDER, + NULL, "MIDI Volume", &cv_midimusicvolume, 30}, #ifdef PC_DOS - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "CD Volume" , &cd_volume, 40}, + {IT_STRING|IT_CVAR|IT_CV_SLIDER, + NULL, "CD Volume", &cd_volume, 40}, #endif + {IT_STRING|IT_CALL, NULL, "Toggle SFX", M_ToggleSFX, 50}, + {IT_STRING|IT_CALL, NULL, "Toggle Music", M_ToggleDigital, 60}, + {IT_STRING|IT_CALL, NULL, "Toggle MIDI", M_ToggleMIDI, 70}, + {IT_STRING|IT_CALL, NULL, "Restart Audio System", M_RestartAudio, 80}, - {IT_STRING | IT_CALL, NULL, "Toggle SFX" , M_ToggleSFX, 50}, - {IT_STRING | IT_CALL, NULL, "Toggle Digital Music", M_ToggleDigital, 60}, - {IT_STRING | IT_CALL, NULL, "Toggle MIDI Music", M_ToggleMIDI, 70}, + {IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 100}, + {IT_STRING|IT_CVAR, NULL, "Surround Sound", &surround, 110}, + + {IT_KEYHANDLER|IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 130}, }; -static menuitem_t OP_DataOptionsMenu[] = +/*static menuitem_t OP_DataOptionsMenu[] = { {IT_STRING | IT_CALL, NULL, "Screenshot Options...", M_ScreenshotOptions, 10}, {IT_STRING | IT_SUBMENU, NULL, "Erase Data...", &OP_EraseDataDef, 30}, -}; +};*/ static menuitem_t OP_ScreenshotOptionsMenu[] = { @@ -1416,63 +1423,69 @@ enum static menuitem_t OP_EraseDataMenu[] = { {IT_STRING | IT_CALL, NULL, "Erase Record Data", M_EraseData, 10}, - {IT_STRING | IT_CALL, NULL, "Erase Secrets Data", M_EraseData, 20}, + {IT_STRING | IT_CALL, NULL, "Erase Unlockable Data", M_EraseData, 20}, {IT_STRING | IT_CALL, NULL, "\x85" "Erase ALL Data", M_EraseData, 40}, }; +static menuitem_t OP_HUDOptionsMenu[] = +{ + {IT_STRING | IT_CVAR, NULL, "Show HUD", &cv_showhud, 10}, + {IT_STRING | IT_CVAR | IT_CV_SLIDER, + NULL, "HUD Visibility", &cv_translucenthud, 20}, + + {IT_STRING | IT_CVAR | IT_CV_SLIDER, + NULL, "Minimap Visibility", &cv_kartminimap, 40}, + {IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_kartspeedometer, 50}, + {IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 60}, + {IT_STRING | IT_CVAR, NULL, "Invinciblity SFX", &cv_kartinvinsfx, 70}, + + {IT_STRING | IT_CVAR, NULL, "Console Color", &cons_backcolor, 90}, + {IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize, 100}, +}; + static menuitem_t OP_GameOptionsMenu[] = { -#ifndef NONET - {IT_STRING | IT_CVAR | IT_CV_STRING, - NULL, "Master server", &cv_masterserver, 10}, -#endif - {IT_STRING | IT_CVAR, NULL, "Show HUD", &cv_showhud, 40}, - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "HUD Visibility", &cv_translucenthud, 50}, + {IT_STRING | IT_SUBMENU, NULL, "Random Item Toggles...", &OP_MonitorToggleDef, 10}, - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Minimap Visibility", &cv_kartminimap, 62}, - {IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_speedometer, 72}, - {IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 82}, - {IT_STRING | IT_CVAR, NULL, "Star SFX", &cv_kartstarsfx, 92}, + {IT_STRING | IT_CVAR, NULL, "Game Speed", &cv_kartspeed, 30}, + {IT_STRING | IT_CVAR, NULL, "Frantic Items", &cv_kartfrantic, 40}, + {IT_STRING | IT_CVAR, NULL, "Mirror Mode", &cv_kartmirror, 50}, -#ifdef SEENAMES - {IT_STRING | IT_CVAR, NULL, "HUD Player Names", &cv_seenames, 104}, -#endif - {IT_STRING | IT_CVAR, NULL, "Log Hazard Damage", &cv_hazardlog, 114}, + {IT_STRING | IT_CVAR, NULL, "Number of Laps", &cv_numlaps, 70}, + {IT_STRING | IT_CVAR, NULL, "Use Default Lap Counts", &cv_usemapnumlaps, 80}, + {IT_STRING | IT_CVAR, NULL, "Exit Countdown Timer", &cv_countdowntime, 90}, - {IT_STRING | IT_CVAR, NULL, "Console Back Color", &cons_backcolor, 126}, - {IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize,136}, - {IT_STRING | IT_CVAR, NULL, "Uppercase Console", &cv_allcaps, 146}, + //{IT_STRING | IT_CVAR, NULL, "Time Limit", &cv_timelimit, 110}, + {IT_STRING | IT_CVAR, NULL, "Starting Balloons", &cv_kartballoons, 110}, + {IT_STRING | IT_CVAR, NULL, "Karma Comeback", &cv_kartcomeback, 120}, - {IT_STRING | IT_CVAR, NULL, "Title Screen Demos", &cv_rollingdemos, 158}, + {IT_STRING | IT_CVAR, NULL, "Force Character #", &cv_forceskin, 140}, + {IT_STRING | IT_CVAR, NULL, "Restrict Character Changes", &cv_restrictskinchange, 150}, }; static menuitem_t OP_ServerOptionsMenu[] = { - {IT_STRING | IT_SUBMENU, NULL, "General netgame options...", &OP_NetgameOptionsDef, 10}, - {IT_STRING | IT_SUBMENU, NULL, "Gametype options...", &OP_GametypeOptionsDef, 20}, - {IT_STRING | IT_SUBMENU, NULL, "Random item toggles...", &OP_MonitorToggleDef, 30}, - #ifndef NONET {IT_STRING | IT_CVAR | IT_CV_STRING, - NULL, "Server name", &cv_servername, 50}, + NULL, "Server Name", &cv_servername, 10}, #endif - {IT_STRING | IT_CVAR, NULL, "Intermission Timer", &cv_inttime, 80}, - {IT_STRING | IT_CVAR, NULL, "Voting Timer", &cv_votetime, 90}, - {IT_STRING | IT_CVAR, NULL, "Advance to next map", &cv_advancemap, 100}, + {IT_STRING | IT_CVAR, NULL, "Intermission Timer", &cv_inttime, 40}, + {IT_STRING | IT_CVAR, NULL, "Voting Timer", &cv_votetime, 50}, + {IT_STRING | IT_CVAR, NULL, "Advance to Next Level", &cv_advancemap, 60}, #ifndef NONET - {IT_STRING | IT_CVAR, NULL, "Max Players", &cv_maxplayers, 120}, - {IT_STRING | IT_CVAR, NULL, "Allow players to join", &cv_allownewplayer, 130}, - {IT_STRING | IT_CVAR, NULL, "Allow WAD Downloading", &cv_downloading, 140}, - {IT_STRING | IT_CVAR, NULL, "Attempts to Resynch", &cv_resynchattempts, 150}, + {IT_STRING | IT_CVAR, NULL, "Max Player Count", &cv_maxplayers, 80}, + {IT_STRING | IT_CVAR, NULL, "Allow Players to Join", &cv_allownewplayer, 90}, + {IT_STRING | IT_CVAR, NULL, "Join on Map Change", &cv_joinnextround, 100}, + + {IT_STRING | IT_CVAR, NULL, "Allow WAD Downloading", &cv_downloading, 120}, + {IT_STRING | IT_CVAR, NULL, "Attempts to Resynch", &cv_resynchattempts, 130}, #endif }; -static menuitem_t OP_NetgameOptionsMenu[] = +/*static menuitem_t OP_NetgameOptionsMenu[] = { {IT_STRING | IT_CVAR, NULL, "Time Limit", &cv_timelimit, 10}, {IT_STRING | IT_CVAR, NULL, "Point Limit", &cv_pointlimit, 18}, @@ -1489,9 +1502,9 @@ static menuitem_t OP_NetgameOptionsMenu[] = //{IT_STRING | IT_CVAR, NULL, "Autobalance Teams", &cv_autobalance, 114}, //{IT_STRING | IT_CVAR, NULL, "Scramble Teams on Map Change", &cv_scrambleonchange, 122}, -}; +};*/ -static menuitem_t OP_GametypeOptionsMenu[] = +/*static menuitem_t OP_GametypeOptionsMenu[] = { {IT_HEADER, NULL, "RACE", NULL, 2}, {IT_STRING | IT_CVAR, NULL, "Game Speed", &cv_kartspeed, 10}, @@ -1502,7 +1515,7 @@ static menuitem_t OP_GametypeOptionsMenu[] = {IT_HEADER, NULL, "BATTLE", NULL, 50}, {IT_STRING | IT_CVAR, NULL, "Starting Balloons", &cv_kartballoons, 58}, {IT_STRING | IT_CVAR, NULL, "Karma Comeback", &cv_kartcomeback, 66}, -}; +};*/ static menuitem_t OP_MonitorToggleMenu[] = { @@ -1804,7 +1817,7 @@ menu_t OP_MainDef = sizeof (OP_MainMenu)/sizeof (menuitem_t), &MainDef, OP_MainMenu, - M_DrawSkyRoom, + M_DrawGenericMenu, 60, 30, 0, NULL @@ -1856,13 +1869,26 @@ menu_t OP_VideoModeDef = 0, NULL }; -menu_t OP_SoundOptionsDef = DEFAULTMENUSTYLE("M_SOUND", OP_SoundOptionsMenu, &OP_MainDef, 60, 30); + +menu_t OP_SoundOptionsDef = +{ + "M_SOUND", + sizeof (OP_SoundOptionsMenu)/sizeof (menuitem_t), + &OP_MainDef, + OP_SoundOptionsMenu, + M_DrawSkyRoom, + 60, 30, + 0, + NULL +}; + +menu_t OP_HUDOptionsDef = DEFAULTMENUSTYLE("M_HUD", OP_HUDOptionsMenu, &OP_MainDef, 30, 30); menu_t OP_GameOptionsDef = DEFAULTMENUSTYLE("M_GAME", OP_GameOptionsMenu, &OP_MainDef, 30, 30); menu_t OP_ServerOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_ServerOptionsMenu, &OP_MainDef, 30, 30); -menu_t OP_NetgameOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_NetgameOptionsMenu, &OP_ServerOptionsDef, 30, 30); -menu_t OP_GametypeOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_GametypeOptionsMenu, &OP_ServerOptionsDef, 30, 30); -menu_t OP_MonitorToggleDef = DEFAULTMENUSTYLE("M_SERVER", OP_MonitorToggleMenu, &OP_ServerOptionsDef, 30, 30); +//menu_t OP_NetgameOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_NetgameOptionsMenu, &OP_ServerOptionsDef, 30, 30); +//menu_t OP_GametypeOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_GametypeOptionsMenu, &OP_ServerOptionsDef, 30, 30); +menu_t OP_MonitorToggleDef = DEFAULTMENUSTYLE("M_GAME", OP_MonitorToggleMenu, &OP_GameOptionsDef, 30, 30); /*menu_t OP_MonitorToggleDef = { "M_SERVER", @@ -1903,9 +1929,9 @@ menu_t OP_OpenGLColorDef = NULL }; #endif -menu_t OP_DataOptionsDef = DEFAULTMENUSTYLE("M_DATA", OP_DataOptionsMenu, &OP_MainDef, 60, 30); -menu_t OP_ScreenshotOptionsDef = DEFAULTMENUSTYLE("M_DATA", OP_ScreenshotOptionsMenu, &OP_DataOptionsDef, 30, 30); -menu_t OP_EraseDataDef = DEFAULTMENUSTYLE("M_DATA", OP_EraseDataMenu, &OP_DataOptionsDef, 60, 30); +//menu_t OP_DataOptionsDef = DEFAULTMENUSTYLE("M_DATA", OP_DataOptionsMenu, &OP_MainDef, 60, 30); +menu_t OP_ScreenshotOptionsDef = DEFAULTMENUSTYLE("M_DATA", OP_ScreenshotOptionsMenu, &OP_MainDef, 30, 30); +menu_t OP_EraseDataDef = DEFAULTMENUSTYLE("M_DATA", OP_EraseDataMenu, &OP_MainDef, 60, 30); // ========================================================================== // CVAR ONCHANGE EVENTS GO HERE @@ -4160,13 +4186,12 @@ static void M_Options(INT32 choice) { (void)choice; - // if the player is not admin or server, disable server options - OP_MainMenu[5].status = (Playing() && !(server || IsPlayerAdmin(consoleplayer))) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); + // if the player is not admin or server, disable gameplay & server options + OP_MainMenu[5].status = OP_MainMenu[6].status = (Playing() && !(server || IsPlayerAdmin(consoleplayer))) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); - // if the player is playing _at all_, disable the erase data options - OP_DataOptionsMenu[1].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); - // SRB2Kart: Same with the "Play Credits" option - OP_MainMenu[6].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL); + // if the player is playing _at all_, disable the erase data & credits options + OP_MainMenu[7].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL); + OP_MainMenu[8].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); OP_MainDef.prevMenu = currentMenu; M_SetupNextMenu(&OP_MainDef); @@ -7695,6 +7720,21 @@ static void M_ToggleMIDI(void) } } +static void M_RestartAudio(void) +{ + S_StopMusic(); + I_ShutdownMusic(); + I_ShutdownSound(); + I_StartupSound(); + I_InitMusic(); + + I_SetSfxVolume(cv_soundvolume.value); + I_SetDigMusicVolume(cv_digmusicvolume.value); + I_SetMIDIMusicVolume(cv_midimusicvolume.value); + if (Playing()) // Gotta make sure the player is in a level + P_RestoreMusic(&players[consoleplayer]); +} + // =============== // VIDEO MODE MENU // =============== diff --git a/src/r_main.c b/src/r_main.c index c516b87a..6e1823e4 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -170,7 +170,7 @@ consvar_t cv_drawdist_precip = {"drawdist_precip", "1024", CV_SAVE, drawdist_con consvar_t cv_precipdensity = {"precipdensity", "Moderate", CV_SAVE, precipdensity_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // Okay, whoever said homremoval causes a performance hit should be shot. -consvar_t cv_homremoval = {"homremoval", "No", CV_SAVE, homremoval_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_homremoval = {"homremoval", "Yes", CV_SAVE, homremoval_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_maxportals = {"maxportals", "2", CV_SAVE, maxportals_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; diff --git a/src/s_sound.c b/src/s_sound.c index 0a352e9b..5dc53b65 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -88,7 +88,7 @@ consvar_t cv_numChannels = {"snd_channels", "8", CV_SAVE|CV_CALL, CV_Unsigned, S consvar_t cv_numChannels = {"snd_channels", "32", CV_SAVE|CV_CALL, CV_Unsigned, SetChannelsNum, 0, NULL, NULL, 0, 0, NULL}; #endif -static consvar_t surround = {"surround", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t surround = {"surround", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; #define S_MAX_VOLUME 127 diff --git a/src/s_sound.h b/src/s_sound.h index 39ec769a..3daebf38 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -25,6 +25,7 @@ extern consvar_t stereoreverse; extern consvar_t cv_soundvolume, cv_digmusicvolume, cv_midimusicvolume; extern consvar_t cv_numChannels; +extern consvar_t surround; #ifdef SNDSERV extern consvar_t sndserver_cmd, sndserver_arg; diff --git a/src/v_video.c b/src/v_video.c index ac0eed17..6435e413 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -41,7 +41,7 @@ UINT8 *screens[5]; static CV_PossibleValue_t gamma_cons_t[] = {{0, "MIN"}, {4, "MAX"}, {0, NULL}}; static void CV_usegamma_OnChange(void); -consvar_t cv_ticrate = {"showfps", "No", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_ticrate = {"showfps", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_usegamma = {"gamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_usegamma_OnChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_allcaps = {"allcaps", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};