forked from KatDevsGames/z3randomizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoorframefixes.asm
44 lines (41 loc) · 1.38 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
40
41
42
43
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
;--------------------------------------------------------------------------------