Files
alttpr-baserom/bugfixes.asm
Kevin Cathcart 16259ce158 Add light world check to more unbunny-ing code
This time the code that tries to unbunny you when leaving a dungeon.This
is needed to make ER's new cross world connects work properly.

Move the fake world fix to happen in time for this.
2018-02-07 01:56:50 -05:00

56 lines
1.9 KiB
NASM

;================================================================================
;--------------------------------------------------------------------------------
AssignKiki:
LDA.b #$00 : STA $7EF3D3 ; defuse bomb
LDA.b #$0A : STA $7EF3CC ; assign kiki as follower
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; Name: AllowSQ
; Returns: Accumulator = 0 if S&Q is disallowed, 1 if allowed
;--------------------------------------------------------------------------------
!ITEM_BUSY = "$7F5091"
AllowSQ:
LDA $7EF3C5 : BEQ .done ; thing we overwrote - check if link is in his bed
LDA !ITEM_BUSY : EOR #$01
.done
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
;0 = Reset Music
;1 = Don't Reset Music
MSMusicReset:
LDA $8A : CMP.b #$80 : BNE +
LDA $23
+
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
;0 = Become Permabunny
DecideIfBunny:
LDA $7EF357 : BEQ + : RTL : +
LDA $7EF3CA : AND.b #$40 : EOR #$40
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
;ReadInventoryPond:
; CPX.b #$1B : BNE + : LDA.b #$01 : RTL : +
; LDA $7EF340, X
;RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
FixBunnyOnExitToLightWorld:
JSL.l FakeWorldFix
LDA.w $02E0 : BEQ +
JMP.w DecideIfBunny
+
LDA $7EF357; thing we overwrote
RTL
;--------------------------------------------------------------------------------