-
Notifications
You must be signed in to change notification settings - Fork 0
/
_hooks.asm
71 lines (61 loc) · 1.25 KB
/
_hooks.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
FROM detour_to_custom_knockback
; replacement:
; lda #$08
; ldy $04F2
NOP
NOP
JSR custom_knockback
FROM attack
jsr jumping_attack
FROM jump_attack_step
jsr jumping_attack
; in Trevor state jump table ($9376)
FROM trevor_jump_table
SKIP $8
; state 8 (jumping)
; jump replacement
DW custom_jump_then_standard_jump
FROM set_fall_state
; go to jump state (instead of falling state)
lda #$08
FROM fall_adjust
; x=0 before this
lda #VSP_CONTROL_ZERO_VSPEED
STA vsp_control,X
STX simon_fall_objphase
lda #$16
sta imgsin
zero_hspfra:
lda #$00
sta hspfra
__standard_rts:
rts
rts_if_cutscene:
lda cutscene_timer
beq __standard_rts
lda cutscene_input
beq __standard_rts
; double-rts -- rts caller
pla
pla
rts
LIMIT standard_jump
FROM standard_crouch
jsr crouch_direction
FROM standard_stair_idle
; replaces:
; LDA joypad_down
; AND #$40 ; down ?
JSR stair_jumping
NOP
FROM standard_stair_walk
; replaces:
; JSR stair_walk_resume
JSR stair_jumping
FROM sypha_jumptable
SKIP $8
; jump
DW custom_jump_then_standard_jump
FROM alucard_jumptable
SKIP $8
DW custom_jump_then_standard_jump