diff options
author | Northstar <northstar@northstar.tf> | 2022-02-03 22:09:08 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-02-03 22:09:08 -0300 |
commit | 75bf194b2fca06de805a7bc025c6dd8379250fa5 (patch) | |
tree | c9327ac7921ae80bb2d91381bb7db11b47ca2403 /NorthstarDedicatedTest/sourceconsole.h | |
parent | e9f93ba2e8b9df280aed20131a1606d731d2dbbe (diff) | |
download | NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.tar.gz NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.zip |
Format project
Diffstat (limited to 'NorthstarDedicatedTest/sourceconsole.h')
-rw-r--r-- | NorthstarDedicatedTest/sourceconsole.h | 117 |
1 files changed, 58 insertions, 59 deletions
diff --git a/NorthstarDedicatedTest/sourceconsole.h b/NorthstarDedicatedTest/sourceconsole.h index 79ab2267..cf65cbd3 100644 --- a/NorthstarDedicatedTest/sourceconsole.h +++ b/NorthstarDedicatedTest/sourceconsole.h @@ -6,85 +6,84 @@ class EditablePanel { -public: - virtual ~EditablePanel() = 0; - unsigned char unknown[0x2B0]; + public: + virtual ~EditablePanel() = 0; + unsigned char unknown[0x2B0]; }; struct SourceColor { - unsigned char R; - unsigned char G; - unsigned char B; - unsigned char A; - - SourceColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) - { - R = r; - G = g; - B = b; - A = a; - } - - SourceColor() - { - R = 0; - G = 0; - B = 0; - A = 0; - } + unsigned char R; + unsigned char G; + unsigned char B; + unsigned char A; + + SourceColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) + { + R = r; + G = g; + B = b; + A = a; + } + + SourceColor() + { + R = 0; + G = 0; + B = 0; + A = 0; + } }; class IConsoleDisplayFunc { -public: - virtual void ColorPrint(const SourceColor& clr, const char* pMessage) = 0; - virtual void Print(const char* pMessage) = 0; - virtual void DPrint(const char* pMessage) = 0; + public: + virtual void ColorPrint(const SourceColor& clr, const char* pMessage) = 0; + virtual void Print(const char* pMessage) = 0; + virtual void DPrint(const char* pMessage) = 0; }; class CConsolePanel : public EditablePanel, public IConsoleDisplayFunc { - }; class CConsoleDialog { -public: - struct VTable - { - void* unknown[298]; - void(*OnCommandSubmitted)(CConsoleDialog* consoleDialog, const char* pCommand); - }; - - VTable* m_vtable; - unsigned char unknown[0x398]; - CConsolePanel* m_pConsolePanel; + public: + struct VTable + { + void* unknown[298]; + void (*OnCommandSubmitted)(CConsoleDialog* consoleDialog, const char* pCommand); + }; + + VTable* m_vtable; + unsigned char unknown[0x398]; + CConsolePanel* m_pConsolePanel; }; class CGameConsole { -public: - virtual ~CGameConsole() = 0; + public: + virtual ~CGameConsole() = 0; - // activates the console, makes it visible and brings it to the foreground - virtual void Activate() = 0; + // activates the console, makes it visible and brings it to the foreground + virtual void Activate() = 0; - virtual void Initialize() = 0; + virtual void Initialize() = 0; - // hides the console - virtual void Hide() = 0; + // hides the console + virtual void Hide() = 0; - // clears the console - virtual void Clear() = 0; + // clears the console + virtual void Clear() = 0; - // return true if the console has focus - virtual bool IsConsoleVisible() = 0; + // return true if the console has focus + virtual bool IsConsoleVisible() = 0; - virtual void SetParent(int parent) = 0; + virtual void SetParent(int parent) = 0; - bool m_bInitialized; - CConsoleDialog* m_pConsole; + bool m_bInitialized; + CConsoleDialog* m_pConsole; }; extern SourceInterface<CGameConsole>* g_SourceGameConsole; @@ -92,15 +91,15 @@ extern SourceInterface<CGameConsole>* g_SourceGameConsole; // spdlog logger class SourceConsoleSink : public spdlog::sinks::base_sink<std::mutex> { -private: - std::map<spdlog::level::level_enum, SourceColor> logColours; + private: + std::map<spdlog::level::level_enum, SourceColor> logColours; -public: - SourceConsoleSink(); + public: + SourceConsoleSink(); -protected: - void sink_it_(const spdlog::details::log_msg& msg) override; - void flush_() override; + protected: + void sink_it_(const spdlog::details::log_msg& msg) override; + void flush_() override; }; void InitialiseSourceConsole(HMODULE baseAddress); |