diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-09-21 20:43:21 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-09-21 20:43:21 -0500 |
commit | d47a9ed57a826d60c37bfa8a4ae00ccaba0ed806 (patch) | |
tree | c3f6657118d71abcd1ce3b4584b3e0472841e53f /src/msgbox.h | |
parent | 8d0a306f0a526a76182c8d2b513d7a0441d6f466 (diff) | |
parent | 5654d5c0a056f9cfc99ac608d16aa0a601b997f5 (diff) | |
download | kamek-d47a9ed57a826d60c37bfa8a4ae00ccaba0ed806.tar.gz kamek-d47a9ed57a826d60c37bfa8a4ae00ccaba0ed806.zip |
Merge branch 'level-select' of ssh://treeki.rustedlogic.net:30000/Kamek into level-select
Diffstat (limited to 'src/msgbox.h')
-rw-r--r-- | src/msgbox.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/msgbox.h b/src/msgbox.h new file mode 100644 index 0000000..f71749d --- /dev/null +++ b/src/msgbox.h @@ -0,0 +1,52 @@ +#ifndef MSGBOX_H +#define MSGBOX_H +#include <common.h> +#include <game.h> + +class dMsgBoxManager_c : public dStageActor_c { + public: + void showMessage(int id); + + dMsgBoxManager_c() : state(this, &StateID_LoadRes) { } + + int onCreate(); + int onDelete(); + int onExecute(); + int onDraw(); + + int beforeExecute() { return true; } + int afterExecute(int) { return true; } + int beforeDraw() { return true; } + int afterDraw(int) { return true; } + + m2d::EmbedLayout_c layout; + dDvdLoader_c msgDataLoader; + + bool layoutLoaded; + bool visible; + + dStateWrapper_c<dMsgBoxManager_c> state; + + USING_STATES(dMsgBoxManager_c); + DECLARE_STATE(LoadRes); + DECLARE_STATE(Wait); + DECLARE_STATE(BoxAppearWait); + DECLARE_STATE(ShownWait); + DECLARE_STATE(BoxDisappearWait); + + static dMsgBoxManager_c *instance; + static dMsgBoxManager_c *build(); + + private: + struct entry_s { + u32 id; + u32 titleOffset; + u32 msgOffset; + }; + + struct header_s { + u32 count; + entry_s entry[1]; + }; +}; +#endif /* MSGBOX_H */ |