159 Commits

Author SHA1 Message Date
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
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
Kawe Mazidjatari
9dd34ef53a Merge recastnavigation/recastnavigation@8e9c308afd 2023-03-25 17:17:45 +01:00
Kawe Mazidjatari
cea69d3637 Merge recastnavigation/recastnavigation@3c4a34968a 2023-03-25 17:17:12 +01:00
Kawe Mazidjatari
3649f9be5c Remove old comment
This field has been reverse engineered.
2023-03-25 17:14:04 +01:00
Kawe Mazidjatari
3be9f3dd95 Use KeyValues for ImGui panel key binds
Use KeyValues instead of JSON for ImGui panel key binds. The Server Browser 'default' key has been swapped with the 'extended' one: Default = 'VK_F10', Extended = 'VK_HOME'.
2023-03-25 17:13:16 +01:00
Kawe Mazidjatari
193c5bdeba Move sdk specific cfg files to different folder
Move all SDK internal CFG's to 'cfg/system'.
2023-03-24 00:04:45 +01:00
Kawe Mazidjatari
1758abb0aa Fix 'cppkore' close event bug
Fix close callback getting called recursively when application gets closed by user. The initial call originated from 'Form::WmClose', second call from 'Form::CheckCloseDialog'. The original call should set the 'called' flag, but never did.
2023-03-23 23:43:05 +01:00
Kawe Mazidjatari
f66019fbf8 Prune unused features in 'libcppkore' 2023-03-21 00:16:03 +01:00
Kawe Mazidjatari
8d895bab14 Remove extraneous 'template' keyword in Protobuf
Has to be removed, as older (but still capable!) MSVC compilers throw the error 'C2903' (symbol is neither a class template nor a function template). Generated code remained identical after this change.
2023-03-20 13:54:26 +01:00
Kawe Mazidjatari
340c4d3383 Fix compile error in SpdLog
Added check for older compilers to prevent the error 'C2131' (expression did not evaluate to a constant).
2023-03-20 00:28:36 +01:00
Kawe Mazidjatari
dd48093c23 Add experimental switch header
This header allows us to properly switch between experimental/finished STD implementations without having to adjust the source code (required for compiling on older versions of the Visual Studio 2017 compiler).
2023-03-20 00:17:29 +01:00
Kawe Mazidjatari
3e9f405474 Fix MSVC error 'C2280' and 'C2955'
Fix 'attempting to reference a deleted function'.
Fix 'use of class requires a template argument list'.
2023-03-19 17:58:01 +01:00
Kawe Mazidjatari
fd7e981e8c Upgrade SpdLog library to 1.11.0
* Upgrade SpdLog library to 1.11.0.
* Compile SpdLog as static library.
2023-03-18 13:34:43 +01:00
Kawe Mazidjatari
227885a69f Merge recastnavigation/recastnavigation@b51925bb87, recastnavigation/recastnavigation@7501007439 and recastnavigation/recastnavigation@405cc095ab
Everything has been adjusted to maintain compatibility with the game engine.
2023-02-21 18:19:03 +01:00
Kawe Mazidjatari
4e396728c3 Fix typos 2023-02-21 17:56:56 +01:00
Kawe Mazidjatari
c1107fb4ed Fix spelling 2023-02-12 16:27:09 +01:00
Kawe Mazidjatari
55ec60e1ae Upgrade nlohmann json to '3.11.2' 2023-02-07 00:19:56 +01:00
Kawe Mazidjatari
1cf310f1a0 Upgrade Dear ImGui to v1.89.2 2023-01-27 01:48:49 +01:00
Kawe Mazidjatari
e0fa00abf5 Update Microsoft Detours to latest 2023-01-27 00:51:22 +01:00
Kawe Mazidjatari
938df1dd89 Check visible panels in wrapper instead of imgui itself
The SDK's DX interface is much easier to expose to Dear ImGui than game/engine implementations.
2023-01-26 20:00:52 +01:00
Kawe Mazidjatari
b8bbe6e6d0 Add libcurl to project 2023-01-26 13:09:18 +01:00
Kawe Mazidjatari
188cbf8359 Update protobuf to latest
Updated to v21.12.
2023-01-26 03:15:10 +01:00
Kawe Mazidjatari
f47fb63e5f Fix dedicated server compile errors
Huge cleanup for dedicated. All patches in 'opcodes.cpp' are now directly applied to the executable, and kept as reference in the source file. The patch logic is commented. Any other patches for the dedicated server executable should be documented in the patch file found in 'r5dev/resource/patch'.
2023-01-26 02:59:50 +01:00
Kawe Mazidjatari
532ada48e0 Only run duplicate checks in debug
Duplicate checks are only performed in debug builds, if a duplicate is encountered, a bug in code has been found and has to be solved (do not call REGISTER from headers for example).
2023-01-25 19:22:05 +01:00
Kawe Mazidjatari
98331796b2 Fix bug in LZHAM debug log formatting
Should be '%llu' or '%zu' for size types.
2023-01-17 00:42:38 +01:00
Kawe Mazidjatari
ca3e5ac9d1 ImGuiConfig: fix incorrect allocation size causing OOB memory write
Fix was found after the issue in the previous commit was found.
2023-01-15 18:12:39 +01:00
Kawe Mazidjatari
1371bb1f38 Fix typo 2022-12-26 17:01:14 +01:00
Kawe Mazidjatari
55b90781ee Remove experimental CRC implementation in LZHAM
This implementation was done to calculate buffer CRC on the go, as that was what the VPK file system uses for the file crc's. But it later turned out to be unnecessary, and was never reverted.
2022-12-04 01:33:10 +01:00
Kawe Mazidjatari
d20250e436 Heavy output code cleanup
Only add to detour if the VFTable pointer didn't exist yet. Not declaring these in the anonymous namespace significantly reduces code size and unnecessary memory allocations. We might want to consider refactoring this, although it will probably require a big change.
2022-11-27 15:01:55 +01:00
Kawe Mazidjatari
ea18f30eda Fix incorrect rasterization at tile borders (recastnavigation/recastnavigation#476)
Merge recastnavigation/recastnavigation@3901c5854c
2022-11-25 00:05:36 +01:00
Kawe Mazidjatari
8dc12644be Remove unused functions 2022-11-24 11:50:21 +01:00
Kawe Mazidjatari
d3b2893cdc Change ImGui config file path and use engine's FileSystem API
'ImGuiConfig::Load()' was loading from the new path, however 'ImGuiConfig::Save()' was not. Defined path as constant expression to avoid this problem in the future. Also loading the files through the engine's API from now on.
2022-11-24 10:45:42 +01:00
Kawe Mazidjatari
90d87897f8 Improve consistency within the LZHAM library
Make CRC32 consistence with ADLER32
2022-11-17 20:35:43 +01:00
Kawe Mazidjatari
93bca826ef load imgui configs from 'cfg/imgui/*' instead 2022-11-10 15:33:35 +01:00
Kawe Mazidjatari
edd1c62352 Change vperpXZ to vperpXY 2022-10-22 21:59:57 +02:00
Kawe Mazidjatari
8709a256d9 Use closestPointOnPoly instead of getPolyHeight in dtNavMeshQuery::findRandomPoint 2022-10-22 21:59:57 +02:00
Kawe Mazidjatari
56dd3802f8 Recast & Detour XZY left overs to XYZ
Height should be set on the z axis.
2022-10-22 21:47:07 +02:00
Kawe Mazidjatari
5f84803ac6 ImGui and DirectX code improvements
* Fix history duplication by removing trailing white space characters from submitted commands in console.
* Fix out of range exception caused by caching svConVar.size() in CConsole::BuildSummary while we are modifying it.
* Fixed memory leak  caused by extraneous Strdup calls in CConsole.
* Renamed variables and structure members, static vars in id3dx.cpp are not prefixed with s_, IBrowser_Config is now m_BrowserConfig.
* Performed code cleanup in id3dx.cpp.
2022-10-20 12:29:50 +02:00
Kawe Mazidjatari
31845425d6 Only enable/disable input system on open/close events
Previously we enabled/disabled the input system each frame, depending on the state of the ImGui windows. This commit changes the behavior into only enabling/disabling when the menu's are closed (either through the keyboard or the close button).

I added a simple callback to ImGui::Begin which will be called when the close button on the ImGui panel is pressed and the callback pointer isn't nullptr, this was required as there was otherwise no way to determine when the close button was clicked.
2022-10-20 12:29:50 +02:00
Kawe Mazidjatari
c1ca5d0878 Fix spelling mistakes in Recast & Detour library 2022-10-07 22:32:08 +02:00
Kawe Mazidjatari
41f801365a CConsole: fixed color bug when missing newline
* Fixed bug where the in-game console could not color the line when no newline was found.
* Changed behavior to only newline when: '\n' has been found, or the context has changed (using a print without newline will continue to print on the same line in the console).
* Pass ImVec4 parameter in 'CTextLogger::InsertTextAt' by reference.
2022-09-19 20:21:18 +02:00
Kawe Mazidjatari
34a06147d7 Fix spelling errors
Overall spelling improvements and cleanup..
2022-09-09 19:47:31 +02:00
Kawe Mazidjatari
a3027a8fd1 Upgrade Dear ImGui from 1.87 to 1.88
Upgrade includes all the modifications we brought to the library (SetWindowScrollX/Y, autocaret end, mouse state adjustments for game, highlight around input selection, hotkeys, etc..).
2022-09-02 02:22:39 +02:00
Kawe Mazidjatari
0309d9cd6b Server browser UX improvements
* Use proper method of obtaining content regions for buttons.
* Set min and default size to (928 - 524), this improves the anti-aliasing effect even more.
* Significantly decrease the size of the private server modal.
* Removed extraneous min window size constraint set by 'ImGuiConfig::InitStyle()'.
2022-08-31 15:45:12 +02:00
Kawe Mazidjatari
45c147087a Fixed console logger selection while mutating entries bug
* Fixed bug where attempting to select text, while auto scroll is disabled, and entries are being removed, while entries are also being added, causes the start of the selection to not adjust with the number of lines being removed, which then causes it to move with the deletion.
2022-08-30 22:54:34 +02:00
Kawe Mazidjatari
d1d523fd12 Update imgui_logger.cpp 2022-08-30 21:28:26 +02:00
Kawe Mazidjatari
3414a2cd2c ImGui panel improvements
* Eliminated all forms of concurrency for CConsole logger.
* Used enum for determining which theme user loaded (DEFAULT, LEGACY, MODERN).
* Fixed issue where browser panel doesn't have the same frame padding as the console for the modern theme.
* Fixed issue where the history items count shows number higher than maximum until updated (updates vector before displaying, else this happens in g_pConsole->RunTask which is the operation that happens before we add new elements to the vector, thus showing the wrong count as this size is getting corrected the next frame after we painted, we don't update the summary each frame for performance reasons).
2022-08-22 01:10:18 +02:00