1059 Commits

Author SHA1 Message Date
Amos
e07f59adbe Fix detach bug in PRX 2022-06-09 13:30:36 +02:00
Amos
ef68ef96fa Update vgui_debugpanel.cpp
Cleanup and cast loop int to proper type
2022-06-09 13:30:21 +02:00
Amos
3683a9d108 Optimizations
Remove extraneous 'c_str()' calls
2022-06-09 11:38:31 +02:00
Kawe Mazidjatari
aaf6e46871 ImGui panel improvements
Slight optimizations and cleanup.
Added fade-in effect.
2022-06-09 02:22:01 +02:00
Kawe Mazidjatari
dab5133e07 Rename 2022-06-08 23:35:46 +02:00
Amos
e461412fde Optimizations 2022-06-08 14:35:44 +02:00
Amos
d909878624 Optimizations 2022-06-08 14:03:04 +02:00
Amos
3cd38b6003 Fix format specifiers 2022-06-08 14:02:43 +02:00
Kawe Mazidjatari
9938c724a2 Cleanup 2022-06-07 13:57:29 +02:00
Kawe Mazidjatari
805cf59ad9 Update packedstore.cpp 2022-06-07 13:49:41 +02:00
Kawe Mazidjatari
326b751934 Light optimizations 2022-06-07 13:46:18 +02:00
Kawe Mazidjatari
872b39514f Add file extension support to .vpkignore 2022-06-07 13:46:18 +02:00
Kawe Mazidjatari
719fd3b8d2 Fix small mistake 2022-06-07 13:02:21 +02:00
Kawe Mazidjatari
6317888d57 Remove redundant includes 2022-06-06 23:11:01 +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
aa29c3df18 Fix server browser bug
Fixed bug where map list would contain multiple same entries when server vpk's are installed among the client ones.
v2.0.7_rc4
2022-06-06 16:46:09 +02:00
Kawe Mazidjatari
02b3f6f6f5 Update dedi CFG files 2022-06-06 15:30:10 +02:00
Kawe Mazidjatari
461920a970 Update terminology entirely for packedstore.h/.cpp
VPK tooling also works on the R1 game (Titanfall 1)
2022-06-06 14:54:22 +02:00
Kawe Mazidjatari
6e6e791c10 Fix terminology
Log actual entry index ('j') when sharing bytes, 'i' was block.
v2.0.7_rc3
2022-06-06 01:55:42 +02:00
Kawe Mazidjatari
bfac1c25f4 Update lib name for netconsole x86 debug builds 2022-06-06 01:35:18 +02:00
Kawe Mazidjatari
bbe885689a Add define for compiling launcher for dedicated servers
This sets the selected mode to server by default upon launch
2022-06-06 01:31:20 +02:00
Kawe Mazidjatari
e2bc64a65e Overlap edge of text box with send button 2022-06-06 01:16:40 +02:00
Kawe Mazidjatari
76d8da3db2 Fix return bug
CPackedStore::GetManifest() did not return a value in all control paths.
Use proper size types for entry block constructor.
2022-06-06 00:21:13 +02:00
Kawe Mazidjatari
400fc3b47a Add VPK build exec files 2022-06-06 00:12:48 +02:00
Kawe Mazidjatari
616f9b34fb Log number of descriptors build into VPK directory file 2022-06-06 00:06:54 +02:00
Kawe Mazidjatari
c9e3ea1f08 Rename to use correct terminology 2022-06-05 22:30:29 +02:00
Kawe Mazidjatari
f446ee03dd Correct terminology 2022-06-05 22:27:43 +02:00
Kawe Mazidjatari
0ff27bb20d Fixed bug where logged total directory size is wrong
changed writer.GetPosition() to sizeof(VPKDirHeader_t) + m_vHeader.m_nDirectorySize because we seek back to the offset of m_vHeader.m_nDirectorySize.
2022-06-05 22:12:22 +02:00
Kawe Mazidjatari
13f518d773 Fixed VPK manifest bug
Fixed bug where VPK root character gets written to the manifest file.
Show detailed data sharing statistics.
2022-06-05 20:55:34 +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
15c1908478 Additional cleanup
Cast to proper types.
Set the archive offset only instead of the entire block. The entry could still have its own flags. The only thing needed for saving data is sharing the same offset and size.
2022-06-05 12:28:49 +02:00
Kawe Mazidjatari
a4783a755e Fix memory leak
Access checksum objects directly vs pointer reference. Structure size equals a 64 bit pointer (fits into a single register).
Allocated memory was never deallocated (my mistake).
2022-06-05 03:01:10 +02:00
Kawe Mazidjatari
fb0a3db69e Fix spelling V2.0 2022-06-05 02:44:55 +02:00
Kawe Mazidjatari
c7e7a38b08 Set maximum compression level 2022-06-05 02:25:00 +02:00
Kawe Mazidjatari
22029abfc2 Fixed compression bug for VPK system
Fixed bug where the compressed buffer size equals the source buffer size getting packed into the VPK chunk. In all occurrences this resulted in corrupted data upon export.

The reason for data being corrupt upon export is because the engine checks the equality of the compressed and decompressed size fields in the directory file, if they are equal, the engine doesn't attempt to decompress the block. So we end up with a still compressed block on the disk (technically not corrupt in the context of the compression lib, but useless as-is on the disk).

If a compressed file doesn't get lower in size we are better out storing it rather than compressing it.

Added a new condition in lzham::lzham_lib_compress_memory which checks source and destination buffer size equality.
2022-06-05 02:24:44 +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
3dd96964e3 Cast and format to proper types 2022-06-04 03:19:05 +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
b3dd9c8ad6 Revert declaration 2022-06-04 01:30:18 +02:00
Kawe Mazidjatari
2e77c584b4 Cleanup 2022-06-04 01:17:07 +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
f1f0ca35f8 Merge branch 'master' into indev 2022-06-02 02:02:36 +02:00
Kawe Mazidjatari
14f409c8c6 Update packedstore.cpp 2022-06-02 02:00:35 +02:00
Kawe Mazidjatari
649060c8cc Update packedstore.cpp 2022-06-02 01:59:03 +02:00
Kawe Mazidjatari
f824954640 Update packedstore.cpp 2022-06-02 01:58:29 +02:00
Kawe Mazidjatari
ec7582e476 Fixed VPK repack with multiple files
VPK's could now be repacked with compression and multiple files. The output is identical to the input as far as currently tested (mp_rr_canyonlands_staging).
2022-06-02 01:57:18 +02:00