summaryrefslogtreecommitdiff
path: root/src/palaceDude.cpp
diff options
context:
space:
mode:
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;
}
}