142 Commits

Author SHA1 Message Date
Kawe Mazidjatari
3323c3fadb Small ImGui theme adjustments 2022-06-27 14:48:03 +02:00
Kawe Mazidjatari
374a44f29e Rename PatternToBytesAndMask to PatternToMaskedBytes 2022-06-26 17:45:54 +02:00
PixieCore
8867b3bd7b Even faster startup now. 2022-06-25 12:05:09 +02:00
PixieCore
232680a2a6 CMemory::FindPattern cache bytes in L1.
* Pre-fetch bytes and cache them in L1.
2022-06-25 11:58:30 +02:00
PixieCore
64cf0d33d7 Fixed convention naming in PatternToBytesAndMask. 2022-06-25 00:10:36 +02:00
PixieCore
5ecac66dba Overloaded FindPatternSIMD that only takes 1 string.
* Uses IDA Style Pattern, Byte Array and Mask get created from that pattern.
2022-06-25 00:08:02 +02:00
PixieCore
39de0c3687 memaddr adjustments. 2022-06-24 23:32:47 +02:00
Kawe Mazidjatari
fbcee16f97 CAI_NetworkBuilder::SaveNetworkGraph improvements
Use CIOStream class.
Use proper type for CAI_Network::m_iNumNodes.
Improved CIOStream to take std::filesystem::path instead of std::string.
2022-06-24 16:56:28 +02:00
Kawe Mazidjatari
e22c17340f Add 'UTF8CharLength(..)' to utility.cpp 2022-06-24 12:12:30 +02:00
Kawe Mazidjatari
479adc4b85 CCommandLine additions 2022-06-24 12:10:46 +02:00
Kawe Mazidjatari
1b6f40d941 Fix for SVC_UserMessage
Removed padding that was causing the structure to misalign with the game's one.
Enabled 'SVC_UserMessage::Process()' hook (function works properly after the structure alignment).
2022-06-23 18:20:17 +02:00
Kawe Mazidjatari
ff59db1b95 Light improvements
Update comments.
Proper type for 'user_creds::m_nUserID'.
Proper type for 'CClient::SetUserID'.
Added 'CClient::SetHandle'.
2022-06-14 21:53:03 +02:00
Kawe Mazidjatari
ebf4921063 Ban system improvements
NucleusID/OriginID is an unsigned type, changed all types to uint64_t and cleaned up redundant code.
2022-06-14 20:56:55 +02:00
Kawe Mazidjatari
9fd39d4e21 CModule class optimizations
Module segments are now part of the class to eliminate unnecessary re-inits and copies.
2022-06-13 23:34:06 +02:00
Kawe Mazidjatari
7c0c541405 FileExist cleanup
Use fs::path constructor for all strings.
Renamed CPakFile::AsyncLoad to CPakFile::LoadAsync.
Renamed CPakFile::Load to CPakFile::LoadPak.
2022-06-12 12:40:26 +02:00
Kawe Mazidjatari
872b39514f Add file extension support to .vpkignore 2022-06-07 13:46:18 +02:00
Kawe Mazidjatari
b62cf7c017 Add support for .vpkignore file
Folders can be globally excluded using the '.vpkignore' file (placed in the workspace root).
To exclude specific files, use the manifest file.
2022-06-06 23:08:53 +02:00
Kawe Mazidjatari
d005626aa0 Fix VPK root files bug
Files names of files located in the root of a VPK weren't formatted properly
2022-06-05 18:01:23 +02:00
Kawe Mazidjatari
92daef5a32 VPK system improvements
More detailed operation statistics.
Discard VPK directory files who's header doesn't match engine requirements.
Separated manifest properly between language and context (you can now package for each language and context from a single workspace).
2022-06-05 17:28:39 +02:00
Kawe Mazidjatari
fb0a3db69e Fix spelling V2.0 2022-06-05 02:44:55 +02:00
Kawe Mazidjatari
ad0f94e973 Implement data sharing algorithm in VPK packing
This reduces size of the resulting VPK (checks entry block in hash map).
mp_common compresses to 32mb instead of 37.3mb (original is 38.5mb).
2022-06-04 13:55:24 +02:00
Kawe Mazidjatari
6e32775c71 Additional VPK system improvements
Added DevMsg logs to show the elapsed time of the operation.
Fixed post decompress CRC/ADLER error checking.
Slight cleanup.
2022-06-04 03:12:46 +02:00
Kawe Mazidjatari
655d1c65b2 Proper VPK repacking
Initial proper implementation pending cleanup.

The new system builds a manifest file when a VPK is unpacked. The manifest files contains data such as the entry flags and texture flags. It also contains a field determining whether the file should be compressed or not.

When a user repacks a pack, the system attempts to load this manifest file and does a lookup to the object to retrieve the flags (most of these flags are unknown, but they are used by the engine and are necessary for stuff like cubemaps and texture files to work correctly. Cubemaps won't work with proper flags, and textures (decals, particle system components, etc..) will look washed out without them.

I think some also determine whether a file within the VPK should be cached or not, so simply marking everything as 0x101 will probably end up in more CPU time and higher filesystem cache usage (depot/ is only 0x1, I don't think anything there is getting cached ever without the 0x100 flag).

User could also repack a VPK while excluding anything that is not in the manifest file. So you could unpack all VPK's into a single directory (each VPK has its own manifest file tied to its level name), and rebuild all the VPK's with only the files that where originally in them.

fs_pack_vpk command usage: <locale> <context> <level_name> <manifest_only>

locale determines the pak language (default english), context determines whether is a server/client vpk, level_name determines the BSP name of the pak, manifest_only determines whether the pack system should only include files within the manifest (leaving this arg out will build all files into the vpk).

The VPK workspace path is determined with ConVar 'fs_packedstore_workspace'.
2022-06-04 01:08:23 +02:00
Kawe Mazidjatari
b65928b0c7 Improve spelling 2022-06-03 19:38:58 +02:00
PixieCore
3b46780a38 Temp fix so I can compile (UTF8Decode) 2022-06-02 16:30:35 +02:00
Amos
07533cb0c4 packedstore cleanup
Add const qualifiers to params.
Enable compression flags.
2022-06-02 15:20:22 +02:00
Kawe Mazidjatari
e6e4bd703c Fix string utility bugs
GetFileName returned null string if file is not within a path, now returns the input file name.
RemoveFileName returned file name if file is not within a path, now returns null string.
Added StringReplaceC (string replace with copy instead of modifying the reference object).
2022-06-02 01:55:41 +02:00
Kawe Mazidjatari
4d8d164df6 Improve CIOStream class
Add read/write with specified size.
Add data vector.
2022-06-02 01:52:49 +02:00
Kawe Mazidjatari
5b75903ac2 Fixed missed rename of 'Read()' 2022-05-30 02:47:55 +02:00
Kawe Mazidjatari
2ee9cce393 Improve binary stream class 2022-05-30 02:47:15 +02:00
Kawe Mazidjatari
399131d57d Add additional useful string utils 2022-05-30 01:50:21 +02:00
Kawe Mazidjatari
11652d015d SDK launcher progress
* Fixed compiler error when trying to compile SDK Launcher in debug (static lib was not compiled with static link runtime).
* Documented most stuff in basepanel.cpp
* Split some logic into dedicated functions in basepanel.cpp
* Implemented VDF parser from Matthias Moeller.
* Parse playlist file and load all playlists into the combo box.
2022-05-26 01:44:46 +02:00
Kawe Mazidjatari
4b72afb74f Light refactor for logging
Moved logging functions to dbg.h (tier0) and export them from the dll.
Added additional functions for checking bad pointers (debug only!).
Reduced output code size.
2022-05-25 14:18:29 +02:00
Kawe Mazidjatari
dacd307663 See description
* Finished designer code for launcher gui.
* Basic implementation of setting flags for host launch option.
* Check in 'CHostState::LoadConfig' if -launcher is below 1.. if condition is met the cfg's will be executed from 'CHostState::LoadConfig'.
* Added 'StringIsDigit' utility.
2022-05-24 02:23:37 +02:00
Kawe Mazidjatari
52883808e1 Reversed CServer structure (almost complete). See desc
* Mostly rebuild CServer structure.
* Partially rebuild CNetworkStringTable structure.
* Partially rebuild CNetworkStringTableContainer structure.
* Removed redundant patterns which are now covered in the data structure.
2022-05-20 20:14:39 +02:00
Kawe Mazidjatari
efb7c36408 Light project restructure
Moved server/client headers and implementations into dedicated subfolder.
Renamed Some classes to match the game binary (e.g. CBaseClient is now CClient).
Removed redundant files.
2022-05-20 11:52:19 +02:00
Kawe Mazidjatari
291ca3700d Update CBaseClient struct 2022-05-17 02:28:16 +02:00
Kawe Mazidjatari
637041d5e7 Use 'fs' instead of 'std::filesystem' 2022-05-16 21:54:46 +02:00
Kawe Mazidjatari
2e38f2e0dd Forgot to unlock mutex in early return condition 2022-05-16 21:48:32 +02:00
Kawe Mazidjatari
3bdae1a05f Use mutex instead 2022-05-16 21:41:15 +02:00
Kawe Mazidjatari
107a516f9e Implement CBaseClientState structure 2022-05-15 00:29:25 +02:00
Kawe Mazidjatari
9546f7a2ff Update netpacket_t struct 2022-05-14 18:22:46 +02:00
Kawe Mazidjatari
3144227ec8 Update GetAdr implementations to feature spdlog
Fixed all alignments and reduced code verbosity
2022-05-13 14:53:25 +02:00
Kawe Mazidjatari
3e48e746db Cleanup some strings 2022-05-12 01:07:48 +02:00
Kawe Mazidjatari
27c3ed0365 Add print functions for printing '__m128i' datatypes 2022-05-10 23:36:01 +02:00
Kawe Mazidjatari
452c8afcf3 Display '%' symbol properly in console 2022-05-10 23:32:44 +02:00
Kawe Mazidjatari
72289f9f33 CMDLCache::GetStudioHardware improvements
Slightly mapped out the structure more.
The function should now be compatible with earlier game dll's.
CStudioHWDataRef::SetFlags has to be rebuild as these are declared inline for earlier game dll's.
2022-05-06 00:51:49 +02:00
PixieCore
66d122e192 Start of CEngineClient implementation.
* Rebuild SetRestrictedServerCommand and SetRestrictedClientCommands
* Implemented new CMemory Function to walk through a VTable.
* pDetours->GetCon() gets called first now.
*
2022-05-06 00:34:46 +02:00
Kawe Mazidjatari
24dae59cb8 Improve CMDLCache::FindMDL 2022-05-05 02:54:17 +02:00
Kawe Mazidjatari
f851c29498 Optimize some CHLClient functions away for dedicated 2022-05-04 21:10:46 +02:00