Skip to content

Commit

Permalink
dungeon maps prevent
Browse files Browse the repository at this point in the history
prevent opening dungeon map in boss rooms
  • Loading branch information
Zarby89 committed Oct 28, 2024
1 parent 7328ad6 commit 0c02f8f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
40 changes: 39 additions & 1 deletion DungeonMaps.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -240,3 +277,4 @@ dw $0ba9, $0bbe, $cbbe, $cba9 ; Room 81
dw $4bbe, $0bbe, $8ba9, $8bbe ; Room 82

; ===============================================================================
pullpc
2 changes: 1 addition & 1 deletion Main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ incsrc CustomSprProperties.asm
incsrc OverworldMap.asm
incsrc SanctuaryMusicTransitionNOP.asm
incsrc DoorOverlay.asm
incsrc DungeonMaps.asm
incsrc HitBoxProperties.asm

; ==============================================================================
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0c02f8f

Please sign in to comment.