From 34b18815286938176b0462ba5a97ea03195409fb Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 22 Mar 2020 17:23:40 +0300 Subject: CGame::Initialise --- src/render/Console.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/render/Console.h (limited to 'src/render/Console.h') diff --git a/src/render/Console.h b/src/render/Console.h new file mode 100644 index 00000000..726f96cf --- /dev/null +++ b/src/render/Console.h @@ -0,0 +1,24 @@ +#pragma once +#include "common.h" + +class CConsole +{ + enum { + MAX_MESSAGE_LENGTH = 40 + }; + uint8 m_nActiveMessages; + uint8 m_nCurrentMessage; + wchar m_asMessages[NUM_CONSOLEMESSAGES][MAX_MESSAGE_LENGTH]; + uint32 m_anTimeStart[NUM_CONSOLEMESSAGES]; + uint8 m_anColourRed[NUM_CONSOLEMESSAGES]; + uint8 m_anColourGreen[NUM_CONSOLEMESSAGES]; + uint8 m_anColourBlue[NUM_CONSOLEMESSAGES]; + +public: + void Init() { m_nCurrentMessage = 0; m_nActiveMessages = 0; } + void Display(); +}; + +extern CConsole& TheConsole; + +static_assert(sizeof(CConsole) == 0x2BC, "CConsole: error"); \ No newline at end of file -- cgit v1.2.3 From c29a85a443ae47f30507c7d4369a017333f75f11 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 22 Mar 2020 18:48:16 +0300 Subject: console init --- src/render/Console.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/render/Console.h') diff --git a/src/render/Console.h b/src/render/Console.h index f66d63d5..0b5702f7 100644 --- a/src/render/Console.h +++ b/src/render/Console.h @@ -19,6 +19,7 @@ public: void AddLine(char *s, uint8 r, uint8 g, uint8 b); void AddOneLine(char *s, uint8 r, uint8 g, uint8 b); void Display(); + void Init() { m_nCurrentLine = 0; m_nLineCount = 0; } }; extern CConsole &TheConsole; \ No newline at end of file -- cgit v1.2.3 From d1d123dc6aeaa88702672c181377735e1b66125f Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 22 Mar 2020 19:19:07 +0300 Subject: missing endlines --- src/render/Console.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/render/Console.h') diff --git a/src/render/Console.h b/src/render/Console.h index 0b5702f7..c454d75e 100644 --- a/src/render/Console.h +++ b/src/render/Console.h @@ -22,4 +22,4 @@ public: void Init() { m_nCurrentLine = 0; m_nLineCount = 0; } }; -extern CConsole &TheConsole; \ No newline at end of file +extern CConsole &TheConsole; -- cgit v1.2.3