From cb5dcc681f1f41322d3b649902e90133d277c857 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sat, 15 Sep 2012 23:39:54 +0200 Subject: added unfinished PalaceDude --- src/msgbox.cpp | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) (limited to 'src/msgbox.cpp') diff --git a/src/msgbox.cpp b/src/msgbox.cpp index adbeb24..9a5fb25 100644 --- a/src/msgbox.cpp +++ b/src/msgbox.cpp @@ -1,52 +1,9 @@ #include #include +#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 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() { -- cgit v1.2.3 From 37d35a9d8a98c730b6b3579a479fc7d0562f6a02 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 16 Sep 2012 20:18:27 +0200 Subject: fixed message boxes not drawing --- src/msgbox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/msgbox.cpp') diff --git a/src/msgbox.cpp b/src/msgbox.cpp index 9a5fb25..968b607 100644 --- a/src/msgbox.cpp +++ b/src/msgbox.cpp @@ -279,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(); -- cgit v1.2.3