2549 Commits

Author SHA1 Message Date
Kawe Mazidjatari
5551909ac7 Explicitly cast to types to suppress warnings in navmesh tool 2023-04-03 14:49:18 +02:00
Kawe Mazidjatari
e9cbe34a95 Remove dead code from navmesh tool 2023-04-03 14:48:38 +02:00
Kawe Mazidjatari
9a1343b231 Fix symbol shadowing warnings in navmesh tool 2023-04-03 14:47:41 +02:00
Kawe Mazidjatari
8809f17504 Compile NetMsg out entirely for dedicated 2023-04-03 14:34:46 +02:00
Kawe Mazidjatari
87831050e9 Fix SDK launcher compiler warning
Unused param.
2023-04-03 13:12:36 +02:00
Kawe Mazidjatari
fee5f7608e Fix SDK launcher bug
Add missing argument for string format specifier. Fixed additional compiler warnings by casting types/commenting unused.
2023-04-03 13:12:22 +02:00
Kawe Mazidjatari
4cff696133 Cast results back to a float
This suppresses a compiler 'type conversion' warning.
2023-04-03 11:22:55 +02:00
Kawe Mazidjatari
53c693f6e1 Avoid creating a unnecessary copy
Avoid copying the string out of the vector.
2023-04-03 11:21:31 +02:00
Kawe Mazidjatari
a1f7cc9a0d Make code compatible with older C++ versions
Made compatible with earlier C++ versions without having verbose compiler warnings.
2023-04-03 01:41:46 +02:00
Kawe Mazidjatari
d8cc85da6b Fix symbol shadowing warnings
'uint' is defined in pseudodefs.h, but also in format.h. The definition in pseudodefs.h shadows the one in format.h. Since the one in format.h is local, it has been renamed to 'uinty' to avoid this behavior.
2023-04-03 01:40:21 +02:00
Kawe Mazidjatari
e79ed464e9 Improve HexDump utility
* Improved formatting.
* Get default logger directly instead of using a string identifier.
* Promoted size type to 'size_t'.
* Removed extraneous static variables.
2023-04-02 21:51:15 +02:00
Kawe Mazidjatari
0c5a24152e /W4: Fix name shadowing warnings
Parameter 'hostname' shadows global cvar 'hostname'.
2023-04-02 17:40:15 +02:00
Kawe Mazidjatari
417365fa77 /W4: Fix type truncation warnings 2023-04-02 17:39:16 +02:00
Kawe Mazidjatari
b0d2665550 /W4: Fix compiler compatibility
Clang doesn't support function-style casts with types containing a space.
2023-04-02 17:34:42 +02:00
Kawe Mazidjatari
4e7693bae6 /W4: Fix name shadowing warnings 2023-04-02 17:25:18 +02:00
Kawe Mazidjatari
bae2e0a99c /W4: Fix implicit type conversion warnings
Explicitly convert them to avoid any warnings or potential bugs.
2023-04-02 17:23:53 +02:00
Kawe Mazidjatari
7727f13efa /W4: Fix return value truncation warning
Fix value truncation warning caused by returning 'CServerNetworkProperty::m_edict' in 'CServerNetworkProperty::GetEdict'. type has been demoted to actual type 'edict_t'.
2023-04-02 17:21:21 +02:00
Kawe Mazidjatari
42b3e49840 /W4: Properly pack server animation structures
Manually add fields to align structure properly. This suppresses many pesky compiler warnings.
2023-04-02 17:19:13 +02:00
Kawe Mazidjatari
a63d66b667 /W4: Fix unreferenced symbol bugs
Return value of 'g_pMasterServer->GetServerByToken' was never checked. Added check to improve the error messages that could be displayed.
2023-04-02 17:14:29 +02:00
Kawe Mazidjatari
2d87e082f1 /W4: Fix unreferenced symbol bugs
Fixed bugs that was caused by symbols that were defined, but never used.
* 'UnsignedIntConvertToFltSIMD' never used its input parameter.
* The results from the call to 'sq_call' were never checked, so if a failure took place, it was never logged.
* 'CheckForWarnings' never used the 'context' parameter, but this was required as context types of 'eDLL_T::SYSTEM_WARNING' or 'context == eDLL_T::SYSTEM_ERROR', should be returning the warning/error color as well.
* Renamed 'GetHiddenServerConnectStatus' to 'GetHiddenServerName' and added more dedicated error handling within its logic, as the results from the call 'g_pMasterServer->GetServerByToken' was never checked.
2023-04-02 17:11:14 +02:00
Kawe Mazidjatari
ae431c6ac2 /W4: Fix unreferenced symbol warnings
Fix verbose unreferenced symbol warnings.
2023-04-02 17:02:04 +02:00
Kawe Mazidjatari
a71839f13a /W4: Fix potentially non zero-terminated string
The prior call to 'strcpy' might not zero-terminated string, explicitly perform this operation to prevent this bug.
2023-04-02 16:56:54 +02:00
Kawe Mazidjatari
e1f0e72af4 /W4: Fix type demotion warnings
Explicitly demote to 'int' to suppress pesky compiler warnings.
2023-04-02 16:03:01 +02:00
Kawe Mazidjatari
24a06f28c6 /W4: Fix verbose compiler warnings in 'Debug' build mode
Warnings caused by symbol ambiguity. Fixed by removing the duplicate definition in 'platform.h'.
2023-04-02 15:58:55 +02:00
Kawe Mazidjatari
922709f4d9 /W4: Fix verbose compiler warnings caused by incorrect type conversion
Fixed bug caused by incorrect type conversion. Type should be as wide as the type used for 'CUtlMemory::m_nAllocationCount', which is 64-bits on this particular implementation.
2023-04-02 15:51:08 +02:00
Kawe Mazidjatari
09553e3e2c /W4: Fix incorrect instantiation of string transformer
The case transformation didn't work properly as the char value was not casted to an unsigned char, causing undefined behavior. Added new utility function 'IsEqualNoCase' which allows for comparing 2 strings case insensitively. Code has been tested with module strings containing irregular cases, and was still able to obtain the imported function address correctly.
2023-04-02 15:16:32 +02:00
Kawe Mazidjatari
978f108526 /W4: Fix incorrect type cast
Values passed to functions from '<cctype>' must be representable as unsigned chars to avoid undefined behavior.
2023-04-02 14:58:02 +02:00
Kawe Mazidjatari
0f461b7695 /W4: Fix unreferenced functions and light cleanup
* Fully commented 'UTF8Decode' to suppress warnings (currently unsupported).
* Cleaned up 'GetModuleInfo' and 'DbgPrint' to use the non-wide string versions instead.
* Added error handling in 'PrintLastError'.
2023-04-02 14:52:12 +02:00
Kawe Mazidjatari
a4a2f34c10 /W4: Fix signed/unsigned mismatch
This commit fixes warnings and bugs caused by signed/unsigned mismatch.
2023-04-02 12:09:43 +02:00
Kawe Mazidjatari
7de717d47c /W4: Use 'constexpr' to evaluate branch at compile time
Fixes many compiler warnings.
2023-04-02 11:19:23 +02:00
Kawe Mazidjatari
0aa62890bb /W4: Remove unreferenced local variables
Removed additional dead code.
2023-04-02 10:50:59 +02:00
Kawe Mazidjatari
48547325ee /W4: Properly pack CClientState structure
Pruned many compiler warnings by removing the packing directive and alignment modifiers. Padding that was otherwise performed by the modifiers, have been added manually. This change did not affect code generation.
2023-04-02 10:48:44 +02:00
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
715300dd82
Update README.md 2023-04-01 22:45:27 +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