-
Notifications
You must be signed in to change notification settings - Fork 2
/
level-select-data.asm
769 lines (642 loc) · 14.6 KB
/
level-select-data.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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
; asmsyntax=ca65
;;
;; All the hand-written data for the level select screen
;;
data_PaletteAnim_List:
.word data_PaletteAnim_Def00
PAL_ANIM_COUNT = (* - data_PaletteAnim_List) / 2
data_PaletteAnim_Def00:
.byte 5 ; palette index
.byte 3 ; number of frames
.byte 6 ; frame rate
; frame data
.byte $20, $20, $00, $00
.byte $20, $00, $20, $00
.byte $20, $00, $00, $20
;.byte $0F, $0F, $20, $0F
; List of all the sprite objects
; A "sprite object" is a meta-sprite for animation.
data_SpriteObject_List:
.word data_SpriteObj_Def_Stack
.byte 112, 35 ; base X/Y
.byte 0 ; Nametable
.word data_SpriteObj_Def_Stack
.byte 104, 115 ; base X/Y
.byte 0 ; Nametable
.word data_SpriteObj_Def_Modem
.byte 240, 16
.byte 0
.word data_SpriteObj_Def_Modem
.byte 184, 64
.byte 0
.word data_SpriteObj_Def_Modem
.byte 168, 112
.byte 0
.word data_SpriteObj_Def_Sat
.byte 248, 63
.byte 0
.word data_SpriteObj_Def_Sat
.byte 232, 127
.byte 0
.word data_SpriteObj_Def_Rack
.byte 64, 31
.byte 1
.word data_SpriteObj_Def_Rack
.byte 80, 63
.byte 1
.word data_SpriteObj_Def_Rack
.byte 96, 95
.byte 1
.word data_SpriteObj_Def_Rack
.byte 64, 127
.byte 1
SPRITE_OBJ_COUNT = (* - data_SpriteObject_List) / 5
; Static "animation" (only palette is animated)
data_SpriteObj_Def_Modem:
.byte 1 ; animation type
.byte 1 ; sprite count
.word data_SpriteObj_02Tiles
.word data_SpriteObj_02Attr
.word data_SpriteObj_02X
.word data_SpriteObj_02Y
data_SpriteObj_02Tiles:
.byte $0B
data_SpriteObj_02Attr:
.byte $01
data_SpriteObj_02X:
.byte $00
data_SpriteObj_02Y:
.byte $00
data_SpriteObj_Def_Sat:
.byte 1 ; animation type
.byte 1 ; sprite count
.word data_SpriteObj_03Tiles
.word data_SpriteObj_03Attr
.word data_SpriteObj_03X
.word data_SpriteObj_03Y
data_SpriteObj_03Tiles:
.byte $2D
data_SpriteObj_03Attr:
.byte $01
data_SpriteObj_03X:
.byte $00
data_SpriteObj_03Y:
.byte $00
data_SpriteObj_Def_Stack:
.byte 0 ; animation type
.byte 10 ; frame rate
.byte 3 ; sprite count
.byte 4 ; frame count
.word data_SpriteObj_01Tiles
.word data_SpriteObj_01Attr
.word data_SpriteObj_01X
.word data_SpriteObj_01Y
.word data_SpriteObj_01FrameX
.word data_SpriteObj_01FrameY
data_SpriteObj_01Tiles:
.byte $33, $34, $33 ;tile IDs
data_SpriteObj_01Attr:
.byte 0, 0, $40 ; attr data
; X/Y offsets
data_SpriteObj_01X:
.byte 0, 8, 16
data_SpriteObj_01Y:
.byte 0, 0, 0
; Frame data
data_SpriteObj_01FrameX:
.byte 0, 0, 0, 0
data_SpriteObj_01FrameY:
.byte 0, 6, 12, 6
data_SpriteObj_Def_Rack:
.byte 0 ; animation type
.byte 10 ; frame rate
.byte 2 ; sprite count
.byte 4 ; frame count
.word data_SpriteObj_04Tiles
.word data_SpriteObj_04Attr
.word data_SpriteObj_04X
.word data_SpriteObj_04Y
.word data_SpriteObj_04FrameX
.word data_SpriteObj_04FrameY
data_SpriteObj_04Tiles:
.byte $08, $18
data_SpriteObj_04Attr:
.byte 0, 0
data_SpriteObj_04X:
.byte 0, 0
data_SpriteObj_04Y:
.byte 0, 8
data_SpriteObj_04FrameX:
.byte 0, 0, 1, 1
data_SpriteObj_04FrameY:
.byte 0, 1, 1, 0
; Cursor data for the level select
data_LevelSelect_Cursor:
; X, Y, w, h
; 1
.byte 31, 62, 18, 9
; 2
.byte 113, 31, 14, 16
.byte 105, 111, 14, 16
; 3
.byte 175, 14, 10, 10
.byte 119, 62, 10, 10
.byte 119, 110, 10, 10
; 4
.byte 116, 45, 20, 20
.byte 100, 109, 20, 20
; 5
.byte 188, 29, 12, 12
.byte 164, 61, 12, 12
.byte 180, 93, 12, 12
.byte 148, 125, 12, 12
; 6
.byte 159, 37, 12, 12
.byte 167, 77, 12, 12
.byte 143, 109, 12, 12
; 7
.byte 207, 61, 20, 20
; Scroll of screen for each cursor value
data_LevelSelect_CursorScroll:
; 1
.byte 0
; 2
.byte 0
.byte 0
; 3
.byte 64
.byte 64
.byte 48
; 4
.byte 130
.byte 130
; 5
.byte 130
.byte 170
.byte 170
.byte 170
; 6
.byte 255
.byte 255
.byte 255
; 7
.byte 255
; First list of pointers for traces. Indexed with menu_PrevLevel
from_idx:
.word from_1
.word from_2a
.word from_2b
.word from_3a
.word from_3b
.word from_3c
.word from_4a
.word from_4b
.word from_5a
.word from_5b
.word from_5c
.word from_5d
.word from_6a
.word from_6b
.word from_6c
; there is no from_7
; Second list of pointers. Indexed with ls_SelectedLevel
from_1:
.word trace_1_2a
.word trace_1_2b
from_2a:
.word trace_2a_3a
.word trace_2a_3b
from_2b:
.word trace_2b_3b
.word trace_2b_3c
from_3a:
.word trace_3a_5a
.word trace_3a_4a
from_3b:
.word trace_3b_4a
.word trace_3b_4b
from_3c:
.word trace_3c_4b
from_4a:
.word trace_4a_5b
.word trace_4a_5c
from_4b:
.word trace_4b_5b
.word trace_4b_5c
.word trace_4b_5d
from_5a:
.word trace_5a_7
from_5b:
.word trace_5b_6a
.word trace_5b_6b
from_5c:
.word trace_5c_6a
.word trace_5c_6b
from_5d:
.word trace_5d_6b
.word trace_5d_6c
from_6a:
.word trace_6a_7
from_6b:
.word trace_6b_7
from_6c:
.word trace_6c_7
; Quadrants of the attribute data for better readability
TR_BOTL = %0001_0000
TR_BOTR = %0100_0000
TR_TOPL = %0000_0001
TR_TOPR = %0000_0100
trace_1_2a:
.word $23C9
.byte TR_BOTL | TR_BOTR
.word $23CA
.byte TR_BOTL | TR_BOTR | TR_TOPL | TR_TOPR
.word $23CB
.byte TR_TOPL
.word $0000 ; word cuz we need the high byte zero
trace_1_2b:
.word $23D1
.byte TR_BOTR
.word $23D9
.byte TR_TOPR
.word $23DA
.byte TR_BOTL | TR_BOTR | TR_TOPL | TR_TOPR
.word $23DB
.byte TR_TOPL
.word $0000
trace_2a_3a:
.word $23C3
.byte TR_BOTR | TR_TOPR
.word $23C4
.byte TR_BOTL | TR_BOTR | TR_TOPL | TR_TOPR
.word $23C5
.byte TR_BOTL | TR_BOTR
.word $23CD
.byte TR_TOPR
.word $23C6
.byte TR_BOTL | TR_BOTR
.word $23CE
.byte TR_TOPL | TR_TOPR
.word $23C7
.byte TR_BOTL
.word $0000
trace_2a_3b:
.word $23CB
.byte TR_BOTL
.word $23D3
.byte TR_TOPL | TR_TOPR
.word $23D4
.byte TR_TOPL | TR_TOPR
.word $23D5
.byte TR_TOPL
.word $23CC
.byte TR_BOTR
.word $23CD
.byte TR_BOTL | TR_BOTR
.word $0000
trace_2b_3b:
.word $23DB
.byte TR_TOPR
.word $23D3
.byte TR_BOTR
.word $23D4
.byte TR_BOTL | TR_BOTR
.word $23D5
.byte TR_BOTL | TR_BOTR
.word $0000
trace_2b_3c:
.word $23DC
.byte TR_BOTL | TR_BOTR
.word $23E4
.byte TR_TOPR
.word $23E5
.byte TR_TOPL
.word $0000
trace_3a_5a:
.word $27C0
.byte TR_BOTL | TR_BOTR
.word $27C1
.byte TR_BOTL | TR_BOTR
.word $27C2
.byte TR_BOTL
.word $0000
trace_3a_4a:
.word $23CF
.byte TR_TOPR
.word $27C8
.byte TR_TOPL
.word $0000
trace_3b_4a:
.word $23CE
.byte TR_BOTL | TR_BOTR
.word $23CF
.byte TR_BOTL
.word $23D7
.byte TR_TOPL | TR_TOPR
.word $0000
trace_3b_4b:
.word $23D6
.byte TR_BOTL | TR_BOTR
.word $23DE
.byte TR_TOPR
.word $23DF
.byte TR_TOPL
.word $0000
trace_3c_4b:
.word $23DD
.byte TR_TOPR
.word $23DE
.byte TR_TOPL | TR_BOTL
.word $23E6
.byte TR_TOPL | TR_TOPR
.word $23E7
.byte TR_TOPL
.word $0000
trace_4a_5b:
.word $27C8
.byte TR_BOTR
.word $27C9
.byte TR_BOTL
.word $27D1
.byte TR_TOPL | TR_TOPR
.word $27D2
.byte TR_TOPL
.word $0000
trace_4a_5c:
.word $27D0
.byte TR_TOPR | TR_BOTR
.word $27D8
.byte TR_TOPR | TR_BOTR
.word $27D9
.byte TR_BOTL | TR_BOTR
.word $27DA
.byte TR_BOTL | TR_BOTR
.word $27DB
.byte TR_BOTL
.word $0000
trace_4b_5b:
.word $23DF
.byte TR_TOPR
.word $23D7
.byte TR_BOTR
.word $27D0
.byte TR_BOTL
.word $27D1
.byte TR_BOTL | TR_BOTR
.word $27D2
.byte TR_BOTL | TR_BOTR
.word $0000
trace_4b_5c:
.word $27D8
.byte TR_TOPL | TR_BOTL
.word $27D9
.byte TR_TOPL | TR_TOPR
.word $27DA
.byte TR_TOPL | TR_TOPR
.word $0000
trace_4b_5d:
.word $27E0
.byte TR_TOPL | TR_TOPR
.word $27E1
.byte TR_TOPL | TR_TOPR
.word $0000
trace_5a_7:
.word $27CA
.byte TR_TOPR
.word $27C2
.byte TR_BOTR
.word $27C3
.byte TR_BOTL | TR_BOTR
.word $27C4
.byte TR_BOTL | TR_BOTR
.word $27C5
.byte TR_BOTL | TR_BOTR
.word $27C6
.byte TR_BOTL | TR_BOTR
.word $27C7
.byte TR_BOTL
.word $27CF
.byte TR_BOTL | TR_TOPL
.word $0000
trace_5b_6a:
.word $27CA
.byte TR_BOTR
.word $27CB
.byte TR_TOPL | TR_TOPR | TR_BOTL
.word $27CC
.byte TR_TOPL | TR_TOPR
.word $0000
trace_5b_6b:
.word $27D3
.byte TR_TOPL
.word $27D4
.byte TR_TOPL | TR_TOPR
.word $27D5
.byte TR_TOPL
.word $0000
trace_5c_6a:
.word $27D3
.byte TR_TOPR | TR_BOTL | TR_BOTR
.word $27CB
.byte TR_BOTR
.word $27CC
.byte TR_BOTR | TR_BOTL
.word $0000
trace_5c_6b:
.word $27DB
.byte TR_TOPR
.word $27DC
.byte TR_TOPR | TR_TOPL
.word $27DD
.byte TR_TOPL
.word $0000
trace_5d_6b:
.word $27E2
.byte TR_BOTL | TR_BOTR
.word $27E3
.byte TR_BOTL | TR_BOTR
.word $27E4
.byte TR_BOTL | TR_BOTR
.word $27E5
.byte TR_BOTL | TR_BOTR | TR_TOPR
.word $27DD
.byte TR_TOPR
.word $0000
trace_5d_6c:
.word $27E2
.byte TR_TOPR
.word $27E3
.byte TR_TOPR | TR_TOPL
.word $27E4
.byte TR_TOPR | TR_TOPL
.word $0000
trace_6a_7:
.word $27CD
.byte TR_TOPR
.word $27CE
.byte TR_TOPR | TR_TOPL | TR_BOTR
.word $0000
trace_6b_7:
.word $27D5
.byte TR_TOPR
.word $27D6
.byte TR_TOPL
.word $0000
trace_6c_7:
.word $27DD
.byte TR_BOTL | TR_BOTR
.word $27DE
.byte TR_BOTL | TR_TOPL
.word $27D6
.byte TR_BOTL
.word $0000
; This table is indexed with menu_PrevLevel
data_Level_Progression_Idx:
.word :+
.word :++
.word :+++
.word :++++
.word :+++++
.word :++++++
.word :+++++++
.word :++++++++
.word :+++++++++
.word :++++++++++
.word :+++++++++++
.word :++++++++++++
.word :+++++++++++++
.word :++++++++++++++
.word :+++++++++++++++
.word :++++++++++++++++
; Uses menu_PrevLevel to determine which
; levels are available for selection.
data_Level_Progression:
; 1
: .byte 1, 2, $FF
; 2
: .byte 3, 4, $FF
: .byte 4, 5, $FF
; 3
: .byte 8, 6, $FF
: .byte 6, 7, $FF
: .byte 7, $FF
; 4
: .byte 9, 10, $FF
: .byte 9, 10, 11, $FF
; 5
: .byte 15, $FF
: .byte 12, 13, $FF
: .byte 12, 13, $FF
: .byte 13, 14, $FF
; 6
: .byte 15, $FF
: .byte 15, $FF
: .byte 15, $FF
: .byte $FF
data_Level_Titles_Idx:
.word :+
.word :++
.word :+++
.word :++++
.word :+++++
.word :++++++
.word :+++++++
.word :++++++++
.word :+++++++++
.word :++++++++++
.word :+++++++++++
.word :++++++++++++
.word :+++++++++++++
.word :++++++++++++++
.word :+++++++++++++++
.word :++++++++++++++++
data_Level_Titles:
: .byte "Level 1", $00
: .byte "Level 2a", $00
: .byte "Level 2b", $00
: .byte "Level 3a", $00
: .byte "Level 3b", $00
: .byte "Level 3c", $00
: .byte "Level 4a", $00
: .byte "Level 4b", $00
: .byte "Level 5a", $00
: .byte "Level 5b", $00
: .byte "Level 5c", $00
: .byte "Level 5d", $00
: .byte "Level 6a", $00
: .byte "Level 6b", $00
: .byte "Level 6c", $00
: .byte "The Boss", $00
data_Level_Text_Line1_Idx:
.word :+
.word :++
.word :++
.word :+++
.word :+++
.word :+++
.word :++++
.word :++++
.word :+++++
.word :+++++
.word :+++++
.word :+++++
.word :++++++
.word :++++++
.word :++++++
.word :+++++++
data_Level_Text_Line1:
: .byte "The first level", $00
: .byte "The second column", $00
: .byte "The third column", $00
: .byte "The fourth column", $00
: .byte "The fifth column", $00
: .byte "The sixth column", $00
: .byte "The boss column", $00
data_Level_Text_Line2_Idx:
.word :+
.word :++
.word :+++
.word :++
.word :+++
.word :++++
.word :++
.word :+++
.word :++
.word :+++
.word :++++
.word :+++++
.word :++
.word :+++
.word :++++
.word :++++++
data_Level_Text_Line2:
: .byte "I guess...", $00
: .byte "The first one tho", $00
: .byte "The second one tho", $00
: .byte "The third one tho", $00
: .byte "The fourth one tho", $00
: .byte ">:C", $00
;data_ls_ui_len: .byte 160
;data_ls_ui:
;.byte 0, 1, 2, 3, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 7, 8, 9, 1, 10, 1, 11, 12, 13, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31, 32, 33, 30, 34, 35, 36, 37, 38, 39, 26, 12, 40, 12, 55, 56, 57, 58, 45, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 59, 60, 61, 62, 63, 64, 65, 66, 67, 66, 68, 69, 13, 81, 82, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 116, 117, 118, 119, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 122, 27, 123, 124, 12
;data_ls_ui2_len: .byte 128
;data_ls_ui2:
;.byte 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 17, 17, 19, 20, 17, 17, 21, 22, 23, 17, 24, 25, 26, 12, 27, 12, 41, 42, 43, 44, 45, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 46, 30, 30, 47, 48, 49, 50, 51, 52, 53, 26, 12, 54, 12, 68, 69, 70, 71, 45, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 72, 73, 74, 75, 76, 77, 27, 78, 79, 80, 68, 69, 13, 96, 97, 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, 100, 101, 102, 103, 104, 99, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115
; Tile addresses for the text
data_lsText_AddrTitle:
.repeat 8, i
.word $22C6 + i
.endrepeat
data_lsText_AddrLine1:
.repeat 15, i
.word $2306 + i
.endrepeat
data_lsText_AddrLine2:
.repeat 15, i
.word $2326 + i
.endrepeat
data_lsUiSprites_CableRight:
;.byte
data_LS_Ui_Attr:
.byte $AA, $2A, $0A, $AA, $AA, $AA, $AA, $AA, $AA, $A2, $A0, $A0, $A0, $A8, $AA, $AA, $AA, $AA, $AA, $AA, $AA, $AA, $AA, $AA
data_LS_Ui_Attr_Len = * - data_LS_Ui_Attr