summaryrefslogtreecommitdiff
path: root/src/palaceDude.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/palaceDude.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/palaceDude.cpp b/src/palaceDude.cpp
index eff3299..6a8d7ff 100644
--- a/src/palaceDude.cpp
+++ b/src/palaceDude.cpp
@@ -22,22 +22,23 @@ dPalaceDude_c *dPalaceDude_c::build() {
int dPalaceDude_c::onExecute() {
if (dFlagMgr_c::instance->flags & spriteFlagMask) {
- if (hasBeenActivated)
- return true;
- //OSReport("Activating Palace Dude\n");
- hasBeenActivated = true;
+ if (!hasBeenActivated) {
+// OSReport("Activating Palace Dude\n");
+ hasBeenActivated = true;
- dMsgBoxManager_c::instance->showMessage(settings & 0xFFFFFFF);
+ dMsgBoxManager_c::instance->showMessage(settings & 0xFFFFFFF);
- SaveBlock *save = GetSaveFile()->GetBlock(-1);
- save->switch_on |= (1 << (settings >> 28));
+ SaveBlock *save = GetSaveFile()->GetBlock(-1);
+ *((u8*)(((u32)GameMgr)+0x380)) |= (1 << (settings >> 28));
+ }
}
if (hasBeenActivated) {
if (hasExitedStage)
return true;
- //OSReport("Palace Dude is activated, %d\n", dMsgBoxManager_c::instance->visible);
+// 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);
hasExitedStage = true;
}