-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstoryscreen.asm
289 lines (257 loc) · 7.02 KB
/
storyscreen.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
storyscreen:
jsr init_screen_time
jsr init_title_stars
lda #0
sta StoryLineStart
lda #10
sta StoryLineOffset
lda #0
sta SharkVelocityX
sta WaveOffsetX
lda #-110
sta WavePositionY
storyscreen_loop:
jsr update_drawing
jsr update_story
jsr update_waves
jsr draw_story
jsr draw_title_stars
jsr update_screen_time
jsr read_button1_flank
cmpa #0
bne storyscreen_shutdown
lda StoryLineStart
cmpa #9
beq storyscreen_shutdown
jmp storyscreen_loop
storyscreen_shutdown
lda #1
sta CurrentScreen
rts
update_story:
update_story_movement
lda ScreenTicks
anda #7
cmpa #7
bne update_story_movement_over
inc StoryLineOffset
update_story_movement_over
update_story_line_shown
lda ScreenTicks
cmpa #59
bne update_story_line_shown_over
lda ScreenSeconds
anda #1
cmpa #0
bne update_story_line_shown_over
inc StoryLineStart
update_story_line_shown_over
rts
draw_story
draw_story_line_0
lda StoryLineStart
cmpa #0
bgt draw_story_line_1
lda StoryLineOffset
ldb #-127
jsr Moveto_d
ldu #story_line_0
jsr Print_Str_yx
draw_story_line_1
lda StoryLineStart
cmpa #1
bgt draw_story_line_2
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-15
ldb #0
jsr Moveto_d
ldu #story_line_1
jsr Print_Str_yx
draw_story_line_2
lda StoryLineStart
cmpa #2
bgt draw_story_line_3
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-30
ldb #0
jsr Moveto_d
ldu #story_line_2
jsr Print_Str_yx
draw_story_line_3
lda StoryLineStart
cmpa #3
bgt draw_story_line_4
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-45
ldb #0
jsr Moveto_d
ldu #story_line_3
jsr Print_Str_yx
draw_story_line_4
lda StoryLineStart
cmpa #4
bgt draw_story_line_5
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-60
ldb #0
jsr Moveto_d
ldu #story_line_4
jsr Print_Str_yx
draw_story_line_5
lda StoryLineStart
cmpa #5
bgt draw_story_line_6
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-75
ldb #0
jsr Moveto_d
ldu #story_line_5
jsr Print_Str_yx
draw_story_line_6
lda StoryLineStart
cmpa #0
lble draw_story_over
cmpa #6
bgt draw_story_line_7
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-90
ldb #0
jsr Moveto_d
ldu #story_line_6
jsr Print_Str_yx
draw_story_line_7
lda StoryLineStart
cmpa #1
lble draw_story_over
cmpa #7
bgt draw_story_line_8
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-105
ldb #0
jsr Moveto_d
ldu #story_line_7
jsr Print_Str_yx
draw_story_line_8
lda StoryLineStart
cmpa #2
lble draw_story_over
cmpa #8
bgt draw_story_line_9
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-120
ldb #0
jsr Moveto_d
ldu #story_line_8
jsr Print_Str_yx
draw_story_line_9
lda StoryLineStart
cmpa #3
lble draw_story_over
cmpa #9
bgt draw_story_line_10
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-120
ldb #0
jsr Moveto_d
lda #-15
ldb #0
jsr Moveto_d
ldu #story_line_9
jsr Print_Str_yx
draw_story_line_10
lda StoryLineStart
cmpa #4
lble draw_story_over
cmpa #10
bgt draw_story_line_11
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-120
ldb #0
jsr Moveto_d
lda #-30
ldb #0
jsr Moveto_d
ldu #story_line_10
jsr Print_Str_yx
draw_story_line_11
lda StoryLineStart
cmpa #5
lble draw_story_over
cmpa #11
bgt draw_story_line_12
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-120
ldb #0
jsr Moveto_d
lda #-45
ldb #0
jsr Moveto_d
ldu #story_line_11
jsr Print_Str_yx
draw_story_line_12
lda StoryLineStart
cmpa #6
lble draw_story_over
cmpa #12
bgt draw_story_over
lda StoryLineOffset
ldb #-127
jsr Moveto_d
lda #-120
ldb #0
jsr Moveto_d
lda #-60
ldb #0
jsr Moveto_d
ldu #story_line_12
jsr Print_Str_yx
draw_story_over
rts
story_line_0:
db 0, 0, "EXOCOETIDAE.", $80
story_line_1:
db 0, 0, "THE FLYING FISH OF", $80
story_line_2:
db 0, 0, "BARBADOS.", $80
story_line_3:
db 0, 0, "A FREAK ACCIDENT HAS", $80
story_line_4:
db 0, 0, "LED TO THEM", $80
story_line_5:
db 0, 0, "CROSSBREEDING WITH A", $80
story_line_6:
db 0, 0, "GREAT WHITE SHARK.", $80
story_line_7:
db 0, 0, "RESULT: THE FIRST", $80
story_line_8:
db 0, 0, "FLYING FISH PREDATOR", $80
story_line_9:
db 0, 0, "IN HISTORY.", $80
story_line_10:
db 0, 0, "...", $80
story_line_11:
db 0, 0, "...", $80
story_line_12:
db 0, 0, "EXOSHARK!", $80