aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/sourceconsole.h
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-08 15:33:31 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-08 15:33:31 +0100
commit4c4d605d10109e02708984755405bbe0947ef5c4 (patch)
tree1d5ffe7909b24b6c79fd444b420741e85f6c2b57 /NorthstarDedicatedTest/sourceconsole.h
parent8dfb8e866119f653802609b24165b0458149c4cc (diff)
downloadNorthstarLauncher-4c4d605d10109e02708984755405bbe0947ef5c4.tar.gz
NorthstarLauncher-4c4d605d10109e02708984755405bbe0947ef5c4.zip
initial commit
Diffstat (limited to 'NorthstarDedicatedTest/sourceconsole.h')
-rw-r--r--NorthstarDedicatedTest/sourceconsole.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/sourceconsole.h b/NorthstarDedicatedTest/sourceconsole.h
new file mode 100644
index 00000000..7f494dca
--- /dev/null
+++ b/NorthstarDedicatedTest/sourceconsole.h
@@ -0,0 +1,90 @@
+#pragma once
+#include "pch.h"
+#include "sourceinterface.h"
+
+void InitialiseSourceConsole(HMODULE baseAddress);
+
+class EditablePanel
+{
+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;
+ }
+};
+
+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;
+};
+
+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;
+};
+
+class CGameConsole
+{
+public:
+ virtual ~CGameConsole() = 0;
+
+ // activates the console, makes it visible and brings it to the foreground
+ virtual void Activate() = 0;
+
+ virtual void Initialize() = 0;
+
+ // hides the console
+ virtual void Hide() = 0;
+
+ // clears the console
+ virtual void Clear() = 0;
+
+ // return true if the console has focus
+ virtual bool IsConsoleVisible() = 0;
+
+ virtual void SetParent(int parent) = 0;
+
+ bool m_bInitialized;
+ CConsoleDialog* m_pConsole;
+};
+
+extern SourceInterface<CGameConsole>* g_SourceGameConsole; \ No newline at end of file