diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
commit | c0c336500955a23e344651e5412c9d9d441ef4ee (patch) | |
tree | 790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2TowerMessage.h | |
parent | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff) | |
download | t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip |
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2TowerMessage.h | 68 |
1 files changed, 47 insertions, 21 deletions
diff --git a/src/T2DLL/T2TowerMessage.h b/src/T2DLL/T2TowerMessage.h index 5dca2c6..434ff5b 100644 --- a/src/T2DLL/T2TowerMessage.h +++ b/src/T2DLL/T2TowerMessage.h @@ -1,33 +1,59 @@ #pragma once #include "common.h" +#include "LAttachment.h" -class T2TowerMessage { +class InfoBarMsgItem; + +enum { + kAlertType0 = 0, + kAlertType1 = 1, + kAlertType2 = 2, + kAlertType3 = 3 +}; + +class AFX_EXT_CLASS T2TowerMessage : public LAttachment { public: - T2TowerMessage(HINSTANCE, T2TowerDoc*); + T2TowerMessage(HINSTANCE inModuleHandle, T2TowerDoc* inDoc); virtual ~T2TowerMessage(); - void InfoBarMessage(const CString&, int, const char*); -private: - void SetInfoBarMsg(InfoBarMsgItem*); -public: - void EquipBalloonMessage(const CString&, T2Equip*); - void PeopleBalloonMessage(const CString&, T2People*); - void EquipBalloonMessage(const CString&, POINT); + virtual void ExecuteSelf(unsigned int inMessage, void* ioData); + + void InfoBarMessage(const CString& inText, int inDelay, const char* inSoundID); + void EquipBalloonMessage(const CString& inText, T2Equip* inEquip); + void PeopleBalloonMessage(const CString& inText, T2People* inPeople); + void EquipBalloonMessage(const CString& inText, POINT inPt); void BuildErr(const CString&); - void BuildErr(unsigned int, T2EquipDef*); - int GetBuildErrString(unsigned int, CString&); - void ObjectBalloonMessage(const CString&, const RECT&); - void InfoDialogMessage(const CString&, int, int); - void AleatMessage(const CString&, int); + void BuildErr(unsigned int inID, T2EquipDef* inDef); + BOOL GetBuildErrString(unsigned int inID, CString& outStr); + void ObjectBalloonMessage(const CString& inText, const RECT& inRect); + void InfoDialogMessage(const CString& inText, int inID, int inDelay); + void AleatMessage(const CString& inText, int inAlertType); void SpendTime(); void SpendTime2(); - virtual void ExecuteSelf(unsigned int, void*); + void CancelInfoBarMessage(const CString& inText); + void PassiveInfoBarMessage(const char* inText, int inDelay, const char* inSoundID); + void SetCaptureRect(RECT inRect); + private: - CWnd* FindFloatingWindow(int); + void SetInfoBarMsg(InfoBarMsgItem* inItem); + CWnd* FindFloatingWindow(int inID); + + T2TowerDoc *mDocument; + int _14; + HINSTANCE mModuleHandle; + LArray *mInfoBarMsgItems; + LArray *mEquipBalloonMessages; + LArray *mObjectBalloonMessages; + BOOL mHasCapture; + RECT mCaptureRect; +}; + +class InfoBarMsgItem { public: - void CancelInfoBarMessage(const CString&); - void PassiveInfoBarMessage(const char*, int, const char*); - void SetCaptureRect(RECT); + InfoBarMsgItem(const CString &inText, int inDelay, const char *inSoundID); + ~InfoBarMsgItem(); - T2TowerMessage(const T2TowerMessage&) {} - T2TowerMessage& operator=(const T2TowerMessage&) {} + CString mText; + int mDelay; + unsigned int mEndTicks; + CString mSoundID; }; |