summaryrefslogtreecommitdiff
path: root/src/palaceDude.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-04-30 17:34:09 +0200
committerTreeki <treeki@gmail.com>2013-04-30 17:34:51 +0200
commit46f7334790a5cef5fb167698e2d11c8bb680b6e9 (patch)
treee2c7410ad9379ec9f6abc9214dc9172f1539157b /src/palaceDude.cpp
parent7f8d7800a9e6636c72604e80e3b6258ca1f0830f (diff)
downloadkamek-46f7334790a5cef5fb167698e2d11c8bb680b6e9.tar.gz
kamek-46f7334790a5cef5fb167698e2d11c8bb680b6e9.zip
changes to palace dude and message box, and removal of cutscenes
Diffstat (limited to '')
-rw-r--r--src/palaceDude.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/palaceDude.cpp b/src/palaceDude.cpp
index 19f7255..7aa0ccc 100644
--- a/src/palaceDude.cpp
+++ b/src/palaceDude.cpp
@@ -2,6 +2,8 @@
#include <stage.h>
#include "msgbox.h"
+const char *PalaceDudeFileList[] = {"OpeningScene", 0};
+
class dPalaceDude_c : public dStageActor_c {
public:
static dPalaceDude_c *build();
@@ -26,12 +28,17 @@ int dPalaceDude_c::onExecute() {
// OSReport("Activating Palace Dude\n");
hasBeenActivated = true;
- StopBGMMusic();
+ if (!(settings & 0xF000000))
+ StopBGMMusic();
- dMsgBoxManager_c::instance->showMessage(settings & 0xFFFFFFF);
+ dMsgBoxManager_c::instance->showMessage(
+ settings & 0xFFFFFF, // message ID
+ false, // cannot cancel
+ (settings & 0xF000000) ? 270 : 840 // delay
+ );
SaveBlock *save = GetSaveFile()->GetBlock(-1);
- GameMgrP->switchPalaceFlag|= (1 << (settings >> 28));
+ GameMgrP->switchPalaceFlag |= (1 << (settings >> 28));
}
}
@@ -41,7 +48,9 @@ int dPalaceDude_c::onExecute() {
// OSReport("Palace Dude is activated, %d\n", dMsgBoxManager_c::instance->visible);
if (!dMsgBoxManager_c::instance->visible) {
// OSReport("Exiting\n");
- ExitStage(WORLD_MAP, 0, BEAT_LEVEL, MARIO_WIPE);
+ if (settings & 0xF000000)
+ SaveGame(0, false);
+ ExitStage(WORLD_MAP, 0x80000000, BEAT_LEVEL, MARIO_WIPE);
hasExitedStage = true;
}
}