2709 Commits

Author SHA1 Message Date
Kawe Mazidjatari
11f20348ac Move GdiPlus header to launcher PCH
Only used by the SDK launcher for the dashboard.
2023-05-26 21:53:25 +02:00
Kawe Mazidjatari
7c944b6dfb Fix intermittent PDB creation error
Option '/Zf' requires '/Zi', else it gets ignored.
2023-05-25 22:25:33 +02:00
Kawe Mazidjatari
f122e856fb Determine whether or not to newline
Errors/warnings should be newlined, even if engine code doesn't provide it.
2023-05-22 23:17:50 +02:00
Kawe Mazidjatari
bafaa1b7de Remove unused enum 2023-05-22 22:46:18 +02:00
Kawe Mazidjatari
b75c32903f Allow lumps to be read from filesystem cache
Only certain lumps can be cached; see switch case in 'IsLumpIdxCachable'. Attempting to load anything else from cache results in a code crash or invalid data.
2023-05-22 22:40:27 +02:00
Kawe Mazidjatari
1fbc3291c7 Fix EOF read errors and PAKFILE_LUMP not loading correctly when discrete
This commit adds support for loading cubemap lumps from the disk, several patches and hooks had to be implemented to make this work. Since the game was trying to read the pakfile lump from the BSP file (even when absent), it would read EOF (heavily reduces down map loading performance).
2023-05-22 12:32:49 +02:00
Kawe Mazidjatari
ceb438b7ca Add BSP header definitions 2023-05-22 12:29:23 +02:00
Kawe Mazidjatari
4c6840be6c Light cleanup for 'CMapLoadHelper' ctor 2023-05-22 12:08:02 +02:00
Kawe Mazidjatari
2d0c033f95 Fix LUMP_GAME_LUMP not loading from the disk
Last lump to not load from the disk, see function 'AddGameLump' for details as to how this is performed.
2023-05-21 18:08:07 +02:00
Kawe Mazidjatari
5fcf430be5 Add GameLump data types 2023-05-21 18:07:04 +02:00
Kawe Mazidjatari
27925d3b7d Fix compiler warning causing compile errors
Unused initialized local variable.
2023-05-21 01:59:37 +02:00
Kawe Mazidjatari
ecf7f973f8 Allow to load all lumps from disk
This commit allows for loading all lumps from disk, if the m_bExternal var is set, it also attempts to load the lumps listed in the function 'IsLumpTypeExternal' from the cache, but through a different code path, which causes a crash. Setting this to false allows for loading it in the ctor.
2023-05-20 21:44:53 +02:00
rexx
66f52dea23 fix missing valid external lump check
bsp_lump loading was missing a check for if the lump is supposed to be able to load from disk

also removes VERTEX lumps from loading from disk due to crashes that occur when they are kept
2023-05-20 14:54:00 +01:00
rexx
d7f0de9d40 fix external bsp_lump loading
previously the lump data was being freed immediately after loading. this sets m_pRawData to nullptr so that doesn't happen
2023-05-20 13:49:12 +01:00
Kawe Mazidjatari
4297cd9ce3 Experimental BSP_LUMP loading hook
The 'CMapLoadHelper' constructor has been rebuild to load lump files too (if they exist). Currently, the game only reads the packed BSP file, or lumps if they exist in the filesystem cache. The newly added logic also reads them from a file. This is currently broken, most likely due to alignment problems. Experimental.
2023-05-20 14:06:36 +02:00
Kawe Mazidjatari
e338f0331a Add filesystem cache types
Types for file system cache.
2023-05-20 14:04:33 +02:00
Kawe Mazidjatari
44edef1724 Add BSP types
Type 'StaticPropLump_t' has been moved to 'gamebspfile.h'.
2023-05-20 14:03:44 +02:00
Kawe Mazidjatari
56f4dd927a Add VGui progress bar types 2023-05-20 14:01:19 +02:00
rexx
d521c67367 Hook CMapLoadHelper ctor
This will be used for enabling bsp_lump file loading in the future
2023-05-19 20:21:11 +01:00
Kawe Mazidjatari
c0c6c735a7 Improve build system
Added option: /Zf (Faster PDB generation); this was required as we enabled /MP. Without this, the compiler regularly fails to create a PDB.
Added option:  /EHsc (Standard C++ exception handling).
2023-05-18 14:07:52 +02:00
Kawe Mazidjatari
53788d5ba5 Potential fix for intermittent crash during playlists reload
This should fix a rare crash that happens when the playlists file is reloaded during disconnect. The client fetches the playlists from the server on connect. On disconnect, we want to reload the one from the client so that if the player want's to create his own game, that he would have his own playlists. The fix is to delay the reload of the playlists file to the beginning of the next frame.
2023-05-16 00:44:59 +02:00
rexx
14e19f38ef fix compiling
compiling was broken due to some spdlog warnings being treated as errors incorrectly
2023-05-15 20:16:58 +01:00
Kawe Mazidjatari
0dc2e110a6
Merge pull request #99 from Mauler125/aligned_memalloc
Fix aligned memalloc
2023-05-15 20:50:56 +02:00
Kawe Mazidjatari
8acfad5556 Fix aligned memalloc singleton
Properly fix the aligned memalloc singleton in the SDK; the implementation now uses a callback based approach for calling the allocator and deallocator.
2023-05-15 20:47:17 +02:00
Kawe Mazidjatari
95316ab1c8 Improve code for uniform random stream
Use 'std::lock_guard' for mutex management. Also fixed a compiler warning that got triggered by having a mutex unlock placed at an unreachable code path in 'CGaussianRandomStream::RandomFloat'.
2023-05-15 20:45:57 +02:00
Kawe Mazidjatari
b87dd0943f Fix compiler warnings
Use NOTE_UNUSED instead to suppress warnings.
2023-05-15 20:43:24 +02:00
Kawe Mazidjatari
7ddd33c8de Force name consistency
Renamed to just 'netconsole' as it was phrased like that throughout other files.
2023-05-15 18:00:51 +02:00
Kawe Mazidjatari
552f5f750c Fix crash in 'CClient::ActivatePlayer'
Set the persistence fields to 'ready' in 'CClient::ActivatePlayer', before executing the rest of the function. Previously, it was set in 'CVEngineServer::PersistenceAvailable', but this is too late. The function 'FairFight_Init' was actually 'CClient::ActivatePlayer', and thus it has been moved to the correct file, and the old file defining it previously has been removed.
2023-05-15 17:19:18 +02:00
Kawe Mazidjatari
9a9813512c Add AVI public headers to CMakeLists 2023-05-15 15:01:25 +02:00
Kawe Mazidjatari
11864f8902 Add all public headers to CMake projects
Added all public headers to CMake projects, also moved some files around in the public directory. Translation units have been moved to the libraries that were responsible for implementing them, as this game is monolithic.
2023-05-15 14:47:03 +02:00
Kawe Mazidjatari
a421a2bdec Regroup VGui projects
Moved under 'System'.
2023-05-15 09:54:43 +02:00
Kawe Mazidjatari
d5f3228ab0 Fix intermittent bug in server browser
On some compile runs, the 'LoadTextureBuffer' call is getting optimized out as 'ret' is only used for the assert statement, but on release, the assert statements does nothing and thus the compiler got rid of the call. This code should not be fired in this function, but rather in the initialization routine anyways. The code has been moved to 'CBrowser::Init', and the issue has been fixed.
2023-05-15 09:54:18 +02:00
Kawe Mazidjatari
f943fe8509 RecastMesh.cpp: Fix compiler warning
2 warnings:
Operation 'lkup[arr[i] & 0xF] | 0x8000;' returns an int, but should return a unsigned short; added explicit cast.
Operation 'arr[i] & 0xF' could read up to 64 bytes, while the stack buffer is only 16 bytes. Switched to operation: ''arr[i] & 0x3'.

The static buffer has also been declare const now.
2023-05-15 09:51:27 +02:00
Kawe Mazidjatari
310264c66d RecastMeshDetail.cpp: Fix compiler warning
Function 'updateLeftFace' is static, and when 'REVERSE_DIRECTION' is set to 1, its not getting used anywhere leading to a compiler warning as it has internal linkage with no references, and thus its getting pruned. Only define the function when 'REVERSE_DIRECTION' is 0.
2023-05-15 09:46:51 +02:00
Kawe Mazidjatari
9f44bcc818 Treat compiler warnings as errors
Treat them as errors globally. Most of the time a warning is a bug, or problem in code that could be solved in a different (better) manner. Thirdparty code have this disabled. The warnings as errors option can be globally disabled through the CMake GUI, but this is not recommended.
2023-05-15 09:44:26 +02:00
Kawe Mazidjatari
0138ac025f Fix bug when trying to print the host token
Should return ptr to string (caught from compiler warnings).
2023-05-15 00:54:33 +02:00
Kawe Mazidjatari
852d48256e Fix compiler warnings from tier0
Function with internal linkage has no references, and is getting removed.
2023-05-15 00:53:46 +02:00
Kawe Mazidjatari
6a86ae2606 Cleanup CMakeLists files
Light cleanup in CMakeLists files. Split protocols and improve filter names.
2023-05-14 17:36:08 +02:00
Kawe Mazidjatari
fd9152862d
Merge pull request #98 from Mauler125/cmake_port
Use CMake for project file generation
2023-05-14 16:28:26 +02:00
Kawe Mazidjatari
c50f8d86f6 Add option for GameDLL version and source directory
Options could be set from the CMake GUI. By default, GameDLL version is set to 'GAMEDLL_S3', and engine source directory is set to 'r5dev/'.
2023-05-14 16:27:31 +02:00
Kawe Mazidjatari
78c80faf7d Fix S0/S1 compiler error
Update name.
2023-05-14 16:22:44 +02:00
Kawe Mazidjatari
69509def95
Update README.md
Update to new build system.
2023-05-14 14:57:06 +02:00
Kawe Mazidjatari
048f8a6467 Create the runtime directory
Create the runtime (binary) directory while running the project generator.
2023-05-14 14:54:34 +02:00
Kawe Mazidjatari
2174cc977c Automatically detect Visual Studio version
Automatically detect when using the batch file to create solution files. The system will search from Visual Studio 2017 up to Visual Studio 2022.
2023-05-14 14:16:12 +02:00
Kawe Mazidjatari
7078a8b10a Fix syntax error
Fix small syntax error in post build event code.
2023-05-14 12:07:25 +02:00
Kawe Mazidjatari
d8ac2852ba Regenerate 'build.txt' after DLL project builds
This post build event function regenerates the 'build.txt' file after compiling the engine projects. It takes the branch name, commit hash (short), current time and time designator.
2023-05-14 12:03:16 +02:00
Kawe Mazidjatari
b3fc2c5adb Enable profiling for Profile builds
Enable linker option for profiling.
2023-05-14 02:28:53 +02:00
Kawe Mazidjatari
ae108ef1cc Light CMakeLists cleanup
Use global var for PCH name instead.
2023-05-14 02:27:54 +02:00
Kawe Mazidjatari
7248c8aab7 Fix compiler warning
Use size_t instead to avoid the type truncation warning.
2023-05-14 02:11:29 +02:00
Kawe Mazidjatari
d809a9f633 Use PCH generated from VPC globally
This reduced output code size with 40KiB, improved compile times and appeared to improve runtime performance as well.
2023-05-14 02:10:17 +02:00