// ***********************************************************
// *                                                         *
// * These values are mainly for UDMF Eternity               *
// *                                                         *
// ***********************************************************

common
{
	// Some common settings
	include("Common.cfg");

	// Default testing parameters
	include("Test_params.cfg", "eternity");

	// Action special help (mxd)
	actionspecialhelp = "http://eternity.youfailit.net/wiki/Detailed_parameterized_linedef_specification";
	
	// FIXME: this info is not on the wiki, but in things.edf
	// Thing class help (mxd)
	thingclasshelp = "https://github.com/team-eternity/eternity/blob/master/base/doom/things.edf";

	// Default nodebuilder configurations
	defaultsavecompiler = "zdbsp_normal";
	defaulttestcompiler = "zdbsp_fast";

	// Generalized actions
	// generalizedlinedefs is true for Doom format and false for
	// the other two, so it's not here.
	generalizedsectors = true;
	
	//mxd. Maximum safe map size check (0 means skip check)
	safeboundary = 0;

	// Texture loading options
	mixtexturesflats = true;
	defaulttexturescale = 1.0f;
	defaultflatscale = 1.0f;
	scaledtextureoffsets = true;
	
	//mxd. Sidedefs compression
	// ioanch FIXME: what does this do? I made it false
	sidedefcompressionignoresaction = false;

	// Texture sources
	textures
	{
		include("Doom_misc.cfg", "textures");
		include("ZDoom_misc.cfg", "textures");	// works for Eternity too
	}
	
	//mxd. HiRes sources
	hires
	{
		include("ZDoom_misc.cfg", "hires");
	}

	// Patch sources
	patches
	{
		include("Doom_misc.cfg", "patches");
	}

	// Sprite sources
	sprites
	{
		include("Doom_misc.cfg", "sprites");
	}

	// Flat sources
	flats
	{
		include("Doom_misc.cfg", "flats");
	}

	// Colormap sources
	colormaps
	{
		include("Boom_misc.cfg", "colormaps");
	}

	//mxd. Voxel sources
	// Not in Eternity
//	voxels
//	{
//		include("ZDoom_misc.cfg", "voxels");
//	}

	// Generalized sector types
	gen_sectortypes
	{
		include("ZDoom_generalized.cfg", "gen_sectortypes");	// same as in ZDOOM
	}
	
	//mxd. Built-in Damage types
	// ioanch: From base/things.edf
	damagetypes = "Fist Pistol Shotgun Chaingun Plasma BFG BFG_Splash Chainsaw SShotgun BetaBFG BFGBurst Slime Lava Crush Telefrag Falling Suicide Barrel Splash Quake Rocket R_Splash BFG11k_Splash Grenade Hit PlayerMisc Fire";
	
	compatibility
	{
		fixnegativepatchoffsets = true;
		fixmaskedpatchoffsets = true;
	}
}

mapformat_doom
{
    mixtexturesflats = true;
  // The format interface handles the map data format
  formatinterface = "DoomMapSetIO";

	maplumpnames
	{
		include("Doom_misc.cfg", "doommaplumpnames");
		include("Boom_misc.cfg", "boommaplumpnames");
	}

  // When this is set to true, sectors with the same tag will light up when a line is highlighted
  linetagindicatesectors = true;

  // Special linedefs
  include("ZDoom_misc.cfg", "speciallinedefs_doomhexen");

  // Default flags for first new thing
  defaultthingflags
  {
    include("Doom_misc.cfg", "defaultthingflags");
  }

  // Door making
  include("ZDoom_misc.cfg", "doormaking_doom");

  // Generalized actions
  generalizedlinedefs = true;
  generalizedsectors = true;
  
  // GENERALIZED LINEDEF TYPES
	gen_linedeftypes
	{
		include("Boom_generalized.cfg", "gen_linedeftypes");
	}
  
  // GENERALIZED SECTOR TYPES
	gen_sectortypes
	{
		include("Boom_generalized.cfg", "gen_sectortypes");
        include("Eternity_generalized.cfg", "gen_sectortypes");
	}
  
  // DEFAULT SECTOR BRIGHTNESS LEVELS
  sectorbrightness
  {
    include("Doom_misc.cfg", "sectorbrightness");
  }

  // SECTOR TYPES
  sectortypes
  {
    include("Doom_sectors.cfg");
  }

	// LINEDEF FLAGS
	linedefflags
	{
		include("Doom_misc.cfg", "linedefflags");
		include("Boom_misc.cfg", "linedefflags");
        include("Eternity_misc.cfg", "linedefflags");
	}

	// LINEDEF ACTIVATIONS
	linedefactivations
	{
	}

	// Linedef flags UDMF translation table
	// This is needed for copy/paste and prefabs to work properly
	// When the UDMF field name is prefixed with ! it is inverted
	linedefflagstranslation
	{
		include("Doom_misc.cfg", "linedefflagstranslation");
		include("Boom_misc.cfg", "linedefflagstranslation");
		include("Eternity_misc.cfg", "linedefflagstranslation");
	}

	// LINEDEF TYPES
	linedeftypes
	{
		include("Doom_linedefs.cfg");
		include("Boom_linedefs.cfg");
        include("Eternity_linedefs.cfg", "doom");
	}

	// THING FLAGS
	thingflags
	{
		include("Doom_misc.cfg", "thingflags");
		include("Boom_misc.cfg", "thingflags");
        include("Eternity_misc.cfg", "thingflags");
	}

	// Thing flags UDMF translation table
	// This is needed for copy/paste and prefabs to work properly
	// When the UDMF field name is prefixed with ! it is inverted
	thingflagstranslation
	{
		include("Doom_misc.cfg", "thingflagstranslation");
		include("Boom_misc.cfg", "thingflagstranslation");
		include("Eternity_misc.cfg", "thingflagstranslation");
	}
		// How to compare thing flags (for the stuck things error checker)
	thingflagscompare
	{
		include("Doom_misc.cfg", "thingflagscompare");
		include("Boom_misc.cfg", "thingflagscompare");
	}

	// Things flags masks
	include("Doom_misc.cfg", "thingflagsmasks");

}
// ***********************************************************
// *                                                         *
// *                       Text map format                   *
// *                                                         *
// ***********************************************************

mapformat_udmf
{
	// The format interface handles the map data format
	formatinterface = "UniversalMapSetIO";

	//mxd. The default script compiler to use
	defaultscriptcompiler = "zdoom_acs.cfg"; 

	// Enables support for long (> 8 chars) texture names
	// WARNING: this should only be enabled for UDMF game configurations!
	// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
	longtexturenames = true;
	
	// Enables support for individual offsets of upper/middle/lower sidedef textures
	localsidedeftextureoffsets = true;

	// Enables setting brightness for floor, ceiling, and walls independently from each other
	distinctfloorandceilingbrightness = true;
	distinctwallbrightness = true;

	// Enabled setting brightness for upper, middle, and lower sidedef independently from each other
	distinctsidedefpartbrightness = true;

	// Enables support for skewing sidedef textures
	sidedeftextureskewing = true;
	
	// Default nodebuilder configurations
	defaultsavecompiler = "zdbsp_udmf_normal";
	defaulttestcompiler = "zdbsp_udmf_fast";
	
	// ioanch: eternity
	engine = "eternity"; // override that so that DB2 uses the correct namespace

	maplumpnames
	{
		include("UDMF_misc.cfg", "udmfmaplumpnames_begin");
		include("ZDoom_misc.cfg", "udmfmaplumpnames");
		include("UDMF_misc.cfg", "udmfmaplumpnames_end");
	}

	// eternity
	universalfields
	{
		include("Eternity_misc.cfg", "universalfields");
	}

	// When this is set to true, sectors with the same tag will light up when a line is highlighted
	linetagindicatesectors = false;

	// Special linedefs
	include("ZDoom_misc.cfg", "speciallinedefs_udmf");	// same in EE

	// Default flags for first new thing
	defaultthingflags
	{
		include("Eternity_misc.cfg", "defaultthingflags_udmf");
	}

	// Door making
	include("Eternity_misc.cfg", "doormaking_udmf");

	// Generalized actions
	generalizedlinedefs = false;
	generalizedsectors = true;
	
	// GENERALIZED SECTOR TYPES
	gen_sectortypes
	{
        include("Eternity_generalized.cfg", "gen_sectortypes_udmf");
	}

	// SECTOR FLAGS
	sectorflags
	{
		include("Eternity_misc.cfg", "sectorflags_udmf");
	}
	
	// Sector portal flags (ceiling)
	ceilingportalflags
	{
		portal_ceil_disabled = "Disabled";
		portal_ceil_blocksound = "Block sound";
		portal_ceil_nopass = "Impassable";
		portal_ceil_norender = "Not rendered";
		portal_ceil_attached = "Attach to linked portal";
		portal_ceil_useglobaltex = "Use global texture";
	}
	
	// Sector portal flags (floor)
	floorportalflags
	{
		portal_floor_disabled = "Disabled";
		portal_floor_blocksound = "Block sound";
		portal_floor_nopass = "Impassable";
		portal_floor_norender = "Not rendered";
		portal_floor_attached = "Attach to linked portal";
		portal_floor_useglobaltex = "Use global texture";
	}
	
	// Sector portal renderstyles
	sectorportalrenderstyles
	{
		none = "None";
		translucent = "Translucent";
		additive = "Additive";
	}	
	
	// DEFAULT SECTOR BRIGHTNESS LEVELS
	sectorbrightness
	{
		include("ZDoom_misc.cfg", "sectorbrightness");
	}

	// SECTOR TYPES
	sectortypes
	{
		include("Eternity_misc.cfg", "sectors_udmf");
	}

	// SECTOR RENSERSTYLES
	sectorrenderstyles
	{
		include("UDMF_misc.cfg", "sectorrenderstyles");
	}

	// LINEDEF FLAGS
	linedefflags
	{
		include("Eternity_misc.cfg", "linedefflags_udmf");
	}

	// LINEDEF ACTIVATIONS
	linedefactivations
	{
		include("Eternity_misc.cfg", "linedefactivations_udmf");
	}
	
	//mxd. Linedef flags UDMF translation table
	// This is needed for copy/paste and prefabs to work properly
	// When the UDMF field name is prefixed with ! it is inverted
	linedefflagstranslation
	{
		include("Doom_misc.cfg", "linedefflagstranslation");
		include("Hexen_misc.cfg", "linedefflagstranslation");
		include("ZDoom_misc.cfg", "linedefflagstranslation");
	} 

	// LINEDEF RENSERSTYLES
	linedefrenderstyles
	{
		include("UDMF_misc.cfg", "linedefrenderstyles");
	}

	//SIDEDEF FLAGS
	sidedefflags
	{
		include("Eternity_misc.cfg", "sidedefflags");  
	}

	// THING FLAGS
	thingflags
	{
		include("Eternity_misc.cfg", "thingflags_udmf");
	}
	
	// How to compare thing flags (for the stuck things error checker)
	thingflagscompare
	{
		include("Eternity_misc.cfg", "thingflagscompare_udmf");
	}

	//mxd. Thing flags UDMF translation table
	// This is needed for copy/paste and prefabs to work properly
	// When the UDMF field name is prefixed with ! it is inverted
	thingflagstranslation
	{
		include("Doom_misc.cfg", "thingflagstranslation");
		include("Hexen_misc.cfg", "thingflagstranslation");
		include("ZDoom_misc.cfg", "thingflagstranslation");
	}

	// Things flags masks
	include("Hexen_misc.cfg", "thingflagsmasks");

	// LINEDEF TYPES
	linedeftypes
	{
		include("Hexen_linedefs.cfg");
		include("Eternity_linedefs.cfg", "udmf");
	}

}