Prevent mirroring into entrances in inverted

This commit is contained in:
Kevin Cathcart
2018-09-17 23:00:57 -04:00
parent bcd1397df6
commit 4aeec98197
2 changed files with 20 additions and 0 deletions

View File

@@ -141,3 +141,16 @@ CheckHole:
LDA.l ExtraHole_Entrance, X : STA.w $010E : STZ.w $010F
JML Overworld_Hole_End
;--------------------------------------------------------------------------------
PreventEnterOnBonk:
STA $00 ; part of what we wrote over
LDA.l InvertedMode : AND.w #$00FF : BEQ .done
LDA.l $5D : AND.w #$00FF : CMP.w #$0014 : BNE .done ;in mirror mode?
LDA.b $8A : AND.w #$0040 : CMP $7B : BEQ .done ; Are we bonking, or doing the superbunny glitch?
; If in inverted, are in mirror mode, and are bonking then do not enter
JML.l PreventEnterOnBonk_BRANCH_IX
.done
LDX.w #$0102 ; rest of what we wrote over
JML.l PreventEnterOnBonk_return
;--------------------------------------------------------------------------------

View File

@@ -269,6 +269,13 @@ NOP #19 ;23 bytes removed with the JSL
org $04E7AE ; <- bank0E.asm : 4230 (LDA $7EF287 : AND.w #$0020)
JSL.l TurtleRockPegSolved
;--------------------------------------------------------------------------------
org $1BBD05 ; <- bank1B.asm : 261 (TYA : STA $00) ; hook starts at the STA
JML.l PreventEnterOnBonk
NOP
PreventEnterOnBonk_return:
org $1BBD77 ; <- bank1B.asm : 308 (SEP #$30)
PreventEnterOnBonk_BRANCH_IX:
;--------------------------------------------------------------------------------
;================================================================================