5 Commits

Author SHA1 Message Date
Kawe Mazidjatari
8acfad5556 Fix aligned memalloc singleton
Properly fix the aligned memalloc singleton in the SDK; the implementation now uses a callback based approach for calling the allocator and deallocator.
2023-05-15 20:47:17 +02:00
Kawe Mazidjatari
f120354e96 Initial port to CMake
* All libraries have been isolated from each other, and build into separate artifacts.
* Project has been restructured to support isolating libraries.
* CCrashHandler now calls a callback on crash (setup from core/dllmain.cpp, this can be setup in any way for any project. This callback is getting called when the apllication crashes. Useful for flushing buffers before closing handles to logging files for example).
* Tier0 'CoreMsgV' function now calls a callback sink, which could be set by the user (currently setup to the SDK's internal logger in core/dllmain.cpp).

TODO:
* Add a batch file to autogenerate all projects.
* Add support for dedicated server.
* Add support for client dll.

Bugs:
* Game crashes on the title screen after the UI script compiler has finished (root cause unknown).
* Curl error messages are getting logged twice for the dedicated server due to the removal of all "DEDICATED" preprocessor directives to support isolating projects. This has to be fixed properly!
2023-05-10 00:05:38 +02:00
rexx
b7fafa6b65 temporary modsystem fix
this is a temporary fix for the incorrect g_pAlignedMemAlloc behaviour
g_pAlignedMemAlloc is supposed to be a pointer to a struct of 2 functions, but it is a pointer to a class with a virtual function table, causing invalid function addresses
This causes an access violation on this call
This should be fixed properly in the future
2023-05-08 19:15:53 +01:00
Kawe Mazidjatari
7555264d4e Add RSON free
Cleanup RSON memory.
2023-05-06 17:49:13 +02:00
Kawe Mazidjatari
75ccebb4b6 Squirrel system restructure
Properly decouple squirrel and game code. This makes it easier to reverse engineer more of this squirrel system, and to compile them as individual libraries later on when moving to CMake to significantly decrease compile times.
2023-05-06 16:23:56 +02:00