forked from CaitSith2/z3randomizer
-
Notifications
You must be signed in to change notification settings - Fork 4
/
doorframefixes.asm
39 lines (36 loc) · 1.4 KB
/
doorframefixes.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
;================================================================================
; Door Frame Fixes
;================================================================================
;--------------------------------------------------------------------------------
; StoreLastOverworldDoorID
;--------------------------------------------------------------------------------
StoreLastOverworldDoorID:
TXA : INC
STA $7F5099
LDA $1BBB73, X : STA $010E
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; CacheDoorFrameData
;--------------------------------------------------------------------------------
CacheDoorFrameData:
LDA $7F5099 : BEQ .originalBehaviour
DEC : ASL : TAX
LDA EntranceDoorFrameTable, X : STA $0696
LDA EntranceAltDoorFrameTable, X : STA $0698
BRA .done
.originalBehaviour
LDA $D724, X : STA $0696
STZ $0698
.done
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; WalkDownIntoTavern
;--------------------------------------------------------------------------------
WalkDownIntoTavern:
LDA $7F5099
; tavern door has index 0x42 (saved off value is incremented by one)
CMP #$43
RTL
;--------------------------------------------------------------------------------