diff options
Diffstat (limited to '')
-rw-r--r-- | src/msgbox.cpp | 50 |
1 files changed, 5 insertions, 45 deletions
diff --git a/src/msgbox.cpp b/src/msgbox.cpp index adbeb24..968b607 100644 --- a/src/msgbox.cpp +++ b/src/msgbox.cpp @@ -1,52 +1,9 @@ #include <common.h> #include <game.h> +#include "msgbox.h" // Replaces: EN_LIFT_ROTATION_HALF (Sprite 107; Profile ID 481 @ 80AF96F8) -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; } - - 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]; - }; -}; dMsgBoxManager_c *dMsgBoxManager_c::instance = 0; dMsgBoxManager_c *dMsgBoxManager_c::build() { @@ -322,7 +279,10 @@ daEnMsgBlock_c *daEnMsgBlock_c::build() { void daEnMsgBlock_c::blockWasHit(bool isDown) { pos.y = initialY; - dMsgBoxManager_c::instance->showMessage(settings); + if (dMsgBoxManager_c::instance) + dMsgBoxManager_c::instance->showMessage(settings); + else + Delete(false); physics.setup(this, &physicsInfo, 3, currentLayerID); physics.addToList(); |