Browse Source

added some info and buildtools

Shane Spies 2 years ago
parent
commit
4502689ba5
100 changed files with 32502 additions and 0 deletions
  1. 91 0
      build/Compile_MeckRain_HIGH.bat
  2. 91 0
      build/Compile_MeckRain_LOW.bat
  3. 77 0
      build/MecklenburgV-B5a5.bat
  4. 82 0
      build/MeckrainV5B1.bat
  5. 82 0
      build/MeckrainVB5A.bat
  6. 18 0
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/example-batch-file.bat
  7. 72 0
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/shlt.fgd
  8. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/hlbsp.exe
  9. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/hlcsg.exe
  10. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/hlrad.exe
  11. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/hlvis.exe
  12. 101 0
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/lights.rad
  13. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/ripent.exe
  14. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/hlbsp.exe
  15. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/hlcsg.exe
  16. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/hlrad.exe
  17. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/hlvis.exe
  18. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/ripent.exe
  19. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlbsp.exe
  20. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlcsg.exe
  21. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlfix.exe
  22. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlrad.exe
  23. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlvis.exe
  24. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/ripent.exe
  25. 9 0
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/thecompilator(GoldSource).bat
  26. 4 0
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/wad.txt
  27. BIN
      build/SHLT-3.9/SHLT 3.9 Binaries and Resources/zhlt.wad
  28. 54 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/Terms of Use.txt
  29. 49 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/TimeCounter.h
  30. 649 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/anorms.h
  31. 158 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/blockmem.cpp
  32. 20 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/blockmem.h
  33. 149 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/boundingbox.h
  34. 1696 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/bspfile.cpp
  35. 422 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/bspfile.h
  36. 578 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/cmdlib.cpp
  37. 170 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/cmdlib.h
  38. 228 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/filelib.cpp
  39. 22 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/filelib.h
  40. 0 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/files.cpp
  41. 40 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/hlassert.h
  42. 684 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/log.cpp
  43. 104 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/log.h
  44. 9 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/mathlib.cpp
  45. 278 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/mathlib.h
  46. 17 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/mathtypes.h
  47. 109 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/messages.cpp
  48. 96 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/messages.h
  49. 61 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/resourcelock.cpp
  50. 11 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/resourcelock.h
  51. 362 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/scriplib.cpp
  52. 26 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/scriplib.h
  53. 682 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/threads.cpp
  54. 49 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/threads.h
  55. 58 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/win32fix.h
  56. 1103 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/winding.cpp
  57. 82 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/winding.h
  58. 5 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/copy_executables_here.bat
  59. 278 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/bsp5.h
  60. 624 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/hlbsp.mak
  61. 721 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/hlbsp.vcproj
  62. 177 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/hlbsp.vcproj.SILENCERSPC.Administrator.user
  63. 48 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/make.inc
  64. 259 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/merge.cpp
  65. 553 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/outside.cpp
  66. 325 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/portals.cpp
  67. 1533 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/qbsp.cpp
  68. 1164 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/solidbsp.cpp
  69. 309 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/surfaces.cpp
  70. 558 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/tjunc.cpp
  71. 351 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlbsp/writebsp.cpp
  72. 458 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/autowad.cpp
  73. 1131 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/brush.cpp
  74. 361 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/brushunion.cpp
  75. 312 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/csg.h
  76. 688 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/hlcsg.mak
  77. 746 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/hlcsg.vcproj
  78. 177 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/hlcsg.vcproj.SILENCERSPC.Administrator.user
  79. 102 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/hullfile.cpp
  80. 45 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/make.inc
  81. 660 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/map.cpp
  82. 0 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/netvis_in_vis.cpp
  83. 50 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/properties.cpp
  84. 1895 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/qcsg.cpp
  85. 849 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/textures.cpp
  86. 461 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/wadcfg.cpp
  87. 203 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/wadinclude.cpp
  88. 132 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/wadpath.cpp
  89. 24 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlcsg/wadpath.h
  90. 709 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/hlrad.mak
  91. 761 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/hlrad.vcproj
  92. 177 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/hlrad.vcproj.SILENCERSPC.Administrator.user
  93. 640 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/lerp.cpp
  94. 2450 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/lightmap.cpp
  95. 57 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/make.inc
  96. 246 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/mathutil.cpp
  97. 124 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/nomatrix.cpp
  98. 3023 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/qrad.cpp
  99. 523 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/qrad.h
  100. 0 0
      build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/hlrad/qradutil.cpp

+ 91 - 0
build/Compile_MeckRain_HIGH.bat

@@ -0,0 +1,91 @@
+@echo off
+echo.
+echo Steven, modify the batch script to fit your settings. The original map name is Meckrainig1, so change it.
+echo.
+
+set WADROOT=F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\wads
+
+
+echo ###################################################
+echo #           Batch  Compiler -MeckVR-              #
+echo ###################################################
+echo ###################################################
+echo #  MecklenburgV_rain by FUNJOB Batch Compiler V5  #
+echo ###################################################
+echo #  This toolset is ment for HIGH quality builds   #
+echo ###################################################
+echo.
+echo Written At: 6/8/2009 3:22 PM
+echo BC Version: 3.1.2.0
+echo.
+
+echo Hey steven, don't give this script away, it's very crucial for compiling the mecklenburg series
+echo Also, don't give out any of the files like the lights.rad. That's also modded by me.
+
+"hlcsg.exe" -wadautodetect -cliptype Precise -chart -estimate -texdata 15000 -lightdata 15000 "Meckraing1"
+if ERRORLEVEL 1 goto failed
+"hlbsp.exe" -maxnodesize 8192.0 -chart -estimate -texdata 15000 -lightdata 15000 -wadinclude <INSTERT EMDEDED.WAD> "Meckraing1"
+if ERRORLEVEL 1 goto failed
+"hlvis.exe" -full -chart -estimate -texdata 15000 -lightdata 15000 "Meckraing1"
+if ERRORLEVEL 1 goto failed
+"hlrad.exe" -sparse -chart -estimate -texdata 15000 -lightdata 15000 -chop 16 -extra "Meckraing1"
+if ERRORLEVEL 1 goto failed
+if ERRORLEVEL 1 goto failed
+if not exist "Meckraing1.wic" goto nodelwic
+del "Meckraing1.wic"
+echo Meckraing1.wic deleted.
+:nodelwic
+if not exist "Meckraing1.lin" goto nodellin
+del "Meckraing1.lin"
+echo Meckraing1.lin deleted.
+:nodellin
+if not exist "Meckraing1.p0" goto nodelp0
+del "Meckraing1.p0"
+echo Meckraing1.p0 deleted.
+:nodelp0
+if not exist "Meckraing1.p1" goto nodelp1
+del "Meckraing1.p1"
+echo Meckraing1.p1 deleted.
+:nodelp1
+if not exist "Meckraing1.p2" goto nodelp2
+del "Meckraing1.p2"
+echo Meckraing1.p2 deleted.
+:nodelp2
+if not exist "Meckraing1.p3" goto nodelp3
+del "Meckraing1.p3"
+echo Meckraing1.p3 deleted.
+:nodelp3
+if not exist "Meckraing1.prt" goto nodelprt
+del "Meckraing1.prt"
+echo Meckraing1.prt deleted.
+:nodelprt
+if not exist "Meckraing1.err" goto nodelerr
+del "Meckraing1.err"
+echo Meckraing1.err deleted.
+:nodelerr
+if not exist "Meckraing1.ent.bak" goto nodelentbac
+del "Meckraing1.ent.bak"
+echo Meckraing1.ent.bak deleted.
+:nodelentbac
+if not exist "Meckraing1.bsp" goto nocopybsp
+copy "Meckraing1.bsp" "C:\Steam\steamapps\_Funjob_\half-life\ts\maps"
+echo Meckraing1.bsp copied to C:\Steam\steamapps\_Funjob_\half-life\ts\maps.
+:nocopybsp
+if not exist "Meckraing1.res" goto nocopyres
+copy "Meckraing1.res" "C:\Steam\steamapps\_Funjob_\half-life\ts\maps"
+echo Meckraing1.res copied to C:\Steam\steamapps\_Funjob_\half-life\ts\maps.
+:nocopyres
+if not exist "Meckraing1.pts" goto nocopypts
+copy "Meckraing1.pts" "C:\Steam\steamapps\_Funjob_\half-life\ts\maps"
+echo Meckraing1.pts copied to C:\Steam\steamapps\_Funjob_\half-life\ts\maps.
+:nocopypts
+
+goto succeeded
+:failed
+echo.
+echo There was a problem compiling Mecklenburg, check your log file for errors.
+:succeeded
+echo.
+if exist "Meckraing1.log" "%windir%/NOTEPAD.EXE" "Meckraing1.log"
+
+echo Congrats, Mecklenburg Rain compiled with no fatal issues!

+ 91 - 0
build/Compile_MeckRain_LOW.bat

@@ -0,0 +1,91 @@
+@echo off
+echo.
+echo Steven, modify the batch script to fit your settings. The original map name is Meckrainig1, so change it.
+echo.
+
+set WADROOT=F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\wads
+
+
+echo ###################################################
+echo #           Batch  Compiler -MeckVR-              #
+echo ###################################################
+echo ###################################################
+echo #  MecklenburgV_rain by FUNJOB Batch Compiler V5  #
+echo ###################################################
+echo #   This toolset is ment for low quality builds   #
+echo ###################################################
+echo.
+echo Written At: 6/8/2009 3:22 PM
+echo BC Version: 3.1.2.0
+echo.
+
+echo Hey steven, don't give this script away, it's very crucial for compiling the mecklenburg series
+echo Also, don't give out any of the files like the lights.rad. That's also modded by me.
+
+"hlcsg.exe" -wadautodetect -cliptype Precise -chart -estimate -texdata 15000 -lightdata 15000 "Meckraing1"
+if ERRORLEVEL 1 goto failed
+"hlbsp.exe" -maxnodesize 2048.0 -chart -estimate -texdata 15000 -lightdata 15000 "Meckraing1"
+if ERRORLEVEL 1 goto failed
+"hlvis.exe" -full -chart -estimate -texdata 15000 -lightdata 15000 "Meckraing1"
+if ERRORLEVEL 1 goto failed
+"hlrad.exe" -sparse -chart -estimate -texdata 15000 -lightdata 15000  "Meckraing1"
+if ERRORLEVEL 1 goto failed
+if ERRORLEVEL 1 goto failed
+if not exist "Meckraing1.wic" goto nodelwic
+del "Meckraing1.wic"
+echo Meckraing1.wic deleted.
+:nodelwic
+if not exist "Meckraing1.lin" goto nodellin
+del "Meckraing1.lin"
+echo Meckraing1.lin deleted.
+:nodellin
+if not exist "Meckraing1.p0" goto nodelp0
+del "Meckraing1.p0"
+echo Meckraing1.p0 deleted.
+:nodelp0
+if not exist "Meckraing1.p1" goto nodelp1
+del "Meckraing1.p1"
+echo Meckraing1.p1 deleted.
+:nodelp1
+if not exist "Meckraing1.p2" goto nodelp2
+del "Meckraing1.p2"
+echo Meckraing1.p2 deleted.
+:nodelp2
+if not exist "Meckraing1.p3" goto nodelp3
+del "Meckraing1.p3"
+echo Meckraing1.p3 deleted.
+:nodelp3
+if not exist "Meckraing1.prt" goto nodelprt
+del "Meckraing1.prt"
+echo Meckraing1.prt deleted.
+:nodelprt
+if not exist "Meckraing1.err" goto nodelerr
+del "Meckraing1.err"
+echo Meckraing1.err deleted.
+:nodelerr
+if not exist "Meckraing1.ent.bak" goto nodelentbac
+del "Meckraing1.ent.bak"
+echo Meckraing1.ent.bak deleted.
+:nodelentbac
+if not exist "Meckraing1.bsp" goto nocopybsp
+copy "Meckraing1.bsp" "C:\Steam\steamapps\_Funjob_\half-life\ts\maps"
+echo Meckraing1.bsp copied to C:\Steam\steamapps\_Funjob_\half-life\ts\maps.
+:nocopybsp
+if not exist "Meckraing1.res" goto nocopyres
+copy "Meckraing1.res" "C:\Steam\steamapps\_Funjob_\half-life\ts\maps"
+echo Meckraing1.res copied to C:\Steam\steamapps\_Funjob_\half-life\ts\maps.
+:nocopyres
+if not exist "Meckraing1.pts" goto nocopypts
+copy "Meckraing1.pts" "C:\Steam\steamapps\_Funjob_\half-life\ts\maps"
+echo Meckraing1.pts copied to C:\Steam\steamapps\_Funjob_\half-life\ts\maps.
+:nocopypts
+
+goto succeeded
+:failed
+echo.
+echo There was a problem compiling Mecklenburg, check your log file for errors.
+:succeeded
+echo.
+if exist "Meckraing1.log" "%windir%/NOTEPAD.EXE" "Meckraing1.log"
+
+echo Congrats, Mecklenburg Rain compiled with no fatal issues!

+ 77 - 0
build/MecklenburgV-B5a5.bat

@@ -0,0 +1,77 @@
+@echo off
+set WADROOT=D:\Hammer
+echo ###################################################
+echo #                 Batch  Compiler                 #
+echo ###################################################
+echo ###################################################
+echo #  Please report bugs to: ryansgregg@hotmail.com  #
+echo ###################################################
+echo.
+echo Written At: 3/3/2007 4:27 PM
+echo BC Version: 3.1.2.0
+echo.
+"D:\Hammer\batch2\Tools\hlcsg.exe" -wadautodetect -cliptype Simple -wadinclude embeded.wad -chart -estimate -texdata 15000 -lightdata 15000 "D:\Hammer\Mecklenburg\vfinal\meckv_final"
+if ERRORLEVEL 1 goto failed
+"D:\Hammer\batch2\Tools\hlbsp.exe" -maxnodesize 8192.0 -chart -estimate -texdata 15000 -lightdata 15000 "D:\Hammer\Mecklenburg\vfinal\meckv_final"
+if ERRORLEVEL 1 goto failed
+"D:\Hammer\batch2\Tools\hlvis.exe" -chart -estimate -texdata 15000 -lightdata 15000 "D:\Hammer\Mecklenburg\vfinal\meckv_final"
+if ERRORLEVEL 1 goto failed
+"D:\Hammer\batch2\Tools\hlrad.exe" -chop 70 -sparse -chart -estimate -texdata 15000 -lightdata 15000  "D:\Hammer\Mecklenburg\vfinal\meckv_final"
+if ERRORLEVEL 1 goto failed
+if ERRORLEVEL 1 goto failed
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.wic" goto nodelwic
+del "D:\Hammer\Mecklenburg\vfinal\meckv_final.wic"
+echo D:\Hammer\Mecklenburg\vfinal\meckv_final.wic deleted.
+:nodelwic
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.lin" goto nodellin
+del "D:\Hammer\Mecklenburg\vfinal\meckv_final.lin"
+echo D:\Hammer\Mecklenburg\vfinal\meckv_final.lin deleted.
+:nodellin
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.p0" goto nodelp0
+del "D:\Hammer\Mecklenburg\vfinal\meckv_final.p0"
+echo D:\Hammer\Mecklenburg\vfinal\meckv_final.p0 deleted.
+:nodelp0
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.p1" goto nodelp1
+del "D:\Hammer\Mecklenburg\vfinal\meckv_final.p1"
+echo D:\Hammer\Mecklenburg\vfinal\meckv_final.p1 deleted.
+:nodelp1
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.p2" goto nodelp2
+del "D:\Hammer\Mecklenburg\vfinal\meckv_final.p2"
+echo D:\Hammer\Mecklenburg\vfinal\meckv_final.p2 deleted.
+:nodelp2
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.p3" goto nodelp3
+del "D:\Hammer\Mecklenburg\vfinal\meckv_final.p3"
+echo D:\Hammer\Mecklenburg\vfinal\meckv_final.p3 deleted.
+:nodelp3
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.prt" goto nodelprt
+del "D:\Hammer\Mecklenburg\vfinal\meckv_final.prt"
+echo D:\Hammer\Mecklenburg\vfinal\meckv_final.prt deleted.
+:nodelprt
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.err" goto nodelerr
+del "D:\Hammer\Mecklenburg\vfinal\meckv_final.err"
+echo D:\Hammer\Mecklenburg\vfinal\meckv_final.err deleted.
+:nodelerr
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.ent.bak" goto nodelentbac
+del "D:\Hammer\Mecklenburg\vfinal\meckv_final.ent.bak"
+echo D:\Hammer\Mecklenburg\vfinal\meckv_final.ent.bak deleted.
+:nodelentbac
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.bsp" goto nocopybsp
+copy "D:\Hammer\Mecklenburg\vfinal\meckv_final.bsp" "C:\Steam\SteamApps\_funjob_\half-life\ts\maps"
+echo meckv_final.bsp copied to C:\Steam\SteamApps\_funjob_\half-life\ts\maps.
+:nocopybsp
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.res" goto nocopyres
+copy "D:\Hammer\Mecklenburg\vfinal\meckv_final.res" "C:\Steam\SteamApps\_funjob_\half-life\ts\maps"
+echo meckv_final.res copied to C:\Steam\SteamApps\_funjob_\half-life\ts\maps.
+:nocopyres
+if not exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.pts" goto nocopypts
+copy "D:\Hammer\Mecklenburg\vfinal\meckv_final.pts" "C:\Steam\SteamApps\_funjob_\half-life\ts\maps"
+echo meckv_final.pts copied to C:\Steam\SteamApps\_funjob_\half-life\ts\maps.
+:nocopypts
+
+goto succeeded
+:failed
+echo.
+echo There was a problem compiling your map, check your meckv_final.log file for errors.
+:succeeded
+echo.
+if exist "D:\Hammer\Mecklenburg\vfinal\meckv_final.log" "C:\WINDOWS\system32\notepad.exe" "D:\Hammer\Mecklenburg\vfinal\meckv_final.log"

+ 82 - 0
build/MeckrainV5B1.bat

@@ -0,0 +1,82 @@
+@echo off
+echo ###################################################
+echo #                 Batch  Compiler                 #
+echo ###################################################
+echo ###################################################
+echo #  Please report bugs to: ryansgregg@hotmail.com  #
+echo ###################################################
+echo.
+echo Written At: 2/13/2010 11:08 PM
+echo BC Version: 3.1.2.0
+echo.
+if ERRORLEVEL 1 goto failed
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\hlcsg.exe" -wadautodetect -cliptype Simple -chart -estimate -texdata 8192 -lightdata 6144 "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\hlbsp.exe" -maxnodesize 2048 -chart -estimate -texdata 8192 -lightdata 6144 "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\hlvis.exe" -chart -estimate -texdata 8192 -lightdata 6144 "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\hlrad.exe" -nopaque -notexscale -chop 128.0 -dscale 1.0 -chart -estimate -texdata 8192 -lightdata 6144  "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\ripent.exe" -export -chart -texdata 8192 -lightdata 6144 "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\resgen.exe" -k -o -f "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.wic" goto nodelwic
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.wic"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.wic deleted.
+:nodelwic
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.lin" goto nodellin
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.lin"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.lin deleted.
+:nodellin
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p0" goto nodelp0
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p0"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p0 deleted.
+:nodelp0
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p1" goto nodelp1
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p1"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p1 deleted.
+:nodelp1
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p2" goto nodelp2
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p2"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p2 deleted.
+:nodelp2
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p3" goto nodelp3
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p3"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p3 deleted.
+:nodelp3
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.prt" goto nodelprt
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.prt"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.prt deleted.
+:nodelprt
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.err" goto nodelerr
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.err"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.err deleted.
+:nodelerr
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.ent.bak" goto nodelentbac
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.ent.bak"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.ent.bak deleted.
+:nodelentbac
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.bsp" goto nocopybsp
+copy "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.bsp" "C:\steam\steamapps\_funjob_\half-life\ts\maps"
+echo MecklenburgV_RainB5.bsp copied to C:\steam\steamapps\_funjob_\half-life\ts\maps.
+:nocopybsp
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.res" goto nocopyres
+copy "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.res" "C:\steam\steamapps\_funjob_\half-life\ts\maps"
+echo MecklenburgV_RainB5.res copied to C:\steam\steamapps\_funjob_\half-life\ts\maps.
+:nocopyres
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.pts" goto nocopypts
+copy "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.pts" "C:\steam\steamapps\_funjob_\half-life\ts\maps"
+echo MecklenburgV_RainB5.pts copied to C:\steam\steamapps\_funjob_\half-life\ts\maps.
+:nocopypts
+
+goto succeeded
+:failed
+echo.
+echo There was a problem compiling your map, check your MecklenburgV_RainB5.log file for errors.
+:succeeded
+echo.
+if exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.log" "F:\WINDOWS\NOTEPAD.EXE" "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.log"

+ 82 - 0
build/MeckrainVB5A.bat

@@ -0,0 +1,82 @@
+@echo off
+echo ###################################################
+echo #                 Batch  Compiler                 #
+echo ###################################################
+echo ###################################################
+echo #  Please report bugs to: ryansgregg@hotmail.com  #
+echo ###################################################
+echo.
+echo Written At: 2/13/2010 11:10 PM
+echo BC Version: 3.1.2.0
+echo.
+if ERRORLEVEL 1 goto failed
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\hlcsg.exe" -wadautodetect -cliptype Simple -chart -estimate -texdata 8192 -lightdata 6144 "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\hlbsp.exe" -maxnodesize 2048 -chart -estimate -texdata 8192 -lightdata 6144 "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\hlvis.exe" -chart -estimate -texdata 8192 -lightdata 6144 "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\hlrad.exe" -extra -notexscale -chop 128.0 -dscale 1.0 -chart -estimate -texdata 8192 -lightdata 6144  "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\batch2\SHLT3.7\x86-SSE2\ripent.exe" -export -chart -texdata 8192 -lightdata 6144 "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+if ERRORLEVEL 1 goto failed
+"F:\HLDev\Goldsource\Hammer\resgen.exe" -k -o -f "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5"
+if ERRORLEVEL 1 goto failed
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.wic" goto nodelwic
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.wic"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.wic deleted.
+:nodelwic
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.lin" goto nodellin
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.lin"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.lin deleted.
+:nodellin
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p0" goto nodelp0
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p0"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p0 deleted.
+:nodelp0
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p1" goto nodelp1
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p1"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p1 deleted.
+:nodelp1
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p2" goto nodelp2
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p2"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p2 deleted.
+:nodelp2
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p3" goto nodelp3
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p3"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.p3 deleted.
+:nodelp3
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.prt" goto nodelprt
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.prt"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.prt deleted.
+:nodelprt
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.err" goto nodelerr
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.err"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.err deleted.
+:nodelerr
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.ent.bak" goto nodelentbac
+del "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.ent.bak"
+echo F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.ent.bak deleted.
+:nodelentbac
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.bsp" goto nocopybsp
+copy "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.bsp" "C:\steam\steamapps\_funjob_\half-life\ts\maps"
+echo MecklenburgV_RainB5.bsp copied to C:\steam\steamapps\_funjob_\half-life\ts\maps.
+:nocopybsp
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.res" goto nocopyres
+copy "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.res" "C:\steam\steamapps\_funjob_\half-life\ts\maps"
+echo MecklenburgV_RainB5.res copied to C:\steam\steamapps\_funjob_\half-life\ts\maps.
+:nocopyres
+if not exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.pts" goto nocopypts
+copy "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.pts" "C:\steam\steamapps\_funjob_\half-life\ts\maps"
+echo MecklenburgV_RainB5.pts copied to C:\steam\steamapps\_funjob_\half-life\ts\maps.
+:nocopypts
+
+goto succeeded
+:failed
+echo.
+echo There was a problem compiling your map, check your MecklenburgV_RainB5.log file for errors.
+:succeeded
+echo.
+if exist "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.log" "F:\WINDOWS\NOTEPAD.EXE" "F:\HLDev\Goldsource\Hammer\Mecklenburg\Rain\MecklenburgV_RainB5.log"

+ 18 - 0
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/example-batch-file.bat

@@ -0,0 +1,18 @@
+@echo OFF
+
+SET MAP_PATH="D:\Programs\Hammer\maps\hl\mymap.map"
+SET TOOLS_PATH="D:\Programs\SHLT\SHLT 3.7 Binaries and Resources\x86 (32 bit) SSE2"
+
+SET CSG_PARAMS=-wadautodetect -cliptype precise
+SET BSP_PARAMS=
+SET VIS_PARAMS=-full
+SET RAD_PARAMS=-bounce 1 -extra -sparse -dscale 1
+SET ALL_PARAMS=-estimate -threads 2 -chart -low
+
+%TOOLS_PATH%\HLCSG.exe %MAP_PATH% %ALL_PARAMS% %CSG_PARAMS%
+%TOOLS_PATH%\HLBSP.exe %MAP_PATH% %ALL_PARAMS% %BSP_PARAMS%
+%TOOLS_PATH%\HLVIS.exe %MAP_PATH% %ALL_PARAMS% %VIS_PARAMS%
+%TOOLS_PATH%\HLRAD.exe %MAP_PATH% %ALL_PARAMS% %RAD_PARAMS%
+
+@echo End of compiler.bat.
+@pause>nul

+ 72 - 0
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/shlt.fgd

@@ -0,0 +1,72 @@
+// phlt_copy_brush information, from the official release thread,
+// ( http://www.svencoop.com/forums/showthread.php?t=36733 ) :
+// Added a new point entity, phlt_copy_brush, which allows to change
+// its classname to any you want upon map compilation, e.g. func_wall,
+// and then take the model/appearance of an existing unique brush entity
+// by targetname. With this, you can, for example, make many clones of
+// some prefab you are using a lot, without furtherly approaching map
+// limits. Any additional keyvalues added with SmartEdit disabled will
+// be kept, allowing for perfect copies which are indistinguishable from
+// the original in appearance and function. It is adviced, that the entity
+// which's appearance you are copying over possesses an origin brush. If
+// you want to rotate the copy, have the new classname be func_rotating.
+// Func_walls are blind for angles. Furthermore, note that some entities
+// will cause massive errors when having an origin brush, e.g. func_water.
+// For such cases, look at the offset of the original entity to where
+// the copy is supposed to be, and offset the phlt_copy_brush entity that
+// much from the origin of the coordinate system (0, 0, 0). Also, note
+// that the copies will look exactly as the original, including its
+// lighting and decals placed on it, no matter whether from map start or
+// while the map is running (bullet holes, sprays, blood, etc.), and that
+// the copies cannot emit texturelights.
+@PointClass size(-4 -4 -4, 4 4 4) color(96 240 16) = phlt_copy_brush : "Copies models from other entities"
+[
+	spawnflags(flags) =
+	[
+		1 : "Bit #1 (1)" : 0
+		2 : "Bit #2 (2)" : 0
+		4 : "Bit #3 (4)" : 0
+		8 : "Bit #4 (8)" : 0
+		16 : "Bit #5 (16)" : 0
+		32 : "Bit #6 (32)" : 0
+		64 : "Bit #7 (64)" : 0
+		128 : "Bit #8 (128)" : 0
+		256 : "Bit #9 (256)" : 0
+		512 : "Bit #10 (512)" : 0
+		1024 : "Bit #11 (1024)" : 0
+		2048 : "Bit #12 (2048)" : 0
+		4096 : "Bit #13 (4096)" : 0
+		8192 : "Bit #14 (8192)" : 0
+		16384 : "Bit #15 (16384)" : 0
+		32768 : "Bit #16 (32768)" : 0
+		65536 : "Bit #17 (65536)" : 0
+		131072 : "Bit #18 (131072)" : 0
+		262144 : "Bit #19 (262144)" : 0
+		524288 : "Bit #20 (524288)" : 0
+		1048576 : "Bit #21 (1048576)" : 0
+		2097152 : "Bit #22 (2097152)" : 0
+		4194304 : "Bit #23 (4194304)" : 0
+		8388608 : "Bit #24 (8388608)" : 0
+	]
+	phlt_cpm_target(string) : "PHLT Copy Target"
+	phlt_cpm_class(string) : "PHLT New Classname" : "func_rotating"
+	targetname(target_source) : "Name"
+	target(target_destination) : "Target"
+	angles(string) : "Pitch Yaw Roll (X Z Y)" : "0 0 0"
+]
+
+// shlt_entity_wildcard information, from the official release thread,
+// ( http://www.svencoop.com/forums/showthread.php?t=36733 ) :
+// This entity, upon compile, emits "wildcard_amount" - 1 info_targets,
+// and morphs this shlt_entity_wildcard into a trigger_auto, which
+// killtargets the emitted info_targets "delay" seconds after map start
+// and also removes itself.
+// The purpose of this is to prevent a crash from too many entities in
+// the middle of the map. Instead, the server would crash on map load,
+// and prevent frustration among players from a crash in the middle of play.
+@PointClass size(-24 -24 -24, 24 24 24) color(32 96 255) = shlt_entity_wildcard : "Edicts-Wildcard"
+[
+	killtarget(string) : "Wildcard name" : "shlt_wildcards"
+	wildcard_amount(integer) : "Wildcard size (Entities) (>=1)" : 50
+	delay(string) : "Delay before removal (>=0.5)" : "1.0"
+]

BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/hlbsp.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/hlcsg.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/hlrad.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/hlvis.exe


+ 101 - 0
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/lights.rad

@@ -0,0 +1,101 @@
+//lights.rad
+//Add any custom "Texture light" Values into the end of this file
+//Example - 
+//custcompscn		255 255 255 1000
+//This would make the texture "mycustomcomputerscreen" have a yellow light, and emit 1000 brightness
+//Texture light bright values also tend to be less powerful then there point light sisters, so keep this in mind
+//when you are complieing your map
+
++0~tnnl_lgt5	255 255 255 1
+gravsh_flr		0 0 255 75
++0~fifts_lght06	255 255 255 100
++0fun_hypjump	255	255	0 32
++0~generic78b	0 202 35 500
+fun_gradred		255 0 0 500
+gravsh_wall		0 0 255 100
++0generic_109	64 64 255 100
+sv_porta		0 0 255 75
+SCROLL_hyperspa	255 255 255 5
+fun_nerv		255 255 255 40
+fun_meccreditsn	255 255 255 200
+fun_meccreditra	255 255 255 200
+fun_credgray	255 255 255 200
+gp_credit_grey	255 255 255 200
+!howater		255 255 255 200
+gp_hospitalsig2	255 255 255 200
+pkf_sign8a		255 255 255 100
+fap-machine10	255 255 255 200
+fap-machine07	255 255 255 100
+fap-machine11	255 255 255 200
+gp_meck_credits   255 255 255 1000
+gp_skyscrwindow	255 255 255 100
+gp_teakwon		255 255 255 3000
+~spotblue		164 164 255 1000
+~trn_lt1		255 255 255 1000
+freezer_meat		255 255 255 200
+exit1			255 255 255 200
+~light4a		255 255 255 5000
+sv_hosign2		255 255 255 700
+sv_hotel		255 255 255 450
+gp_windowlight		255 255 255 60
+gp_711sign		255 255 255 450
+gp_whitelight		255 255 255 6000
++0~WHITE		255 255 255 6000
++0~GENERIC65 		255 255 255 750
++0~GENERIC85		110 140 235 1000 
++0~GENERIC86		255 230 125 1000
++0~GENERIC86B		60 220 170 1000
++0~GENERIC86R		128 0 0 6000
+GENERIC87A		100  255 100 1000
+GENERIC88A		255 100 100 1000
+GENERIC89A		40 40 130 1000
+GENERIC90A		200 255 200 1000
+GENERIC105		255 100 100 1000
+GENERIC106		120 120 100 1000
+GENERIC107		180 50 180 1000
+GEN_VEND1		50 180 50 1000
+EMERGLIGHT		255 200 100 50000
++0~FIFTS_LGHT01 	160 170 220 4000
++0~FIFTIES_LGT2 	160 170 220 5000
++0~FIFTS_LGHT4		160 170 220 4000
++0~LIGHT1		40 60 150 3000
++0~LIGHT3A		180 180 230 10000
++0~LIGHT4A		200 190 130 11000
++0~LIGHT5A		80 150 200 10000
++0~LIGHT6A		150 5 5 25000
++0~TNNL_LGT1		240 230 100 1000
++0~TNNL_LGT2		190 255 255 12000
++0~TNNL_LGT3		150 150 210 17000
++0~TNNL_LGT4		170 90 40 10000
++0LAB1_W6D		165 230 255 4000
++0LAB1_W6		150 160 210 8800
++0LAB1_W7		245 240 210 4000
+SKKYLITE		165 230 255 1000
++0~DRKMTLS1		205 0 0 6000
++0~DRKMTLGT1		200 200 180 6000
++0~DRKMTLS2		150 120 20 30000
++0~DRKMTLS2C		255 200 100 50000
++0DRKMTL_SCRN		60 80 255 10000
+~LAB_CRT9A		225 150 150 100
+~LAB_CRT9B		100 100 255 100
+~LAB_CRT9C		100 200 150 100
+~LIGHT3A		190 20 20 3000
+~LIGHT3B		155 155 235 2000
+~LIGHT3C		220 210 150 2500
+~LIGHT3E		90 190 140 6000
+C1A3C_MAP		100 100 255 100
+FIFTIES_MON1B		100 100 180 30
++0~LAB_CRT8		50 50 255 100
+ELEV2_CIEL		255 200 100 800
+YELLOW			255 200 100 2000
+RED			255 0 0 1000
+C14_LIGHT_BIG00		160 170 220 567
+SUBWAY_LIGHTS		160 170 220 8000
+grate_light_ury		160 170 220 8888
+quaintLight1bar		160 170 220 8888
+C14_LIGHT_null		160 170 220 200
+comp_lights2		255 200 100 200
+light_newblue		123 123 255 2222
+C3A2_LIGHT		255 255 128 4567
+hera_light1		0 128 255 2000
+LITEPANEL1		160 170 220 4000

BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x64 (64 bit)/ripent.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/hlbsp.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/hlcsg.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/hlrad.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/hlvis.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) No SSE/ripent.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlbsp.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlcsg.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlfix.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlrad.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/hlvis.exe


BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/ripent.exe


+ 9 - 0
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/thecompilator(GoldSource).bat

@@ -0,0 +1,9 @@
+hlfix.exe "I:\Hammah\zm_arena\arena1.rmf" -w "I:\Hammah\Valve Hammer Editor\SHLT-3.9\SHLT 3.9 Binaries and Resources\x86 (32 bit) SSE2\wad.txt"
+
+hlcsg.exe "I:\Hammah\zm_arena\arena1.map" -wadinclude "I:\Hammah\q3evil6.wad" -wadinclude "I:\Hammah\graphtallica6.wad" -wadinclude "I:\Hammah\graphtallica8.wad" -wadinclude "I:\Hammah\zhlt.wad" -cliptype Simple -texdata 8192 -lightdata 6144 -low -chart 
+
+hlbsp.exe "I:\Hammah\zm_arena\arena1.map" -maxnodesize 512.0 -subdivide 240.0 -texdata 8192 -lightdata 6144 -low -chart 
+
+hlvis.exe "I:\Hammah\zm_arena\arena1.map" -full -texdata 8192 -lightdata 6144 -low -chart 
+
+hlrad.exe "I:\Hammah\zm_arena\arena1.map" -extra -texdata 8192 -lightdata 6144 -low -chart 

+ 4 - 0
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/x86 (32 bit) SSE2/wad.txt

@@ -0,0 +1,4 @@
+I:\Hammah\q3evil6.wad
+I:\Hammah\graphtallica6.wad
+I:\Hammah\graphtallica8.wad
+I:\Hammah\zhlt.wad

BIN
build/SHLT-3.9/SHLT 3.9 Binaries and Resources/zhlt.wad


+ 54 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/Terms of Use.txt

@@ -0,0 +1,54 @@
+Super Half Life Tools (SHLT)
+Version 3.9
+Read me File
+10/04/2009
+
+----------
+
+About This Document: 
+
+This document contains last-minute information about SHLT, including questions you may have concerning the tools or your computer. If you have a question, check to see if it is addressed here first: you may save yourself an email to me at a latter date.
+
+----------
+
+I.	GENERAL TECHNICAL ISSUES
+II.	LICENCE
+III.	CONTACTING ME
+
+----------
+
+I. GENERAL TECHNICAL ISSUES
+
+To get the code to run you should have a copy of VS 2005 Final (Pro). The code has not been tested in the betas and the freeware issue of VS 2005 (C++) has no support to compile 64bit.
+
+There are allot of "warnings" when you do compile, but these should be ignored - as fixing them causes compile errors, such as hull holes, and invisible walls - along with bad lighting, and slower compiles.
+
+The code should work with a *nix complier that has support for Microsoft secure memory commands.
+
+----------
+
+II. LICENCE
+
+0) This code is protected by the GPL, a link to the GPL can be found at the end of this page.
+
+1) In addition to the GPL, the Valve SDK 2.3 EULA overrides any rights you may have obtained in the GPL, when needed.
+
+2) The iD Quake 2 Licence overrides portions of both the Valve EULA, and the GPL where needed, please contact iD for information on this subject.
+
+Copy of the GPL
+http://www.gnu.org/copyleft/gpl.html
+
+Valve SDK EULA
+http://valvesoftware.com/business.html
+
+Quake II Source EULA
+http://www.idsoftware.com/business/technology/techlicense.php#The%20Quake%20II%20Engine
+
+----------
+
+III. CONTACTING ME
+
+I can be contacted via
+
+Email
+silencer191@yahoo.de

+ 49 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/TimeCounter.h

@@ -0,0 +1,49 @@
+#ifndef TIMECOUNTER_H__
+#define TIMECOUNTER_H__
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif
+
+#include "cmdlib.h"
+
+class TimeCounter
+{
+public:
+    void start()
+    {
+        start = I_FloatTime();
+    }
+
+    void stop()
+    {
+        double stop = I_FloatTime();
+        accum += stop - start;
+    }
+
+    double getTotal() const
+    {
+        return accum;
+    }
+
+    void reset()
+    {
+        memset(this, 0, sizeof(*this));
+    }
+
+// Construction
+public:
+    TimeCounter()
+    {
+        reset();
+    }
+    // Default Destructor ok
+    // Default Copy Constructor ok
+    // Default Copy Operator ok
+
+protected:
+    double start;
+    double accum;
+};
+
+#endif//TIMECOUNTER_H__

+ 649 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/anorms.h

@@ -0,0 +1,649 @@
+
+{
+-0.525731, 0.000000, 0.850651}
+
+,
+{
+-0.442863, 0.238856, 0.864188}
+
+,
+{
+-0.295242, 0.000000, 0.955423}
+
+,
+{
+-0.309017, 0.500000, 0.809017}
+
+,
+{
+-0.162460, 0.262866, 0.951056}
+
+,
+{
+0.000000, 0.000000, 1.000000}
+
+,
+{
+0.000000, 0.850651, 0.525731}
+
+,
+{
+-0.147621, 0.716567, 0.681718}
+
+,
+{
+0.147621, 0.716567, 0.681718}
+
+,
+{
+0.000000, 0.525731, 0.850651}
+
+,
+{
+0.309017, 0.500000, 0.809017}
+
+,
+{
+0.525731, 0.000000, 0.850651}
+
+,
+{
+0.295242, 0.000000, 0.955423}
+
+,
+{
+0.442863, 0.238856, 0.864188}
+
+,
+{
+0.162460, 0.262866, 0.951056}
+
+,
+{
+-0.681718, 0.147621, 0.716567}
+
+,
+{
+-0.809017, 0.309017, 0.500000}
+
+,
+{
+-0.587785, 0.425325, 0.688191}
+
+,
+{
+-0.850651, 0.525731, 0.000000}
+
+,
+{
+-0.864188, 0.442863, 0.238856}
+
+,
+{
+-0.716567, 0.681718, 0.147621}
+
+,
+{
+-0.688191, 0.587785, 0.425325}
+
+,
+{
+-0.500000, 0.809017, 0.309017}
+
+,
+{
+-0.238856, 0.864188, 0.442863}
+
+,
+{
+-0.425325, 0.688191, 0.587785}
+
+,
+{
+-0.716567, 0.681718, -0.147621}
+
+,
+{
+-0.500000, 0.809017, -0.309017}
+
+,
+{
+-0.525731, 0.850651, 0.000000}
+
+,
+{
+0.000000, 0.850651, -0.525731}
+
+,
+{
+-0.238856, 0.864188, -0.442863}
+
+,
+{
+0.000000, 0.955423, -0.295242}
+
+,
+{
+-0.262866, 0.951056, -0.162460}
+
+,
+{
+0.000000, 1.000000, 0.000000}
+
+,
+{
+0.000000, 0.955423, 0.295242}
+
+,
+{
+-0.262866, 0.951056, 0.162460}
+
+,
+{
+0.238856, 0.864188, 0.442863}
+
+,
+{
+0.262866, 0.951056, 0.162460}
+
+,
+{
+0.500000, 0.809017, 0.309017}
+
+,
+{
+0.238856, 0.864188, -0.442863}
+
+,
+{
+0.262866, 0.951056, -0.162460}
+
+,
+{
+0.500000, 0.809017, -0.309017}
+
+,
+{
+0.850651, 0.525731, 0.000000}
+
+,
+{
+0.716567, 0.681718, 0.147621}
+
+,
+{
+0.716567, 0.681718, -0.147621}
+
+,
+{
+0.525731, 0.850651, 0.000000}
+
+,
+{
+0.425325, 0.688191, 0.587785}
+
+,
+{
+0.864188, 0.442863, 0.238856}
+
+,
+{
+0.688191, 0.587785, 0.425325}
+
+,
+{
+0.809017, 0.309017, 0.500000}
+
+,
+{
+0.681718, 0.147621, 0.716567}
+
+,
+{
+0.587785, 0.425325, 0.688191}
+
+,
+{
+0.955423, 0.295242, 0.000000}
+
+,
+{
+1.000000, 0.000000, 0.000000}
+
+,
+{
+0.951056, 0.162460, 0.262866}
+
+,
+{
+0.850651, -0.525731, 0.000000}
+
+,
+{
+0.955423, -0.295242, 0.000000}
+
+,
+{
+0.864188, -0.442863, 0.238856}
+
+,
+{
+0.951056, -0.162460, 0.262866}
+
+,
+{
+0.809017, -0.309017, 0.500000}
+
+,
+{
+0.681718, -0.147621, 0.716567}
+
+,
+{
+0.850651, 0.000000, 0.525731}
+
+,
+{
+0.864188, 0.442863, -0.238856}
+
+,
+{
+0.809017, 0.309017, -0.500000}
+
+,
+{
+0.951056, 0.162460, -0.262866}
+
+,
+{
+0.525731, 0.000000, -0.850651}
+
+,
+{
+0.681718, 0.147621, -0.716567}
+
+,
+{
+0.681718, -0.147621, -0.716567}
+
+,
+{
+0.850651, 0.000000, -0.525731}
+
+,
+{
+0.809017, -0.309017, -0.500000}
+
+,
+{
+0.864188, -0.442863, -0.238856}
+
+,
+{
+0.951056, -0.162460, -0.262866}
+
+,
+{
+0.147621, 0.716567, -0.681718}
+
+,
+{
+0.309017, 0.500000, -0.809017}
+
+,
+{
+0.425325, 0.688191, -0.587785}
+
+,
+{
+0.442863, 0.238856, -0.864188}
+
+,
+{
+0.587785, 0.425325, -0.688191}
+
+,
+{
+0.688191, 0.587785, -0.425325}
+
+,
+{
+-0.147621, 0.716567, -0.681718}
+
+,
+{
+-0.309017, 0.500000, -0.809017}
+
+,
+{
+0.000000, 0.525731, -0.850651}
+
+,
+{
+-0.525731, 0.000000, -0.850651}
+
+,
+{
+-0.442863, 0.238856, -0.864188}
+
+,
+{
+-0.295242, 0.000000, -0.955423}
+
+,
+{
+-0.162460, 0.262866, -0.951056}
+
+,
+{
+0.000000, 0.000000, -1.000000}
+
+,
+{
+0.295242, 0.000000, -0.955423}
+
+,
+{
+0.162460, 0.262866, -0.951056}
+
+,
+{
+-0.442863, -0.238856, -0.864188}
+
+,
+{
+-0.309017, -0.500000, -0.809017}
+
+,
+{
+-0.162460, -0.262866, -0.951056}
+
+,
+{
+0.000000, -0.850651, -0.525731}
+
+,
+{
+-0.147621, -0.716567, -0.681718}
+
+,
+{
+0.147621, -0.716567, -0.681718}
+
+,
+{
+0.000000, -0.525731, -0.850651}
+
+,
+{
+0.309017, -0.500000, -0.809017}
+
+,
+{
+0.442863, -0.238856, -0.864188}
+
+,
+{
+0.162460, -0.262866, -0.951056}
+
+,
+{
+0.238856, -0.864188, -0.442863}
+
+,
+{
+0.500000, -0.809017, -0.309017}
+
+,
+{
+0.425325, -0.688191, -0.587785}
+
+,
+{
+0.716567, -0.681718, -0.147621}
+
+,
+{
+0.688191, -0.587785, -0.425325}
+
+,
+{
+0.587785, -0.425325, -0.688191}
+
+,
+{
+0.000000, -0.955423, -0.295242}
+
+,
+{
+0.000000, -1.000000, 0.000000}
+
+,
+{
+0.262866, -0.951056, -0.162460}
+
+,
+{
+0.000000, -0.850651, 0.525731}
+
+,
+{
+0.000000, -0.955423, 0.295242}
+
+,
+{
+0.238856, -0.864188, 0.442863}
+
+,
+{
+0.262866, -0.951056, 0.162460}
+
+,
+{
+0.500000, -0.809017, 0.309017}
+
+,
+{
+0.716567, -0.681718, 0.147621}
+
+,
+{
+0.525731, -0.850651, 0.000000}
+
+,
+{
+-0.238856, -0.864188, -0.442863}
+
+,
+{
+-0.500000, -0.809017, -0.309017}
+
+,
+{
+-0.262866, -0.951056, -0.162460}
+
+,
+{
+-0.850651, -0.525731, 0.000000}
+
+,
+{
+-0.716567, -0.681718, -0.147621}
+
+,
+{
+-0.716567, -0.681718, 0.147621}
+
+,
+{
+-0.525731, -0.850651, 0.000000}
+
+,
+{
+-0.500000, -0.809017, 0.309017}
+
+,
+{
+-0.238856, -0.864188, 0.442863}
+
+,
+{
+-0.262866, -0.951056, 0.162460}
+
+,
+{
+-0.864188, -0.442863, 0.238856}
+
+,
+{
+-0.809017, -0.309017, 0.500000}
+
+,
+{
+-0.688191, -0.587785, 0.425325}
+
+,
+{
+-0.681718, -0.147621, 0.716567}
+
+,
+{
+-0.442863, -0.238856, 0.864188}
+
+,
+{
+-0.587785, -0.425325, 0.688191}
+
+,
+{
+-0.309017, -0.500000, 0.809017}
+
+,
+{
+-0.147621, -0.716567, 0.681718}
+
+,
+{
+-0.425325, -0.688191, 0.587785}
+
+,
+{
+-0.162460, -0.262866, 0.951056}
+
+,
+{
+0.442863, -0.238856, 0.864188}
+
+,
+{
+0.162460, -0.262866, 0.951056}
+
+,
+{
+0.309017, -0.500000, 0.809017}
+
+,
+{
+0.147621, -0.716567, 0.681718}
+
+,
+{
+0.000000, -0.525731, 0.850651}
+
+,
+{
+0.425325, -0.688191, 0.587785}
+
+,
+{
+0.587785, -0.425325, 0.688191}
+
+,
+{
+0.688191, -0.587785, 0.425325}
+
+,
+{
+-0.955423, 0.295242, 0.000000}
+
+,
+{
+-0.951056, 0.162460, 0.262866}
+
+,
+{
+-1.000000, 0.000000, 0.000000}
+
+,
+{
+-0.850651, 0.000000, 0.525731}
+
+,
+{
+-0.955423, -0.295242, 0.000000}
+
+,
+{
+-0.951056, -0.162460, 0.262866}
+
+,
+{
+-0.864188, 0.442863, -0.238856}
+
+,
+{
+-0.951056, 0.162460, -0.262866}
+
+,
+{
+-0.809017, 0.309017, -0.500000}
+
+,
+{
+-0.864188, -0.442863, -0.238856}
+
+,
+{
+-0.951056, -0.162460, -0.262866}
+
+,
+{
+-0.809017, -0.309017, -0.500000}
+
+,
+{
+-0.681718, 0.147621, -0.716567}
+
+,
+{
+-0.681718, -0.147621, -0.716567}
+
+,
+{
+-0.850651, 0.000000, -0.525731}
+
+,
+{
+-0.688191, 0.587785, -0.425325}
+
+,
+{
+-0.587785, 0.425325, -0.688191}
+
+,
+{
+-0.425325, 0.688191, -0.587785}
+
+,
+{
+-0.425325, -0.688191, -0.587785}
+
+,
+{
+-0.587785, -0.425325, -0.688191}
+
+,
+{
+-0.688191, -0.587785, -0.425325}
+
+,

+ 158 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/blockmem.cpp

@@ -0,0 +1,158 @@
+
+/// ********* WIN32 **********
+
+#ifdef SYSTEM_WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <malloc.h>
+#include "cmdlib.h"
+#include "messages.h"
+#include "log.h"
+#include "hlassert.h"
+#include "blockmem.h"
+
+// =====================================================================================
+//  AllocBlock
+// =====================================================================================
+void*           AllocBlock(const unsigned long size)
+{
+    void*           pointer;
+    HANDLE          h;
+
+    if (!size)
+    {
+        Warning("Attempting to allocate 0 bytes");
+    }
+
+    h = GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, size);
+
+    if (h)
+    {
+        pointer = GlobalLock(h);
+    }
+    else
+    {
+        return NULL;
+    }
+
+    return pointer;
+}
+
+// =====================================================================================
+//  FreeBlock
+// =====================================================================================
+bool            FreeBlock(void* pointer)
+{
+    HANDLE          h;
+
+    if (!pointer)
+    {
+        Warning("Freeing a null pointer");
+    }
+
+    h = GlobalHandle(pointer);
+
+    if (h)
+    {
+        GlobalUnlock(h);
+        GlobalFree(h);
+        return true;
+    }
+    else
+    {
+        Warning("Could not translate pointer into handle");
+        return false;
+    }
+}
+
+#ifdef CHECK_HEAP
+// =====================================================================================
+//  HeapCheck
+// =====================================================================================
+void            HeapCheck()
+{
+    if (_heapchk() != _HEAPOK)
+        hlassert(false);
+}
+#endif
+
+// =====================================================================================
+//  AllocBlock
+// =====================================================================================
+// HeapAlloc/HeapFree is thread safe by default
+void*           Alloc(const unsigned long size)
+{
+    HeapCheck();
+    return calloc(1, size);
+}
+
+// =====================================================================================
+//  AllocBlock
+// =====================================================================================
+bool            Free(void* pointer)
+{
+    HeapCheck();
+    free(pointer);
+    return true;
+}
+
+#endif /// ********* WIN32 **********
+
+
+
+
+/// ********* POSIX **********
+
+#ifdef SYSTEM_POSIX
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+#include "cmdlib.h"
+#include "messages.h"
+#include "log.h"
+
+// =====================================================================================
+//  AllocBlock
+// =====================================================================================
+void*           AllocBlock(const unsigned long size)
+{
+    if (!size)
+    {
+        Warning("Attempting to allocate 0 bytes");
+    }
+    return calloc(1, size);
+}
+
+// =====================================================================================
+//  FreeBlock
+// =====================================================================================
+bool            FreeBlock(void* pointer)
+{
+    if (!pointer)
+    {
+        Warning("Freeing a null pointer");
+    }
+    free(pointer);
+    return true;
+}
+
+// =====================================================================================
+//  Alloc
+// =====================================================================================
+void*           Alloc(const unsigned long size)
+{
+    return AllocBlock(size);
+}
+
+// =====================================================================================
+//  Free
+// =====================================================================================
+bool            Free(void* pointer)
+{
+    return FreeBlock(pointer);
+}
+
+#endif /// ********* POSIX **********

+ 20 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/blockmem.h

@@ -0,0 +1,20 @@
+#ifndef BLOCKMEM_H__
+#define BLOCKMEM_H__
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif
+
+extern void*    AllocBlock(unsigned long size);
+extern bool     FreeBlock(void* pointer);
+
+extern void*    Alloc(unsigned long size);
+extern bool     Free(void* pointer);
+
+#if defined(CHECK_HEAP)
+extern void     HeapCheck();
+#else
+#define HeapCheck()
+#endif
+
+#endif // BLOCKMEM_H__

+ 149 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/boundingbox.h

@@ -0,0 +1,149 @@
+// Copyright (C) 2000  Sean Cavanaugh
+// This file is licensed under the terms of the Lesser GNU Public License
+// (see LPGL.txt, or http://www.gnu.org/copyleft/lesser.txt)
+
+// AJM:
+#ifdef SYSTEM_WIN32
+#pragma warning(disable:4305) // truncation from 'const double' to 'float'
+#endif
+
+#ifndef BOUNDINGBOX_H__
+#define BOUNDINGBOX_H__
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif
+
+class BoundingBox
+{
+public:
+    typedef enum
+    {
+        eDisjoint,      // neither boxes touch
+        eUnion,         // this box intersects with the other box
+        eSubset,        // this box is inside the other box
+        eSuperset       // this box is completly envelops the other box
+    } eBoundingState;
+
+    // Tests if other box is completely outside of this box
+    bool testDisjoint(const BoundingBox& other) const
+    {
+        if ((m_Mins[0] > other.m_Maxs[0]) ||
+            (m_Mins[1] > other.m_Maxs[1]) ||
+            (m_Mins[2] > other.m_Maxs[2]) ||
+            (m_Maxs[0] < other.m_Mins[0]) ||
+            (m_Maxs[1] < other.m_Mins[1]) ||
+            (m_Maxs[2] < other.m_Mins[2]))
+        {
+            return true;
+        }
+        return false;
+    }
+    // returns true if this box is completely inside other box
+    bool testSubset(const BoundingBox& other) const
+    {
+        if (
+                (m_Mins[0] >= other.m_Mins[0]) &&
+                (m_Maxs[0] <= other.m_Maxs[0]) &&
+                (m_Mins[1] >= other.m_Mins[1]) &&
+                (m_Maxs[1] <= other.m_Maxs[1]) &&
+                (m_Mins[2] >= other.m_Mins[2]) &&
+                (m_Maxs[2] <= other.m_Maxs[2])
+           )
+        {
+            return true;
+        }
+        return false;
+    }
+    // returns true if this box contains the other box completely
+    bool testSuperset(const BoundingBox& other) const
+    {
+        return other.testSubset(*this);
+    }
+    // returns true if this box partially intersects the other box
+    bool testUnion(const BoundingBox& other) const
+    {
+        BoundingBox tmpBox;
+        tmpBox.m_Mins[0] = max(m_Mins[0], other.m_Mins[0]);
+        tmpBox.m_Mins[1] = max(m_Mins[1], other.m_Mins[1]);
+        tmpBox.m_Mins[2] = max(m_Mins[2], other.m_Mins[2]);
+        tmpBox.m_Maxs[0] = min(m_Maxs[0], other.m_Maxs[0]);
+        tmpBox.m_Maxs[1] = min(m_Maxs[1], other.m_Maxs[1]);
+        tmpBox.m_Maxs[2] = min(m_Maxs[2], other.m_Maxs[2]);
+
+        if ((tmpBox.m_Mins[0] > tmpBox.m_Maxs[0]) ||
+            (tmpBox.m_Mins[1] > tmpBox.m_Maxs[1]) ||
+            (tmpBox.m_Mins[2] > tmpBox.m_Maxs[2]))
+        {
+            return false;
+        }   
+        return true;
+    }
+    eBoundingState test(const BoundingBox& other) const
+    {
+        eBoundingState rval;
+        if (testDisjoint(other))
+        {
+            rval = eDisjoint;
+        }
+        else if (testSubset(other))
+        {
+            rval = eSubset;
+        }
+        else if (testSuperset(other))
+        {
+            rval = eSuperset;
+        }
+        else
+        {
+            rval = eUnion;
+        }
+        return rval;
+    }
+
+    void set(const vec3_t mins, const vec3_t maxs)
+    {
+        VectorCopy(mins, m_Mins);
+        VectorCopy(maxs, m_Maxs);
+    }
+    void reset()
+    {
+        VectorFill(m_Mins,  999999999.999);
+        VectorFill(m_Maxs, -999999999.999);
+    }
+    void add(const vec3_t point)
+    {
+        m_Mins[0] = min(m_Mins[0], point[0]);
+        m_Maxs[0] = max(m_Maxs[0], point[0]);
+        m_Mins[1] = min(m_Mins[1], point[1]);
+        m_Maxs[1] = max(m_Maxs[1], point[1]);
+        m_Mins[2] = min(m_Mins[2], point[2]);
+        m_Maxs[2] = max(m_Maxs[2], point[2]);
+    }
+    void add(const BoundingBox& other)
+    {
+        add(other.m_Mins);
+        add(other.m_Maxs);
+    }
+
+public:
+    // BoundingBox(const BoundingBox& other) // Default copy constructor ok
+    // BoundingBox& operator=(const BoundingBox& other); // Default copy operator ok
+    BoundingBox()
+    {
+        reset();
+    }
+    BoundingBox(const vec3_t& mins, const vec3_t& maxs)
+    {
+        VectorCopy(mins, m_Mins);
+        VectorCopy(maxs, m_Maxs);
+    }
+    ~BoundingBox() {}
+
+public:
+    // Bounding box
+    vec3_t m_Mins;
+    vec3_t m_Maxs;
+};
+
+#endif//BOUNDINGBOX_H__

File diff suppressed because it is too large
+ 1696 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/bspfile.cpp


+ 422 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/bspfile.h

@@ -0,0 +1,422 @@
+#ifndef BSPFILE_H__
+#define BSPFILE_H__
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif
+
+// upper design bounds
+#define MAX_MAP_HULLS            4
+// hard limit
+
+#define MAX_MAP_MODELS         512		//400	//PROTECTOR
+// variable, but 400 brush entities is very stressful on the engine and network code as it is.
+// note that 512 is the absolute limit - maps won't load if that many models are precached.
+// models include unqiue *.mdl- and *.spr-files appearing in the map as well as one model for
+// each unique brush entity. For the *.mdl and *.spr-files, there are exceptions, though.
+// E.g., player models and HUD sprites & targas don't fall under the limit.
+
+#define MAX_MAP_BRUSHES			131072	//32768 //SILENCER
+// arbitrary, but large numbers of brushes generally require more lightmap's than the compiler can handle
+
+#define MAX_ENGINE_ENTITIES   523264		//1024	//SILENCER
+#define MAX_MAP_ENTITIES      1046528		//2048	//SILENCER
+// variable, since the -num_edcits # parameter has been added
+// in actuallity it is too much, as temporary entities in the game plus static map entities can overflow
+
+#define MAX_MAP_ENTSTRING   16384*1024	//(512*1024) //SILENCER
+// abitrary, 512Kb of string data should be plenty even with TFC FGD's
+// SILENCER: You can NEVER have enough of this,
+// especially not in Sven Co-op, with all those squadmakers and game_text entities
+
+// SILENCER: The following two are hard limits. Tried doing more, but just as said in that
+// mail from ages ago, some faces just don't show up and ocassionally, the game crashes.
+// Note: The integrated plane optimization by XP-Cagey takes action before the limit check.
+#define MAX_MAP_PLANES      32767 //32768 //SILENCER: Considering the high chance of shorts being used for this
+#define MAX_INTERNAL_MAP_PLANES 256*1024
+// (from email): I have been building a rather complicated map, and using your latest 
+// tools (1.61) it seemed to compile fine.  However, in game, the engine was dropping
+// a lot of faces from almost every FUNC_WALL, and also caused a strange texture 
+// phenomenon in software mode (see attached screen shot).  When I compiled with v1.41,
+// I noticed that it hit the MAX_MAP_PLANES limit of 32k.  After deleting some brushes
+// I was able to bring the map under the limit, and all of the previous errors went away.
+
+#define MAX_MAP_NODES        32767
+// hard limit (negative short's are used as contents values)
+#define MAX_MAP_CLIPNODES    65535 //32767 //SILENCER
+// hard limit (negative short's are used as contents values)
+// SILENCER: If you go over the clipnodes limit, some brushes
+// in your map won't be solid, so you can fall outside world.
+// Sending a warning to the mapper if he exceeds the limit,
+// but not stopping the compiler later, so he can see how far he is
+// over the limit.
+
+#define MAX_MAP_LEAFS         32767	//8192
+// Old: ( 8192 is hard limit - halflife depends on it to setup pvs bits correctly )
+// SILENCER: This is not a straight hard limit (anymore (?))
+// At least it is true that I made a testmap with ca. 16000
+// leafs and it did not crash or show weird problems at any point.
+// Added a warning being thrown at the user when he exceeds 8192, though.
+
+#define MAX_MAP_VERTS        65535
+#define MAX_MAP_FACES        65535
+#define MAX_MAP_MARKSURFACES 65535
+// hard limit (data structures store them as unsigned shorts)
+
+#define MAX_MAP_TEXTURES       512
+// hard limit (halflife limitation)
+
+#define MAX_MAP_TEXINFO      32767
+// hard limit (face.texinfo is signed short)
+
+#define MAX_MAP_EDGES       524287	//256000	//SILENCER
+#define MAX_MAP_SURFEDGES	1048575	//512000	//SILENCER
+// (not so(?)) arbitrary
+
+#define DEFAULT_MAX_MAP_MIPTEX      0x2000000	//0x400000	//PROTECTOR//SILENCER
+// 4Mb of textures is enough especially considering the number of people playing the game
+// still with voodoo 1 and 2 class cards with limited local memory.
+//PROTECTOR: blahblahblah voodoo foo. welcome to the 21st century, buy yourself a graphics card with 1024mb ram for 100$.
+//SILENCER: We don't have to overdo it THAT much. It still is just Goldsource. Lowered to 32 MB.
+
+#define DEFAULT_MAX_MAP_LIGHTDATA	0x2000000	//0x600000 (6 MB) //SILENCER: New is 32 MB
+// arbitrary
+
+#define MAX_MAP_VISIBILITY  0x1000000	//0x200000	//SILENCER
+// arbitrary
+
+// these are for entity key:value pairs
+#define MAX_KEY                 64	//32	//SILENCER
+#define ZHLT3_MAX_VALUE             4096
+// quote from yahn: 'probably can raise these values if needed'
+
+// texture size limit
+#define MAX_TEXTURE_SIZE   (256 * 256 * sizeof(short) * 3) / 2
+// this is arbitrary, and needs space for the largest realistic texture plus
+// room for its mipmaps. This value is primarily used to catch damaged or
+// invalid textures in a wad file
+
+//=============================================================================
+
+#define BSPVERSION  30
+#define TOOLVERSION 2
+
+
+//
+// BSP File Structures
+//
+
+
+typedef struct
+{
+    int             fileofs, filelen;
+}
+lump_t;
+
+#define LUMP_ENTITIES      0
+#define LUMP_PLANES        1
+#define LUMP_TEXTURES      2
+#define LUMP_VERTEXES      3
+#define LUMP_VISIBILITY    4
+#define LUMP_NODES         5
+#define LUMP_TEXINFO       6
+#define LUMP_FACES         7
+#define LUMP_LIGHTING      8
+#define LUMP_CLIPNODES     9
+#define LUMP_LEAFS        10
+#define LUMP_MARKSURFACES 11
+#define LUMP_EDGES        12
+#define LUMP_SURFEDGES    13
+#define LUMP_MODELS       14
+#define HEADER_LUMPS      15
+
+//#define LUMP_MISCPAD      -1
+//#define LUMP_ZEROPAD      -2
+
+typedef struct
+{
+    float           mins[3], maxs[3];
+    float           origin[3];
+    int             headnode[MAX_MAP_HULLS];
+    int             visleafs;                              // not including the solid leaf 0
+    int             firstface, numfaces;
+}
+dmodel_t;
+
+typedef struct
+{
+    int             version;
+    lump_t          lumps[HEADER_LUMPS];
+}
+dheader_t;
+
+typedef struct
+{
+    int             nummiptex;
+    int             dataofs[4];                            // [nummiptex]
+}
+dmiptexlump_t;
+
+#define MIPLEVELS   4
+typedef struct miptex_s
+{
+    char            name[16];
+    unsigned        width, height;
+    unsigned        offsets[MIPLEVELS];                    // four mip maps stored
+}
+miptex_t;
+
+typedef struct
+{
+    float           point[3];
+}
+dvertex_t;
+
+typedef struct
+{
+    float           normal[3];
+    float           dist;
+    planetypes      type;                                  // PLANE_X - PLANE_ANYZ ?remove? trivial to regenerate
+}
+dplane_t;
+
+typedef enum
+{
+    CONTENTS_EMPTY = -1,
+    CONTENTS_SOLID = -2,
+    CONTENTS_WATER = -3,
+    CONTENTS_SLIME = -4,
+    CONTENTS_LAVA = -5,
+    CONTENTS_SKY = -6,
+    CONTENTS_ORIGIN = -7,                                  // removed at csg time
+    CONTENTS_CLIP = -8,                                    // changed to contents_solid
+
+    CONTENTS_CURRENT_0 = -9,
+    CONTENTS_CURRENT_90 = -10,
+    CONTENTS_CURRENT_180 = -11,
+    CONTENTS_CURRENT_270 = -12,
+    CONTENTS_CURRENT_UP = -13,
+    CONTENTS_CURRENT_DOWN = -14,
+
+    CONTENTS_TRANSLUCENT = -15,
+    CONTENTS_HINT = -16,     // Filters down to CONTENTS_EMPTY by bsp, ENGINE SHOULD NEVER SEE THIS
+
+#ifdef ZHLT_NULLTEX
+    CONTENTS_NULL = -17,     // AJM  // removed in csg and bsp, VIS or RAD shouldnt have to deal with this, only clip planes!
+#endif
+
+#ifdef ZHLT_DETAIL   // AJM
+    CONTENTS_DETAIL = -18,  
+#endif
+}
+contents_t;
+
+// !!! if this is changed, it must be changed in asm_i386.h too !!!
+typedef struct
+{
+    int             planenum;
+    short           children[2];                           // negative numbers are -(leafs+1), not nodes
+    short           mins[3];                               // for sphere culling
+    short           maxs[3];
+    unsigned short  firstface;
+    unsigned short  numfaces;                              // counting both sides
+}
+dnode_t;
+
+typedef struct
+{
+    int             planenum;
+    short           children[2];                           // negative numbers are contents
+}
+dclipnode_t;
+
+typedef struct texinfo_s
+{
+    float           vecs[2][4];                            // [s/t][xyz offset]
+    int             miptex;
+    int             flags;
+}
+texinfo_t;
+
+#define TEX_SPECIAL     1                                  // sky or slime or null, no lightmap or 256 subdivision
+
+// note that edge 0 is never used, because negative edge nums are used for
+// counterclockwise use of the edge in a face
+typedef struct
+{
+    unsigned short  v[2];                                  // vertex numbers
+}
+dedge_t;
+
+#define MAXLIGHTMAPS    4
+typedef struct
+{
+    unsigned short	planenum;
+    short           side;
+
+    int             firstedge;                             // we must support > 64k edges
+    short           numedges;
+    short           texinfo;
+
+    // lighting info
+    byte            styles[MAXLIGHTMAPS];
+    int             lightofs;                              // start of [numstyles*surfsize] samples
+}
+dface_t;
+
+#define AMBIENT_WATER   0
+#define AMBIENT_SKY     1
+#define AMBIENT_SLIME   2
+#define AMBIENT_LAVA    3
+
+#define NUM_AMBIENTS            4                  // automatic ambient sounds
+
+// leaf 0 is the generic CONTENTS_SOLID leaf, used for all solid areas
+// all other leafs need visibility info
+typedef struct
+{
+    int             contents;
+    int             visofs;                                // -1 = no visibility info
+
+    short           mins[3];                               // for frustum culling
+    short           maxs[3];
+
+    unsigned short  firstmarksurface;
+    unsigned short  nummarksurfaces;
+
+    byte            ambient_level[NUM_AMBIENTS];
+}
+dleaf_t;
+
+//============================================================================
+
+#define ANGLE_UP    -1
+#define ANGLE_DOWN  -2
+
+//
+// BSP File Data
+//
+
+extern int      g_nummodels;
+extern dmodel_t g_dmodels[MAX_MAP_MODELS];
+extern int      g_dmodels_checksum;
+
+extern int      g_visdatasize;
+extern byte     g_dvisdata[MAX_MAP_VISIBILITY];
+extern int      g_dvisdata_checksum;
+
+extern int      g_lightdatasize;
+extern byte*    g_dlightdata;
+extern int      g_dlightdata_checksum;
+
+extern int      g_texdatasize;
+extern byte*    g_dtexdata;                                  // (dmiptexlump_t)
+extern int      g_dtexdata_checksum;
+
+extern int      g_entdatasize;
+extern char     g_dentdata[MAX_MAP_ENTSTRING];
+extern int      g_dentdata_checksum;
+
+extern int      g_numleafs;
+extern dleaf_t  g_dleafs[MAX_MAP_LEAFS];
+extern int      g_dleafs_checksum;
+
+extern int      g_numplanes;
+extern dplane_t g_dplanes[MAX_INTERNAL_MAP_PLANES];
+extern int      g_dplanes_checksum;
+
+extern int      g_numvertexes;
+extern dvertex_t g_dvertexes[MAX_MAP_VERTS];
+extern int      g_dvertexes_checksum;
+
+extern int      g_numnodes;
+extern dnode_t  g_dnodes[MAX_MAP_NODES];
+extern int      g_dnodes_checksum;
+
+extern int      g_numtexinfo;
+extern texinfo_t g_texinfo[MAX_MAP_TEXINFO];
+extern int      g_texinfo_checksum;
+
+extern int      g_numfaces;
+extern dface_t  g_dfaces[MAX_MAP_FACES];
+extern int      g_dfaces_checksum;
+
+extern int      g_numclipnodes;
+extern dclipnode_t g_dclipnodes[MAX_MAP_CLIPNODES];
+extern int      g_dclipnodes_checksum;
+
+extern int      g_numedges;
+extern dedge_t  g_dedges[MAX_MAP_EDGES];
+extern int      g_dedges_checksum;
+
+extern int      g_nummarksurfaces;
+extern unsigned short g_dmarksurfaces[MAX_MAP_MARKSURFACES];
+extern int      g_dmarksurfaces_checksum;
+
+extern int      g_numsurfedges;
+extern int      g_dsurfedges[MAX_MAP_SURFEDGES];
+extern int      g_dsurfedges_checksum;
+
+extern void     DecompressVis(const byte* src, byte* const dest, const unsigned int dest_length);
+extern int      CompressVis(const byte* const src, const unsigned int src_length, byte* dest, unsigned int dest_length);
+
+extern void     LoadBSPImage(dheader_t* header);
+extern void     LoadBSPFile(const char* const filename);
+extern void     WriteBSPFile(const char* const filename);
+extern void     PrintBSPFileSizes();
+
+//
+// Entity Related Stuff
+//
+
+typedef struct epair_s
+{
+    struct epair_s* next;
+    char*           key;
+    char*           value;
+}
+epair_t;
+
+typedef struct
+{
+    vec3_t          origin;
+    int             firstbrush;
+    int             numbrushes;
+    epair_t*        epairs;
+}
+entity_t;
+
+extern int      g_numentities;
+extern entity_t g_entities[MAX_MAP_ENTITIES];
+
+extern void            ParseEntities(int * lNumAddress, int * lListAddress);
+extern void            UnparseEntities();
+
+extern void            strins(char* srcDestStr, const int maxNewLen, const char* insStr, const int insAtPos, const bool overwrite, const char fillGap);
+extern void            MarkEntityAsRedundant(entity_t* ent);
+extern entity_t*       AddEntity(const char* const classname, int neworigin[3]);
+extern void            RemoveKeyValue(entity_t* ent, const char* const key);
+extern void            SetKeyValue(entity_t* ent, const char* const key, const char* const value);
+extern const char*     ValueForKey(const entity_t* const ent, const char* const key);
+extern int             IntForKey(const entity_t* const ent, const char* const key);
+extern vec_t           FloatForKey(const entity_t* const ent, const char* const key);
+extern bool            BoolForKey(const entity_t* const ent, const char* const key);
+extern void            GetVectorForKey(const entity_t* const ent, const char* const key, vec3_t vec);
+extern void            GetIntVectorForKey(const entity_t* const ent, const char* const key, int vec[3]);
+
+extern entity_t* FindTargetEntity(const char* const target);
+extern epair_t* ParseEpair();
+extern entity_t* EntityForModel(int modnum);
+
+//
+// Texture Related Stuff
+//
+
+extern int      g_max_map_miptex;
+extern int		g_max_map_lightdata;
+extern void     dtexdata_init();
+extern void CDECL dtexdata_free();
+
+extern char*    GetTextureByNumber(int texturenumber);
+
+#endif //BSPFILE_H__

+ 578 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/cmdlib.cpp

@@ -0,0 +1,578 @@
+#ifdef SYSTEM_WIN32
+#pragma warning(disable:4996)
+#endif
+
+#ifdef SYSTEM_WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
+#include "cmdlib.h"
+#include "messages.h"
+#include "hlassert.h"
+#include "blockmem.h"
+#include "log.h"
+
+#ifdef SYSTEM_POSIX
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#endif
+
+#define PATHSEPARATOR(c) ((c) == '\\' || (c) == '/')
+
+/*
+ * ================
+ * I_FloatTime
+ * ================
+ */
+
+double          I_FloatTime()
+{
+#ifdef SYSTEM_WIN32
+    FILETIME        ftime;
+    double rval;
+
+    GetSystemTimeAsFileTime(&ftime);
+
+    rval = ftime.dwLowDateTime;
+    rval += ((__int64)ftime.dwHighDateTime) << 32;
+
+    return (rval / 10000000.0);
+#endif
+
+#ifdef SYSTEM_POSIX
+    struct timeval  tp;
+    struct timezone tzp;
+    static int      secbase;
+
+    gettimeofday(&tp, &tzp);
+
+    if (!secbase)
+    {
+        secbase = tp.tv_sec;
+        return tp.tv_usec / 1000000.0;
+    }
+
+    return (tp.tv_sec - secbase) + tp.tv_usec / 1000000.0;
+#endif
+}
+
+#ifdef SYSTEM_POSIX
+char*           strupr(char* string)
+{
+    int             i;
+    int             len = strlen(string);
+
+    for (i = 0; i < len; i++)
+    {
+        string[i] = toupper(string[i]);
+    }
+    return string;
+}
+
+char*           strlwr(char* string)
+{
+    int             i;
+    int             len = strlen(string);
+
+    for (i = 0; i < len; i++)
+    {
+        string[i] = tolower(string[i]);
+    }
+    return string;
+}
+#endif
+
+// Case Insensitive substring matching
+const char*     stristr(const char* const string, const char* const substring)
+{
+    char*           string_copy;
+    char*           substring_copy;
+    const char*     match;
+
+    string_copy = _strdup(string);
+    _strlwr(string_copy);
+
+    substring_copy = _strdup(substring);
+    _strlwr(substring_copy);
+
+    match = strstr(string_copy, substring_copy);
+    if (match)
+    {
+        match = (string + (match - string_copy));
+    }
+
+    free(string_copy);
+    free(substring_copy);
+    return match;
+}
+
+/*--------------------------------------------------------------------
+// New implementation of FlipSlashes, DefaultExtension, StripFilename, 
+// StripExtension, ExtractFilePath, ExtractFile, ExtractFileBase, etc.
+----------------------------------------------------------------------*/
+#ifdef ZHLT_NEW_FILE_FUNCTIONS
+
+//Since all of these functions operate around either the extension 
+//or the directory path, centralize getting both numbers here so we
+//can just reference them everywhere else.  Use strrchr to give a
+//speed boost while we're at it.
+inline void getFilePositions(char* path, int* extension_position, int* directory_position)
+{
+	char* ptr = strrchr(path,'.');
+	if(ptr == 0)
+	{ *extension_position = -1; }
+	else
+	{ *extension_position = ptr - path; }
+
+	ptr = max(strrchr(path,'/'),strrchr(path,'\\'));
+	if(ptr == 0)
+	{ *directory_position = -1; }
+	else
+	{ 
+		*directory_position = ptr - path;
+		if(*directory_position > *extension_position)
+		{ *extension_position = -1; }
+		
+		//cover the case where we were passed a directory - get 2nd-to-last slash
+		if(*directory_position == strlen(path) - 1)
+		{
+			do
+			{
+				--(*directory_position);
+			}
+			while(*directory_position > -1 && path[*directory_position] != '/' && path[*directory_position] != '\\');
+		}
+	}
+}
+
+char* FlipSlashes(char* string)
+{
+	char* ptr = string;
+	if(SYSTEM_SLASH_CHAR == '\\')
+	{
+		while(ptr = strchr(ptr,'/'))
+		{ *ptr = SYSTEM_SLASH_CHAR; }
+	}
+	else
+	{
+		while(ptr = strchr(ptr,'\\'))
+		{ *ptr = SYSTEM_SLASH_CHAR; }
+	}
+	return string;
+}
+
+void DefaultExtension(char* path, const char* extension)
+{
+	int extension_pos, directory_pos;
+	getFilePositions(path,&extension_pos,&directory_pos);
+	if(extension_pos == -1)
+	{ strcat(path,extension); }
+}
+
+void StripFilename(char* path)
+{
+	int extension_pos, directory_pos;
+	getFilePositions(path,&extension_pos,&directory_pos);
+	if(directory_pos == -1)
+	{ path[0] = 0; }
+	else
+	{ path[directory_pos] = 0; }
+}
+
+void StripExtension(char* path)
+{
+	int extension_pos, directory_pos;
+	getFilePositions(path,&extension_pos,&directory_pos);
+	if(extension_pos != -1)
+	{ path[extension_pos] = 0; }
+}
+
+void ExtractFilePath(char* const path, char* dest)
+{
+	int extension_pos, directory_pos;
+	getFilePositions(path,&extension_pos,&directory_pos);
+	if(directory_pos != -1)
+	{
+	    memcpy(dest,path,directory_pos+1); //include directory slash
+	    dest[directory_pos+1] = 0;
+	}
+	else
+	{ dest[0] = 0; }
+}
+
+void ExtractFile(char* const path, char* dest)
+{
+	int extension_pos, directory_pos;
+	getFilePositions(path,&extension_pos,&directory_pos);
+
+	int length = (int)strlen(path);
+
+	if(directory_pos == -1)	{ directory_pos = 0; }
+	else { length -= directory_pos + 1; }
+
+    memcpy(dest,path+directory_pos+1,length); //exclude directory slash
+    dest[length] = 0;
+}
+
+void ExtractFileBase(char* const path, char* dest)
+{
+	int extension_pos, directory_pos;
+	getFilePositions(path,&extension_pos,&directory_pos);
+	int length = extension_pos == -1 ? (int)strlen(path) : extension_pos;
+
+	if(directory_pos == -1)	{ directory_pos = 0; }
+	else { length -= directory_pos + 1; }
+
+    memcpy(dest,path+directory_pos+1,length); //exclude directory slash
+    dest[length] = 0;
+}
+
+void ExtractFileExtension(char* const path, char* dest)
+{
+	int extension_pos, directory_pos;
+	getFilePositions(path,&extension_pos,&directory_pos);
+	if(extension_pos != -1)
+	{
+		int length = (int)strlen(path) - extension_pos;
+	    memcpy(dest,path+extension_pos,length); //include extension '.'
+	    dest[length] = 0;
+	}
+	else
+	{ dest[0] = 0; }
+}
+//-------------------------------------------------------------------
+#else //old cmdlib functions
+
+char*           FlipSlashes(char* string)
+{
+    while (*string)
+    {
+        if (PATHSEPARATOR(*string))
+        {
+            *string = SYSTEM_SLASH_CHAR;
+        }
+        string++;
+    }
+    return string;
+}
+
+void            DefaultExtension(char* path, const char* extension)
+{
+    char*           src;
+
+    //
+    // if path doesn't have a .EXT, append extension
+    // (extension should include the .)
+    //
+    src = path + strlen(path) - 1;
+
+    while (!PATHSEPARATOR(*src) && src != path)
+    {
+        if (*src == '.')
+            return;                                        // it has an extension
+        src--;
+    }
+
+    strcat(path, extension);
+}
+
+void            StripFilename(char* path)
+{
+    int             length;
+
+    length = strlen(path) - 1;
+    while (length > 0 && !PATHSEPARATOR(path[length]))
+        length--;
+    path[length] = 0;
+}
+
+void            StripExtension(char* path)
+{
+    int             length;
+
+    length = strlen(path) - 1;
+    while (length > 0 && path[length] != '.')
+    {
+        length--;
+        if (PATHSEPARATOR(path[length]))
+            return;                                        // no extension
+    }
+    if (length)
+        path[length] = 0;
+}
+
+/*
+ * ====================
+ * Extract file parts
+ * ====================
+ */
+void            ExtractFilePath(const char* const path, char* dest)
+{
+    hlassert (path != dest);
+
+    const char*           src;
+
+    src = path + strlen(path) - 1;
+
+    //
+    // back up until a \ or the start
+    //
+    while (src != path && !PATHSEPARATOR(*(src - 1)))
+        src--;
+
+    memcpy(dest, path, src - path);
+    dest[src - path] = 0;
+}
+
+void            ExtractFile(const char* const path, char* dest)
+{
+    hlassert (path != dest);
+
+    const char*           src;
+
+    src = path + strlen(path) - 1;
+
+    while (src != path && !PATHSEPARATOR(*(src - 1)))
+        src--;
+
+    while (*src)
+    {
+        *dest++ = *src++;
+    }
+    *dest = 0;
+}
+
+void            ExtractFileBase(const char* const path, char* dest)
+{
+    hlassert (path != dest);
+
+    const char*           src;
+
+    src = path + strlen(path) - 1;
+
+    //
+    // back up until a \ or the start
+    //
+    while (src != path && !PATHSEPARATOR(*(src - 1)))
+        src--;
+
+    while (*src && *src != '.')
+    {
+        *dest++ = *src++;
+    }
+    *dest = 0;
+}
+
+void            ExtractFileExtension(const char* const path, char* dest)
+{
+    hlassert (path != dest);
+
+    const char*           src;
+
+    src = path + strlen(path) - 1;
+
+    //
+    // back up until a . or the start
+    //
+    while (src != path && *(src - 1) != '.')
+        src--;
+    if (src == path)
+    {
+        *dest = 0;                                         // no extension
+        return;
+    }
+
+    strcpy_s(dest, src);
+}
+
+#endif
+
+/*
+ * ============================================================================
+ * 
+ * BYTE ORDER FUNCTIONS
+ * 
+ * ============================================================================
+ */
+
+#ifdef WORDS_BIGENDIAN
+
+short           LittleShort(const short l)
+{
+    byte            b1, b2;
+
+    b1 = l & 255;
+    b2 = (l >> 8) & 255;
+
+    return (b1 << 8) + b2;
+}
+
+short           BigShort(const short l)
+{
+    return l;
+}
+
+int             LittleLong(const int l)
+{
+    byte            b1, b2, b3, b4;
+
+    b1 = l & 255;
+    b2 = (l >> 8) & 255;
+    b3 = (l >> 16) & 255;
+    b4 = (l >> 24) & 255;
+
+    return ((int)b1 << 24) + ((int)b2 << 16) + ((int)b3 << 8) + b4;
+}
+
+int             BigLong(const int l)
+{
+    return l;
+}
+
+float           LittleFloat(const float l)
+{
+    union
+    {
+        byte            b[4];
+        float           f;
+    }
+    in             , out;
+
+    in.f = l;
+    out.b[0] = in.b[3];
+    out.b[1] = in.b[2];
+    out.b[2] = in.b[1];
+    out.b[3] = in.b[0];
+
+    return out.f;
+}
+
+float           BigFloat(const float l)
+{
+    return l;
+}
+
+#else // Little endian (Intel, etc)
+
+short           BigShort(const short l)
+{
+    byte            b1, b2;
+
+    b1 = (byte) (l & 255);
+    b2 = (byte) ((l >> 8) & 255);
+
+    return (short)((b1 << 8) + b2);
+}
+
+short           LittleShort(const short l)
+{
+    return l;
+}
+
+int             BigLong(const int l)
+{
+    byte            b1, b2, b3, b4;
+
+    b1 = (byte) (l & 255);
+    b2 = (byte) ((l >> 8) & 255);
+    b3 = (byte) ((l >> 16) & 255);
+    b4 = (byte) ((l >> 24) & 255);
+
+    return ((int)b1 << 24) + ((int)b2 << 16) + ((int)b3 << 8) + b4;
+}
+
+int             LittleLong(const int l)
+{
+    return l;
+}
+
+float           BigFloat(const float l)
+{
+    union
+    {
+        byte            b[4];
+        float           f;
+    }
+    in             , out;
+
+    in.f = l;
+    out.b[0] = in.b[3];
+    out.b[1] = in.b[2];
+    out.b[2] = in.b[1];
+    out.b[3] = in.b[0];
+
+    return out.f;
+}
+
+float           LittleFloat(const float l)
+{
+    return l;
+}
+
+#endif
+
+//=============================================================================
+
+bool CDECL      safe_snprintf(char* const dest, const size_t count, const char* const args, ...)
+{
+    size_t          amt;
+    va_list         argptr;
+
+    hlassert(count > 0);
+
+    va_start(argptr, args);
+    amt = vsnprintf(dest, count, args, argptr);
+    va_end(argptr);
+
+    // truncated (bad!, snprintf doesn't null terminate the string when this happens)
+    if (amt == count)
+    {
+        dest[count - 1] = 0;
+        return false;
+    }
+
+    return true;
+}
+
+bool            safe_strncpy(char* const dest, const char* const src, const size_t count)
+{
+    return safe_snprintf(dest, count, "%s", src);
+}
+
+bool            safe_strncat(char* const dest, const char* const src, const size_t count)
+{
+    if (count)
+    {
+        strncat(dest, src, count);
+
+        dest[count - 1] = 0;                               // Ensure it is null terminated
+        return true;
+    }
+    else
+    {
+        Warning("safe_strncat passed empty count");
+        return false;
+    }
+}
+
+bool            TerminatedString(const char* buffer, const int size)
+{
+    int             x;
+
+    for (x = 0; x < size; x++, buffer++)
+    {
+        if ((*buffer) == 0)
+        {
+            return true;
+        }
+    }
+    return false;
+}

+ 170 - 0
build/SHLT-3.9/SHLT 3.9 Sourcecode/SHLT/common/cmdlib.h

@@ -0,0 +1,170 @@
+#ifndef CMDLIB_H__
+#define CMDLIB_H__
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifdef __MINGW32__
+#include <io.h>
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+// AJM: gnu compiler fix
+#ifdef __GNUC__
+#define _alloca __builtin_alloca
+#define alloca __builtin_alloca
+#endif
+
+#include "win32fix.h"
+#include "mathtypes.h"
+
+#ifdef _DEBUG
+#define ZHLT_VERSIONSTRING "v3.9"
+#else
+#define ZHLT_VERSIONSTRING "3.9"
+#endif
+
+// SILENCER -->
+#if !defined(_WIN64)
+
+#if _M_IX86_FP == 0
+#define HACK_VERSIONSTRING "x86 (32b) SSE OFF"
+#endif
+
+#if _M_IX86_FP == 1
+#define HACK_VERSIONSTRING "x86 (32b) SSE1 ON"
+#endif
+
+#if _M_IX86_FP == 2
+#define HACK_VERSIONSTRING "x86 (32b) SSE2 ON"
+#endif
+
+#else
+#define HACK_VERSIONSTRING "x64 (64b)        "
+#endif
+// <-- SILENCER
+
+
+//=====================================================================
+// AJM: Different features of the tools can be undefined here
+//      these are not officially beta tested, but seem to work okay
+
+// ZHLT_* features are spread across more than one tool. Hence, changing
+//      one of these settings probably means recompiling the whole set
+#define ZHLT_INFO_COMPILE_PARAMETERS        // ALL TOOLS
+#define ZHLT_NULLTEX                        // HLCSG, HLBSP
+#define ZHLT_TEXLIGHT                       // HLCSG, HLRAD - triggerable texlights by LRC
+#define ZHLT_GENERAL                        // ALL TOOLS - general changes
+#define ZHLT_NEW_FILE_FUNCTIONS				// ALL TOOLS - file path/extension extraction functions
+//#define ZHLT_DETAIL                         // HLCSG, HLBSP - detail brushes    
+//#define ZHLT_PROGRESSFILE                   // ALL TOOLS - estimate progress reporting to -progressfile
+//#define ZHLT_NSBOB
+
+#define ZHLT_VectorMA_FIX //--vluzacn
+
+#define ZHLT_PLANETYPE_FIX // Very Important !! --vluzacn
+
+#define COMMON_HULLU // winding optimisations by hullu
+
+// tool specific settings below only mean a recompile of the tool affected
+#define HLCSG_CLIPECONOMY
+#define HLCSG_WADCFG
+#define HLCSG_AUTOWAD
+
+#define HLCSG_PRECISIONCLIP
+#define HLCSG_FASTFIND
+#ifdef ZHLT_NULLTEX