39 Commits

Author SHA1 Message Date
Kawe Mazidjatari
bc3d42d0be Add client build only to SDK (client.dll)
For future S4 debugging
2022-03-23 23:05:43 +01:00
Amos
1058a6fa10 Use unicode character set instead and light cleanup/bug fixes 2022-03-04 12:22:17 +01:00
Amos
3616b85f6a Some fixes and new features, see description.
* Add CServerGameDLL interface to SDK (unfinished)
* Inline all CHostState members. Calling discrete member functions will result in a corrupt stack. It also alters with the VTable layout in the engine since we assign our SDK instance directly to it. Forcing everything to be inline (like the assembled counterpart within the executable itself) will ensure no virtual calls will get created and misalign the base VTable.
* Patch SQVM_CompileError to call SQVM_Error with the severity flag set to false (0 = do not terminate process, 1 is terminate process).
2022-02-24 01:51:11 +01:00
Amos
d3c7b9baf5 Rename to make more sense 2022-02-23 21:11:35 +01:00
Amos
cfa572f20e Small fixes + improve console autocomplete readability 2022-02-23 21:02:37 +01:00
Amos
9506a5141a CConsole improvements
* Pad the autocomplete list with 18 to keep all items in view
* Show help text for ConCommand as well
+ Small code cleanup
2022-02-23 15:56:03 +01:00
Amos
c6cf40f539 Optimize console autocomplete and show usage text 2022-02-22 16:31:24 +01:00
Amos
ae0b439a3c Additional cleanup + optimizations 2022-02-21 12:06:05 +01:00
Amos
15897c0ea1 Small logging improvement 2022-02-16 01:53:31 +01:00
Amos
6e3fb73a82 Update comment blocks 2022-02-14 02:31:42 +01:00
Amos
a5b3b2dea4 Update comment blocks 2022-02-13 15:16:09 +01:00
Amos
d3d1e673ae Fix IConsole assertions 2022-02-06 16:33:11 +01:00
Amos
2e8cc3e7b1 Update ImGui default theme 2022-01-28 12:56:51 +01:00
Amos
a1f96797c0 Console and Browser UX improvements
* Log warnings
* Improve style
* Vector size is now controlled by ConVar instead
* Keep current item in view when console is cleaning up the vector. This doesn't work ideally as its hard to keep track of the current item, and the scroll is a float. In the future it might be better to grab the first vertex of the center line on the console and track that perhaps.
2022-01-22 15:51:09 +01:00
Amos
3be02f949b Add remote function calls checksum for server 2022-01-20 16:04:10 +01:00
IcePixelx
140a3476f9 fixed empty control statement. 2022-01-20 14:18:19 +01:00
Amos
963c189f35 Reset scroll position when AutoSuggest has updated 2022-01-20 00:24:41 +01:00
Amos
b1d3a01a71 Reset AutoComplete vars when "Submit" button is clicked 2022-01-19 23:12:43 +01:00
Amos
540e219c22 Clamp Autocomplete window properly
* Fixed cases where the horizontal scrollbar would conceal the only item in the autocomplete window

* Add new ConVar to show help text next to ConVar in autocomplete. disabled by default to prevent it from being cluttered.
2022-01-19 19:03:04 +01:00
Amos
c796a44aa9 Keep items within rect
The text was off by one unit after the last commit
2022-01-18 11:37:53 +01:00
Amos
6bc6996f9a Fixed scroll position bug out of scope + changed autocomplete scrolling behavior to that of Source console
Added new parameter for forcing default ImGui theme
2022-01-18 11:24:03 +01:00
Amos
60f3402fd6 Improve readability of AutoComplete suggestion ConVar values 2022-01-18 02:21:46 +01:00
Amos
66cdb6ff18 Fix std::string cast 2022-01-18 02:21:46 +01:00
Amos
2be10dbaa4 Fix PushStyleVar/PopStyleVar imbalance 2022-01-18 01:46:27 +01:00
Amos
2c62fbfafe Use memset instead. Temporary fix for invisible 'AddLog' logs 2022-01-18 00:39:59 +01:00
Amos
31db2ef7cb Clamp Server Browser window size 2022-01-17 23:21:50 +01:00
Amos
2bb02acd60 Implement autocomplete logic for in-game console.
Autocompletes based on user input.
Also shows ConVar's current value.
2022-01-17 23:21:43 +01:00
Amos
fc4a426ca2 Fix missing std::string casts 2022-01-16 12:40:25 +01:00
Amos
d182652211 Check and clear console vector even if console is not drawn
The vector could still overflow if user plays the game for a long time while not opening the console at least once.
2022-01-16 01:32:51 +01:00
IcePixelx
4da14d7dde Cleaned up native server browser and commented functions. 2022-01-15 20:13:11 +01:00
r-ex
b366e4ce82
sq server browser clean up (#63)
* sq server browser clean up

* Properly loop through std::vector on GetAvailableMaps.

Co-authored-by: IcePixelx <41352111+PixieCore@users.noreply.github.com>
2022-01-15 18:57:18 +01:00
IcePixelx
829e122cea SQ Serverbrowser V1 push. Clean-up following after @r-ex fixed SQ things. 2022-01-15 15:25:19 +01:00
Amos
1c5df4e178 Ansi terminal color support + big optimizations on all log systems + 'Warning()' hook
* Ansi colors can now be enabled with the '-ansiclr- flag.
* All loggers have been optimized and are all initialized only once at process startup.
* New hook for 'Warning()' print function with warning level.
2022-01-14 20:48:16 +01:00
Amos
de3b3f53bd Optimizations + QoL improvements/cleanup
* IConsole overlay now clears the oldest log entries to stay under the vector limit instead of clearing the whole vector.
* IConsole code cleanup.
* IBrowser code cleanup, reordered class methods.
* Use ConVar utilities to get/set values for strings in IBrowser and IConsole.
* New ConVar's for RUI console overlay to tweak colors.
2022-01-12 02:56:17 +01:00
Amos
c0f24e64ff Rename global cvar pointer 2022-01-10 01:31:25 +01:00
Amos
9a3175fb6d Fix console input text reclaim to reflect latest ImGui changes 2022-01-06 01:52:05 +01:00
Amos
6a9a00735a Rename hooked command callbacks 2021-12-29 13:57:16 +01:00
IcePixelx
c81aca28de Fixed a few asserts regarding the gui. RPak things. Check description.
* Fixed assert on ImGui on IBrowser because ImGui::Begin wasn't followed up by ImGui::End
* FileExists got modernized. Using std library instead of Windows native functions now.
* RTech::DecompressedSize is actually readable now thanks to steyk.
* Same goes for RTech::Decompress
* rtech_decompress prints the decompressed file CRC32 now and writes the file all at once.
* Fixed ImGui assert on spamming SetupImGui();
2021-12-26 02:30:20 +01:00
Amos
d5b2e58dae Code base refactor + major performance and readability improvement. Read description for details.
* Codebase restructured to SourceSDK codebase style and .cpp/.h assertion paths in the game executable.
* Document most functions with valve style 'Purpose' blocks.
* Rename variables to match the rest of the codebase and Valve's naming convention.
* Dedicated DLL and the SDKLauncher now share the same codebase as the DevSDK.

* Obtain globals or pointers directly instead of waiting for runtime initialized data.
* Dynamically search for all functions and globals (this doesn't count for dedicated yet!).
* Initialize most in-SDK variables.

* Move certain prints and other utilities under ConVars to reduce verbosity and increase performance.
* Print all pattern scan results through a virtual function to make it easier to add and debug new patterns in the future.
* Type global var pointers appropriately if class or type is known and implemented.
* Forward declare 'CClient' class to avoid having 2 'g_pClient' copies.
* Add IDA's pseudo definitions for easier prototyping with decompiled assembly code.

* RPAK decompress Command callback implementation.
* Load decompressed RPaks from 'paks\Win32\' overriding the ones in 'paks\Win64\' (the decompress callback will automatically fix the header and write it to 'paks\Win32\').

* VPK decompress Command callback implementation.
* Move CRC32 ands Adler32 to implementation files.

* Server will print out more details about the connecting client.

* Upgrade ImGui lib to v1.86.
* Don't compile id3dx.h for dedicated.
* Don't compile id3dx.cpp for dedicated
* Implement DevMsg print function allowing to print information to the in-game VGUI/RUI console overlay, ImGui console overlay and the external windows console

* Fixed bug where the Error function would not properly terminate the process when an error is called. This caused access violations for critical/non-recoverable errors.
* Fixed bug where the game would crash if the console or server browser was enabled while the game was still starting up.
* Several bug fixes for the dedicated server (warning: dedicated is still considered work-in-progress!).
2021-12-25 22:36:38 +01:00