-
Notifications
You must be signed in to change notification settings - Fork 10
/
ffight_ae_string_scripts_hijacks.asm
134 lines (100 loc) · 3.21 KB
/
ffight_ae_string_scripts_hijacks.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
;=======================================
draw_string_calc_string_address:
and.l #$000000ff, D0
add.w D0, D0
lea new_string_indexes.l, A1
move.l (A1,D0.w), A1
rts
;=======================================
;=======================================
hijack_draw_string_script:
bsr draw_string_calc_string_address
jmp $0014C2
;=======================================
;=======================================
hijack_hide_string_script:
bsr draw_string_calc_string_address
jmp $0017DC
;=======================================
;=======================================
draw_string_p23_handler:
btst.b #$0, ($0,A6)
bne draw_string_p23_handler_exit
add.b #$39, D0
draw_string_p23_handler_exit:
jmp $14ae.w
;=======================================
;=======================================
hijack_show_p2_additional_credits_message:
btst.b #$0, ($0,A6)
bne hijack_show_p2_additional_credits_message_p2
move.w #$3d, D0 ; Show additional credit message p3
jmp $9e6c.l
hijack_show_p2_additional_credits_message_p2:
move.w #$27, D0 ; Show additional credit message p2
jmp $9e6c.l
;=======================================
;=======================================
hijack_hide_p2_additional_credits_message:
btst.b #$0, ($0,A6)
bne hijack_hide_p2_additional_credits_message_p2
move.w #$bd, D0 ; Hide additional credit message p3
jmp $9e6c.l
hijack_hide_p2_additional_credits_message_p2:
move.w #$a7, D0 ; Hide additional credit message p2
jmp $9e6c.l
;=======================================
;=======================================
;=======================================
hijack_p1_select_player_countdown:
movea.l #$0090879C, A1
tst.b ($53a9,A5)
beq p1_countdown_continue
jmp $015C58
p1_countdown_continue:
jmp $015C5C
;=======================================
;=======================================
hijack_p2_select_player_countdown:
btst.b #$0, ($0,A6)
bne p2_countdown_handler
movea.l #$0090971C, A1
bra p2_countdown_exit
p2_countdown_handler:
movea.l #$00908F1C, A1
p2_countdown_exit:
tst.b ($53a9,A5)
beq p2_countdown_continue
jmp $0164C6
p2_countdown_continue:
jmp $0164CA
;=======================================
;=======================================
hijack_p1_continue_countdown
movea.l #$00908A0C, A1
moveq #$0, D0
jmp $0156CA
;=======================================
;=======================================
hijack_p2_continue_countdown:
btst.b #$0, ($0,A6)
bne p2_continue_countdown_handler
movea.l #$0090998C, A1
bra p2_continue_countdown_exit
p2_continue_countdown_handler:
movea.l #$0090918C, A1
p2_continue_countdown_exit:
moveq #$0, D0
jmp $015F3E
;=======================================
;=======================================
; Random code moved to make room for a draw handler in the early banks
; This is fucked up.... if something jumps to 143a (things do) and we use more space after this hijack we will cause a break
move_00142E:
addi.w #$10, D0
move.w D0, ($4,A0)
move.w D1, ($6,A0)
lea ($80,A0), A0
move.w (-$6eb2,A5), D0
jmp $001442
;=======================================