53 Commits

Author SHA1 Message Date
Kawe Mazidjatari
b4383478d1 Initial refactor of the CCrashHandler class
* Fixed recursive call.
* Format file similarly to Respawn's.
* Reduced output code size.

TODO:
* Call crashmsg.exe.
* Add build and system information.
2022-12-26 20:11:37 +01:00
Kawe Mazidjatari
9ec5b6aabd Improve formatting for FPU 2022-12-25 22:49:49 +01:00
Kawe Mazidjatari
0a9045f1c7 Fix typo in crash handler 2022-12-25 22:44:07 +01:00
Marvin D
c79f98e4f8 Remove comment on crashhandler. 2022-12-24 16:48:15 +01:00
Marvin D
f9f09bd02a Limit IMI search to 7. 2022-12-24 16:43:19 +01:00
Marvin D
e24b9b90a5 VEH Clean-up. 2022-12-24 16:41:47 +01:00
Marvin D
22506fa689 Fix VEH.
* Make sure IsMaterialInternal won't be inlined.
* Fix recurssive VEH throwing.
* Check if IsMaterialInternal caused exception and ignore it.
2022-12-24 16:40:04 +01:00
Marvin D
d1ec3aaf71 Disable VEH till fix. 2022-12-24 13:06:44 +01:00
Marvin D
8506851860 VEH clean up. 2022-12-23 14:06:31 +01:00
Marvin D
bd2cc9f4b3 EXCEPTION_EXECUTE_HANDLER -> EXCEPTION_CONTINUE_SEARCH 2022-12-23 03:19:43 +01:00
Marvin D
37a50c92b8 VectoredExceptionHandler init.
* Only gets compiled in for release builds.
* Attaches on gamesdk init, so should catch everything on dll setup also.
* Fake PDB parsing still needs to be done.
2022-12-23 02:56:40 +01:00
rexx
3c3e1c46df Add pak_listtypes command 2022-12-22 21:44:38 +00:00
Marvin D
01724cfaad vtable.cpp clean up 2022-12-21 15:55:52 +01:00
Marvin D
c071ce2217 Prevent constant ModuleSections_t allocation. 2022-12-20 23:38:45 +01:00
Marvin D
9994491551 RTech_RegisterAsset 2022-12-20 01:03:59 +01:00
Marvin D
21f995a37b remove un-needed include 2022-12-09 01:17:23 +01:00
Marvin D
ef256618f6 CVTableHelper class for easier RE.
* THIS IS NOT SUPPOSED TO BE USED WITH SHIPPING CODE!
* This is used for a quick way to call virtual functions for reverse engineering and rebuilding big functions, upon successful rebuild, implement needed VTables accordingly.
2022-12-09 01:15:42 +01:00
Kawe Mazidjatari
ebf7bb5e0b Fix engine bug regarding forcing application borders
In Respawn's engine, the '-forceborder' command line parameter does the same thing as '-noborder'. '-forceborder' should remove the flags (nand) while '-noborder' should append the borderless flag. This code is an attempt to mitigate the problem. There was not enough bytes to assemble the nand operation for this code path without involving code caves or shifting.
2022-12-06 00:48:11 +01:00
Kawe Mazidjatari
119255b4ff Const correctness 2022-12-05 00:57:48 +01:00
Kawe Mazidjatari
1021a95068 Merge branch 'SignatureMap' into indev 2022-12-04 14:21:14 +01:00
Kawe Mazidjatari
e9e323f9d4 Add option to disable cache map
* Add '-nosmap' command line parameter to disable signature caching.
* Invalidate the cache map after initialization.
* Add const qualifiers where possible.
2022-12-04 14:16:12 +01:00
Kawe Mazidjatari
55b90781ee Remove experimental CRC implementation in LZHAM
This implementation was done to calculate buffer CRC on the go, as that was what the VPK file system uses for the file crc's. But it later turned out to be unnecessary, and was never reverted.
2022-12-04 01:33:10 +01:00
Marvin D
c3158b6937 Slight improvements.
CModule::GetSectionByName adjustments.
RTech::CreateDXTexture improvements.
2022-12-04 00:01:31 +01:00
Kawe Mazidjatari
10a0a41162 Rename to maintain consistency 2022-12-03 17:40:05 +01:00
Kawe Mazidjatari
e26679f199 Use 'Error' instead when SMap compression failed 2022-12-03 17:27:54 +01:00
Kawe Mazidjatari
a9e518e2e6 Fix PluginSDK compile errors 2022-12-03 00:08:48 +01:00
Kawe Mazidjatari
5695e3016c CIOStream: use stf::fstream instead 2022-12-02 22:31:42 +01:00
Kawe Mazidjatari
5903b40f96 Implement LZHAM compression for the signature cache map 2022-12-02 22:14:46 +01:00
Kawe Mazidjatari
b90d6f929c Finish Signature Cache Map implementation
* Fixed bug where the system still added entries after we are initialized (file has already been written to the disk).
* Moved loading logic to CSigCache class.
* Dedicated and Host/Client now have their own cache files.
2022-12-02 12:12:13 +01:00
Kawe Mazidjatari
81fbf9ded7 Finish signature cache map implementation in CModule 2022-12-02 11:10:53 +01:00
Kawe Mazidjatari
c3eba48472 Implement signature cache further into the CModule class
Init speeds have been reduced from 1.7 sec (average) to 0.06 sec (average)
2022-12-02 10:37:41 +01:00
Kawe Mazidjatari
783b3dbb5a Initial working implementation of the Signature Cache Map.
Init speeds have been reduced from 1.7 seconds (average) to 0.3 seconds (average)
2022-12-02 00:30:49 +01:00
Kawe Mazidjatari
5513057f53 Pass patterns by const string reference 2022-12-02 00:28:29 +01:00
Kawe Mazidjatari
053f284029 Compute the file size properly 2022-12-02 00:25:28 +01:00
Kawe Mazidjatari
f999372f37 Work in progress signature cache map loading and parsing 2022-12-01 22:47:39 +01:00
Kawe Mazidjatari
4ba88963ff Fix bugs and many compiler warnings
* Promoted size types in CUtlBuffer to int64.
* Fixed bug where CUtlBuffer::GetPtr returns a 64bit pointer that was promoted from a 32bit integral type.
* Use int64/size_t for anything strlen, pointer subtraction, etc..
* Removed invalid structure alignment declarations.
2022-11-24 15:41:52 +01:00
Kawe Mazidjatari
824a9f8bb2 utility.cpp light cleanup
* Use ternary operator for simple tests.
* Default 'GetFileName's 'bRemoveExtension' parameter to false.
2022-11-23 16:54:10 +01:00
Kawe Mazidjatari
11fa1c5119 Add case insensitive search for developer console input field
This has been requested by a user. This change will allow for searching convars from partial input regardless of the case.
2022-11-13 23:44:30 +01:00
Kawe Mazidjatari
24a4097cef Improve string trimming logic
Add option to trim anything before/after the criteria.
2022-11-11 01:17:11 +01:00
Marvin D
d00aaa933d CRenderView init, GetWorldMatrixForView()
* Fixed .gitignore for root /game/
* Fixed bug in WalkVTable where it would offset self.
* General clean up: VAR -> CON, CON -> VAR
2022-11-10 00:53:12 +01:00
Kawe Mazidjatari
40566235e0 Server authentication code improvements
* Added validity checks for player names, they must be UTF-8 encoded, else game clients will crash attempting to set non-UTF-8 player names in RUI.
* CServer::RejectConnection now takes a 'v_netadr_t*', previously it was 'user_creds_s*', which worked as 'v_netadr_t' is the first member in 'user_creds_s'.
* Programmer must now manually pass a character buffer to 'v_net_adr::GetAddress(...)'.
2022-11-03 02:30:57 +01:00
Kawe Mazidjatari
5f84803ac6 ImGui and DirectX code improvements
* Fix history duplication by removing trailing white space characters from submitted commands in console.
* Fix out of range exception caused by caching svConVar.size() in CConsole::BuildSummary while we are modifying it.
* Fixed memory leak  caused by extraneous Strdup calls in CConsole.
* Renamed variables and structure members, static vars in id3dx.cpp are not prefixed with s_, IBrowser_Config is now m_BrowserConfig.
* Performed code cleanup in id3dx.cpp.
2022-10-20 12:29:50 +02:00
Kawe Mazidjatari
de2400f6a2 Implement StrintCount utility
Counts the number or delimiters found in a given string
2022-09-22 17:08:20 +02:00
Kawe Mazidjatari
b0fc8fb46c Add utility for checking if a file is empty or not 2022-09-10 00:06:26 +02:00
Kawe Mazidjatari
34a06147d7 Fix spelling errors
Overall spelling improvements and cleanup..
2022-09-09 19:47:31 +02:00
Kawe Mazidjatari
e1cf700355 Improve timer logic
Accurate interval to duration conversion.
2022-08-31 02:15:54 +02:00
Kawe Mazidjatari
885e6fa94e Proper NET_SetKey sanity checks
* Checks if input encoded key is 24 characters long.
* Checks if the input data is a valid base64.
2022-08-30 20:04:59 +02:00
Marvin D
55a620aa4d CPluginSystem init, for native mods.
* Not finished yet.
* Need to make a proper ModuleManager
* Handle PluginSystem_Reload()
2022-08-20 01:59:36 +02:00
Kawe Mazidjatari
2d367f56fe Improve FindPatternSIMD and GetVirtualMethodTable
Allow searching for multiple occurrences, the main reason for this addition is that some RTTI object locators reference 2 (or more) VFTables, the ConVar class is a good example., where we have 2 separate VFTables, one implementing ConCommandBase (which implements its own IConVar), the other implementing just IConVar for ConVar (2 VMT pointers in one class).
2022-08-15 21:05:42 +02:00
Kawe Mazidjatari
4551f6d494 Implement convar_list and convar_differences
Also added more CCvarUtilities methods which are yet to be implemented.
2022-08-13 12:39:57 +02:00