summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-16 21:55:27 +0200
committerTreeki <treeki@gmail.com>2012-09-16 21:55:27 +0200
commit3d6dbb391e8916235608ced97db1fb70223b209e (patch)
tree213e412aabdf2853bc24b772b4fabffa5cc1a7f3
parent37d35a9d8a98c730b6b3579a479fc7d0562f6a02 (diff)
downloadkamek-3d6dbb391e8916235608ced97db1fb70223b209e.tar.gz
kamek-3d6dbb391e8916235608ced97db1fb70223b209e.zip
fixed palace dude switch thing, skawo says it's complete now, yay
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;
}