894 Commits

Author SHA1 Message Date
Kawe Mazidjatari
add5c577ff Improve ImGui theme system
-imgui_theme "modern" = Respawn theme.
-imgui_theme "legacy" = Valve theme.
No args = default theme.
2022-06-24 12:22:04 +02:00
Kawe Mazidjatari
5f64a14a87 Add 'ssize_t' to skdefs.h (size error type) 2022-06-24 12:12:59 +02:00
Kawe Mazidjatari
e22c17340f Add 'UTF8CharLength(..)' to utility.cpp 2022-06-24 12:12:30 +02:00
Kawe Mazidjatari
e1ede0c995 Remove unused function from imgui_logger.cpp 2022-06-24 12:12:00 +02:00
Kawe Mazidjatari
479adc4b85 CCommandLine additions 2022-06-24 12:10:46 +02:00
Kawe Mazidjatari
ef454ac126 Reversed CCommandLine members
Fixed wrong order of 'CCommandLine::ParmValue()' methods. Float overload was first, char const* last.
Added reversed members (confirmed size of 2096 bytes).
2022-06-24 02:42:28 +02:00
PixieCore
1da841d4dd Remove troll function from HLClient. 2022-06-23 21:08:56 +02:00
Kawe Mazidjatari
2678fe2ec8 StreamDB_Init cleanup
Removed unused third parameter from DevMsg call.
Added log for loading non override STBSP files.
2022-06-23 20:08:07 +02:00
Kawe Mazidjatari
965b4f4367 Remove VecNetMessages and VecNetDataFragments
Improved and used CUtlVector class instead.
2022-06-23 19:52:58 +02:00
Kawe Mazidjatari
1b6f40d941 Fix for SVC_UserMessage
Removed padding that was causing the structure to misalign with the game's one.
Enabled 'SVC_UserMessage::Process()' hook (function works properly after the structure alignment).
2022-06-23 18:20:17 +02:00
IcePixelx
f1395c0bad
Little cleanup, branch to test changes when at home. (#69)
* Little cleanup, branch to test changes when at home.

* Remove non-used variables
2022-06-23 18:03:53 +02:00
PixieCore
0e4c126823 Revert NULL passing into second arg (was for testing) 2022-06-22 14:06:53 +02:00
PixieCore
62ac2c03ff RTech::CreateDXTexture fix for CreateShaderResourceView 2022-06-22 14:03:41 +02:00
Kawe Mazidjatari
426ae0c4cd Bad logic logging improvements
Log bad logic in colors for every game logic error.
Added 'g_flErrorTimeStamp' and a hook to 'SQVM_LogicError'.
2022-06-22 12:12:08 +02:00
Kawe Mazidjatari
33f517d809 Use XOR operator for toggling menu's 2022-06-22 10:19:44 +02:00
Kawe Mazidjatari
978c43250f Console cleanup and optimizations
Proper usage of callbacks, no longer use string comparisons to check if buffer changed.
Improved optimizations with avg 5000 clocks in release and avg 600000 clocks in debug (no filter).
2022-06-22 03:24:46 +02:00
Kawe Mazidjatari
83e855112a Update default ImGui theme 2022-06-22 01:17:10 +02:00
Kawe Mazidjatari
145b5dcd13 CTextLogger cleanup
Reordered structure.
Use C++ style casts.
changed m_flLastClick (float) to double.
2022-06-22 00:33:12 +02:00
Kawe Mazidjatari
76ec4b8f4a Improve console scrolling
Moved auto scrolling logic to CTextLogger.
Removed redundant code in CTextLogger.
Added bool param to CTextLogger::RemoveLine to determine whether or not to lock the mutex (internal operations should not lock).
Fixed issue where scrolling with cursor is not possible when auto-scroll is set or ScrollY is towards its max.
Fixed copy button (copy all text in console via GUI, ctrl + a - ctrl + v alternative).
2022-06-21 23:25:15 +02:00
Kawe Mazidjatari
a436b70601 CConsole / CTextLogger optimizations
CConsole: cast to proper types.
CTextLogger: only compute line string if filter is active.
2022-06-21 20:20:12 +02:00
Kawe Mazidjatari
3e2c395584 Don't append newlines on obtained text
Newlines are added through the SDK, and the CTextLogger class has been modified to insert a newline when in encounters a newline character.
2022-06-21 11:32:40 +02:00
Kawe Mazidjatari
a534ef1e3c Type untyped variables in CTextLogger
All of these are known types that aren't going to change.
2022-06-21 11:13:30 +02:00
Kawe Mazidjatari
f7dd4089f0 Logger improvements
Fix crash cases due to concurrent access and wrong type casting.
Improve filter logic (now greys out everything outside criteria).

TODO: Return 'size_t' for everything size related.
2022-06-21 10:14:20 +02:00
Kawe Mazidjatari
98741a9591 Remove redundant 'PrintPercentageEscape' calls 2022-06-21 10:12:15 +02:00
Kawe Mazidjatari
da299a002c Reimplement text filter
Could be better at some point, currently removes anything not matching criteria resulting in gaps.
But on the other side it might be good as the location of all occurrences are known (should make it easier to see when it is logged during the process).

Revisit in the future.
2022-06-20 20:21:52 +02:00
Kawe Mazidjatari
0de09217bc Log process uptime
Log actual process uptime in all (post init) loggers.
The actual process uptime is obtained from the engine (Plat_FloatTime()).
2022-06-20 15:48:33 +02:00
Kawe Mazidjatari
85462806d1 Improve sys_utils naming
Stripped 'Con_NPrintf' from dedicated.
2022-06-20 15:04:27 +02:00
Kawe Mazidjatari
4095424b7c Add clock/time function patterns
Added:
* Sys_GetProcessUpTime
* Plat_FloatTime
* Plat_MSTime
2022-06-20 14:58:53 +02:00
Kawe Mazidjatari
7d749fc53a Skip space characters properly in CTextLogger 2022-06-20 13:23:38 +02:00
Kawe Mazidjatari
f52bfb139e Remove m_bReadOnly from CTextLogger
User can't modify the log text, it can only be modified through code.
2022-06-20 13:23:11 +02:00
Kawe Mazidjatari
33aebfb89d ImGui theme improvements 2022-06-20 13:05:50 +02:00
Kawe Mazidjatari
44157bdce4 Fix CConsole history navigation bug
Fix bug where a space character gets appended on each navigation event, even if there already is a space character.
2022-06-20 11:21:18 +02:00
Kawe Mazidjatari
43b73dc717 Improve scrollback
Scrollback now scrolls back pixel perfect to the exact line in view before resize.
2022-06-20 11:20:02 +02:00
Kawe Mazidjatari
28f0df81c6 Fix crash case
Prevent concurrent access to CTextLogger::m_Lines.
Additional cleanup.
2022-06-20 11:01:53 +02:00
Kawe Mazidjatari
1764f039cf CConsole improvements: Add selectable logger text
CConsole now uses a dedicated class for logging text (modified CTextEditor class (CTextLogger)). The class uses an ImDraw list with a character vector to draw the text.

Text could be selected by double click (word), triple click (line), a selection by dragging the cursor, or everything with 'ctrl + a'.
2022-06-20 10:31:09 +02:00
Kawe Mazidjatari
1b81f2d1eb Modify CTextLogger
Redact and modify CTextLogger (copy of CTextEditor) to fit logger usage.
Removed most unnecessary methods/code and members.
2022-06-20 10:17:11 +02:00
Kawe Mazidjatari
fed337fbbd Add imgui_logger.cpp
A copy of CTextEditor
2022-06-20 10:14:43 +02:00
Kawe Mazidjatari
f1091fef0e imgui_editor.cpp class rename 2022-06-20 10:05:32 +02:00
PixieCore
a2a04bfb7f Fix other seasons. 2022-06-19 18:09:02 +02:00
PixieCore
8bf08af7b9 Start of RTech::CreateDXTexture rebuild.
* Currently crashes due to stack corruption.
2022-06-19 18:07:43 +02:00
Kawe Mazidjatari
20eabe4b8e Update imgui_editor.h 2022-06-19 10:54:11 +02:00
Kawe Mazidjatari
40a0c8878a Rename TextEditor members 2022-06-19 10:51:45 +02:00
Kawe Mazidjatari
0c11011567 Add ImGuiColorTextEdit to project 2022-06-18 23:23:29 +02:00
Kawe Mazidjatari
f98a575dfa Fix S1 compiler errors 2022-06-18 21:24:02 +02:00
Kawe Mazidjatari
2c954da789 Light CConsole class cleanup 2022-06-18 18:11:05 +02:00
Kawe Mazidjatari
963ec33e9f Format function parameters the same as the game 2022-06-18 17:53:59 +02:00
Kawe Mazidjatari
daa931ef64 Use appropriate type for CFactory::GetVersionIndex
svInterfaceName.length() is size_t, and substr takes size_t.
2022-06-18 17:52:32 +02:00
Kawe Mazidjatari
e110aa5832 RTech decompress cleanup
Cast to proper types
2022-06-17 18:42:13 +02:00
Kawe Mazidjatari
8463811bb0 Remove unnecessary cast for string format 2022-06-17 18:29:17 +02:00
Kawe Mazidjatari
87e3313e22 FileSystem improvements
Deref g_pFullFileSystem (most engine functions use this pointer instead of the direct address of g_pFileSystem_Stdio).
2022-06-16 21:19:04 +02:00