Skip to content
/ SDHLT Public
forked from seedee/SDHLT

Simplified Map Compile Tools

License

Notifications You must be signed in to change notification settings

G2Pavon/SDHLT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Is this a replacement for the current map compile tools? No, this project aims to simplify and "clean up" the source code of the HL map compile tools in order to make it easier to understand how the tools work, as the original codebase is complex and hard to understand.

How? well,

  • Most of arguments were removed (which ones are still left? look here)
  • Replaced macros #define constants with constexpr
  • Using auto
  • Updated C-style struct definition to C++ style
  • Rearranged #includes
  • Removed SYSTEM_WIN32 macro and related code (now only linux is supported)
  • Replaced malloc with new
  • Removed old map file version (<220 and QuArK) support
  • Main() functions was simplified adding a function to handle arguments, removed the function that reads the params from settings.txt file, also info_compile_parameters support removed
  • Removed unused code

It's still difficult to read, but at least there are fewer lines of code. I probably got fucked up some function along the way (for example: read transfer lists file (.inc file) fails when try opening), but it still generates playable bsp maps. (Btw, I'm learning C++ with this project)

is a fork of SHDLT (because is ease build on Linux), which itself is a fork of VHLT cleaned up, which in turn is a fork of VHLT, which is a fork of ZHLT, and so on.

SMCT

Language Files Blank Lines Comment Lines Code Lines
C++ 42 3334 2332 28022
C/C++ Header 23 437 204 1984
TOTAL 65 3771 2536 30006

VHLT Clean-up (remove-ifdef + remove-xash)

Language Files Blank Lines Comment Lines Code Lines
C++ 51 4512 3272 35487
C/C++ Header 33 937 347 4045
TOTAL 84 5449 3619 39532

SCMT numbers vary from time to time Generated by cloc v1.90***

There is still a lot more "cleaning" to do. Something I would like to do in the distant future:

Replace C-style data struct by C++ classes

Replace float array[3] with std::array<float, 3> or glm maybe

Replace char with std::string

About

Simplified Map Compile Tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.1%
  • C 1.5%
  • CMake 0.4%