-
Notifications
You must be signed in to change notification settings - Fork 53
/
flipperkill.asm
73 lines (55 loc) · 1.08 KB
/
flipperkill.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
;================================================================================
; Fake Flippers Softlock Fix
;--------------------------------------------------------------------------------
; Written over and used by OnEnterWater hook.
UnequipCapeQuiet:
LDA.b #$20 : STA.w PoofTimer
STZ.w NoDamage
STZ.b CapeOn
STZ.w LinkZap
RTL
protectff:
LDA.l AllowAccidentalMajorGlitch
BEQ .yes_protect
RTL
.yes_protect
REP #$30
LDA.b LinkPosY
AND.w #$1E00
ASL
ASL
ASL
STA.b Scrap06
LDA.b LinkPosX
AND.w #$1E00
ORA.b Scrap06
XBA
LSR
TAX
SEP #$30
; Remove dark world bit
; in game table that converts coordinates to actual screen ID
; special case for other areas
LDA.b OverworldIndex
BMI .special_overworld
AND.b #$3F
CMP.l $82A4E3,X
BEQ ++
.protect
LDA.b #$15
STA.b LinkState
STZ.b LinkAnimationStep
STZ.b LinkWalkDirection
LDA.b #$02
STA.b LinkDirection
STZ.w MedallionFlag
STZ.w CutsceneFlag
STZ.w NoMenu
++ RTL
.special_overworld
CMP.l .spow,X
BNE .protect
RTL
.spow
db $80, $81, $81, $FF, $FF, $FF, $FF, $FF
db $FF, $81, $81, $FF, $FF, $FF, $FF, $FF