Kawe Mazidjatari
20b6b021d9
/W4: Fix verbose compiler warning caused by type demotion
...
Explicitly demote to unsigned char.
2023-04-02 09:43:08 +02:00
Kawe Mazidjatari
afcbd42e90
/W4: Fixed bug caused by dead code
...
Fixed bug caused by calling CBaseFileSystem::Size on a closed file handle, the results weren't used at all which triggered the warning.
2023-04-02 09:35:25 +02:00
Kawe Mazidjatari
1ef5287b56
/W4: Fixed name shadowing bug
...
'DrawAllOverlays' gets called with a boolean parameter indicating whether or not the render frame should be ran. This is so the rest of the logic could run in order to decay overlays to avoid memory leak or unnecessary high CPU time in overlay timing code. Parameter name has been renamed from 'bDraw' to 'bRender', and the local variable 'bDraw' which caused the shadow warning, has been renamed to 'bShouldDraw'. The local variable 'bOverlayEnabled' now takes into account the 'bRender' parameter.
2023-04-02 09:27:54 +02:00
Kawe Mazidjatari
678199d6ca
/W4: Fixed name shadowing warning
2023-04-02 09:23:53 +02:00
Kawe Mazidjatari
4ed1ad75d1
/W4: Fix warning caused by conversion from uint32 to uint8
...
Prune the rest explicitly with a bit mask.
2023-04-02 02:27:30 +02:00
Kawe Mazidjatari
69b4a43a28
/W4: Fix potentially uninitialized local variable 'remoteContext'
2023-04-02 02:19:08 +02:00
Kawe Mazidjatari
2bf86375d7
/W4: Fix unreachable code
2023-04-02 02:17:52 +02:00
Kawe Mazidjatari
c2094a68de
Add and implement file path normalization logic
...
Implementation taken from game executable.
2023-04-02 02:00:47 +02:00
Kawe Mazidjatari
b648378574
Turn 'TxtrAssetToDxgiFormat' into constant table
...
Turned into an actual constant.
2023-04-02 01:40:28 +02:00
Kawe Mazidjatari
cd40081a20
Rename RPak header magic constant to 'RPAK_MAGIC'
...
A more descriptive name.
2023-04-02 01:26:38 +02:00
Kawe Mazidjatari
e9fac084fe
Fix struct -> class compiler warning
...
'dtMeshTile' is defined as struct, but declared as class, causing a compiler warning. Fixed by declaring it as struct.
2023-04-02 01:23:07 +02:00
Kawe Mazidjatari
ef0e64b639
Revert back to old RTech::Decompress implementation and monolithic lookup table
...
Reverted as the new implementation wouldn't work properly on clang-cl (crashed on several pak files), and only worked on msvc when suppressing compiler warnings. The original implementation (raw copy/paste assembly) works perfectly on both compiler with no warning suppressors.
2023-04-02 01:22:11 +02:00
Kawe Mazidjatari
4357c9dbf3
Fix many compiler warnings
...
Fix many compiler warnings indicating potentially unwanted implicit conversions/truncations.
2023-04-02 00:59:24 +02:00
Kawe Mazidjatari
2fb54ad8c4
Guard 'IsValidPersonaName' out for client.dll
...
Don't compile 'IsValidPersonaName' for client.dll.
2023-04-01 22:58:43 +02:00
Kawe Mazidjatari
b9a16a6c1d
Revert change
...
These should call the 'flt4x' version of Rotate* instead.
2023-04-01 22:37:12 +02:00
Kawe Mazidjatari
7024ecc7d9
Add missing include
...
Add 'smmintrin.h' for newly utilized intrinsic '_mm_extract_epi64' which is portable, unlike accessing union members of the __m128i structure.
2023-04-01 22:19:30 +02:00
Kawe Mazidjatari
2740d4edad
Fix compile errors when using clang-cl to compile the SDK
...
Add global define for the clang compiler, and leave non-member 'fltx4' operator functions out when using clang to compile the SDK as these are causing errors. 'fltx4' is a typedef of __m128; not a user defined class, so these operators couldn't be added.
2023-04-01 22:13:58 +02:00
Kawe Mazidjatari
615e0efccd
Comment 'RESTRICT' keyword
...
Causes compile errors in clang-cl as the functions it calls do not take a restricted pointer.
2023-04-01 22:11:41 +02:00
Kawe Mazidjatari
4c79b5af5d
Change immediate from decimal to hexadecimal
...
Force consistency.
2023-04-01 21:43:16 +02:00
Kawe Mazidjatari
a7158d0881
CConsole::AddLog optimizations
...
Use FormatV to format the string, and use the move constructor to move it into the conlog structure.
2023-04-01 21:42:34 +02:00
Kawe Mazidjatari
fd9f9cb00d
Comment 'register' keywords in 'generichash.cpp'
...
Commented due to deprecation in C++17.
2023-04-01 21:14:42 +02:00
Kawe Mazidjatari
7f559f837f
Use C-style cast
...
Use C-style cast to avoid compile errors on clang-cl.
2023-04-01 21:12:41 +02:00
Kawe Mazidjatari
d2a8d077a6
Make SSE mask constants unsigned
...
Should be unsigned to avoid compile errors (clang-cl); this did not affect code generation.
2023-04-01 21:10:49 +02:00
Kawe Mazidjatari
69624baa10
NavMesh debug draw code refactor
...
* Use mathlib SIMD wrappers instead, this is to maintain compatibility across different platforms/compilers.
* Moved camera distance logic to separate method.
2023-04-01 20:54:10 +02:00
Kawe Mazidjatari
f2d1b9e643
Fix crash caused by returning unsigned values
...
Function returned '-1' as 'ULONG_MAX'. This patch fixes this problem while suppressing compiler warnings.
2023-04-01 17:39:22 +02:00
Kawe Mazidjatari
7cc58a642f
Rename and mark detour globals as static
...
Renamed to 'g_DetourVector' and 'g_DetourSet', marked as static.
2023-04-01 13:17:23 +02:00
Kawe Mazidjatari
cc67739802
Remove already defined symbols
...
These are already defined in 'mathlib_base.cpp'.
2023-04-01 13:11:02 +02:00
Kawe Mazidjatari
16ea75d5a2
Fix clang-cl compile errors
...
Cannot concatenate __FUNCTION__ macro like this.
2023-04-01 13:10:22 +02:00
Kawe Mazidjatari
69e6c4718e
Rename static 'Init' method in ConVar
...
Renamed to 'StaticInit' to avoid base class override. Also commented '__restrict' qualifiers.
2023-04-01 13:09:02 +02:00
Kawe Mazidjatari
2be8c69d6d
Fix typo causing potential bug
...
This should be an unsigned 8-bit integer, as values within the array exceed the maximum value of a signed 8-bit integer.
2023-04-01 12:27:36 +02:00
Kawe Mazidjatari
7a521d1d27
Turn static map into jump table
...
Slightly increase performance and reduce overhead during texture creation.
2023-04-01 11:27:53 +02:00
Kawe Mazidjatari
b9bf4195a0
Rename DevMsg logger
...
Renamed to 'sdk'.
2023-04-01 10:58:15 +02:00
Kawe Mazidjatari
986c194703
Make persistence logging more compact
...
Make it more compact.
2023-04-01 10:36:09 +02:00
Kawe Mazidjatari
7827721277
Add a newline when printing miles debug output
2023-04-01 10:24:08 +02:00
Kawe Mazidjatari
b15d848c66
Cleanup 'user_creds_s'
...
Light cleanup.
2023-04-01 01:51:39 +02:00
Kawe Mazidjatari
e3429705eb
Fix crash caused by CAppSystemGroup changes
...
* Moved 'm_pFileSystem' to 'CSourceAppSystemGroup' (actually belongs there, CAppSystemGroup has to be 0xA8 in size in order for 'm_bDedicated' to line up in 'CModAppSystemGroup').
* Prefixed all static functions with 'Static' to avoid name collisions.
2023-04-01 01:27:04 +02:00
Kawe Mazidjatari
122cd89aa9
Fix recursive initialization of convars/concommands
...
'CSourceAppSystemGroup::PreInit' could be called multiple times. Added check for its actual stage before running any initialization code. This fixes the recursive init problem.
2023-04-01 01:10:16 +02:00
Kawe Mazidjatari
2fdcf2ce2c
Reverse engineer 'CAppSystemGroup' class
...
Partially reverse engineered.
2023-04-01 01:07:20 +02:00
Kawe Mazidjatari
5056d8f040
Move interface types to public header
2023-04-01 01:05:43 +02:00
Kawe Mazidjatari
67180e51ff
Validate client's origin name on connect
...
Recently, there has been a sudden influx of players playing with a name that isn't valid. Names such as " " or "@something $very !crazy". This patch fixes this problem by enforcing checks during connect by default.
2023-03-31 22:37:53 +02:00
Kawe Mazidjatari
aa42126154
Re-enable COMDAT folding and references linker optimization flags
...
Re-enabled to significantly reduce binary size without affecting code generation results.
2023-03-31 20:05:10 +02:00
Kawe Mazidjatari
29616f4810
Rename 'g_vAllMaps' to 'g_InstalledMaps'
2023-03-31 00:35:01 +02:00
Kawe Mazidjatari
1a361d9961
Remove /TSAWARE compiler flag from DLL projects
2023-03-31 00:19:23 +02:00
Kawe Mazidjatari
731bdbb010
Remove explicit COMDAT/References linker optimization flags
2023-03-30 23:03:48 +02:00
Kawe Mazidjatari
6b6ead34a4
Enable TERMINAL_SERVER_AWARE PE header flag
...
Enabled to enforce maximum compatibility with game executable, which has this enabled as well.
2023-03-30 22:57:19 +02:00
Kawe Mazidjatari
9a8b39d71d
Additional compiler option changes
...
Force consistency between all libraries
2023-03-30 22:47:17 +02:00
Kawe Mazidjatari
c9f51a5dab
Change project compiler options
...
Changed to match the assembly of the game as much as possible. Will be finished when port to CMake is completed.
2023-03-30 22:21:18 +02:00
Kawe Mazidjatari
f9c5986245
Upgrade Dear ImGui to 1.89.4
...
Upgrade and light restructure of ImGui directory.
2023-03-29 00:19:19 +02:00
Kawe Mazidjatari
387b24875b
Downgrade 'libcurl' to 7.54.0
...
The game uses 7.54.0, downgraded to maintain compatibility if we ever hook curl functions.
2023-03-28 23:14:26 +02:00
Kawe Mazidjatari
654d7a97e7
Remove extraneous trailing semicolon
2023-03-28 21:18:11 +02:00