// Specification: HLFix
// Written by: Ryan Gregg
// Version: 0.81b
// Created: August 4, 2004
// Last updated: September 13, 2004

// Updated by: Ryan Gregg
// Date: September 13, 2004
// Added MakeWAD Batch and Stage.

Batch
{
  Name		"MakeWAD"
  Priority	"0"
  Links		"HLFix,http://extension.ws/hlfix/"
  Stages	"MakeWAD"
  Template	"@echo off\n"_
  		"\"${StagePath=MakeWAD}\" ${StageParam=MakeWAD}\n"
}

Batch
{
  Name		"HLFix"
  Priority	"1"
  Links		"HLFix,http://extension.ws/hlfix/"
  Stages	"HLFix"
  Filter	"Supported Files|*.rmf;*.map|RMF Files (*.rmf)|*.rmf|MAP Files (*.map)|*.map"
  Template	"@echo off\n"_
  		"\"${StagePath=HLFix}\" ${StageParam=HLFix} \"${FilePath}\\${FileName}\"\n"
}

//
// MakeWAD
//
Stage
{
  Name		"MakeWAD"
  Title		"Make WAD"
  Type		"Program"
  Filter	"MakeWAD (makewad.exe)|makewad.exe"

  Space
  {
    Size	"10"
  }

  TextBox
  {
    Name	"Additional Parameters"
    Type	"String"
    Size	"3"
    Hint	"\tAdd additional parameters here as you would a command line."
  }
}

//
// HLFix
//
Stage
{
  Name		"HLFix"
  Title		"Half-Life Fix"
  Type		"Program"
  Filter	"HLFix (hlfix.exe)|hlfix.exe"

  CheckBox
  {
    Name	"Only Visible"
    Param	"-v"
    Bold	"True"
    Hint	"\tProcess and output visible objects only."
  }

  CheckBox
  {
    Name	"No Tessellation"
    Param	"-nt"
    Hint	"\tDon't tesselate non-planar faces."
  }

  CheckBox
  {
    Name	"No Decomposition"
    Param	"-nd"
    Hint	"\tDon't decompose non-convex solids."
  }

  CheckBox
  {
    Name	"No Union"
    Param	"-nu"
    Hint	"\tDon't unite coplanar faces."
  }

  CheckBox
  {
    Name	"No Correction"
    Param	"-na"
    Hint	"\tDon't perform any geometry correction."
  }

  TextBox
  {
    Name	"Epsilon"
    Param	"-e"
    Type	"Single"
    Default	"1.0"
    Min		"0.0"
    Hint	"\tEpsilon factor for numeric comparisons.\n\n"_
  		"\tCertain numeric comparisons in hlfix require a \"fuzziness\" value in order to deal with inaccurate data that can be generated by VHE. The value of the -e parameter is a multiplier for this fuzziness value. If you find that hlfix is modifying geometry it shouldn't or producing unexplainable \"Incomplete edge cycle\" errors, try raising this value. If you find that hlfix is not modifying geometry it should or that your compiled maps have visible errors, try lowering this value."
  }

  TextBox
  {
    Name	"Output File"
    Param	"-o"
    Type	"String"
    Hint	"\tSpecify another output file name (default is <mapname>.map or <mapname>.rmf)."
  }

  ComboBox
  {
    Name	"Input File"
    Bold	"True"
    Default	"RMF File"
    Options	"RMF File,|MAP File,-r"
    Hint	"\tSpecify the input file type.\n\n"_
    		"\tIf RMF File is selected HLFix will generate a MAP File.  If MAP File is selected HLFix will generate a RMF File."
  }

  FileBox
  {
    Name	"WAD File"
    Param	"-w"
    Bold	"True"
    FullPath	"True"
    //Default	"wad.txt"
    Filter	"Text Files (*.txt)|*.txt|All Files|*.*"
    Hint	"\tSpecify a .wad file list.\n\n"_
    		"\tThe .wad files used in your map must be listed in a seperate text file (because they aren't listed in the .rmf file). This file must contain the full paths of the wad files used in your map, listed one per line. By default, hlfix looks for a file called wad.txt. It looks for the file in the same directory as the input file unless you specify a path when using the -w parameter. A utility is included with hlfix called makewad.exe which reads VHE's registry entries to generate a wad list file. The only reason hlfix needs the filenames for .wads is so those filenames can be written to the .map file. hlfix does not actually attempt to read any of the .wads as it currently does not perform any operations on textures themselves."
  }

  Space
  {
    Size	"1"
  }

  TextBox
  {
    Name	"Additional Parameters"
    Type	"String"
    Size	"3"
    Hint	"\tAdd additional parameters here as you would a command line."
  }
}