-
Notifications
You must be signed in to change notification settings - Fork 2
/
menu_ram.asm
96 lines (70 loc) · 1.82 KB
/
menu_ram.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
; asmsyntax=ca65
LS_CURSOR_COLOR_START = $21
LS_CURSOR_COLOR_END = $2D
LS_CURSOR_ANIM_FRAMES = 3
ls_cursorColorBuff = PaletteBufferSprites + 15
CURSOR_TILE = $26
.pushseg
.segment "ZEROPAGE" : zeropage
; Horizontal scroll for the map
menu_ScrollValue: .res 1
menu_DrawnSprites: .res 1
menu_LoadedSprites: .res 1
LEVELSELECT_SPRITE_OFFSET = 5 + 12 + 27
tmp_SpriteX: .res 1
tmp_SpriteY: .res 1
tmp_SpriteTile: .res 1
tmp_SpriteFlags: .res 1
tmp_BaseX: .res 1
tmp_BaseY: .res 1
ls_SpritesToLoad: .res 1
; Palette data idx for modem sprites
ls_ModemPal: .res 1
; Pointer to the progression data
ls_LevelProg: .res 2
ls_cursorAnim: .res 1 ; Cursor color animation thing
ls_AttrUpdate: .res 1
ls_AttrUpdate_Clr: .res 1
ls_TmpTracePointer: .res 2
ls_PrevTraceAddr: .res 2
ls_PrevTraceData: .res 1
.segment "MAINRAM"
title_MenuLength: .res 1
title_MenuItems: .res 10
; Level that was just completed. $FF if from title screen.
; Used to determine position in level select.
menu_PrevLevel: .res 1
; Relative to nametable, not current scroll.
ls_SpriteX: .res 32
ls_SpriteY: .res 32
; Bit 7 - Flip Vertically
; Bit 6 - Flip Horizontally
; Bit 5 - Priority
; Bit 4 - unused
; Bit 3 - X coord 9th bit
; Bit 2 - unused
; Bits 0,1 - Palette ID
ls_SpriteFlags: .res 32
; Tile IDs
ls_SpriteTiles: .res 32
; one entry per sprite obj
ls_SpriteFrames: .res 32
ls_SpriteFrameTimer: .res 32
ls_PaletteFrames: .res 16
ls_PaletteFrameTimer: .res 16
ls_PalTmp: .res 4
ls_NumActiveLevels: .res 1 ; number of options available
ls_ActiveLevels: .res 8 ; list of indexes for active level icons
ls_SelectedLevel: .res 1
ls_SelectedLevel_Prev: .res 1
ls_PrevTraceCount: .res 1
ls_PrevTraces: .res 15
; 0 - no text to write
; 1 - Title
; 2 - Line 1
; 3 - Line 2
ls_WriteText: .res 1
SPINNER_DELAY = 50
ls_SpinnerCount: .res 1
ls_SpinnerFlip: .res 1
.popseg