From 3d6dbb391e8916235608ced97db1fb70223b209e Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 16 Sep 2012 21:55:27 +0200 Subject: fixed palace dude switch thing, skawo says it's complete now, yay --- src/palaceDude.cpp | 17 +++++++++-------- 1 file 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; } -- cgit v1.2.3