This change was planned for a long time. This moves all REGISTER calls to a single translation unit, this is required as we currently added a very dirty workaround for not registering duplicates by checking if VFTable pointer was already present in the vector... Registering from single translation unit prevents duplicate instances that gets created if header is included by more cpp files.
Reworking this reduced 100kb+ of compiled code. This commit also reworked the way functions/variables/constant gets logged with their addresses; the new code formats them on the fly, and allows for resize at any time. Formatting is no longer required by programmer.
TODO: currently there are some compile errors for dedicated and client dll's. These will be resolved very soon as they need to be properly worked out still (server & client only stuff needs to be properly split). Use the 'main' (stable) branch for the time being if you need to compile these dll's.
Also reversed one new method: IEngine::GetPlaylistCount (gets the number of playlists read from the playlists file, the other 2 unknown methods after this one also do stuff with the playlists, but rather on KeyValues level, one checks if something exists i think, the other returns a const char. Haven't ran these yet).
Moved every pattern to IDetour interface. This allows for debugging patterns scans more easily, and create threads during pattern searching (Operation is now fired in APIENTRY).
Also cleaned up some unused code/extraneous comments.
Slightly increased performance by purging duplicate patterns.
Made variable search less dependent from other results (except if pattern-to-scan results is within the same header)
Migrating to this to initialize all patterns and prototypes in Systems_Init() instead.
This should make debugging missing/not found patterns easier and allow for opting out variable/constant search (some of these require other patterns to be found, thus resulting in seg faults..).
Also added check to detect if user has a eligible CPU to run this SDK.
The game requires SSE and SSE2 instruction sets. Our SDK requires this too due to the use of SSE intrinsics, so we cannot let the game handle this. We have to check it ourselves.
* Move most definitions to implementation file to avoid recompiling whole program for small changes
* Pass strings by reference for where possible.
* Split Module class to dedicated file.
* Add const qualifiers to all eligible methods for address/module class
* Some renaming
Inline every signature defined in the SDK (previously each translation unit had its own copy of the signature and function prototype). DLL init is near instant now (85% speed improvements).
* Add Cbuf_AddText and Cbuf_Execute signatures.
* Remove additional VGui stuff from dedicated statemachine.
* Move signatures to their respective headers.
* De-inline 'CHostState::FrameUpdate()'
* Ported al new patters to GAMEDLL_S1, CEngine still recreation needs extra work
* Load server VPK's instead of client VPK's on standalone servers
* Dynamically search for 'g_bDedicated' global boolean instead of hardcoded address
* Add 'PatchString' to memory class
* Rebuild CModGroupApp::Main, did not include the dedicated routine with the empty class global.
* Using a template function now for virtual function calls
* Implemented most of the CEngine class and grabbing its global var now.
* Using local CEngine now in FrameUpdate
* Implemented EngineParms_t fully and grabbing its global var.
* Added macro for adding class member variables at offsets.
A lot of comments added regarding what needs to be done for this commit.
* Check other season compability, wasn't able to do that due to not having access to said binaries at the moment.
* Fix sdklauncher to use widestrings to fix the bug with other languages in path