//-------------------------------------------------------------------------------------------
//
// Note:
// Much of the menu structure defined here is accessed internally by CCMDs
// and menu generation code. If you want to design your own menus make sure
// that they are named identically and that links to all important submenus
// are present.
//
//-------------------------------------------------------------------------------------------

DEFAULTLISTMENU
{
	Font "BigFont", "Untranslated"
	IfGame(Doom, Chex)
	{
		Selector "M_SKULL1", -32, -5
		Linespacing 16
		Font "BigFont", "Red"
	}
	IfGame(Strife)
	{
		Selector "M_CURS1", -28, -5
		Linespacing 19
	}
	IfGame(Heretic, Hexen)
	{
		Selector "M_SLCTR1", -28, -1
		Linespacing 20
	}
}

//-------------------------------------------------------------------------------------------
//
// The main menu. There's a lot of differences here between the games
//
//-------------------------------------------------------------------------------------------

LISTMENU "MainMenu"
{
	IfGame(Doom, Chex)
	{
		StaticPatch 94, 2, "M_DOOM"
		Position 97, 72
		IfOption(ReadThis)
		{
			Position 97, 64
		}
	}
	IfGame(Strife)
	{
		StaticPatch 84, 2, "M_STRIFE"
		Position 97, 45
	}
	IfGame(Heretic)
	{
		StaticPatch 88, 0, "M_HTIC"
		StaticPatch 40, 10, "M_SKL01"
		StaticPatch 232, 10, "M_SKL00"
		Position 110, 56
	}
	IfGame(Hexen)
	{
		StaticPatch 88, 0, "M_HTIC"
		StaticPatch 37, 80, "FBULB0"
		StaticPatch 278, 80, "FBULA0"
		Position 110, 56
	}
	
	IfGame(Doom, Strife, Chex)
	{
		PatchItem "M_NGAME", "n", "PlayerclassMenu"
		ifOption(SwapMenu)
		{
			PatchItem "M_LOADG", "l", "LoadGameMenu"
			PatchItem "M_SAVEG", "s", "SaveGameMenu"
			PatchItem "M_OPTION","o", "OptionsMenu"
		}
		else
		{
			PatchItem "M_OPTION","o", "OptionsMenu"
			PatchItem "M_LOADG", "l", "LoadGameMenu"
			PatchItem "M_SAVEG", "s", "SaveGameMenu"
		}
		ifOption(ReadThis)
		{
			PatchItem "M_RDTHIS","r", "ReadThisMenu"
		}
		PatchItem "M_QUITG", "q", "QuitMenu"
	}
	
	IfGame(Heretic, Hexen)
	{
		TextItem "$MNU_NEWGAME", "n", "PlayerclassMenu"
		TextItem "$MNU_OPTIONS", "o", "OptionsMenu"
		TextItem "$MNU_GAMEFILES", "g", "GameFilesMenu"
		TextItem "$MNU_INFO", "i", "ReadThisMenu"
		TextItem "$MNU_QUITGAME", "q", "QuitMenu"
	}
}

//-------------------------------------------------------------------------------------------
//
// Important note about the following template menus:
// Don't even think about replacing them with something that's not an empty menu
// with some static elements only. Proper function is not guaranteed then.
//
//-------------------------------------------------------------------------------------------

//-------------------------------------------------------------------------------------------
//
// The player class menu
// The init code will set the first item to 'autoselect' if it's the only one.
//
//-------------------------------------------------------------------------------------------

ListMenu "PlayerclassMenu"
{
	IfGame(Doom, Heretic, Hexen, Strife)
	{
		NetgameMessage "$NEWGAME"
	}
	IfGame(Chex)
	{
		NetgameMessage "$CNEWGAME"
	}

	IfGame(Doom, Strife, Chex)
	{
		StaticTextCentered 160, 15, "$MNU_CHOOSECLASS"
		Position 48, 63
		PlayerDisplay 220, 63, "20 00 00", "80 00 40"
		MouseWindow 0, 220
	}
	IfGame(Heretic)
	{
		StaticTextCentered 160, 15, "$MNU_CHOOSECLASS"
		Position 80, 50
		PlayerDisplay 220, 50, "20 00 00", "80 00 40"
		MouseWindow 0, 220
	}
	IfGame(Hexen)
	{
		StaticText 34, 24, "$MNU_CHOOSECLASS"
		Position 66, 58
		PlayerDisplay 174, 8, "00 07 00", "40 53 40"
		MouseWindow 0, 174
	}
	// The rest of this menu will be set up based on the actual player definitions.
}

//-------------------------------------------------------------------------------------------
//
// The episode menu
// The init code will set the first item to 'autoselect' if it's the only one.
//
//-------------------------------------------------------------------------------------------

ListMenu "EpisodeMenu"
{
	IfGame(Doom, Heretic, Hexen, Strife)
	{
		NetgameMessage "$NEWGAME"
	}
	IfGame(Chex)
	{
		NetgameMessage "$CNEWGAME"
	}

	IfGame(Doom, Chex)
	{
		Position 48, 63
		StaticPatch 54, 38, "M_EPISOD"
	}
	IfGame(Strife)
	{
		Position 48, 63
		StaticText 54, 38, "$MNU_EPISODE"
	}
	IfGame(Heretic, Hexen)
	{
		Position 80, 50
	}
	// items will be filled in by MAPINFO
}

//-------------------------------------------------------------------------------------------
//
// The skill menu
// Most of this will be filled in at runtime
//
//-------------------------------------------------------------------------------------------

ListMenu "SkillMenu"
{

	IfGame(Doom, Chex)
	{
		StaticPatch 96, 14, "M_NEWG"
	}
	IfGame(Strife)
	{
		StaticPatch 96, 14, "M_NGAME"
	}
	IfGame(Doom, Strife, Chex)
	{
		StaticPatch 54, 38, "M_SKILL"
		Position 48, 63
	}
	IfGame (Heretic)
	{
		Position 38, 30
	}
	IfGame (Hexen)
	{
		StaticText 74, 16, "$MNU_CHOOSESKILL"
		Position 160, 44
		centermenu
	}
}

//-------------------------------------------------------------------------------------------
//
// Raven's game files menu
//
//-------------------------------------------------------------------------------------------

ListMenu "GameFilesMenu"
{
	Position 110, 60
	TextItem "$MNU_LOADGAME", "l", "LoadGameMenu"
	TextItem "$MNU_SAVEGAME", "s", "SaveGameMenu"
}

//-------------------------------------------------------------------------------------------
//
// Base definition for load game menu. Only the configurable part is done here
//
//-------------------------------------------------------------------------------------------

ListMenu "LoadGameMenu"
{
	IfGame(Doom, Heretic, Hexen, Strife)
	{
		NetgameMessage "$LOADNET"
	}
	IfGame(Chex)
	{
		NetgameMessage "$CLOADNET"
	}
	IfGame(Doom, Strife, Chex)
	{
		StaticPatchCentered 160, -20, "M_LOADG"
	}
	IfGame(Heretic, Hexen)
	{
		StaticTextCentered 160, -10, "$MNU_LOADGAME"
	}
	Position 80,54
	Class "LoadMenu"	// uses its own implementation
}

//-------------------------------------------------------------------------------------------
//
// Base definition for save game menu. Only the configurable part is done here
//
//-------------------------------------------------------------------------------------------

ListMenu "SaveGameMenu"
{
	NetgameMessage "$SAVENET" // [TP] Zandronum doesn't allow the client to save the game.
	IfGame(Doom, Strife, Chex)
	{
		StaticPatchCentered 160, -20, "M_SAVEG"
	}
	IfGame(Heretic, Hexen)
	{
		StaticTextCentered 160, -10, "$MNU_SAVEGAME"
	}
	Position 80,54
	Class "SaveMenu"	// uses its own implementation
}

//-------------------------------------------------------------------------------------------
//
// The option menu
//
//-------------------------------------------------------------------------------------------

OptionValue "YesNo"
{
	0, "No"
	1, "Yes"
}

OptionValue "NoYes"
{
	0, "Yes"
	1, "No"
}

OptionValue "OnOff"
{
	0, "Off"
	1, "On"
}

OptionValue "OffOn"
{
	0, "On"
	1, "Off"
}

OptionMenuSettings
{
	// These can be overridden if a different menu fonts requires it.
	Linespacing 8
	IfGame(Heretic, Hexen)
	{
		Linespacing 9
	}
}

DefaultOptionMenu
{
	Position -15
	IfGame(Heretic, Hexen)
	{
		Position -13
	}
}

// [TP] Zandronum additions, these get filled in by the engine
OptionValue ZA_Levels {}
OptionValue ZA_Bots {}
OptionValue ZA_Announcers {}
// [TP] --

OptionMenu "OptionsMenu"
{
	Title "OPTIONS"
	Submenu "Multiplayer Options",		"ZA_MultiplayerOptions" // [TP]
	StaticText " " // [TP]
	Submenu "Customize Controls",		"CustomizeControls"
	Submenu "Mouse options",			"MouseOptions"
	Submenu "Joystick options",			"JoystickOptions"
	StaticText " "
	Submenu "Player Setup",				"PlayerMenu"
	Submenu "Gameplay Options",			"GameplayOptions"
	Submenu "Compatibility Options",	"CompatibilityOptions"
	Submenu "Automap Options",			"AutomapOptions"
	Submenu "HUD Options",				"HUDOptions"
	Submenu "Miscellaneous Options",	"MiscOptions"
	Submenu "Sound Options",			"SoundOptions"
	Submenu "Display Options",			"VideoOptions"
	Submenu "Set video mode",			"VideoModeMenu"
	StaticText " "
	SafeCommand "Reset to defaults",	"reset2defaults"
	SafeCommand	"Reset to last saved",	"reset2saved"
	Command "Go to console",			"menuconsole"
}

//-------------------------------------------------------------------------------------------
//
// The player menu
//
//-------------------------------------------------------------------------------------------

OptionValue "Gender"
{
	0, "Male"
	1, "Female"
	2, "Other"
}

OptionValue "Autoaim"
{
	0, "Never"
	1, "Very low"
	2, "Low"
	3, "Medium"
	4, "High"
	5, "Very high"
	6, "Always"
}


ListMenu "PlayerMenu"
{
	StaticTextCentered 160, 6, "$MNU_PLAYERSETUP"
	Font "SmallFont"
	Linespacing 14
	Position 48, 36

	IfGame (Doom, Strife, Chex)
	{
		PlayerNameBox "Name", 0, "Playerbox"
		Selector "-", -16, -1
	}
	IfGame(Heretic, Hexen)
	{
		PlayerNameBox "Name", 5, "Playerbox"
		Selector "-", -16, 1
	}
	IfGame(Doom, Heretic, Strife, Chex)
	{
		MouseWindow 0, 220
		PlayerDisplay 220, 80, "20 00 00", "80 00 40", 1, "PlayerDisplay"
	}
	IfGame(Hexen)
	{
		MouseWindow 0, 220
		PlayerDisplay 220, 80, "00 07 00", "40 53 40", 1, "PlayerDisplay"
	}
	
	// [TP] Zandronum does not store team in userinfo
	// ValueText "Team", "Team"
	ValueText "Color", "Color"
	Linespacing 10
	Slider "Red", "Red", 0, 255, 16
	Slider "Green", "Green", 0, 255, 16
	Linespacing 14
	Slider "Blue", "Blue", 0, 255, 16
	ValueText "Class", "Class"
	ValueText "Skin", "Skin"
	ValueText "Gender", "Gender", "Gender"
	ValueText "Autoaim", "Autoaim", "Autoaim"
	Slider "Handicap", "Handicap", 0, 200, 5 // [TP]
	// [TP] This is moved to weapon setup
	// ValueText "Switch on pickup", "Switch", "OffOn"
	ValueText "Always Run", "AlwaysRun", "OnOff"
	TextItem "Weapon Setup", "w", "ZA_WeaponSetup" // [TP]
	Class "PlayerMenu"
}

//-------------------------------------------------------------------------------------------
//
// Controls Menu
//
//-------------------------------------------------------------------------------------------

OptionValue JoinMenuKeys
{
	0.0, "Space"
	1.0, "Enter"
}

OptionMenu "CustomizeControls"
{
	Title "CUSTOMIZE CONTROLS"
	ScrollTop 2
	StaticTextSwitchable 	"ENTER to change, BACKSPACE to clear", "Press new key for control, ESC to cancel", "ControlMessage"
	StaticText 	""
	StaticText 	"Controls", 1
	Control 	"Fire",					"+attack"
	Control 	"Secondary Fire",		"+altattack"
	Control 	"Weapon Reload",			"+reload"
	Control 	"Weapon Zoom",				"+zoom"
	Control 	"Use / Open",			"+use"
	Control 	"Move forward",			"+forward"
	Control 	"Move backward",		"+back"
	Control 	"Strafe left",			"+moveleft"
	Control 	"Strafe right",			"+moveright"
	Control 	"Turn left",			"+left"
	Control 	"Turn right",			"+right"
	Control 	"Jump",					"+jump"
	Control 	"Crouch",				"+crouch"
	Control 	"Crouch Toggle",		"crouch"
	Control 	"Fly / Swim up",		"+moveup"
	Control 	"Fly / Swim down",		"+movedown"
	Control 	"Stop flying",			"land"
	Control 	"Mouse look",			"+mlook"
	Control 	"Keyboard look",		"+klook"
	Control 	"Look up",				"+lookup"
	Control 	"Look down",			"+lookdown"
	Control 	"Center view",			"centerview"
	Control 	"Run",					"+speed"
	Control 	"Strafe",				"+strafe"
	Control 	"Show Scoreboard",		"+showscores"
	Control		"Show medals",			"+showmedals" // [TP]
	StaticText 	""
	StaticText 	"Chat", 1
	Control 	"Say",					"messagemode"
	Control 	"Team say",				"messagemode2"
	Control		"Private say",				"messagemode3" // [AK]
	StaticText 	""
	StaticText 	"Weapons", 1
	Control 	"Next weapon",			"weapnext"
	Control 	"Previous weapon",		"weapprev"
	Control		"Swap weapon", 			"weapswap" // [AK]
	Control		"Weapon Slot 1",		"slot 1"
	Control		"Weapon Slot 2",		"slot 2"
	Control		"Weapon Slot 3",		"slot 3"
	Control		"Weapon Slot 4",		"slot 4"
	Control		"Weapon Slot 5",		"slot 5"
	Control		"Weapon Slot 6",		"slot 6"
	Control		"Weapon Slot 7",		"slot 7"
	Control		"Weapon Slot 8",		"slot 8"
	Control		"Weapon Slot 9",		"slot 9"
	Control		"Weapon Slot 0",		"slot 0"
	StaticText 	""
	StaticText 	"Inventory", 1
	Control 	"Activate item",		"invuse"
	Control 	"Activate all items",	"invuseall"
	Control 	"Next item",			"invnext"
	Control 	"Previous item",		"invprev"
	Control 	"Drop item",			"invdrop"
	Control		"Query item",			"invquery"
	Control 	"Drop weapon",			"weapdrop"
	// [TP] Voting controls
	StaticText 	""
	StaticText 	"Voting", 1
	Control		"Vote yes",				"vote_yes"
	Control		"Vote no",				"vote_no"
	// [TP] --
	StaticText 	""
	StaticText 	"Other", 1
	Control 	"Toggle automap",		"togglemap"
	Control 	"Chasecam",				"chase"
	Control 	"Coop spy",				"spynext"
	Control		"Item carrier spy",			"spycarrier" // [AK]
	Control 	"Screenshot",			"screenshot"
	Control		"Spectate",				"spectate" // [TP]
	Control		"Taunt",				"taunt" // [TP]
	Option		"Join the game",		"joinmenukey", "JoinMenuKeys" // [TP]
	Control		"Join the game (custom)", "menu_join" // [TP]
	Control  	"Open console",			"toggleconsole"
	StaticText 	""
	StaticText 	"Strife Popup Screens", 1
	Control 	"Mission objectives",	"showpop 1"
	Control 	"Keys list",			"showpop 2"
	Control 	"Weapons/ammo/stats",	"showpop 3"
}

//-------------------------------------------------------------------------------------------
//
// Mouse Menu
//
//-------------------------------------------------------------------------------------------

OptionValue "Corners"
{
	-1, "Off"
	0, "Upper left"
	1, "Upper right"
	2, "Lower left"
	3, "Lower right"
}

OptionValue "MenuMouse"
{
	0, "No"
	1, "Yes"
	2, "Touchscreen-like"
}

OptionString "Cursors"
{
	"None", "Default"
	"cursor", "Simple arrow"
	"doomcurs", "Doom"
	"herecurs", "Heretic"
	"hexncurs", "Hexen"
	"strfcurs", "Strife"
	"chexcurs", "Chex"
	"-", "System cursor"
}

OptionMenu "MouseOptions"
{
	Title "MOUSE OPTIONS"
	Option "Enable mouse",				"use_mouse", "YesNo"
	Option "Enable mouse in menus",	"m_use_mouse", "MenuMouse", "use_mouse"
	Option "Show back button",		"m_show_backbutton", "Corners", "use_mouse"
	Option "Cursor",				"vid_cursor", "Cursors"
	StaticText 	""
	Slider "Overall sensitivity",		"mouse_sensitivity", 0.5, 2.5, 0.1
	Option "Prescale mouse movement",	"m_noprescale", "NoYes"
	Option "Smooth mouse movement",		"smooth_mouse", "YesNo"
	StaticText 	""
	Slider "Turning speed",				"m_yaw", 0, 2.5, 0.1
	Slider "Mouselook speed",			"m_pitch", 0, 2.5, 0.1
	Slider "Forward/Backward speed",	"m_forward", 0, 2.5, 0.1
	Slider "Strafing speed",			"m_side", 0, 2.5, 0.1
	StaticText 	""
	Option "Always Mouselook",			"freelook", "OnOff"
	Option "Invert Mouse",				"invertmouse", "OnOff"
	Option "Lookspring",				"lookspring", "OnOff"
	Option "Lookstrafe",				"lookstrafe", "OnOff"
}


//-------------------------------------------------------------------------------------------
//
// Joystick Menu
//
//-------------------------------------------------------------------------------------------

OptionMenu "JoystickOptions"
{
	Title "CONTROLLER OPTIONS"
	// Will be filled in by joystick code.
}

OptionValue "JoyAxisMapNames"
{
	-1, "None"
	0, "Turning"
	1, "Looking Up/Down"
	2, "Moving Forward"
	3, "Strafing"
	4, "Moving Up/Down"
}

OptionValue "Inversion"
{
	0, "Not Inverted"
	1, "Inverted"
}

OptionMenu "JoystickConfigMenu"
{
	Title "CONFIGURE CONTROLLER"
	Class "JoystickConfigMenu"
	// Will be filled in by joystick code.
}


//-------------------------------------------------------------------------------------------
//
// Video Menu
//
//-------------------------------------------------------------------------------------------

OptionValue ColumnMethods 
{
	0.0, "Original"
	1.0, "Optimized"
}

OptionValue RocketTrailTypes 
{
	0.0, "Off"
	1.0, "Particles"
	2.0, "Sprites"
	3.0, "Sprites & Particles"
}

OptionValue BloodTypes 
{
	0.0, "Sprites"
	1.0, "Sprites & Particles"
	2.0, "Particles"
}

OptionValue PuffTypes 
{
	0.0, "Sprites"
	1.0, "Particles"
}

OptionValue Wipes 
{
	0.0, "None"
	1.0, "Melt"
	2.0, "Burn"
	3.0, "Crossfade"
}

OptionValue Endoom 
{
	0.0, "Off"
	1.0, "On"
	2.0, "Only modified"
}

OptionValue Contrast 
{
	0.0, "Off"
	1.0, "On"
	2.0, "Smooth"
}

OptionValue Fuzziness
{
	0.0, "Translucent"
	1.0, "Fuzz"
	2.0, "Shadow"
}

// [TP]
OptionValue ZA_RespawnInvulEffects
{
	0.0, "None"
	1.0, "Skulltag"
	2.0, "ZDoom"
}

OptionMenu "VideoOptions"
{
	Title "DISPLAY OPTIONS"
	
	Submenu "Scoreboard Options", 		"ScoreboardOptions"
	StaticText " "
	Slider "Screen size",				"screenblocks", 3.0, 12.0, 1.0, 0
	Slider "Brightness",				"Gamma", 0.75, 3.0, 0.05, 2
	Option "Vertical Sync",				"vid_vsync", "OnOff"
	Option "Column render mode",		"r_columnmethod", "ColumnMethods"

	StaticText " "
	Option "Screen wipe style",			"wipetype", "Wipes"

	IfOption(Windows)
	{
		Option	"Show ENDOOM screen",	"showendoom", "Endoom"
		//Option "DirectDraw palette hack", "vid_palettehack", "OnOff"
		//Option "Use attached surfaces", "vid_attachedsurfaces", "OnOff"
	}
	
	Option "Stretch short skies",		"r_stretchsky", "OnOff"
	Option "Use fuzz effect",			"r_drawfuzz", "Fuzziness"
	Slider "Lost Soul translucency",	"transsouls", 0.25, 1.0, 0.05, 2
	Option "Use fake contrast",			"r_fakecontrast", "Contrast"
	Option "Rocket Trails",				"cl_rockettrails", "RocketTrailTypes"
	Option "Blood Type",				"cl_bloodtype", "BloodTypes"
	Option "Bullet Puff Type",			"cl_pufftype", "PuffTypes"
	Slider "Number of particles",		"r_maxparticles", 100, 10000, 100, 0
	Option "Show player sprites",		"r_drawplayersprites", "OnOff"
	Option "Death camera",				"r_deathcamera", "OnOff"
	Option "Teleporter zoom",			"telezoom", "OnOff"
	Slider "Earthquake shake intensity",	"r_quakeintensity", 0.0, 1.0, 0.05, 2
	Option "Interpolate monster movement",	"nomonsterinterpolation", "NoYes"
}

//-------------------------------------------------------------------------------------------
//
// HUD menu
//
//-------------------------------------------------------------------------------------------

OptionValue DisplayTagsTypes 
{
	0.0, "None"
	1.0, "Items"
	2.0, "Weapons"
	3.0, "Both"
}

OptionValue TextColors
{
	0.0, "\cabrick"
	1.0, "\cbtan"
	2.0, "\ccgray"
	3.0, "\cdgreen"
	4.0, "\cebrown"
	5.0, "\cfgold"
	6.0, "\cgred"
	7.0, "\chblue"
	8.0, "\ciorange"
	9.0, "\cjwhite"
	10.0, "\ckyellow"
	11.0, "\cldefault"
	12.0, "\cmblack"
	13.0, "\cnlight blue"
	14.0, "\cocream"
	15.0, "\cpolive"
	16.0, "\cqdark green"
	17.0, "\crdark red"
	18.0, "\csdark brown"
	19.0, "\ctpurple"
	20.0, "\cudark gray"
	21.0, "\cvcyan"
}

OptionValue Crosshairs
{
	// will be filled in from the XHAIRS lump
}

OptionValue ZDoomHexen
{
	0.0, "ZDoom"
	1.0, "Hexen"
}

OptionValue ZDoomStrife
{
	0.0, "ZDoom"
	1.0, "Strife"
}

// [TP]
OptionValue ZA_VotingDisplay
{
	0, "Minimal"
	1, "Fullscreen"
}

// [TP]
OptionValue ZA_FullscreenHUD
{
	0, "Classic style"
	1, "New style"
}

OptionMenu "HUDOptions"
{
	Title "HUD Options"
	Submenu "Alternative HUD",			"AltHudOptions"
	Submenu "Message Options", 			"MessageOptions"
	StaticText " "
	Option "Default Crosshair",			"crosshair", "Crosshairs"
	Option "Force default crosshair",	"crosshairforce", "OnOff"
	Option "Grow crosshair when picking up items",	"crosshairgrow", "OnOff"
	ColorPicker "Crosshair color", 		"crosshaircolor"
	Option "Crosshair shows health",	"crosshairhealth", "OnOff"
	Option "Scale crosshair",			"crosshairscale", "OnOff"
	Option "Voting display",			"cl_showfullscreenvote", "ZA_VotingDisplay"
	Option "Hide vote screen after vote",		"cl_hidevotescreen", "YesNo" // [AK]
	Option "Fullscreen HUD",			"cl_stfullscreenhud", "ZA_FullscreenHUD"
	StaticText " "
	Option "Large frag messages",		"cl_showlargefragmessages",	"YesNo" // [TP]
	Option "Draw coop info",			"cl_drawcoopinfo", "YesNo" // [TP]
	Option "Display nametags",			"displaynametags", "DisplayTagsTypes"
	Option "Nametag color",				"nametagcolor", "TextColors", "displaynametags"
	Option "Stretch status bar",		"st_scale", "OnOff"
	Option "Stretch Fullscreen HUD",	"hud_scale", "OnOff"
	Option "Use old ouch mug shot formula",	"st_oldouch", "OnOff"
	StaticText " "
	Option "Hexen weapon flashes",		"pf_hexenweaps",	"ZDoomHexen"
	Option "Poison damage flashes",		"pf_poison",		"ZDoomHexen"
	Option "Ice death flashes",			"pf_ice",			"ZDoomHexen"
	Option "Poison Buildup flashes",	"pf_hazard",		"ZDoomStrife"
}
	
//-------------------------------------------------------------------------------------------
//
// Alternative HUD
//
//-------------------------------------------------------------------------------------------

OptionValue "AMCoordinates"
{
	0, "Player"
	1, "Map"
}

OptionValue "AltHUDScale"
{
	0, "Off"
	1, "Scale to 640x400"
	2, "Pixel double"
}

OptionValue "AltHUDTime"
{
	0, "Off"
	1, "Level, milliseconds"
	2, "Level, seconds"
	3, "Level"
	4, "Hub, seconds"
	5, "Hub"
	6, "Total, seconds"
	7, "Total"
	8, "System, seconds"
	9, "System"
}

OptionMenu "AltHUDOptions"
{
	Title "Alternative HUD"
	//Indent 220
	Option "Enable alternative HUD",				"hud_althud", "OnOff"
	Option "Stretch alternative HUD",				"hud_althudscale", "AltHUDScale"
	Option "Show secret count",						"hud_showsecrets", "OnOff"
	Option "Show monster count",					"hud_showmonsters", "OnOff"
	Option "Show item count",						"hud_showitems", "OnOff"
	Option "Show stamina and accuracy",				"hud_showstats", "OnOff"
	Option "Show berserk",							"hud_berserk_health", "OnOff"
	Option "Show time",								"hud_showtime", "AltHUDTime"
	Option "Time color",							"hud_timecolor", "TextColors"
	Slider "Red ammo display below %",				"hud_ammo_red", 0, 100, 1, 0
	Slider "Yellow ammo display below %",			"hud_ammo_yellow", 0, 100, 1, 0
	Slider "Red health display below",				"hud_health_red", 0, 100, 1, 0
	Slider "Yellow health display below",			"hud_health_yellow", 0, 100, 1, 0
	Slider "Green health display below",			"hud_health_green", 0, 100, 1, 0
	Slider "Red armor display below",				"hud_armor_red", 0, 100, 1, 0
	Slider "Yellow armor display below",			"hud_armor_yellow", 0, 100, 1, 0
	Slider "Green armor display below",				"hud_armor_green", 0, 100, 1, 0
	StaticText " "
	StaticText "Alternative Automap HUD", 1
	option "Map title color",						"hudcolor_titl", "TextColors"
	option "Map time color",						"hudcolor_ltim", "TextColors"
	option "Hub time color",						"hudcolor_time", "TextColors"
	option "Total time color",						"hudcolor_ttim", "TextColors"
	option "Coordinate color",						"hudcolor_xyco", "TextColors"
	option "Coordinate mode",						"map_point_coordinates", "AMCoordinates"
	option "Statistics name color",					"hudcolor_statnames", "TextColors"
	option "Statistics color",						"hudcolor_stats", "TextColors"
}

//-------------------------------------------------------------------------------------------
//
// Misc menu
//
//-------------------------------------------------------------------------------------------

OptionValue Autosave
{
	0,	"Always"
	1,	"Scripts Only"
	2,	"Never"
}

OptionValue dehopt
{
	0,	"Never"
	1,	"All"
	2,	"Only last one"
}

OptionMenu "MiscOptions"
{
	Title "Miscellaneous Options"
	//Indent 220
	IfOption(Windows)
	{
		Option "Merge left+right Alt/Ctrl/Shift", 		"k_mergekeys", "OnOff"
		Option "Alt-Enter toggles fullscreen",			"k_allowfullscreentoggle", "OnOff"
	}
	Option "Show IWAD selection dialog",			"queryiwad", "OnOff"
	StaticText " "
	Option "Protect cvars from consolecommand",		"cl_protectcvars", "OnOff" // [AK]
	Option "Enable cheats from all games",			"allcheats", "OnOff"
	Option "Enable autosaves",						"disableautosave", "Autosave"
	Slider "Number of autosaves",					"autosavecount", 1, 20, 1, 0
	Option "Load *.deh/*.bex lumps",				"dehload", "dehopt"
	StaticText " "
	Option "Cache nodes",							"gl_cachenodes", "OnOff"
	Slider "Time threshold for node caching",		"gl_cachetime", 0.0, 2.0, 0.1
	SafeCommand "Clear node cache",					"clearnodecache"
}

//-------------------------------------------------------------------------------------------
//
// Automap Menu
//
//-------------------------------------------------------------------------------------------

OptionValue MapColorTypes
{
	0, "Custom"
	1, "Traditional Doom"
	2, "Traditional Strife"
	3, "Traditional Raven"
}

OptionValue SecretTypes
{
	0, "Never"
	1, "Only when found"
	2, "Always"
}

OptionValue RotateTypes
{
	0, "Off"
	1, "On"
	2, "On for overlay only"
}

OptionValue OverlayTypes
{
	0, "Off"
	1, "Overlay+Normal"
	2, "Overlay Only"
}

OptionValue MaplabelTypes
{
	0, "Never"
	1, "Always"
	2, "Not for hubs"
}

OptionValue STSTypes
{
	0, "Off"
	1, "Front"
	2, "Animated"
	3, "Rotated"
}

OptionValue MapBackTypes
{
	0, "Off"
	1, "On"
	2, "Map defined colors only"
}

OptionMenu AutomapOptions
{
	Title "AUTOMAP OPTIONS"
	Option "Map color set",				"am_colorset", "MapColorTypes"
	Option "Allow map defined colors",	"am_customcolors", "YesNo"
	Submenu "Set custom colors",		"MapColorMenu"
	Submenu "Customize map controls",	"MapControlsMenu"
	StaticText " "
	Option "Rotate automap",			"am_rotate", "RotateTypes"
	Option "Overlay automap",			"am_overlay", "OverlayTypes"
	Option "Enable textured display",	"am_textured", "OnOff"
	Option "Follow player",				"am_followplayer", "OnOff"
	StaticText " "
	Option "Show item counts",			"am_showitems", "OnOff"
	Option "Show monster counts",		"am_showmonsters", "OnOff"
	Option "Show secret counts",		"am_showsecrets", "OnOff"
	Option "Show time elapsed",			"am_showtime", "OnOff"
	Option "Show total time elapsed",	"am_showtotaltime", "OnOff"
	Option "Show secrets on map",		"am_map_secrets", "SecretTypes"
	Option "Show map label",			"am_showmaplabel", "MaplabelTypes"
	Option "Draw map background",		"am_drawmapback", "MapBackTypes"
	Option "Show keys (cheat)",			"am_showkeys", "OnOff"
	Option "Show trigger lines",		"am_showtriggerlines", "OnOff"
	Option "Show things as sprites",	"am_showthingsprites", "STSTypes"
}

//-------------------------------------------------------------------------------------------
//
// Automap Controls
//
//-------------------------------------------------------------------------------------------

OptionMenu MapControlsMenu
{
	Title "CUSTOMIZE MAP CONTROLS"
	ScrollTop 2
	StaticTextSwitchable 	"ENTER to change, BACKSPACE to clear", "Press new key for control, ESC to cancel", "ControlMessage"
	StaticText 	""
	StaticText "Map Controls", 1
	MapControl "Pan left",		"+am_panleft"
	MapControl "Pan right",		"+am_panright"
	MapControl "Pan up",		"+am_panup"
	MapControl "Pan down",		"+am_pandown"
	MapControl "Zoom in",		"+am_zoomin"
	MapControl "Zoom out",		"+am_zoomout"
	MapControl "Toggle zoom",	"am_gobig"
	MapControl "Toggle follow",	"am_togglefollow"
	MapControl "Toggle grid",	"am_togglegrid"
	MapControl "Toggle texture","am_toggletexture"
	MapControl "Set mark",		"am_setmark"
	MapControl "Clear mark",	"am_clearmarks"
}

//-------------------------------------------------------------------------------------------
//
// Automap Colors
//
//-------------------------------------------------------------------------------------------

OptionMenu MapColorMenu
{
	Title "CUSTOMIZE MAP COLORS"
	SafeCommand "Restore default custom colors", "am_restorecolors"
	StaticText " "
	ColorPicker "Background",								"am_backcolor"		
	ColorPicker "You",										"am_yourcolor"		
	ColorPicker "1-sided walls",							"am_wallcolor"		
	ColorPicker "2-sided walls with different floors",		"am_fdwallcolor"		
	ColorPicker "2-sided walls with different ceilings",	"am_cdwallcolor"		
	ColorPicker "2-sided walls with 3D floors",				"am_efwallcolor"		
	ColorPicker "Map grid",									"am_gridcolor"		
	ColorPicker "Center point",								"am_xhaircolor"		
	ColorPicker "Not-yet-seen walls",						"am_notseencolor"		
	ColorPicker "Locked doors",								"am_lockedcolor"		
	ColorPicker "Teleporter to the same map",				"am_intralevelcolor"	
	ColorPicker "Teleporter to a different map",			"am_interlevelcolor"	
	ColorPicker "Secret sector",							"am_secretsectorcolor"	
	ColorPicker "Special trigger lines",					"am_specialwallcolor"
	StaticText " "
	StaticText "Cheat Mode", 1
	ColorPicker "Invisible 2-sided walls",		"am_tswallcolor"		
	ColorPicker "Secret walls",					"am_secretwallcolor"	
	ColorPicker "Actors",						"am_thingcolor"		
	ColorPicker "Monsters",						"am_thingcolor_monster"		
	ColorPicker "non-counting Monsters",		"am_thingcolor_ncmonster"		
	ColorPicker "Friends",						"am_thingcolor_friend"		
	ColorPicker "Items",						"am_thingcolor_item"			
	ColorPicker "Count Items",					"am_thingcolor_citem"			
	StaticText " "
	StaticText "Overlay Mode", 1
	ColorPicker "You",							"am_ovyourcolor"		
	ColorPicker "1-sided walls",				"am_ovwallcolor"		
	ColorPicker "2-sided walls with different floors",		"am_ovfdwallcolor"		
	ColorPicker "2-sided walls with different ceilings",	"am_ovcdwallcolor"		
	ColorPicker "2-sided walls with 3D floors",				"am_ovefwallcolor"		
	ColorPicker "Not-yet-seen walls",			"am_ovunseencolor"	
	ColorPicker "Locked doors",				"am_ovlockedcolor"
	ColorPicker "Teleporter to the same map",					"am_ovtelecolor"		
	ColorPicker "Teleporter to a different map",			"am_ovinterlevelcolor"	
	ColorPicker "Secret sector",				"am_ovsecretsectorcolor"	
	ColorPicker "Special trigger lines",		"am_ovspecialwallcolor"
	StaticText " "
	StaticText "Overlay Cheat Mode", 1
	ColorPicker "Invisible 2-sided walls",		"am_ovotherwallscolor"		
	ColorPicker "Secret walls",					"am_ovsecretwallcolor"	
	ColorPicker "Actors",						"am_ovthingcolor"		
	ColorPicker "Monsters",						"am_ovthingcolor_monster"		
	ColorPicker "non-counting Monsters",		"am_ovthingcolor_ncmonster"		
	ColorPicker "Friends",						"am_ovthingcolor_friend"		
	ColorPicker "Items",						"am_ovthingcolor_item"		
	ColorPicker "Count Items",					"am_ovthingcolor_citem"		
}

//-------------------------------------------------------------------------------------------
//
// Color Picker
//
//-------------------------------------------------------------------------------------------

OptionMenu ColorPickerMenu
{
	Title "SELECT COLOR"
	// This menu will be created by the calling code
}

//-------------------------------------------------------------------------------------------
//
// Messages
//
//-------------------------------------------------------------------------------------------


OptionValue ScaleValues
{
	0, "Off"
	1, "On"
	// 2, "Double"	// [EP] con_scaletext is a bool in Zandronum
}

OptionValue MessageLevels
{
	0.0, "Item Pickup"
	1.0, "Obituaries"
	2.0, "Critical Messages"
	// [AK] Added chat levels.
	3.0, "Chat Messages"
	4.0, "Team Messages"
	5.0, "Private Messages"
}

// [TP]
OptionValue ZA_ChatSound
{
	0, "Off"
	1, "Default"
	2, "Doom 1"
	3, "Doom 2"
}

// [TP]
OptionValue ZA_ColorInMessages
{
	0, "Off"
	1, "On"
	2, "Not in chat"
}

OptionMenu MessageOptions
{
	Title 	"MESSAGES"
	SubMenu "Text scaling",				"ZA_TextScaling" // [TP]
	Option "Show messages",				"show_messages", "OnOff"
	Option "Show obituaries",			"show_obituaries", "OnOff"
	Option "Chat sound",				"chat_sound", "ZA_ChatSound" // [TP]
	Option "Private chat sound",			"privatechat_sound", "ZA_ChatSound" // [AK]
	// [EP] con_scaletext is moved to the "Text scaling" submenu
	// Option "Scale text in high res", 	"con_scaletext", "ScaleValues"
	Option "Minimum message level", 	"msg", "MessageLevels"
	Option "Center messages",			"con_centernotify", "OnOff"
	Option "Color in messages",			"con_colorinmessages", "ZA_ColorInMessages" // [TP]
	// [AK] Added textfields for the chat prefix/suffix.
	StaticText " "
	TextField "Chat prefix",			"cl_chatprefix"
	TextField "Chat suffix",			"cl_chatsuffix"

	StaticText " "
	StaticText "Message Colors", 1
	StaticText " "
	Option "Item Pickup",				"msg0color", "TextColors"
	Option "Obituaries",				"msg1color", "TextColors"
	Option "Critical Messages",			"msg2color", "TextColors"
	Option "Chat Messages",				"msg3color", "TextColors"
	Option "Team Messages",				"msg4color", "TextColors"
	Option "Private Messages",			"msg5color", "TextColors" // [AK]
	Option "Centered Messages",			"msgmidcolor", "TextColors"
	StaticText " "
	Option "Screenshot messages",		"screenshot_quiet",	"OffOn"
	Option "Detailed save messages",	"longsavemessages",	"OnOff"
	Option "Display Console Timestamps",	"con_showtimestamps", 	"YesNo" // [AK]
}

//-------------------------------------------------------------------------------------------
//
// Scoreboard
//
//-------------------------------------------------------------------------------------------

OptionMenu ScoreboardOptions
{
	Title "SCOREBOARD OPTIONS"
	StaticText "Cooperative Options", 1
	StaticText " "
	Option "Enable Scoreboard",		"sb_cooperative_enable", "YesNo"
	Option "Header Color",			"sb_cooperative_headingcolor", "TextColors"
	Option "Your Player Color",		"sb_cooperative_yourplayercolor", "TextColors"
	Option "Other Players' Color",	"sb_cooperative_otherplayercolor", "TextColors"
	StaticText " "
	StaticText " "
	StaticText "Deathmatch Options", 1
	StaticText " "
	Option "Enable Scoreboard",		"sb_deathmatch_enable",	"YesNo"
	Option "Header Color",			"sb_deathmatch_headingcolor", "TextColors"
	Option "Your Player Color",		"sb_deathmatch_yourplayercolor", "TextColors"
	Option "Other Players' Color",	"sb_deathmatch_otherplayercolor", "TextColors"
	StaticText " "
	StaticText " "
	StaticText "Team Deathmatch Options", 1
	StaticText " "
	Option "Enable Scoreboard",		"sb_teamdeathmatch_enable", "YesNo"
	Option "Header Color",			"sb_teamdeathmatch_headingcolor", "TextColors"
}

/*=======================================
 *
 * Gameplay Options (dmflags) Menu
 *
 *=======================================*/
 
OptionValue  SmartAim
{
	0.0, "Off"
	1.0, "On"
	2.0, "Never friends"
	3.0, "Only monsters"
}

OptionValue  FallingDM
{
	0, "Off"
	1, "Old"
	2, "Hexen"
	3, "Strife"
}

OptionValue  JumpCrouch
{
	0, "Default"
	1, "Off"
	2, "On"
}


OptionMenu GameplayOptions
{
	Title 	"GAMEPLAY OPTIONS"
	//Indent 222
	// [AK] "teamplay" is a latch CVar in Zandronum.
	// Option "Teamplay",				"teamplay",	"OnOff"
	Slider	"Team damage scalar",	"teamdamage", 0, 1, 0.05
	StaticText " "
	Option "Smart Autoaim",			"sv_smartaim", "SmartAim"
	StaticText " "
	Option "Falling damage",		"sv_fallingdamage", "FallingDM"
	Option "Drop weapon",			"sv_weapondrop", "YesNo"
	Option "Double ammo",			"sv_doubleammo", "YesNo"
	Option "Infinite ammo",			"sv_infiniteammo", "YesNo"
	Option "Infinite inventory",	"sv_infiniteinventory", "YesNo"
	Option "No monsters",			"sv_nomonsters", "YesNo"
	Option "No monsters to exit",	"sv_killallmonsters", "YesNo"
	// [TP] sv_killallmonsters_percentage
	Slider "% of monsters to kill",	"sv_killallmonsters_percentage", 0, 100, 5
	Option "Monsters respawn",		"sv_monsterrespawn", "YesNo"
	Option "No respawn",			"sv_norespawn", "YesNo"
	Option "Items respawn",			"sv_itemrespawn", "YesNo"
	Option "Big powerups respawn",	"sv_respawnsuper", "YesNo"
	Option "Fast monsters",			"sv_fastmonsters", "YesNo"
	Option "Degeneration",			"sv_degeneration", "YesNo"
	Option "Allow Autoaim",			"sv_noautoaim", "NoYes"
	Option "Allow Suicide",			"sv_disallowsuicide", "NoYes"
	Option "Allow jump",			"sv_jump", "JumpCrouch"
	Option "Allow crouch",			"sv_crouch", "JumpCrouch"
	Option "Allow freelook",		"sv_nofreelook", "NoYes"
	Option "Allow FOV",				"sv_nofov", "NoYes"
	// [TP] Zandronum has this CVar under a different name
	// Option "Allow BFG aiming",		"sv_nobfgaim", "NoYes"
	Option "Allow BFG aiming",		"sv_bfgfreeaim", "YesNo"
	Option "Allow Unlagged BFG tracers",	"sv_nounlaggedbfgtracers", "NoYes"
	Option "Allow automap",			"sv_noautomap", "NoYes"
	Option "Automap allies",		"sv_noautomapallies", "NoYes"
	Option "Allow spying",			"sv_disallowspying", "NoYes"
	Option "Allow obituaries",		"sv_noobituaries", "NoYes"
	Option "Chasecam cheat",		"sv_chasecam", "YesNo"
	Option "Check ammo for weapon switch",	"sv_dontcheckammo", "NoYes"
	Option "Icon's death kills its spawns",	"sv_killbossmonst", "YesNo"
	Option "End sector counts for kill %",	"sv_nocountendmonst", "NoYes"
	// [TP] Zandronum dmflags
	Option "Allow player identification",	"sv_noidentifytarget", "NoYes"
	Option "Unblock players",		"sv_unblockplayers", "YesNo"
	Option "Unblock allies",		"sv_unblockallies", "YesNo"
	Option "Allow rocket jumping",	"sv_norocketjumping", "NoYes"
	Option "Allow item dropping",	"sv_nodrop", "NoYes"
	Option "Award damage dealt",	"sv_awarddamageinsteadkills", "YesNo"
	Option "Force OpenGL defaults",	"sv_forcegldefaults", "YesNo"
	Option "Force translucency",	"sv_forcealpha", "YesNo"
	Option "Full blood brightness",	"sv_maxbloodscalar", "YesNo"
	Option "Force software pitch limits",	"sv_forcesoftwarepitchlimits", "YesNo"
	Option "Allow private chat",	"sv_noprivatechat", "NoYes"
	// [TP] --

	StaticText " "
	StaticText "Deathmatch Settings",1
	Option "Weapons stay",			"sv_weaponstay", "YesNo"
	Option "Allow powerups",		"sv_noitems", "NoYes"
	Option "Allow health",			"sv_nohealth", "NoYes"
	Option "Allow armor",			"sv_noarmor", "NoYes"
	Option "Spawn farthest",		"sv_spawnfarthest", "YesNo"
	Option "Same map",				"sv_samelevel", "YesNo"
	Option "Force respawn",			"sv_forcerespawn", "YesNo"
	// [TP] Force respawn time option
	NumberField	"Force respawn time limit",	"sv_forcerespawntime", 0, 60, 1, "sv_forcerespawn"
	Option "Allow exit",			"sv_noexit", "NoYes"
	Option "Barrels respawn",		"sv_barrelrespawn", "YesNo"
	// [TP] Zandronum has this CVar under a different name
	// Option "Respawn protection",	"sv_respawnprotect", "YesNo"
	Option "Respawn protection",	"sv_norespawninvul", "NoYes"
	Option "Lose frag if fragged",	"sv_losefrag", "YesNo"
	Option "Keep frags gained",		"sv_keepfrags", "YesNo"
	Option "No team switching",		"sv_noteamswitch", "YesNo"
	// [TP/BB/EP] Zandronum deathmatch settings
	Option "Don't spawn runes (DM)", "sv_norunes", "YesNo"
	NumberField	"Flag return time (ST/CTF)", "sv_flagreturntime", 0, 60
	Option "Instant flag return (ST/CTF)", "sv_instantreturn", "YesNo"
	Option "Server picks teams (ST/CTF)", "sv_noteamselect", "YesNo"
	Option "Keep teams across levels", "sv_keepteams", "YesNo"
	Option "Apply LMS spectator settings",	"sv_applylmsspectatorsettings", "YesNo"
	Option "Medals",				"sv_nomedals", "NoYes"
	// [TP] --

	StaticText " "
	StaticText "Cooperative Settings",1
	Option "Spawn multi. weapons", 	"sv_noweaponspawn", "NoYes"
	// [TP] Zandronum uses different names for these CVars
	/*
	Option "Lose entire inventory",	"sv_cooploseinventory", "YesNo"
	Option "Keep keys",				"sv_cooplosekeys", "NoYes"
	Option "Keep weapons",			"sv_cooploseweapons", "NoYes"
	Option "Keep armor",			"sv_cooplosearmor", "NoYes"
	Option "Keep powerups",			"sv_cooplosepowerups", "NoYes"
	Option "Keep ammo",				"sv_cooploseammo", "NoYes"
	Option "Lose half ammo",		"sv_coophalveammo", "YesNo"
	*/
	Option "Lose entire inventory",	"sv_coop_loseinventory", "YesNo"
	Option "Keep keys",				"sv_coop_losekeys", "NoYes"
	Option "Keep weapons",			"sv_coop_loseweapons", "NoYes"
	Option "Keep armor",			"sv_coop_losearmor", "NoYes"
	Option "Keep powerups",			"sv_coop_losepowerups", "NoYes"
	Option "Keep ammo",				"sv_coop_loseammo", "NoYes"
	Option "Lose half ammo",		"sv_coop_halveammo", "YesNo"
	Option "Spawn where died",		"sv_samespawnspot", "YesNo"
	// [TP/BB/EP] Zandronum co-operative settings
	Option "Start with shotgun",	"sv_shotgunstart", "YesNo"
	Option "Spawn singleplayer actors", "sv_coop_spactorspawn", "YesNo"
	Option "Share keys",			"sv_sharekeys", "YesNo"
	Option "Reset map upon death in survival",	"sv_survival_nomapresetondeath", "NoYes"
	Option "Dead players can keep inventory",	"sv_deadplayerscankeepinventory", "YesNo"
	Option "Allow coop info",		"sv_nocoopinfo", "NoYes"
	Option "Allow closing doors",		"sv_nodoorclose", "NoYes"
	// [TP] --
	Class "GameplayMenu"
}

/*=======================================
 *
 * Compatibility Options Menu
 *
 *=======================================*/


OptionValue CompatModes
{
	0, "Default"
	1, "Doom"
	2, "Doom (strict)"
	3, "Boom"
	6, "Boom (strict)"
	5, "MBF"
	4, "ZDoom 2.0.63"
}

OptionMenu "CompatibilityOptions"
{
	Title "COMPATIBILITY OPTIONS"
	Option "Compatibility mode",						"compatmode", "CompatModes", "", 1

	// [JDM] Separated ZDoom and Zandronum compatibility options
	StaticText " "
	StaticText "Vanilla/Boom Compatibility",1
	Option "Find shortest textures like Doom",			"compat_SHORTTEX", "YesNo"
	Option "Use buggier stair building",				"compat_stairs", "YesNo"
	Option "Find neighboring light like Doom",			"compat_LIGHT", "YesNo"
	Option "Limit Pain Elementals' Lost Souls",			"compat_LIMITPAIN", "YesNo"
	Option "Don't let others hear your pickups",		"compat_SILENTPICKUP", "YesNo"
	Option "Actors are infinitely tall",				"compat_nopassover", "YesNo"
	Option "Enable wall running",						"compat_WALLRUN", "YesNo"
	Option "Spawn item drops on the floor",				"compat_NOTOSSDROPS", "YesNo"
	Option "All special lines can block <use>",			"compat_USEBLOCKING", "YesNo"
	Option "Disable BOOM door light effect",			"compat_NODOORLIGHT", "YesNo"
	Option "Raven scrollers use original speed",		"compat_RAVENSCROLL", "YesNo"
	Option "Use original sound target handling",		"compat_SOUNDTARGET", "YesNo"
	Option "DEH health settings like Doom2.exe",		"compat_DEHHEALTH", "YesNo"
	Option "Self ref. sectors don't block shots",		"compat_TRACE", "YesNo"
	Option "Monsters get stuck over dropoffs",			"compat_DROPOFF", "YesNo"
	Option "Monsters cannot cross dropoffs",			"compat_CROSSDROPOFF", "YesNo"
	Option "Monsters see invisible players",			"compat_INVISIBILITY", "YesNo"
	Option "Boom scrollers are additive",				"compat_BOOMSCROLL", "YesNo"
	Option "Inst. moving floors are not silent",		"compat_silentinstantfloors", "YesNo"
	Option "Sector sounds use center as source",		"compat_SECTORSOUNDS", "YesNo"
	Option "Use Doom heights for missile clipping",		"compat_MISSILECLIP", "YesNo"
	Option "Allow any bossdeath for level special",		"compat_ANYBOSSDEATH", "YesNo"
	Option "No Minotaur floor flames in water",			"compat_MINOTAUR", "YesNo"
	Option "Original A_Mushroom speed in DEH mods",		"compat_MUSHROOM", "YesNo"
	Option "Monster movement is affected by effects",	"compat_MBFMONSTERMOVE", "YesNo"
	Option "Crushed monsters can be resurrected",		"compat_CORPSEGIBS", "YesNo"
	Option "Friendly monsters aren't blocked",			"compat_NOBLOCKFRIENDS", "YesNo"
	Option "Invert sprite sorting",						"compat_SPRITESORT", "YesNo"
	Option "Use Doom code for hitscan checks",			"compat_HITSCAN", "YesNo"
	Option "Cripple sound for silent BFG trick",		"compat_soundslots", "YesNo"
	Option "Draw polyobjects like Hexen",				"compat_POLYOBJ", "YesNo"
	Option "Ignore Y offsets on masked midtextures",	"compat_MASKEDMIDTEX", "YesNo"
	Option "Cannot travel straight NSEW",				"compat_badangles", "YesNo"
	Option "Use Doom's floor motion behavior",			"compat_floormove", "YesNo"
	// [BB] Out of order ZDoom backport.
	Option "Non-blocking lines can be pushed",			"compat_pushwindow", "YesNo"

	// [TP] Zandronum compatibility settings
	StaticText " "
	StaticText "Old Zan/ST/ZDoom Compatibility",1
	Option "Limit air movement",						"compat_limited_airmovement", "YesNo"
	Option "Item grab like vanilla",					"compat_plasmabump", "YesNo"
	Option "Respawn instantly",							"compat_instantrespawn", "YesNo"
	Option "No taunts",									"compat_disabletaunts", "YesNo"
	Option "Original sound curve",						"compat_originalsoundcurve", "YesNo"
	Option "Use old intermission screens/music",		"compat_oldintermission", "YesNo"
	Option "No stealth monsters",						"compat_disablestealthmonsters", "YesNo"
	Option "Splash damage is infinitely tall",			"compat_oldradiusdmg", "YesNo"
	Option "No crosshairs",								"compat_nocrosshair", "YesNo"
	Option "Always switch weapons on pickup",			"compat_oldweaponswitch", "YesNo"
	Option "NET scripts are client-side",				"compat_netscriptsareclientside", "YesNo"
	Option "Clients send full button info",				"compat_clientssendfullbuttoninfo", "YesNo"
	Option "Forbid the 'land' console command",			"compat_noland", "YesNo"
	Option "Use the old pseudo-RNG",					"compat_oldrandom", "YesNo"
	Option "Spheres float like in Skulltag",			"compat_nogravity_spheres", "YesNo"
	Option "Player scripts resume after disconnect",	"compat_dont_stop_player_scripts_on_disconnect", "YesNo"
	Option "Explosion thrust like old ZDoom versions",	"compat_explosionthrust", "YesNo"
	Option "Dropped items pass through bridges",		"compat_bridgedrops", "YesNo"
	Option "Vertical movement like old ZDoom versions",	"compat_oldzdoomzmovement", "YesNo"
	Option "Weapons must be lowered fully",				"compat_fullweaponlower", "YesNo"
	Option "Auto-aiming has vertical holes",			"compat_autoaim", "YesNo"
	Option "West facing spawns are silent",				"compat_silentwestspawns", "YesNo"
	Option "Use old Skulltag jumping behavior",			"compat_skulltagjumping", "YesNo"
	Option "Reset global ACS variables upon map reset",		"compat_resetglobalvarsonmapreset", "YesNo"
	
	Class "CompatibilityMenu"
}

/*=======================================
 *
 * Sound Options Menu
 *
 *=======================================*/
 
OptionValue SampleRates
{
	0,		"Default"
	4000,	"4000 Hz"
	8000,	"8000 Hz"
	11025,	"11025 Hz"
	22050,	"22050 Hz"
	32000,	"32000 Hz"
	44100,	"44100 Hz"
	48000,	"48000 Hz"
}


OptionValue BufferSizes
{
	   0, "Default"
	  64, "64 samples"
	 128, "128 samples"
	 256, "256 samples"
	 512, "512 samples"
	1024, "1024 samples"
	2048, "2048 samples"
	4096, "4096 samples"
}


OptionValue BufferCounts
{
	   0, "Default"
	   2, "2"
	   3, "3"
	   4, "4"
	   5, "5"
	   6, "6"
	   7, "7"
	   8, "8"
	   9, "9"
	  10, "10"
	  11, "11"
	  12, "12"
}


OptionString SoundOutputsWindows
{
	"Default",		"Default"
	"DirectSound",	"DirectSound"
	"WASAPI",		"Vista WASAPI"
	"ASIO",			"ASIO"
	"WaveOut",		"WaveOut"
	// [AK] OpenAL was removed in the FMOD version used in Zandronum 3.1 and over.
	// "OpenAL",		"OpenAL (very beta)"
	"No sound",		"No sound"
}


OptionString SoundOutputsUnix
{
	"Default",		"Default"
	"OSS",			"OSS"
	"ALSA",			"ALSA"
	"SDL",			"SDL"
	"ESD",			"ESD"
	"PulseAudio",	"PulseAudio"
	"No sound",		"No sound"
}

OptionString SoundOutputsMac
{
	"Sound Manager",	"Sound Manager"
	"Core Audio",		"Core Audio"
	"No sound",			"No sound"
}

OptionString OutputFormats
{
	"PCM-8",		"8-bit"
	"PCM-16",		"16-bit"
	"PCM-24",		"24-bit"
	"PCM-32",		"32-bit"
	"PCM-Float",	"32-bit float"
}


OptionString SpeakerModes
{
	"Auto",		"Auto"
	"Mono",		"Mono"
	"Stereo",	"Stereo"
	"Prologic",	"Dolby Prologic Decoder"
	"Quad",		"Quad"
	"Surround",	"5 speakers"
	"5.1",		"5.1 speakers"
	"7.1",		"7.1 speakers"
}


OptionString Resamplers
{
	"NoInterp",		"No interpolation"
	"Linear",		"Linear"
	"Cubic",		"Cubic"
	"Spline",		"Spline"
}

OptionValue MidiDevices
{
	// filled in by the sound code
}

OptionMenu SoundOptions
{
	Title "SOUND OPTIONS"
	Slider "Sounds volume",		"snd_sfxvolume", 0, 1, 0.05
	Slider "Menu volume",		"snd_menuvolume", 0, 1, 0.05
	Slider "Music volume",		"snd_musicvolume", 0, 1, 0.05
	Slider "Announcer volume",	"snd_announcervolume", 0, 1, 0.05 // [TP]
	Option "Announcer",			"cl_announcer", "ZA_Announcers" // [TP]
	Option "MIDI device",		"snd_mididevice", "MidiDevices"
	StaticText " "
	Option "Underwater reverb",	"snd_waterreverb", "OnOff"
	Slider "Underwater cutoff",	"snd_waterlp", 0, 2000, 50, 0
	Option "Randomize pitches",	"snd_pitched", "OnOff"
	Slider "Sound channels",	"snd_channels", 8, 256, 8, 0
	Option "Play connect sound", "cl_connectsound", "YesNo" // [TP]
	Option "Multiple announcer sounds", "cl_allowmultipleannouncersounds", "YesNo" // [TP]
	StaticText " "
	Command "Restart sound",	"snd_reset"
	StaticText " "
	IfOption(Windows)
	{
		Option "Output system",		"snd_output", "SoundOutputsWindows"
	}
	IfOption(Unix)
	{
		Option "Output system",		"snd_output", "SoundOutputsUnix"
	}
	IfOption(Mac)
	{
		Option "Output system",		"snd_output", "SoundOutputsMac"
	}
	Option "Output format",		"snd_output_format", "OutputFormats"
	Option "Speaker mode",		"snd_speakermode", "SpeakerModes"
	Option "Resampler",			"snd_resampler", "Resamplers"
	Option "HRTF filter",		"snd_hrtf", "OnOff"

	StaticText " "
	Submenu "Advanced options",			"AdvSoundOptions"
	Submenu "Module replayer options",	"ModReplayerOptions"
}

/*=======================================
 *
 * Advanced Sound Options Menu
 *
 *=======================================*/

OptionValue GusMemory
{
	0, "Unlimited"
	1, "256K"
	2, "512K"
	3, "768K"
	4, "1024K"
}

OptionValue OplCores
{
	0, "MAME OPL2"
	1, "DOSBox OPL3"
	2, "Java OPL3"
}

OptionMenu AdvSoundOptions
{
	Title "ADVANCED SOUND OPTIONS"
	Option "Sample rate",			"snd_samplerate", "SampleRates"
	Option "Buffer size",			"snd_buffersize", "BufferSizes"
	Option "Buffer count",			"snd_buffercount", "BufferCounts"
	StaticText " "
	StaticText "OPL Synthesis",	1
	Slider "Number of emulated OPL chips", "opl_numchips", 1, 8, 1, 0
	Option "Full MIDI stereo panning", "opl_fullpan", "OnOff"
	Option "OPL Emulator Core", "opl_core", "OplCores"
	StaticText " "
	StaticText "GUS Emulation",	1
	Slider "MIDI voices",	"midi_voices", 16, 256, 4, 0
	Option "Emulate TiMidity", "midi_timiditylike", "OnOff"
	Option "Read DMXGUS lumps", "midi_dmxgus", "OnOff"
	Option "GUS memory size", "gus_memsize", "GusMemory"
}

/*=======================================
 *
 * Module Replayer Options Menu
 *
 *=======================================*/

OptionValue ModReplayers
{
	0.0, "FMOD"
	1.0, "foo_dumb"
}


OptionValue ModInterpolations
{
	0.0, "None"
	1.0, "Linear"
	2.0, "Cubic"
}


OptionValue ModVolumeRamps
{
	0.0, "None"
	1.0, "Logarithmic"
	2.0, "Linear"
	3.0, "XM=lin, else none"
	4.0, "XM=lin, else log"
}


OptionMenu ModReplayerOptions
{
	Title "MODULE REPLAYER OPTIONS"
	Option "Replayer engine",		"mod_dumb", "ModReplayers"
	StaticText " "
	Option "Sample rate",			"mod_samplerate", "SampleRates", "mod_dumb"
	Option "Interpolation",			"mod_interp", "ModInterpolations", "mod_dumb"
	Option "Volume ramping",		"mod_volramp", "ModVolumeRamps", "mod_dumb"
	StaticText " "
	Option "Chip-o-matic",			"mod_autochip", "OnOff", "mod_dumb"
	// 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.
}

/*=======================================
 *
 * Video mode menu
 *
 *=======================================*/

OptionValue ForceRatios
{
	0.0, "Off"
	3.0, "4:3"
	1.0, "16:9"
	5.0, "17:10"
	2.0, "16:10"
	4.0, "5:4"
}
OptionValue Ratios
{
	0.0, "4:3"
	1.0, "16:9"
	2.0, "16:10"
	3.0, "17:10"
	 -1, "All"
}
OptionValue RatiosTFT
{
	0.0, "4:3"
	4.0, "5:4"
	1.0, "16:9"
	2.0, "16:10"
	3.0, "17:10"
	 -1, "All"
}

// [BB]
OptionValue Renderers
{
	0.0, "Software"
	1.0, "OpenGL"
}

OptionMenu VideoModeMenu
{
	Title "VIDEO MODE"
	
	Option "Fullscreen",			"fullscreen", "YesNo"
	Option "Aspect ratio",			"menu_screenratios", "Ratios"
	// [BB]
	Option "Renderer",			"vid_renderer", "Renderers"
	Option "Force aspect ratio",	"vid_aspect", "ForceRatios"
	Option "Enable 5:4 aspect ratio","vid_tft", "YesNo"
	StaticText " "
	ScreenResolution "res_0"
	ScreenResolution "res_1"
	ScreenResolution "res_2"
	ScreenResolution "res_3"
	ScreenResolution "res_4"
	ScreenResolution "res_5"
	ScreenResolution "res_6"
	ScreenResolution "res_7"
	ScreenResolution "res_8"
	ScreenResolution "res_9"
	StaticTextSwitchable "Press ENTER to set mode", "", "VMEnterText"
	StaticText " "
	StaticTextSwitchable "T to test mode for 5 seconds", "Please wait 5 seconds...", "VMTestText"
	class VideoModeMenu
}

