diff options
author | erorcun <erayorcunus@gmail.com> | 2019-10-23 23:45:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-23 23:45:05 +0200 |
commit | 1ef0f8fdd96c26cac74e16ad304425561dae101e (patch) | |
tree | 6194c4080223c237fa898e93908d9247f9eb3382 /src/text/Messages.h | |
parent | CGame::FinalShutdown (diff) | |
parent | Fixes (diff) | |
download | re3-1ef0f8fdd96c26cac74e16ad304425561dae101e.tar re3-1ef0f8fdd96c26cac74e16ad304425561dae101e.tar.gz re3-1ef0f8fdd96c26cac74e16ad304425561dae101e.tar.bz2 re3-1ef0f8fdd96c26cac74e16ad304425561dae101e.tar.lz re3-1ef0f8fdd96c26cac74e16ad304425561dae101e.tar.xz re3-1ef0f8fdd96c26cac74e16ad304425561dae101e.tar.zst re3-1ef0f8fdd96c26cac74e16ad304425561dae101e.zip |
Diffstat (limited to 'src/text/Messages.h')
-rw-r--r-- | src/text/Messages.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/text/Messages.h b/src/text/Messages.h new file mode 100644 index 00000000..8044c626 --- /dev/null +++ b/src/text/Messages.h @@ -0,0 +1,69 @@ +#pragma once + +struct tMessage +{ + wchar *m_pText; + uint16 m_nFlag; + uint32 m_nTime; + uint32 m_nStartTime; + int32 m_nNumber[6]; + wchar *m_pString; +}; + +struct tBigMessage +{ + tMessage m_Stack[4]; +}; + +struct tPreviousBrief +{ + wchar *m_pText; + int32 m_nNumber[6]; + wchar *m_pString; +}; + +#define NUMBRIEFMESSAGES 8 +#define NUMBIGMESSAGES 6 +#define NUMPREVIOUSBRIEFS 5 + +class CMessages +{ +public: + static tMessage(&BriefMessages)[NUMBRIEFMESSAGES]; + static tBigMessage(&BIGMessages)[NUMBIGMESSAGES]; + static tPreviousBrief(&PreviousBriefs)[NUMPREVIOUSBRIEFS]; + static char PreviousMissionTitle[16]; // unused +public: + static void Init(void); + static uint16 GetWideStringLength(wchar *src); + static void WideStringCopy(wchar *dst, wchar *src, uint16 size); + static bool WideStringCompare(wchar *str1, wchar *str2, uint16 size); + static void Process(void); + static void Display(void); + static void AddMessage(wchar *key, uint32 time, uint16 pos); + static void AddMessageJumpQ(wchar *key, uint32 time, uint16 pos); + static void AddMessageSoon(wchar *key, uint32 time, uint16 pos); + static void ClearMessages(void); + static void ClearSmallMessagesOnly(void); + static void AddBigMessage(wchar *key, uint32 time, uint16 pos); + static void AddBigMessageQ(wchar *key, uint32 time, uint16 pos); + static void AddToPreviousBriefArray(wchar *text, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6, wchar *string); + static void InsertNumberInString(wchar *src, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6, wchar *dst); + static void InsertStringInString(wchar *str1, wchar *str2); + static void InsertPlayerControlKeysInString(wchar *src); + static void AddMessageWithNumber(wchar *key, uint32 time, uint16 pos, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6); + static void AddMessageJumpQWithNumber(wchar *key, uint32 time, uint16 pos, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6); + static void AddMessageSoonWithNumber(wchar *key, uint32 time, uint16 pos, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6); + static void AddBigMessageWithNumber(wchar *key, uint32 time, uint16 pos, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6); + static void AddBigMessageWithNumberQ(wchar *key, uint32 time, uint16 pos, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6); + static void AddMessageWithString(wchar *text, uint32 time, uint16 flag, wchar *str); + static void AddMessageJumpQWithString(wchar *text, uint32 time, uint16 flag, wchar *str); + static void ClearThisPrint(wchar *str); + static void ClearThisBigPrint(wchar *str); + static void ClearAllMessagesDisplayedByGame(void); + + // unused or cut + //static void AddMessageSoonWithString(wchar*, uint32, uint16, wchar*); + //static void CutString(int16, char*, char**); + //static void PrintString(char*, int16, int16, int16); +}; |