Some inline helper function of the included files in the header make use
of functions defined within it. This can cause a circular dependency
cycle if said helper functions are ever defined within the classes.
To break this potential cycle, we can use forward declarations.
This also has the benefit of reducing preprocessing overhead a little
bit.
* decompiled some bgs_chk funcs
* c_m3d_g
* c_math progress
* remove duplicate SComponent headers
* move some variables and decompile a function
* some inlined from debug
* cM3d_2PlaneLinePosNearPos
* fix fabsf and decompile cM3d_CrawVec
* format
* cleanup
* more cleanup
Co-authored-by: Pheenoh <pheenoh@gmail.com>
* c_phase: Make cPhs_Do a little more matching
Still doesn't fully match, but now the branch offsets and everything
else line up.
The load of pUserData still doesn't properly match though.
* c_phase: Make cPhs_Next completely match
Co-authored-by: Pheenoh <pheenoh@gmail.com>
* change split.py to output extern vars/functions into generate CPP
also change demangling to use short type names
* don't take files for extern funcs/vars anymore
Co-authored-by: Pheenoh <pheenoh@gmail.com>
Removes the strong dependency on a single header file and moves
declarations to their respective header file.
This allows for making dependencies explicit in cpp files and other
headers, and also makes it much easier to track where everything related
to a particular component is.
This change also creates a few header files that previously didn't
exist, making it much nicer for people implementing things, as they
won't need to create the header file, it'll just be there ready to go.
Ideally functions.h wouldn't even be a thing, as this header adds a lot
of preprocessing overhead due to its size, and will continue to grow
significantly larger over the lifespan of the project, which can also
impact the performance of editors that do dependency lookups and
context-aware syntax highlighting.
this does a thing we don't actually want to do (generate a pdf), and is also broken, because everything is someone else's problem
Co-authored-by: Pheenoh <pheenoh@gmail.com>
technically our version of mwcc only supports c++98 but this is close enough to preserve spaces between nested template closing brackets
Co-authored-by: notyourav <65437533+notyourav@users.noreply.github.com>