Add hooks to store door frame overlay information based on entrance used, not cave entered, for simple cave entrances. Also use entrance info, not destination cave, to determine if link should walk up or down after triggering screen transition.

This commit is contained in:
LLCoolDave
2017-07-01 19:06:31 +02:00
parent b97435d4a1
commit db537fe4d6
4 changed files with 80 additions and 1 deletions

44
doorframefixes.asm Normal file
View File

@@ -0,0 +1,44 @@
;================================================================================
; Door Frame Fixes
;================================================================================
;--------------------------------------------------------------------------------
; StoreLastEntranceID
;--------------------------------------------------------------------------------
StoreLastEntranceID:
CPX #$003a : BCC .noStore
TXA : SBC #$3a
BRA .done
.noStore
LDA #$00
.done
STA $7F5099
LDA $1BBB73, X : STA $010E
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; CacheDoorFrameData
;--------------------------------------------------------------------------------
CacheDoorFrameData:
LDA $7F5099 : BEQ .originalBehaviour
DEC : ASL : TAX
LDA EntranceDoorFrameTable, X : STA $0696
BRA .done
.originalBehaviour
LDA $D724, X : STA $0696
.done
STZ $0698
LDA #$00
STA $7F5099
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; WalkDownIntoTavern
;--------------------------------------------------------------------------------
WalkDownIntoTavern:
LDA $7F5099
CMP #$08
RTL
;--------------------------------------------------------------------------------