Filled in the rest of the menus

Sound is only partially functional, video mode completely nonfunctional, but it makes no sense adjusting them to the current backend code when it's due for replacement.
This commit is contained in:
Christoph Oelckers 2019-12-05 00:47:05 +01:00
parent 1b1fad6e13
commit 628bd9efc6
13 changed files with 400 additions and 743 deletions

View file

@ -223,8 +223,7 @@ CGameMenuItemTitle itemOptionsOldTitle("OPTIONS", 1, 160, 20, 2038);
CGameMenuItemChain itemOption1("CONTROLS...", 3, 0, 40, 320, 1, &menuControls, -1, NULL, 0);
CGameMenuItemSlider sliderDetail("DETAIL:", 3, 66, 50, 180, gDetail, 0, 4, 1, SetDetail, -1, -1);
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);
-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);
@ -299,7 +298,6 @@ CGameMenuItemChain itemNetStart12("START GAME", 1, 66, 175, 280, 0, 0, -1, Start
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);
CGameMenuItemZBool itemSounds3DAudio("3D SOUND:", 3, 40, 90, 180, snd_doppler, SetDoppler, NULL, NULL);
@ -591,7 +589,6 @@ CGameMenuItemZBool itemOptionsSoundSoundToggle("SOUND:", 3, 66, 60, 180, false,
CGameMenuItemZBool itemOptionsSoundMusicToggle("MUSIC:", 3, 66, 70, 180, false, UpdateMusicToggle, NULL, NULL);
CGameMenuItemZBool itemOptionsSound3DToggle("3D AUDIO:", 3, 66, 80, 180, false, Update3DToggle, NULL, NULL);
CGameMenuItemSlider itemOptionsSoundSoundVolume("SOUND VOLUME:", 3, 66, 90, 180, &snd_fxvolume.Value, 0, 256, 48, UpdateSoundVolume, -1, -1, kMenuSliderPercent);
CGameMenuItemSlider itemOptionsSoundMusicVolume("MUSIC VOLUME:", 3, 66, 100, 180, &mus_volume.Value, 0, 256, 48, UpdateMusicVolume, -1, -1, kMenuSliderPercent);
CGameMenuItemZCycle itemOptionsSoundSampleRate("SAMPLE RATE:", 3, 66, 110, 180, 0, UpdateSoundRate, pzSoundRateStrings, 3, 0);
CGameMenuItemSlider itemOptionsSoundNumVoices("VOICES:", 3, 66, 120, 180, snd_numvoices, 16, 256, 16, UpdateNumVoices, -1, -1, kMenuSliderValue);
CGameMenuItemZBool itemOptionsSoundCDToggle("REDBOOK AUDIO:", 3, 66, 130, 180, false, UpdateCDToggle, NULL, NULL);
@ -758,8 +755,7 @@ void SetupOptionsOldMenu(void)
{
sliderDetail.nValue = ClipRange(gDetail, sliderDetail.nRangeLow, sliderDetail.nRangeHigh);
sliderGamma.nValue = ClipRange(gGamma, sliderGamma.nRangeLow, sliderGamma.nRangeHigh);
sliderMusic.nValue = ClipRange(mus_volume, sliderMusic.nRangeLow, sliderMusic.nRangeHigh);
sliderSound.nValue = ClipRange(snd_fxvolume, sliderSound.nRangeLow, sliderSound.nRangeHigh);
bool3DAudio.at20 = snd_doppler;
boolCrosshair.at20 = cl_crosshair;
itemCycleShowWeapons.m_nFocus = cl_showweapon;
@ -1016,8 +1012,6 @@ void SetupLoadGameMenu(void)
void SetupSoundsMenu(void)
{
itemSoundsMusic.nValue = ClipRange(mus_volume, itemSoundsMusic.nRangeLow, itemSoundsMusic.nRangeHigh);
itemSoundsSound.nValue = ClipRange(snd_fxvolume, itemSoundsSound.nRangeLow, itemSoundsSound.nRangeHigh);
menuSounds.Add(&itemSoundsTitle, false);
menuSounds.Add(&itemSoundsMusic, true);
menuSounds.Add(&itemSoundsSound, false);
@ -1419,17 +1413,6 @@ void SetGamma(CGameMenuItemSlider *pItem)
scrSetGamma(gGamma);
}
void SetMusicVol(CGameMenuItemSlider *pItem)
{
mus_volume = pItem->nValue;
}
void SetSoundVol(CGameMenuItemSlider *pItem)
{
snd_fxvolume = pItem->nValue;
sndSetFXVolume(pItem->nValue);
}
void SetCDVol(CGameMenuItemSlider *pItem)
{
UNREFERENCED_PARAMETER(pItem);
@ -1773,12 +1756,6 @@ void UpdateSoundVolume(CGameMenuItemSlider *pItem)
{
sndSetFXVolume(pItem->nValue);
}
void UpdateMusicVolume(CGameMenuItemSlider *pItem)
{
mus_volume = pItem->nValue;
}
void UpdateSoundRate(CGameMenuItemZCycle *pItem)
{
UNREFERENCED_PARAMETER(pItem);

View file

@ -75,156 +75,6 @@ SAMPLE2D * FindChannel(void)
return NULL;
}
#if 0
DICTNODE *hSong;
char *pSongPtr;
int nSongSize;
bool bWaveMusic;
int nWaveMusicHandle;
int sndPlaySong(const char *, const char* songName, bool bLoop)
{
if (!MusicEnabled())
return 0;
if (!songName || strlen(songName) == 0)
return 1;
auto fp = S_OpenAudio(songName, 0, 1);
if (!fp.isOpen())
{
hSong = gSoundRes.Lookup(songName, "MID");
if (!hSong)
{
OSD_Printf(OSD_ERROR "sndPlaySong(): error: can't open \"%s\" for playback!\n", songName);
return 2;
}
int nNewSongSize = hSong->Size();
char *pNewSongPtr = (char *)Xaligned_alloc(16, nNewSongSize);
memcpy(pNewSongPtr, hSong->Lock(), nNewSongSize);
hSong->Unlock(true);
MUSIC_SetVolume(mus_volume);
int32_t retval = MUSIC_PlaySong(pNewSongPtr, nNewSongSize, bLoop);
if (retval != MUSIC_Ok)
{
ALIGNED_FREE_AND_NULL(pNewSongPtr);
return 5;
}
if (bWaveMusic && nWaveMusicHandle >= 0)
{
FX_StopSound(nWaveMusicHandle);
nWaveMusicHandle = -1;
}
bWaveMusic = false;
ALIGNED_FREE_AND_NULL(pSongPtr);
pSongPtr = pNewSongPtr;
nSongSize = nNewSongSize;
return 0;
}
int32_t nSongLen = fp.Tell();
if (EDUKE32_PREDICT_FALSE(nSongLen < 4))
{
OSD_Printf(OSD_ERROR "sndPlaySong(): error: empty music file \"%s\"\n", songName);
return 3;
}
char * pNewSongPtr = (char *)Xaligned_alloc(16, nSongLen);
int nNewSongSize = fp.Read(pNewSongPtr, nSongLen);
if (EDUKE32_PREDICT_FALSE(nNewSongSize != nSongLen))
{
OSD_Printf(OSD_ERROR "sndPlaySong(): error: read %d bytes from \"%s\", expected %d\n",
nNewSongSize, songName, nSongLen);
ALIGNED_FREE_AND_NULL(pNewSongPtr);
return 4;
}
if (!Bmemcmp(pNewSongPtr, "MThd", 4))
{
int32_t retval = MUSIC_PlaySong(pNewSongPtr, nNewSongSize, bLoop);
if (retval != MUSIC_Ok)
{
ALIGNED_FREE_AND_NULL(pNewSongPtr);
return 5;
}
if (bWaveMusic && nWaveMusicHandle >= 0)
{
FX_StopSound(nWaveMusicHandle);
nWaveMusicHandle = -1;
}
bWaveMusic = false;
ALIGNED_FREE_AND_NULL(pSongPtr);
pSongPtr = pNewSongPtr;
nSongSize = nNewSongSize;
}
else
{
int nNewWaveMusicHandle = FX_Play(pNewSongPtr, bLoop ? nNewSongSize : -1, 0, 0, 0, mus_volume, mus_volume, mus_volume,
FX_MUSIC_PRIORITY, 1.f, (intptr_t)&nWaveMusicHandle);
if (nNewWaveMusicHandle <= FX_Ok)
{
ALIGNED_FREE_AND_NULL(pNewSongPtr);
return 5;
}
if (bWaveMusic && nWaveMusicHandle >= 0)
FX_StopSound(nWaveMusicHandle);
MUSIC_StopSong();
nWaveMusicHandle = nNewWaveMusicHandle;
bWaveMusic = true;
ALIGNED_FREE_AND_NULL(pSongPtr);
pSongPtr = pNewSongPtr;
nSongSize = nNewSongSize;
}
return 0;
}
bool sndIsSongPlaying(void)
{
//return MUSIC_SongPlaying();
return false;
}
void sndFadeSong(int nTime)
{
UNREFERENCED_PARAMETER(nTime);
if (bWaveMusic && nWaveMusicHandle >= 0)
{
FX_StopSound(nWaveMusicHandle);
nWaveMusicHandle = -1;
bWaveMusic = false;
}
// MUSIC_SetVolume(0);
MUSIC_StopSong();
}
void sndStopSong(void)
{
if (bWaveMusic && nWaveMusicHandle >= 0)
{
FX_StopSound(nWaveMusicHandle);
nWaveMusicHandle = -1;
bWaveMusic = false;
}
MUSIC_StopSong();
ALIGNED_FREE_AND_NULL(pSongPtr);
nSongSize = 0;
}
#else
int sndPlaySong(const char *mapname, const char* songName, bool bLoop)
{
return Mus_Play(mapname, songName, bLoop);
@ -245,7 +95,6 @@ void sndStopSong(void)
{
Mus_Stop();
}
#endif
void sndSetFXVolume(int nVolume)
{
@ -450,34 +299,6 @@ void DeinitSoundDevice(void)
ThrowError(FX_ErrorString(nStatus));
}
#if 0
void InitMusicDevice(void)
{
int nStatus;
if ((nStatus = MUSIC_Init(MusicDevice)) == MUSIC_Ok)
{
if (MusicDevice == ASS_AutoDetect)
MusicDevice = MIDI_GetDevice();
}
else if ((nStatus = MUSIC_Init(ASS_AutoDetect)) == MUSIC_Ok)
{
initprintf("InitMusicDevice: %s\n", MUSIC_ErrorString(nStatus));
return;
}
DICTNODE *hTmb = gSoundRes.Lookup("GMTIMBRE", "TMB");
if (hTmb)
AL_RegisterTimbreBank((unsigned char*)gSoundRes.Load(hTmb));
MUSIC_SetVolume(mus_volume);
}
void DeinitMusicDevice(void)
{
FX_StopAllSounds();
int nStatus = MUSIC_Shutdown();
if (nStatus != 0)
ThrowError(MUSIC_ErrorString(nStatus));
}
#endif
bool sndActive = false;

View file

@ -187,14 +187,6 @@ CUSTOM_CVARD(Int, snd_speech, 5, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enables/disabl
else if (self > 5) self = 5;
}
int MusicDevice = ASS_WinMM;
CUSTOM_CVARD(Int, mus_device, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "selects music device")
{
if (self < 0) self = 0;
else if (self > 1) self = 1;
else MusicDevice = self? ASS_WinMM : ASS_OPL3; // must be copied because it gets altered by the music code.
}
// HUD

View file

@ -46,7 +46,6 @@ EXTERN_CVAR(Int, snd_mixrate)
EXTERN_CVAR(Int, snd_numchannels)
EXTERN_CVAR(Int, snd_numvoices)
EXTERN_CVAR(Int, snd_speech)
EXTERN_CVAR(Int, mus_volume)
EXTERN_CVAR(Int, mus_device)
extern int MusicDevice;

View file

@ -115,17 +115,17 @@ CUSTOM_CVAR(Bool, cd_enabled, true, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBAL
// Maximum volume of MOD/stream music.
//==========================================================================
CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls music volume")
CUSTOM_CVARD(Float, mus_volume, 0.5, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls music volume")
{
if (self < 0) self = 0;
else if (self > 255) self = 255;
else if (self > 1) self = 1;
else
{
// Set general music volume.
ChangeMusicSetting(ZMusic::snd_musicvolume, nullptr, self / 255.f);
ChangeMusicSetting(ZMusic::snd_musicvolume, nullptr, self);
if (GSnd != nullptr)
{
GSnd->SetMusicVolume(clamp<float>(self / 255.f * relative_volume/* * snd_mastervolume*/, 0, 1));
GSnd->SetMusicVolume(clamp<float>(self * relative_volume/* * snd_mastervolume*/, 0, 1));
}
// For music not implemented through the digital sound system,
// let them know about the change.

View file

@ -224,26 +224,6 @@ static MenuEntry_t *MEL_DISPLAYSETUP_GL[] = {
#ifdef USE_OPENGL
static MenuOption_t MEO_RENDERERSETUP_HIGHTILE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &hw_hightile );
static MenuEntry_t ME_RENDERERSETUP_HIGHTILE = MAKE_MENUENTRY( "True color textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_HIGHTILE, Option );
static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &r_precache );
static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( "Pre-load map textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_PRECACHE, Option );
# ifndef EDUKE32_GLES
static char const *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compr.", };
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTIONSET( MEOSN_RENDERERSETUP_TEXCACHE, NULL, 0x2 );
# endif
# ifdef USE_GLEXT
static MenuOption_t MEO_RENDERERSETUP_DETAILTEX = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &hw_detailmapping );
static MenuEntry_t ME_RENDERERSETUP_DETAILTEX = MAKE_MENUENTRY( "Detail textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_DETAILTEX, Option );
static MenuOption_t MEO_RENDERERSETUP_GLOWTEX = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_NoYes, &hw_glowmapping);
static MenuEntry_t ME_RENDERERSETUP_GLOWTEX = MAKE_MENUENTRY("Glow textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_GLOWTEX, Option);
# endif
static MenuOption_t MEO_RENDERERSETUP_MODELS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &hw_models );
static MenuEntry_t ME_RENDERERSETUP_MODELS = MAKE_MENUENTRY( "3D models:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_MODELS, Option );
#endif
#ifdef USE_OPENGL
@ -312,7 +292,6 @@ static char const s_Volume[] = "Volume:";
static MenuRangeInt32_t MEO_SOUND_VOLUME_FX = MAKE_MENURANGE( &snd_fxvolume, &MF_Redfont, 0, 255, 0, 33, 2 );
static MenuEntry_t ME_SOUND_VOLUME_FX = MAKE_MENUENTRY( s_Volume, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SOUND_VOLUME_FX, RangeInt32 );
static MenuRangeInt32_t MEO_SOUND_VOLUME_MUSIC = MAKE_MENURANGE( &mus_volume, &MF_Redfont, 0, 255, 0, 33, 2 );
static MenuEntry_t ME_SOUND_VOLUME_MUSIC = MAKE_MENUENTRY( s_Volume, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SOUND_VOLUME_MUSIC, RangeInt32 );
#ifndef EDUKE32_STANDALONE
@ -398,104 +377,11 @@ static MenuEntry_t *MEL_SAVESETUP[] = {
&ME_SAVESETUP_CLEANUP,
};
#define NoTitle NULL
#define MAKE_MENUMENU(Title, Format, Entries) { Title, Format, Entries, ARRAY_SIZE(Entries), 0, 0, 0 }
#define MAKE_MENUMENU_CUSTOMSIZE(Title, Format, Entries) { Title, Format, Entries, 0, 0, 0, 0 }
#ifndef EDUKE32_SIMPLE_MENU
static MenuMenu_t M_GAMESETUP = MAKE_MENUMENU( "Game Setup", &MMF_BigOptions, MEL_GAMESETUP );
#endif
static MenuMenu_t M_OPTIONS = MAKE_MENUMENU( s_Options, &MMF_Top_Options, MEL_OPTIONS );
static MenuMenu_t M_VIDEOSETUP = MAKE_MENUMENU( "Video Mode", &MMF_BigOptions, MEL_VIDEOSETUP );
static MenuMenu_t M_KEYBOARDSETUP = MAKE_MENUMENU( "Configure Controls", &MMF_Top_Options, MEL_KEYBOARDSETUP );
static MenuMenu_t M_CONTROLS = MAKE_MENUMENU( "Control Setup", &MMF_BigOptions, MEL_CONTROLS );
static MenuMenu_t M_CHEATS = MAKE_MENUMENU( "Cheats", &MMF_SmallOptions, MEL_CHEATS );
static MenuMenu_t M_MOUSESETUP = MAKE_MENUMENU( "Mouse Setup", &MMF_BigOptions, MEL_MOUSESETUP );
static MenuMenu_t M_JOYSTICKSETUP = MAKE_MENUMENU( "Gamepad Setup", &MMF_BigOptions, MEL_JOYSTICKSETUP );
static MenuMenu_t M_JOYSTICKAXES = MAKE_MENUMENU( "Gamepad Axes", &MMF_BigSliders, MEL_JOYSTICKAXES );
static MenuMenu_t M_KEYBOARDKEYS = MAKE_MENUMENU( "Key Configuration", &MMF_KeyboardSetupFuncs, MEL_KEYBOARDSETUPFUNCS );
static MenuMenu_t M_MOUSEADVANCED = MAKE_MENUMENU( "Advanced Mouse", &MMF_BigSliders, MEL_MOUSEADVANCED );
static MenuMenu_t M_JOYSTICKAXIS = MAKE_MENUMENU( NULL, &MMF_BigSliders, MEL_JOYSTICKAXIS );
#ifdef USE_OPENGL
static MenuMenu_t M_RENDERERSETUP_POLYMOST = MAKE_MENUMENU( "Polymost Setup", &MMF_SmallOptions, MEL_RENDERERSETUP_POLYMOST );
#endif
static MenuMenu_t M_COLCORR = MAKE_MENUMENU( "Color Correction", &MMF_ColorCorrect, MEL_COLCORR );
static MenuMenu_t M_SCREENSETUP = MAKE_MENUMENU( "HUD Setup", &MMF_BigOptions, MEL_SCREENSETUP );
static MenuMenu_t M_DISPLAYSETUP = MAKE_MENUMENU( "Display Setup", &MMF_BigOptions, MEL_DISPLAYSETUP );
static MenuMenu_t M_LOAD = MAKE_MENUMENU_CUSTOMSIZE( s_LoadGame, &MMF_LoadSave, MEL_LOAD );
static MenuMenu_t M_SAVE = MAKE_MENUMENU_CUSTOMSIZE( s_SaveGame, &MMF_LoadSave, MEL_SAVE );
static MenuMenu_t M_SOUND = MAKE_MENUMENU( "Sound Setup", &MMF_BigOptions, MEL_SOUND );
static MenuMenu_t M_ADVSOUND = MAKE_MENUMENU( "Advanced Sound", &MMF_BigOptions, MEL_ADVSOUND );
static MenuMenu_t M_SAVESETUP = MAKE_MENUMENU( "Save Setup", &MMF_BigOptions, MEL_SAVESETUP );
static MenuMenu_t M_NETWORK = MAKE_MENUMENU( "Network Game", &MMF_Top_Joystick_Network, MEL_NETWORK );
static MenuMenu_t M_PLAYER = MAKE_MENUMENU( "Player Setup", &MMF_SmallOptions, MEL_PLAYER );
static MenuMenu_t M_MACROS = MAKE_MENUMENU( "Multiplayer Macros", &MMF_Macros, MEL_MACROS );
static MenuMenu_t M_NETHOST = MAKE_MENUMENU( "Host Network Game", &MMF_SmallOptionsNarrow, MEL_NETHOST );
static MenuMenu_t M_NETOPTIONS = MAKE_MENUMENU( "Net Game Options", &MMF_NetSetup, MEL_NETOPTIONS );
static MenuMenu_t M_NETJOIN = MAKE_MENUMENU( "Join Network Game", &MMF_SmallOptionsNarrow, MEL_NETJOIN );
static MenuPanel_t M_CREDITS4 = { "About " APPNAME, MENU_CREDITS3, MA_Return, MENU_CREDITS5, MA_Advance, };
static MenuPanel_t M_CREDITS5 = { "About " APPNAME, MENU_CREDITS4, MA_Return, MENU_CREDITS, MA_Advance, };
#define CURSOR_CENTER_2LINE { MENU_MARGIN_CENTER<<16, 120<<16, }
#define CURSOR_CENTER_3LINE { MENU_MARGIN_CENTER<<16, 129<<16, }
#define CURSOR_BOTTOMRIGHT { 304<<16, 186<<16, }
static MenuVerify_t M_SAVECLEANVERIFY = { CURSOR_CENTER_3LINE, MENU_SAVESETUP, MA_None, };
static MenuVerify_t M_QUIT = { CURSOR_CENTER_2LINE, MENU_CLOSE, MA_None, };
static MenuVerify_t M_QUITTOTITLE = { CURSOR_CENTER_2LINE, MENU_CLOSE, MA_None, };
static MenuVerify_t M_LOADVERIFY = { CURSOR_CENTER_3LINE, MENU_CLOSE, MA_None, };
static MenuVerify_t M_LOADDELVERIFY = { CURSOR_CENTER_3LINE, MENU_LOAD, MA_None, };
static MenuVerify_t M_NEWVERIFY = { CURSOR_CENTER_2LINE, MENU_EPISODE, MA_Advance, };
static MenuVerify_t M_SAVEVERIFY = { CURSOR_CENTER_2LINE, MENU_SAVE, MA_None, };
static MenuVerify_t M_SAVEDELVERIFY = { CURSOR_CENTER_3LINE, MENU_SAVE, MA_None, };
static MenuVerify_t M_RESETPLAYER = { CURSOR_CENTER_3LINE, MENU_CLOSE, MA_None, };
static MenuVerify_t M_COLCORRRESETVERIFY = { CURSOR_CENTER_2LINE, MENU_COLCORR, MA_None, };
static MenuVerify_t M_KEYSRESETVERIFY = { CURSOR_CENTER_2LINE, MENU_KEYBOARDSETUP, MA_None, };
static MenuVerify_t M_KEYSCLASSICVERIFY = { CURSOR_CENTER_2LINE, MENU_KEYBOARDSETUP, MA_None, };
static MenuVerify_t M_JOYSTANDARDVERIFY = { CURSOR_CENTER_2LINE, MENU_JOYSTICKSETUP, MA_None, };
static MenuVerify_t M_JOYPROVERIFY = { CURSOR_CENTER_2LINE, MENU_JOYSTICKSETUP, MA_None, };
static MenuVerify_t M_JOYCLEARVERIFY = { CURSOR_CENTER_2LINE, MENU_JOYSTICKSETUP, MA_None, };
static MenuMessage_t M_NETWAITMASTER = { CURSOR_BOTTOMRIGHT, MENU_NULL, MA_None, };
static MenuMessage_t M_NETWAITVOTES = { CURSOR_BOTTOMRIGHT, MENU_NULL, MA_None, };
static MenuMessage_t M_BUYDUKE = { CURSOR_BOTTOMRIGHT, MENU_EPISODE, MA_Return, };
static MenuTextForm_t M_ADULTPASSWORD = { NULL, "Enter Password:", MAXPWLOCKOUT, MTF_Password };
static MenuTextForm_t M_CHEATENTRY = { NULL, "Enter Cheat Code:", MAXCHEATLEN, 0 };
static MenuTextForm_t M_CHEAT_WARP = { NULL, "Enter Warp #:", 3, 0 };
static MenuTextForm_t M_CHEAT_SKILL = { NULL, "Enter Skill #:", 1, 0 };
/*
This function prepares data after ART and CON have been processed.
It also initializes some data in loops rather than statically at compile time.
*/
void Menu_Init(void)
{
int32_t i, j, k;
if (FURY)
{
MMF_Top_Skill.pos.x = (320<<15);
ME_SKILL_TEMPLATE.format = &MEF_LeftMenu;
}
++k;
MEOS_NETOPTIONS_GAMETYPE.numOptions = k;
if (NAM_WW2GI)
ME_NETOPTIONS_MONSTERS.name = "Enemies";
// prepare cheats
for (i = 0; i < NUMCHEATFUNCS; ++i)
MEL_CHEATS[i+1] = &ME_CheatCodes[i];
// prepare shareware
if (VOLUMEONE)
{
@ -536,46 +422,6 @@ static void Menu_Pre(MenuID_t cm)
switch (cm)
{
case MENU_GAMESETUP:
MEO_GAMESETUP_DEMOREC.options = (ps->gm&MODE_GAME) ? &MEOS_DemoRec : &MEOS_OffOn;
MenuEntry_DisableOnCondition(&ME_GAMESETUP_DEMOREC, (ps->gm&MODE_GAME) && m_recstat != 1);
break;
case MENU_DISPLAYSETUP:
MenuEntry_HideOnCondition(&ME_DISPLAYSETUP_VOXELS, !g_haveVoxels);
#ifdef USE_OPENGL
if (videoGetRenderMode() == REND_CLASSIC)
MenuMenu_ChangeEntryList(M_DISPLAYSETUP, MEL_DISPLAYSETUP);
else
MenuMenu_ChangeEntryList(M_DISPLAYSETUP, MEL_DISPLAYSETUP_GL);
MEO_SCREENSETUP_SCREENSIZE.steps = !(ud.statusbarflags & STATUSBAR_NONONE) +
!(ud.statusbarflags & STATUSBAR_NOMODERN) +
!(ud.statusbarflags & STATUSBAR_NOMINI) +
!(ud.statusbarflags & STATUSBAR_NOOVERLAY) +
!(ud.statusbarflags & STATUSBAR_NOFULL) +
!(ud.statusbarflags & STATUSBAR_NOSHRINK) * 14;
MEO_SCREENSETUP_SCREENSIZE.max = MEO_SCREENSETUP_SCREENSIZE.steps - 1;
if (MEO_SCREENSETUP_SCREENSIZE.steps <= 2 && !(ud.statusbarflags & STATUSBAR_NONONE))
{
ME_SCREENSETUP_SCREENSIZE.entry = &MEO_SCREENSETUP_SCREENSIZE_TWO;
ME_SCREENSETUP_SCREENSIZE.type = Option;
}
else
{
ME_SCREENSETUP_SCREENSIZE.entry = &MEO_SCREENSETUP_SCREENSIZE;
ME_SCREENSETUP_SCREENSIZE.type = RangeInt32;
}
MenuEntry_HideOnCondition(&ME_SCREENSETUP_SCREENSIZE, (MEO_SCREENSETUP_SCREENSIZE.steps < 2));
break;
case MENU_POLYMER:
case MENU_POLYMOST:
MenuEntry_DisableOnCondition(&ME_RENDERERSETUP_PRECACHE, !hw_hightile);
MenuEntry_DisableOnCondition(&ME_RENDERERSETUP_DETAILTEX, !hw_hightile);
MenuEntry_DisableOnCondition(&ME_RENDERERSETUP_GLOWTEX, !hw_hightile);
#endif
break;
case MENU_VIDEOSETUP:
@ -642,47 +488,7 @@ static void Menu_Pre(MenuID_t cm)
soundvoices == snd_numvoices);
break;
case MENU_SAVESETUP:
MenuEntry_DisableOnCondition(&ME_SAVESETUP_MAXAUTOSAVES, !cl_autosavedeletion);
break;
case MENU_JOYSTICKSETUP:
MenuEntry_DisableOnCondition(&ME_JOYSTICK_EDITBUTTONS, !CONTROL_JoyPresent || (joystick.numButtons == 0 && joystick.numHats == 0));
MenuEntry_DisableOnCondition(&ME_JOYSTICK_EDITAXES, !CONTROL_JoyPresent || joystick.numAxes == 0);
MenuEntry_DisableOnCondition(&ME_JOYSTICK_DEFAULTS_STANDARD, !joystick.isGameController);
MenuEntry_DisableOnCondition(&ME_JOYSTICK_DEFAULTS_PRO, !joystick.isGameController);
break;
case MENU_NETOPTIONS:
if (MEOSV_NetEpisodes[MEO_NETOPTIONS_EPISODE.currentOption] == MAXVOLUMES)
MEL_NETOPTIONS[2] = &ME_NETOPTIONS_USERMAP;
else
{
MEL_NETOPTIONS[2] = &ME_NETOPTIONS_LEVEL;
MEO_NETOPTIONS_LEVEL.options = &MEOS_NETOPTIONS_LEVEL[MEOSV_NetEpisodes[MEO_NETOPTIONS_EPISODE.currentOption]];
}
if (!(g_gametypeFlags[m_coop] & GAMETYPE_MARKEROPTION))
{
ME_NETOPTIONS_MARKERS.type = Dummy;
ME_NETOPTIONS_MARKERS.flags |= MEF_Disabled;
}
else
{
ME_NETOPTIONS_MARKERS.type = Option;
ME_NETOPTIONS_MARKERS.flags &= ~MEF_Disabled;
}
MEL_NETOPTIONS[5] = (g_gametypeFlags[m_coop] & (GAMETYPE_PLAYERSFRIENDLY|GAMETYPE_TDM)) ? &ME_NETOPTIONS_FRFIRE : &ME_NETOPTIONS_MAPEXITS;
break;
case MENU_OPTIONS:
MenuEntry_DisableOnCondition(&ME_OPTIONS_PLAYERSETUP, ud.recstat == 1);
break;
}
default:
break;
}
}
}
static void Menu_DrawVerifyPrompt(int32_t x, int32_t y, const char * text, int numlines = 1)
@ -703,141 +509,6 @@ static void Menu_PreDraw(MenuID_t cm, MenuEntry_t *entry, const vec2_t origin)
switch (cm)
{
case MENU_PLAYER:
rotatesprite_fs(origin.x + (260<<16), origin.y + ((24+(tilesiz[APLAYER].y>>1))<<16), 49152L,0,1441-((((4-((int32_t) totalclock>>4)))&3)*5),0,entry == &ME_PLAYER_TEAM ? G_GetTeamPalette(playerteam) : playercolor,10);
break;
case MENU_MACROS:
mgametextcenter(origin.x, origin.y + (144<<16), "Activate in-game with Shift-F#");
break;
case MENU_COLCORR:
case MENU_COLCORR_INGAME:
// center panel
rotatesprite_fs(origin.x + (120<<16), origin.y + (32<<16), 16384, 0, 3290, 0, 0, 2|8|16);
rotatesprite_fs(origin.x + (160<<16) - (tilesiz[BOTTOMSTATUSBAR].x<<13), origin.y + (82<<16) - (tilesiz[BOTTOMSTATUSBAR].y<<14), 16384, 0, BOTTOMSTATUSBAR, 0, 0, 2|8|16);
// left panel
rotatesprite_fs(origin.x + (40<<16), origin.y + (32<<16), 16384, 0, BONUSSCREEN, 0, 0, 2|8|16);
// right panel
rotatesprite_fs(origin.x + (200<<16), origin.y + (32<<16), 16384, 0, LOADSCREEN, 0, 0, 2|8|16);
break;
case MENU_SAVECLEANVERIFY:
videoFadeToBlack(1);
if (g_oldSaveCnt)
{
Bsprintf(tempbuf, "Delete %d obsolete saves?\nThis action cannot be undone.", g_oldSaveCnt);
Menu_DrawVerifyPrompt(origin.x, origin.y, tempbuf, 2);
}
else
mgametextcenter(origin.x, origin.y + (90<<16), "No obsolete saves found!");
break;
case MENU_LOADVERIFY:
{
videoFadeToBlack(1);
menusave_t & msv = g_menusaves[M_LOAD.currentEntry];
if (msv.isOldVer && msv.brief.isExt)
{
Bsprintf(tempbuf, "Resume game from sequence point:\n\"%s\"", msv.brief.name);
Menu_DrawVerifyPrompt(origin.x, origin.y, tempbuf, 2);
}
else
{
Bsprintf(tempbuf, "Load game:\n\"%s\"", msv.brief.name);
Menu_DrawVerifyPrompt(origin.x, origin.y, tempbuf, 2);
}
break;
}
case MENU_SAVEVERIFY:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "Overwrite previous saved game?");
break;
case MENU_LOADDELVERIFY:
case MENU_SAVEDELVERIFY:
{
videoFadeToBlack(1);
menusave_t & msv = cm == MENU_LOADDELVERIFY ? g_menusaves[M_LOAD.currentEntry] : g_menusaves[M_SAVE.currentEntry-1];
Bsprintf(tempbuf, "Delete saved game:\n\"%s\"?", msv.brief.name);
Menu_DrawVerifyPrompt(origin.x, origin.y, tempbuf, 2);
break;
}
case MENU_NEWVERIFY:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "Abort this game?");
break;
case MENU_COLCORRRESETVERIFY:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "Reset color correction to defaults?");
break;
case MENU_KEYSRESETVERIFY:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "Reset keys to defaults?");
break;
case MENU_KEYSCLASSICVERIFY:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "Reset keys to classic defaults?");
break;
case MENU_JOYSTANDARDVERIFY:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "Reset gamepad to standard layout?");
break;
case MENU_JOYPROVERIFY:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "Reset gamepad to pro layout?");
break;
case MENU_JOYCLEARVERIFY:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "Clear all gamepad settings?");
break;
case MENU_QUIT:
case MENU_QUIT_INGAME:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "Are you sure you want to quit?");
break;
case MENU_QUITTOTITLE:
videoFadeToBlack(1);
Menu_DrawVerifyPrompt(origin.x, origin.y, "End game and return to title screen?");
break;
case MENU_NETWAITMASTER:
G_DrawFrags();
mgametextcenter(origin.x, origin.y + (50<<16), "Waiting for master\n"
"to select level");
break;
case MENU_NETWAITVOTES:
G_DrawFrags();
mgametextcenter(origin.x, origin.y + (90<<16), "Waiting for votes");
break;
#ifndef EDUKE32_STANDALONE
case MENU_BUYDUKE:
mgametextcenter(origin.x, origin.y + (33<<16), "You are playing the shareware\n"
"version of Duke Nukem 3D. While\n"
"this version is really cool, you\n"
"are missing over 75% of the total\n"
"game, along with other great extras\n"
"which you'll get when you order\n"
"the complete version and get\n"
"the final three episodes.");
mgametextcenter(origin.x, origin.y + ((148+16)<<16), "Press any key or button...");
break;
#endif
}
}
break;
case MENU_CREDITS4: // JBF 20031220
{
#define MENU_YOFFSET 40
@ -961,32 +632,6 @@ static void Menu_EntryLinkActivate(MenuEntry_t *entry)
break;
}
case MENU_JOYSTICKAXES:
M_JOYSTICKAXIS.title = joyGetName(0, M_JOYSTICKAXES.currentEntry);
#if 0
MEO_JOYSTICKAXIS_ANALOG.data = &JoystickAnalogueAxes[M_JOYSTICKAXES.currentEntry];
MEO_JOYSTICKAXIS_SCALE.variable = &JoystickAnalogueScale[M_JOYSTICKAXES.currentEntry];
MEO_JOYSTICKAXIS_INVERT.data = &JoystickAnalogueInvert[M_JOYSTICKAXES.currentEntry];
MEO_JOYSTICKAXIS_DEAD.variable = &JoystickAnalogueDead[M_JOYSTICKAXES.currentEntry];
MEO_JOYSTICKAXIS_SATU.variable = &JoystickAnalogueSaturate[M_JOYSTICKAXES.currentEntry];
#endif
break;
case MENU_CHEATS:
{
const int32_t cheatFuncID = M_CHEATS.currentEntry - 1;
switch (cheatFuncID)
{
case -1:
case CHEATFUNC_WARP:
case CHEATFUNC_SKILL:
break;
default:
Menu_DoCheat(CheatFunctionIDs[cheatFuncID]);
break;
}
break;
}
default:
break;
@ -1071,146 +716,8 @@ static void Menu_EntryLinkActivate(MenuEntry_t *entry)
}
}
static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption)
{
int32_t x;
auto ps = g_player[myconnectindex].ps;
if (entry == &ME_GAMESETUP_DEMOREC)
{
if ((ps->gm&MODE_GAME))
G_CloseDemoWrite();
}
else if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
{
ud.weaponswitch = ud.weaponswitch & ~(1|4);
switch (newOption)
{
case 2:
ud.weaponswitch = ud.weaponswitch | 4;
fallthrough__;
case 1:
ud.weaponswitch = ud.weaponswitch | 1;
break;
default:
break;
}
}
else if (entry == &ME_SOUND)
{
if (newOption == 0)
{
FX_StopAllSounds();
S_ClearSoundLocks();
}
}
else if (entry == &ME_SOUND_MUSIC)
{
mus_enabled = newOption;
if (newOption == 0)
S_PauseMusic(true);
else
{
S_PauseMusic(false);
}
}
else if (entry == &ME_SOUND_DUKETALK)
snd_speech = (snd_speech&~1) | newOption;
else if (entry == &ME_JOYSTICK_ENABLE)
{
if (newOption)
CONTROL_ScanForControllers();
CONTROL_JoystickEnabled = (newOption && CONTROL_JoyPresent);
}
else if (entry == &ME_JOYSTICKAXIS_ANALOG)
CONTROL_MapAnalogAxis(M_JOYSTICKAXES.currentEntry, newOption, controldevice_joystick);
else if (entry == &ME_JOYSTICKAXIS_INVERT)
CONTROL_SetAnalogAxisInvert(M_JOYSTICKAXES.currentEntry, newOption, controldevice_joystick);
else if (entry == &ME_NETOPTIONS_EPISODE)
{
if (newOption < g_volumeCnt)
ud.m_volume_number = newOption;
}
else if (entry == &ME_NETOPTIONS_MONSTERS)
{
ud.m_monsters_off = (newOption == g_skillCnt);
if (newOption < g_skillCnt)
ud.m_player_skill = newOption;
}
else if (entry == &ME_ADULTMODE)
{
if (newOption)
{
for (x=0; x<g_animWallCnt; x++)
switch (DYNAMICTILEMAP(wall[animwall[x].wallnum].picnum))
{
case FEMPIC1__STATIC:
wall[animwall[x].wallnum].picnum = BLANKSCREEN;
break;
case FEMPIC2__STATIC:
case FEMPIC3__STATIC:
wall[animwall[x].wallnum].picnum = SCREENBREAK6;
break;
}
}
else
{
adult_lockout = 0;
}
}
return 0;
}
/*
This is polled when the menu code is populating the screen but for some reason doesn't have the data.
*/
static int32_t Menu_EntryOptionSource(MenuEntry_t *entry, int32_t currentValue)
{
if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
return (cl_weaponswitch & 1) ? ((cl_weaponswitch & 4) ? 2 : 1) : 0;
else if (entry == &ME_SOUND_DUKETALK)
return snd_speech & 1;
else if (entry == &ME_NETOPTIONS_MONSTERS)
return (ud.m_monsters_off ? g_skillCnt : ud.m_player_skill);
return currentValue;
}
void Menu_Close(uint8_t playerID)
{
auto & gm = g_player[playerID].ps->gm;
if (gm & MODE_GAME)
{
if (gm & MODE_MENU)
I_ClearAllInput();
// The following lines are here so that you cannot close the menu when no game is running.
gm &= ~MODE_MENU;
mouseLockToWindow(1);
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
{
ready2send = 1;
totalclock = ototalclock;
CAMERACLOCK = (int32_t) totalclock;
CAMERADIST = 65536;
m_animation.start = 0;
m_animation.length = 0;
// Reset next-viewscreen-redraw counter.
// XXX: are there any other cases like that in need of handling?
if (g_curViewscreen >= 0)
actor[g_curViewscreen].t_data[0] = (int32_t) totalclock;
}
G_UpdateScreenArea();
S_PauseSounds(false);
}
}
#endif

View file

@ -612,11 +612,6 @@ static MenuEntry_t ME_SOUND_CDPLAYER = MAKE_MENUENTRY( "8 Track Player", &MF_Red
static MenuRangeInt32_t MEO_SOUND_VOLUME_FX = MAKE_MENURANGE( &snd_fxvolume, &MF_Redfont, 0, 255, 0, 33, 2 );
static MenuEntry_t ME_SOUND_VOLUME_FX = MAKE_MENUENTRY( "Volume:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_VOLUME_FX, RangeInt32 );
static MenuRangeInt32_t MEO_SOUND_VOLUME_MUSIC = MAKE_MENURANGE( &mus_volume, &MF_Redfont, 0, 255, 0, 33, 2 );
static MenuEntry_t ME_SOUND_VOLUME_MUSIC = MAKE_MENUENTRY( "Music:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_VOLUME_MUSIC, RangeInt32 );
static MenuOption_t MEO_SOUND_DUKETALK = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, NULL);
static MenuEntry_t ME_SOUND_DUKETALK = MAKE_MENUENTRY( "Duke talk:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_DUKETALK, Option );
static char const *MEOSN_SOUND_SAMPLINGRATE[] = { "22050Hz", "44100Hz", "48000Hz", };
static int32_t MEOSV_SOUND_SAMPLINGRATE[] = { 22050, 44100, 48000, };

View file

@ -2872,7 +2872,6 @@ void RunLevel(void)
InitRunLevel();
FX_SetVolume(snd_fxvolume);
SetSongVolume(mus_volume);
#if 0
waitforeverybody();

View file

@ -2222,12 +2222,6 @@ MNU_InitMenus(void)
slidersettings[sldr_mouse] = in_mousesensitivity; // (MOUSE_SENS_MAX_VALUE / SLDR_MOUSESENSEMAX);
slidersettings[sldr_sndfxvolume] = snd_fxvolume / (FX_VOL_MAX_VALUE/SLDR_SNDFXVOLMAX);
slidersettings[sldr_musicvolume] = mus_volume / (MUSIC_VOL_MAX_VALUE/SLDR_MUSICVOLMAX);
slidersettings[sldr_scrsize] = gs.BorderNum;
slidersettings[sldr_brightness] = 10;
slidersettings[sldr_bordertile] = gs.BorderTile;
{
int i,newx=xdim,newy=ydim;
@ -3235,20 +3229,6 @@ MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
FX_SetVolume(snd_fxvolume);
break;
case sldr_musicvolume:
barwidth = SLDR_MUSICVOLMAX;
offset = slidersettings[sldr_musicvolume] += dir;
if (TEST(item->flags, mf_disabled))
break;
offset = max(offset, short(0));
offset = min(offset, short(SLDR_MUSICVOLMAX-1));
slidersettings[sldr_musicvolume] = offset;
mus_volume = MUSIC_MIN + (offset * VOL_MUL);
SetSongVolume(mus_volume);
break;
case sldr_scrsize:
{
short bnum;

View file

@ -1229,7 +1229,6 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
if (snd_ambience)
StartAmbientSound();
FX_SetVolume(snd_fxvolume);
SetSongVolume(mus_volume);
TRAVERSE_CONNECT(i)
{

View file

@ -561,10 +561,6 @@ PauseSong(SWBOOL pauseon)
}
}
void
SetSongVolume(int volume)
{
}
SWBOOL
SongIsPlaying(void)

View file

@ -92,7 +92,6 @@ void StopSound(void);
void StartAmbientSound(void);
void StopAmbientSound(void);
SWBOOL PlaySong(char *song_file_name, int cdaudio_track, SWBOOL loop, SWBOOL restart);
void SetSongVolume(int volume);
SWBOOL SongIsPlaying(void);
void PlaySoundRTS(int rts_num);

View file

@ -1144,6 +1144,399 @@ OptionMenu "HUDOptions" //protected
}
//-------------------------------------------------------------------------------------------
//
// Polymost options
//
//-------------------------------------------------------------------------------------------
OptionMenu "PolymostOptions"
{
Title "Polympost Options"
Option "$POLYMOST_TC", "hw_hightile", "OnOff"
Option "$POLYMOST_CACHE", "r_precache", "OnOff"
StaticText ""
Option "$POLYMOST_DETAIL", "hw_detailmapping", "OnOff", "hw_hightile"
Option "$POLYMOST_GLOW", "hw_glowmapping", "OnOff", "hw_hightile"
StaticText ""
Option "$POLYMOST_PALETTEEMU", "hw_useindexedcolortextures", "OnOff"
Option "$POLYMOST_PALINTER", "hw_shadeinterpolate", "OnOff", "hw_useindexedcolortextures"
StaticText ""
Option "$POLYMOST_MODELS", "hw_models", "OnOff"
}
//-------------------------------------------------------------------------------------------
//
// Sound options
// Many of these options are not active, but will be needed should I manage to transition
// the entire sound system to OpenAL 3D. So it is easier to just copy all this verbatim
// and only disable the options not yet usable instead of deleting the content.
//
//-------------------------------------------------------------------------------------------
OptionValue SampleRates
{
//0, "$OPTVAL_DEFAULT"
//4000, "$OPTVAL_4000HZ"
//8000, "$OPTVAL_8000HZ"
11025, "$OPTVAL_11025HZ"
22050, "$OPTVAL_22050HZ"
/32000, "$OPTVAL_32000HZ"
44100, "$OPTVAL_44100HZ"
48000, "$OPTVAL_48000HZ"
}
OptionValue BufferSizes
{
0, "$OPTVAL_DEFAULT"
64, "$OPTVAL_64SAMPLES"
128, "$OPTVAL_128SAMPLES"
256, "$OPTVAL_256SAMPLES"
512, "$OPTVAL_512SAMPLES"
1024, "$OPTVAL_1024SAMPLES"
2048, "$OPTVAL_2048SAMPLES"
4096, "$OPTVAL_4096SAMPLES"
}
OptionString ALDevices
{
// filled in by the sound code
}
OptionString ALResamplers
{
// filled in by the sound code
}
OptionString SpeakerModes
{
"Auto", "$OPTSTR_AUTO"
"Mono", "$OPTSTR_MONO"
"Stereo", "$OPTSTR_STEREO"
"Prologic", "$OPTSTR_PROLOGIC"
"Quad", "$OPTSTR_QUAD"
"Surround", "$OPTSTR_SURROUND"
"5.1", "$OPTSTR_5POINT1"
"7.1", "$OPTSTR_7POINT1"
}
OptionMenu OpenALSoundItems //protected
{
Title "$OPENALMNU_TITLE"
Option "$OPENALMNU_PLAYBACKDEVICE", "snd_aldevice", "ALDevices"
Option "$OPENALMNU_ENABLEEFX", "snd_efx", "OnOff"
Option "$OPENALMNU_RESAMPLER", "snd_alresampler", "ALResamplers"
}
OptionValue MidiDevices
{
// filled in by the sound code
}
OptionMenu SoundOptions //protected
{
Title "$SNDMNU_TITLE"
//Slider "$MODMNU_MASTERVOLUME", "snd_mastervolume", 0, 1, 0.05, 2
//StaticText " "
Option "$SNDMNU_SNDENABLED", "snd_enabled", "OnOff"
Slider "$SNDMNU_SFXVOLUME", "snd_fxvolume", 0, 255, 2, 1
//Slider "$SNDMNU_SFXVOLUME", "snd_fxvolume", 0, 1, 0.05, 2 // Todo: Change value type
Option "$SNDMNU_MUSENABLED", "mus_enabled", "OnOff" Slider "$SNDMNU_MUSICVOLUME", "mus_volume", 0, 1, 0.05, 2
Option "$SNDMNU_MENUSOUND", "menu_sounds", "OnOff" // placeholder until the slider can be made to work
//Slider "$SNDMNU_MENUVOLUME", "snd_menuvolume", 0, 1, 0.05, 2
StaticText " "
Option "$SNDMNU_MIDIDEVICE", "snd_mididevice", "MidiDevices"
StaticText " "
//Option "$SNDMNU_UNDERWATERREVERB", "snd_waterreverb", "OnOff"
//Option "$SNDMNU_RANDOMIZEPITCHES", "snd_pitched", "OnOff"
Slider "$SNDMNU_CHANNELS", "snd_numchannels", 64, 128, 8, 0
staticText ""
ifgame (Blood, ShadowWarrior)
{
Option "$SNDMNU_CDEMU", "mus_redbook", "OnOff"
}
ifgame(Duke, Nam, WW2GI, Fury, Redneck, RedneckRides, ShadowWarrior)
{
Option "$SNDMNU_AMBIENCE", "snd_ambience", "OnOff"
Option "$SNDMNU_SPEECH", "snd_speech", "OnOff"
}
StaticText " "
Submenu "$SNDMNU_ADVANCED", "AdvSoundOptions"
}
/*=======================================
*
* Advanced Sound Options Menu
*
*=======================================*/
OptionValue OplCores
{
0, "$OPTVAL_MAMEOPL2"
1, "$OPTVAL_DOSBOXOPL3"
2, "$OPTVAL_JAVAOPL3"
3, "$OPTVAL_NUKEDOPL3"
}
OptionMenu AdvSoundOptions //protected
{
Title "$ADVSNDMNU_TITLE"
Option "$ADVSNDMNU_SAMPLERATE", "snd_mixrate", "SampleRates"
//Option "$ADVSNDMNU_HRTF", "snd_hrtf", "AutoOffOn"
Option "$ADVSNDMNU_FLIPSTEREO" "snd_reversestereo", "OnOff"
StaticText " "
Option "$SNDMNU_BACKGROUND", "i_soundinbackground", "OnOff"
StaticText " "
ifoption(openal)
{
StaticText " "
Submenu "$SNDMNU_OPENAL", "OpenALSoundItems"
}
StaticText " "
Submenu "$SNDMNU_MIDIPLAYER", "MidiPlayerOptions"
Submenu "$SNDMNU_MODREPLAYER", "ModReplayerOptions"
StaticText " "
Command "$SNDMNU_RESTART", "snd_reset"
}
OptionMenu TimidityConfigMenu protected
{
Title "$ADVSNDMNU_SELCONFIG"
}
OptionMenu FluidPatchsetMenu protected
{
Title "$ADVSNDMNU_SELCONFIG"
}
/*=======================================
*
* Module Replayer Options Menu
*
*=======================================*/
OptionValue ModQuality
{
0.0, "$OPTVAL_ALIASING"
1.0, "$OPTVAL_LINEAR_1"
2.0, "$OPTVAL_CUBIC"
3.0, "$OPTVAL_BLEP" // Band-limited step
4.0, "$OPTVAL_LINEARSLOW"
5.0, "$OPTVAL_BLAM" // Band-limited linear
6.0, "$OPTVAL_CUBICSLOW"
7.0, "$OPTVAL_SINC"
}
OptionValue ModVolumeRamps
{
0.0, "$OPTVAL_NONE"
1.0, "$OPTVAL_NOTEONOFFONLY"
2.0, "$OPTVAL_FULLRAMPING"
}
OptionMenu ModReplayerOptions //protected
{
Title "$MODMNU_TITLE"
Slider "$MODMNU_MASTERVOLUME", "mod_dumb_mastervolume", 1, 16, 0.5, 1
Option "$ADVSNDMNU_SAMPLERATE", "mod_samplerate", "SampleRates"
Option "$MODMNU_QUALITY", "mod_interp", "ModQuality"
Option "$MODMNU_VOLUMERAMPING", "mod_volramp", "ModVolumeRamps"
StaticText " "
Option "$MODMNU_CHIPOMATIC", "mod_autochip", "OnOff"
// TODO if the menu system is ever rewritten: Provide a decent
// mechanism to edit the chip-o-matic settings like you can with
// the foo_dumb preferences in foobar2000.
}
/*=======================================
*
* MIDI player
*
*=======================================*/
OptionValue TimidityReverb
{
0, "$OPTVAL_OFF"
1, "$OPTVAL_STANDARD"
2, "$ADVSNDMNU_GLOBAL"
3, "$ADVSNDMNU_FREEVERB"
4, "$ADVSNDMNU_GLOBAL_FREEVERB"
}
OptionMenu MidiPlayerOptions //protected
{
Title "$SNDMNU_MIDIPLAYER"
Submenu "$ADVSNDMNU_FLUIDSYNTH", "FluidsynthOptions", 0, 1
Submenu "$ADVSNDMNU_TIMIDITY", "TimidityOptions", 0, 1
Submenu "$ADVSNDMNU_OPLSYNTHESIS", "OPLOptions", 0, 1
}
OptionMenu FluidsynthOptions //protected
{
Title "$ADVSNDMNU_FLUIDSYNTH"
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "fluid_patchset", "FluidPatchsetMenu"
Slider "$ADVSNDMNU_FLUIDGAIN", "fluid_gain", 0, 10, 0.5, 1
Option "$ADVSNDMNU_REVERB", "fluid_reverb", "OnOff"
Option "$ADVSNDMNU_CHORUS", "fluid_chorus", "OnOff"
Slider "$ADVSNDMNU_MIDIVOICES", "fluid_voices", 16, 4096, 16, 0
// other CVARs need to be revieved for usefulness
}
OptionMenu TimidityOptions //protected
{
Title "$ADVSNDMNU_TIMIDITY"
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "timidity_config", "TimidityConfigMenu"
Option "$ADVSNDMNU_REVERB", "timidity_reverb", "TimidityReverb"
Slider "$ADVSNDMNU_REVERB_LEVEL", "timidity_reverb_level", 9, 127, 1, 0
Option "$ADVSNDMNU_CHORUS", "timidity_chorus", "OnOff"
// other CVARs need to be revieved for usefulness
}
OptionMenu OPLOptions //protected
{
Title "$ADVSNDMNU_OPLSYNTHESIS"
Option "$ADVSNDMNU_OPLCORES", "opl_core", "OplCores"
Slider "$ADVSNDMNU_OPLNUMCHIPS", "opl_numchips", 1, 8, 1, 0
Option "$ADVSNDMNU_OPLFULLPAN", "opl_fullpan", "OnOff"
}
/*=======================================
*
* Video mode menu
* Even more than the sound, much of this has no backing
* and needs replacement of the backend.
*
*=======================================*/
OptionValue ForceRatios
{
0.0, "$OPTVAL_OFF"
3.0, "4:3"
1.0, "16:9"
5.0, "17:10"
2.0, "16:10"
4.0, "5:4"
6.0, "21:9"
}
OptionValue Ratios
{
0.0, "4:3"
4.0, "5:4"
1.0, "16:9"
2.0, "16:10"
3.0, "17:10"
6.0, "21:9"
-1, "$OPTVAL_ALL"
}
OptionValue ScaleModes
{
0, "$OPTVAL_SCALENEAREST"
1, "$OPTVAL_SCALELINEAR"
2, "640x400"
3, "960x600"
4, "1280x800"
5, "$OPTVAL_CUSTOM"
}
OptionValue CropAspect
{
0, "$OPTVAL_STRETCH"
1, "$OPTVAL_LETTERBOX"
}
OptionValue MaxFps
{
0, "$OPTVAL_UNLIMITED"
60, "$OPTVAL_60FPS"
75, "$OPTVAL_75FPS"
90, "$OPTVAL_90FPS"
120, "$OPTVAL_120FPS"
144, "$OPTVAL_144FPS"
200, "$OPTVAL_200FPS"
}
OptionMenu VideoModeMenu //protected
{
Title "$VIDMNU_TITLE"
StaticText "Caution: This menu is currently"
StaticText "not functional!"
Option "$VIDMNU_RENDERMODE", "vid_rendermode", "RenderMode"
Option "$VIDMNU_FULLSCREEN", "fullscreen", "YesNo"
IfOption(Mac)
{
Option "$VIDMNU_HIDPI", "vid_hidpi", "YesNo"
}
IfOption(Windows)
{
Option "$DSPLYMNU_GPUSWITCH", vid_gpuswitch, "GPUSwitch"
}
Option "$VIDMNU_FORCEASPECT", "vid_aspect", "ForceRatios"
Option "$VIDMNU_CROPASPECT", "vid_cropaspect", "CropAspect"
Option "$VIDMNU_SCALEMODE", "vid_scalemode", "ScaleModes"
Slider "$VIDMNU_SCALEFACTOR", "vid_scalefactor", 0.25, 2.0, 0.25, 2
StaticText " "
Option "$DSPLYMNU_VSYNC", "vid_vsync", "OnOff"
Option "$VIDMNU_MAXFPS", "r_maxfps", "MaxFps"
StaticText ""
StaticText "$VIDMNU_CUSTOMRES"
TextField "$VIDMNU_CUSTOMX", menu_resolution_custom_width
TextField "$VIDMNU_CUSTOMY", menu_resolution_custom_height
Option "$VIDMNU_USELINEAR", "vid_scale_customlinear", "YesNo"
StaticText ""
Command "$VIDMNU_APPLYW", "menu_resolution_commit_changes 0"
Command "$VIDMNU_APPLYFS", "menu_resolution_commit_changes 1"
StaticText ""
SubMenu "$VIDMNU_RESPRESET", CustomResolutionMenu
}
OptionMenu CustomResolutionMenu //protected
{
Title "$VIDMNU_RESPRESETTTL"
StaticText "$VIDMNU_RESPRESETHEAD"
StaticText ""
StaticText "$VIDMNU_ASPECT43"
Command "640x480", "menu_resolution_set_custom 640 480"
Command "1024x768", "menu_resolution_set_custom 1024 768"
Command "1280x960", "menu_resolution_set_custom 1280 960"
Command "1600x1200", "menu_resolution_set_custom 1600 1200"
StaticText ""
StaticText "$VIDMNU_ASPECT54"
Command "1280x1024", "menu_resolution_set_custom 1280 1024"
StaticText ""
StaticText "$VIDMNU_ASPECT169"
Command "960x540", "menu_resolution_set_custom 960 540"
Command "(720p HD) 1280x720", "menu_resolution_set_custom 1280 720"
Command "1366x768", "menu_resolution_set_custom 1366 768"
Command "(1080p HD) 1920x1080", "menu_resolution_set_custom 1920 1080"
Command "(1440p HD) 2560x1440", "menu_resolution_set_custom 2560 1440"
Command "(4K UHD) 3840x2160", "menu_resolution_set_custom 3840 2160"
StaticText ""
StaticText "$VIDMNU_ASPECT1610"
Command "960x600", "menu_resolution_set_custom 960 600"
Command "1280x800", "menu_resolution_set_custom 1280 800"
Command "1440x900", "menu_resolution_set_custom 1440 900"
Command "1680x1050", "menu_resolution_set_custom 1680 1050"
Command "1920x1200", "menu_resolution_set_custom 1920 1200"
}
//-------------------------------------------------------------------------------------------
//