From 0c02f8f39e2f471a15da0318c2c315dfc0dae94c Mon Sep 17 00:00:00 2001 From: Zarby89 Date: Mon, 28 Oct 2024 02:23:03 -0400 Subject: [PATCH] dungeon maps prevent prevent opening dungeon map in boss rooms --- DungeonMaps.asm | 40 +++++++++++++++++++++++++++++++++++++++- Main.asm | 2 +- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/DungeonMaps.asm b/DungeonMaps.asm index 2c1449f..92a5608 100644 --- a/DungeonMaps.asm +++ b/DungeonMaps.asm @@ -9,7 +9,44 @@ ; org $0288FD ; Replace a BEQ by a BRA ; db $80 - +pushpc +org $0288FF +JML XButtonPressDungeon +NOP #$03 +OpenMap: + +org $02891B +NoMap: + + +pullpc +XButtonPressDungeon: +; Restored Code +LDA.w $040C +CMP.b #$FF +BEQ .no_mapping + +; Check for specific rooms +LDA.b $A0 ; load room id + +CMP.b #$B6 : BNE + ; are we in room B6 - Metroid +JML NoMap ++ +CMP.b #$33 : BNE + ; are we in room B6 - VittyVattyYatta +JML NoMap ++ +CMP.b #$C8 : BNE + ; are we in room C8 - Pimpkinghead +JML NoMap ++ +CMP.b #$6C : BNE + ; are we in room 6C - "The" face +JML NoMap ++ +JML OpenMap + +.no_mapping +JML NoMap + +pushpc ; =============================================================================== ; Dungeon Map Level Title GFX @@ -240,3 +277,4 @@ dw $0ba9, $0bbe, $cbbe, $cba9 ; Room 81 dw $4bbe, $0bbe, $8ba9, $8bbe ; Room 82 ; =============================================================================== +pullpc \ No newline at end of file diff --git a/Main.asm b/Main.asm index ee47a38..eca13a5 100644 --- a/Main.asm +++ b/Main.asm @@ -12,7 +12,6 @@ incsrc CustomSprProperties.asm incsrc OverworldMap.asm incsrc SanctuaryMusicTransitionNOP.asm incsrc DoorOverlay.asm -incsrc DungeonMaps.asm incsrc HitBoxProperties.asm ; ============================================================================== @@ -96,6 +95,7 @@ incsrc sage.asm incsrc FluteMap.asm incsrc AllhallowMusic.asm incsrc WarpBetweenFloors.asm +incsrc DungeonMaps.asm warnpc $39FFFF ; If it reaches the warning move some code in next bank. org $3A8000