Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 2.54 KB

README.md

File metadata and controls

49 lines (33 loc) · 2.54 KB

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