diff options
-rw-r--r-- | bossBalboaWrench.yaml | 2 | ||||
-rw-r--r-- | bossFuzzyBear.yaml | 2 | ||||
-rw-r--r-- | bugfixes.yaml | 27 | ||||
-rw-r--r-- | electricLine.yaml | 2 | ||||
-rw-r--r-- | koopatlas.yaml | 18 | ||||
-rw-r--r-- | spritespawner.yaml | 4 | ||||
-rw-r--r-- | src/koopatlas/core.h | 2 | ||||
-rw-r--r-- | src/msgbox.cpp | 45 | ||||
-rw-r--r-- | src/msgbox.h | 50 | ||||
-rw-r--r-- | src/palaceDude.cpp | 50 | ||||
-rw-r--r-- | switchblock.yaml | 15 | ||||
-rw-r--r-- | tools/UsedProfileAndSpriteList.txt | 160 |
12 files changed, 317 insertions, 60 deletions
diff --git a/bossBalboaWrench.yaml b/bossBalboaWrench.yaml index f649aa0..178713d 100644 --- a/bossBalboaWrench.yaml +++ b/bossBalboaWrench.yaml @@ -1,5 +1,5 @@ --- -# Replaces EN_Iwao +# Replaces AC_LIFT_ICE_SPRING source_files: [../src/bossBalboaWrench.cpp] hooks: diff --git a/bossFuzzyBear.yaml b/bossFuzzyBear.yaml index 3b608d3..33b9e1f 100644 --- a/bossFuzzyBear.yaml +++ b/bossFuzzyBear.yaml @@ -1,5 +1,5 @@ --- -# Replaces EN_WALLINSECT +# Replaces WALLINSECT_MGR source_files: [../src/bossFuzzyBear.cpp] hooks: diff --git a/bugfixes.yaml b/bugfixes.yaml index 2576c1e..336a524 100644 --- a/bugfixes.yaml +++ b/bugfixes.yaml @@ -14,6 +14,33 @@ hooks: branch_type: b
target_func: 'after_course_getMusicForZone'
+ # IDs to nuke: 1, 2, 4, 10
+ - name: MusicNukeBahpsNormal1
+ type: patch
+ addr_pal: 0x802F6BC8
+ data: '00000000 00000000 00000000 00000000'
+ - name: MusicNukeBahpsNormal2
+ type: patch
+ addr_pal: 0x802F6BE0
+ data: '00000000 00000000'
+ - name: MusicNukeBahpsNormal3
+ type: patch
+ addr_pal: 0x802F6C10
+ data: '00000000 00000000'
+
+ - name: MusicNukeBahpsFast1
+ type: patch
+ addr_pal: 0x802F6CB0
+ data: '00000000 00000000 00000000 00000000'
+ - name: MusicNukeBahpsFast2
+ type: patch
+ addr_pal: 0x802F6CC8
+ data: '00000000 00000000'
+ - name: MusicNukeBahpsFast3
+ type: patch
+ addr_pal: 0x802F6CF8
+ data: '00000000 00000000'
+
- name: Fix38WithJumpCoin
src_addr_pal: 0x807EBC5C
type: branch_insn
diff --git a/electricLine.yaml b/electricLine.yaml index 3b9e856..ab968c4 100644 --- a/electricLine.yaml +++ b/electricLine.yaml @@ -1,5 +1,5 @@ --- -# Replaces Ship_Window +# Replaces Kawanagare source_files: [../src/electricLine.cpp] hooks: diff --git a/koopatlas.yaml b/koopatlas.yaml index 0457fe0..4c79acf 100644 --- a/koopatlas.yaml +++ b/koopatlas.yaml @@ -16,42 +16,42 @@ source_files: - ../src/koopatlas/starcoin.cpp hooks: - - name: BuildWorldMap + - name: BuildWorldMap # WORLD_MAP type: add_func_pointer src_addr_pal: 0x8098DCF0 target_func: 'dScKoopatlas_c::build(void)' - - name: BuildWMPlayer + - name: BuildWMPlayer # WM_PLAYER type: add_func_pointer src_addr_pal: 0x80988DDC target_func: 'daWMPlayer_c::build(void)' - - name: BuildWMHud + - name: BuildWMHud # WM_DANCE_PAKKUN type: add_func_pointer src_addr_pal: 0x80982844 target_func: 'dWMHud_c::build(void)' - - name: BuildWorldCamera + - name: BuildWorldCamera # WORLD_CAMERA type: add_func_pointer src_addr_pal: 0x8098EEC8 target_func: 'dWorldCamera_c::build(void)' - - name: BuildWMMap + - name: BuildWMMap # WM_MAP type: add_func_pointer src_addr_pal: 0x80984710 target_func: 'dWMMap_c::build(void)' - - name: BuildWMShop + - name: BuildWMShop # WM_TOGEZO type: add_func_pointer src_addr_pal: 0x80986074 target_func: 'dWMShop_c::build(void)' - - name: BuildWMdShopItem + - name: BuildWMdShopItem # WM_BOARD type: add_func_pointer - src_addr_pal: 0x809894B4 + src_addr_pal: 0x80981CA0 target_func: 'dShopItem::build(void)' - - name: BuildWMdStarCoin + - name: BuildWMdStarCoin # WM_GHOST type: add_func_pointer src_addr_pal: 0x80982D1C target_func: 'dWMStarCoin::build(void)' diff --git a/spritespawner.yaml b/spritespawner.yaml index 8c2e7ca..8c630eb 100644 --- a/spritespawner.yaml +++ b/spritespawner.yaml @@ -1,5 +1,5 @@ --- -# Replaces Ac_Lift_ObjBg_HMove_Big +# Replaces EN_BOYON source_files: [../src/spritespawner.cpp] hooks: @@ -12,4 +12,4 @@ hooks: type: add_func_pointer src_addr_pal: 0x80ADEA30 target_func: 'SpriteSpawner_Execute(SpriteSpawner *)' -
\ No newline at end of file + diff --git a/src/koopatlas/core.h b/src/koopatlas/core.h index d2d9454..2674977 100644 --- a/src/koopatlas/core.h +++ b/src/koopatlas/core.h @@ -36,7 +36,7 @@ void NewerMapDrawFunc(); #define WM_HUD WM_DANCE_PAKKUN #define WM_SHOP WM_TOGEZO -#define WM_SHOPITEM WM_PUKU +#define WM_SHOPITEM WM_BOARD #define WM_STARCOIN WM_GHOST class daWMPlayer_c; diff --git a/src/msgbox.cpp b/src/msgbox.cpp index adbeb24..9a5fb25 100644 --- a/src/msgbox.cpp +++ b/src/msgbox.cpp @@ -1,52 +1,9 @@ #include <common.h> #include <game.h> +#include "msgbox.h" // Replaces: EN_LIFT_ROTATION_HALF (Sprite 107; Profile ID 481 @ 80AF96F8) -class dMsgBoxManager_c : public dStageActor_c { - public: - void showMessage(int id); - - dMsgBoxManager_c() : state(this, &StateID_LoadRes) { } - - int onCreate(); - int onDelete(); - int onExecute(); - int onDraw(); - - int beforeExecute() { return true; } - int afterExecute(int) { return true; } - - m2d::EmbedLayout_c layout; - dDvdLoader_c msgDataLoader; - - bool layoutLoaded; - bool visible; - - dStateWrapper_c<dMsgBoxManager_c> state; - - USING_STATES(dMsgBoxManager_c); - DECLARE_STATE(LoadRes); - DECLARE_STATE(Wait); - DECLARE_STATE(BoxAppearWait); - DECLARE_STATE(ShownWait); - DECLARE_STATE(BoxDisappearWait); - - static dMsgBoxManager_c *instance; - static dMsgBoxManager_c *build(); - - private: - struct entry_s { - u32 id; - u32 titleOffset; - u32 msgOffset; - }; - - struct header_s { - u32 count; - entry_s entry[1]; - }; -}; dMsgBoxManager_c *dMsgBoxManager_c::instance = 0; dMsgBoxManager_c *dMsgBoxManager_c::build() { diff --git a/src/msgbox.h b/src/msgbox.h new file mode 100644 index 0000000..032b5c8 --- /dev/null +++ b/src/msgbox.h @@ -0,0 +1,50 @@ +#ifndef MSGBOX_H +#define MSGBOX_H +#include <common.h> +#include <game.h> + +class dMsgBoxManager_c : public dStageActor_c { + public: + void showMessage(int id); + + dMsgBoxManager_c() : state(this, &StateID_LoadRes) { } + + int onCreate(); + int onDelete(); + int onExecute(); + int onDraw(); + + int beforeExecute() { return true; } + int afterExecute(int) { return true; } + + m2d::EmbedLayout_c layout; + dDvdLoader_c msgDataLoader; + + bool layoutLoaded; + bool visible; + + dStateWrapper_c<dMsgBoxManager_c> state; + + USING_STATES(dMsgBoxManager_c); + DECLARE_STATE(LoadRes); + DECLARE_STATE(Wait); + DECLARE_STATE(BoxAppearWait); + DECLARE_STATE(ShownWait); + DECLARE_STATE(BoxDisappearWait); + + static dMsgBoxManager_c *instance; + static dMsgBoxManager_c *build(); + + private: + struct entry_s { + u32 id; + u32 titleOffset; + u32 msgOffset; + }; + + struct header_s { + u32 count; + entry_s entry[1]; + }; +}; +#endif /* MSGBOX_H */ diff --git a/src/palaceDude.cpp b/src/palaceDude.cpp new file mode 100644 index 0000000..eff3299 --- /dev/null +++ b/src/palaceDude.cpp @@ -0,0 +1,50 @@ +#include <game.h> +#include <stage.h> +#include "msgbox.h" + +class dPalaceDude_c : public dStageActor_c { + public: + static dPalaceDude_c *build(); + + bool hasBeenActivated; + bool hasExitedStage; + int onExecute(); +}; + +/*****************************************************************************/ +// Glue Code +dPalaceDude_c *dPalaceDude_c::build() { + void *buffer = AllocFromGameHeap1(sizeof(dPalaceDude_c)); + dPalaceDude_c *c = new(buffer) dPalaceDude_c; + return c; +} + + +int dPalaceDude_c::onExecute() { + if (dFlagMgr_c::instance->flags & spriteFlagMask) { + if (hasBeenActivated) + return true; + //OSReport("Activating Palace Dude\n"); + hasBeenActivated = true; + + dMsgBoxManager_c::instance->showMessage(settings & 0xFFFFFFF); + + SaveBlock *save = GetSaveFile()->GetBlock(-1); + save->switch_on |= (1 << (settings >> 28)); + } + + if (hasBeenActivated) { + if (hasExitedStage) + return true; + //OSReport("Palace Dude is activated, %d\n", dMsgBoxManager_c::instance->visible); + if (!dMsgBoxManager_c::instance->visible) { + ExitStage(WORLD_MAP, 0, BEAT_LEVEL, MARIO_WIPE); + hasExitedStage = true; + } + } + + return true; + +} + + diff --git a/switchblock.yaml b/switchblock.yaml index 6f142b2..e18fda8 100644 --- a/switchblock.yaml +++ b/switchblock.yaml @@ -1,5 +1,5 @@ ---
-source_files: [../src/switchblock.S]
+source_files: [../src/switchblock.S, ../src/palaceDude.cpp]
hooks:
- name: PrepareReplay_SwitchPatch
type: patch
@@ -30,3 +30,16 @@ hooks: target_func: 'CheckBehaviourOverride_EndPatch'
+
+ - name: BuildPalaceDude
+ type: add_func_pointer
+ src_addr_pal: 0x809838E4
+ target_func: 'dPalaceDude_c::build(void)'
+
+ - name: PalaceDudeSpriteInfo
+ type: patch
+ addr_pal: 0x8030CDE8
+ # Orig 02EB 0000 00000000 00000000 00000000 00000000 00000100 00000100 0000 0000 0000 0000 0800 0000'
+ data: '02A7 0000 00000010 00000010 00000000 00000000 00000200 00000200 0000 0000 0200 0200 0000 0000'
+ # 0x8030A340 + sprite num * 0x28 == offset
+
diff --git a/tools/UsedProfileAndSpriteList.txt b/tools/UsedProfileAndSpriteList.txt new file mode 100644 index 0000000..8011339 --- /dev/null +++ b/tools/UsedProfileAndSpriteList.txt @@ -0,0 +1,160 @@ +[Commented] 210 : TARZAN_ROPE : Pengi +--- : MOVIE : Cut Scene +--- : WM_BOARD : Shop Item +--- : WM_DANCE_PAKKUN : HUD +--- : WM_GHOST : Star Coin Screen +--- : WM_MAP : Map +--- : WM_PAKKUN : Captain Bowser: Clown Shot +--- : WM_PLAYER : Player +--- : WM_SINKSHIP : Song Prize +--- : WM_SMALLCLOUD : Bridge Bowser: Dropped Bomb +--- : WM_TOGEZO : Shop +--- : WORLD_CAMERA : World Camera +--- : WORLD_MAP : Koopatlas + 10 : WM_ANCHOR : Captain Bowser: Koopa Throw + 11 : WM_KOOPA_CASTLE : Make Your Own + 12 : WM_KURIBO : Challenge Star + 13 : JR_CLOWN_FOR_PLAYER : Captain Bowser: Clown Car + 14 : WM_ANTLION : Captain Bowser: Koopa Flamethrower + 15 : WM_KILLERBULLET : Sing Along + 16 : WM_CLOUD : Bridge Bowser: Bomb Drop + 17 : WM_KILLER : Song Block + 18 : WM_BOSS_IGGY : Bone Piece + 19 : WM_PUKU : Samurshai + 22 : WM_KINOKO_STAR : Pumpkin Goomba + 49 : AC_LIFT_SEESAW : Fake Star Coin + 79 : EN_HELPOS : Event Looper + 88 : EN_BOYON : Sprite Spawner + 89 : EN_REMOCON_TORIMOCHI : Sprite Swapper Timed +107 : EN_LIFT_ROTATION_HALF : Message Box Manager +152 : EN_BLUR : Message Block +169 : EN_SLIP_PENGUIN : Magic Platform +183 : EN_TARZANROPE : Meteor +210 : TARZAN_ROPE : Topman +213 : BRANCH : Captain Bowser +239 : MIST_INTERMITTENT : Event Block +244 : RIVER_MGR : Line God +246 : TAG_THUNDER : Level Special +250 : KAWANAGARE : Electric Line +251 : SLOW_QUICK_TAG : Topman Boss +273 : WM_KINOBALLOON : Palace Activator +282 : EN_WALLINSECT : Mr Sun +283 : WALLINSECT_MGR : Fuzzy Bear +290 : EN_IWAO : Ramboo +302 : EN_GAKE_NOKO : Wrench +322 : EN_GHOST_JUGEM : Thwomp Boss +324 : SHIP_WINDOW : Podouble +332 : LIFT_TORIDE_ROLL : Effect Video +350 : DUMMY_DOOR_PARENT : Fire Laser +351 : DUMMY_DOOR_CHILD : Shy Guy +410 : AC_BLOCK_GROUP : Mega Goomba +XXX : AC_LIFT_ICE_SPRING : Balboa Wrench + + + +-- All Replaced Profiles -- +AC_BLOCK_GROUP +AC_LIFT_ICE_SPRING +AC_LIFT_SEESAW +BRANCH +DUMMY_DOOR_CHILD +DUMMY_DOOR_PARENT +EN_BLUR +EN_BOYON +EN_GAKE_NOKO +EN_GHOST_JUGEM +EN_HELPOS +EN_IWAO +EN_LIFT_ROTATION_HALF +EN_REMOCON_TORIMOCHI +EN_SLIP_PENGUIN +EN_TARZANROPE +EN_WALLINSECT +JR_CLOWN_FOR_PLAYER +KAWANAGARE +LIFT_TORIDE_ROLL +MIST_INTERMITTENT +MOVIE +RIVER_MGR +SHIP_WINDOW +SLOW_QUICK_TAG +TAG_THUNDER +TARZAN_ROPE +WALLINSECT_MGR +WM_ANCHOR +WM_ANTLION +WM_BOARD +WM_BOSS_IGGY +WM_CLOUD +WM_DANCE_PAKKUN +WM_GHOST +WM_KILLER +WM_KILLERBULLET +WM_KINOBALLOON +WM_KINOKO_STAR +WM_KOOPA_CASTLE +WM_KURIBO +WM_MAP +WM_PAKKUN +WM_PLAYER +WM_PUKU +WM_PUKU +WM_SINKSHIP +WM_SMALLCLOUD +WM_TOGEZO +WORLD_CAMERA +WORLD_MAP + + + +-- World Map Processes Free for Use: -- +WM_ANTLION_MNG +WM_BOSS_BASE +WM_BOSS_KAMECK +WM_BOSS_LARRY +WM_BOSS_LEMMY +WM_BOSS_LUDWIG +WM_BOSS_MORTON +WM_BOSS_ROY +WM_BOSS_WENDY +WM_BROS +WM_BUBBLE +WM_CANNON +WM_CASTLE +WM_COURSE +WM_CS_SEQ_MNG +WM_CS_W3_PALM +WM_DIRECTOR +WM_DOKAN +WM_DOKANROUTE +WM_GRID +WM_HANACHAN +WM_IBARA +WM_ISLAND +WM_JUGEM +WM_KINOKO_1UP +WM_KINOKO_BASE +WM_KINOKO_RED +WM_KINOPIO +WM_KOOPAJR +WM_KOOPASHIP +WM_MANTA +WM_NOTE +WM_PAKKUNHEAD +WM_PEACH +WM_PEACH_CASTLE +WM_SANDPILLAR +WM_START +WM_STOP +WM_SUBPLAYER +WM_SURRENDER +WM_SWITCH +WM_TERESA +WM_TEST +WM_TEST2 +WM_TORIDE +WM_TOWER +WM_TREASURESHIP +WM_YOGANPILLAR +WORLD_SELECT +WORLD_SELECT_GUIDE |