-
Notifications
You must be signed in to change notification settings - Fork 0
/
_infoscreen.asm
217 lines (175 loc) · 5.88 KB
/
_infoscreen.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
////////////////////////////////////////////////////////////////////////////////
//
// Project : ForestSaver - https://github.com/intoinside/ForestSaver
// Target : Commodore 64
// Author : Raffaele Intorcia - raffaele.intorcia@gmail.com
//
// Manager for informative screen.
//
////////////////////////////////////////////////////////////////////////////////
#importonce
.filenamespace InfoScreen
Handler: {
CopyScreenRam(ScreenMemoryBaseAddress, MapDummyArea)
ClearScreen(ScreenMemoryBaseAddress)
lda #RED
sta c64lib.BORDER_COL
sta c64lib.BG_COL_0
lda #SPRITES.RANGER_STANDING
sta SPRITE_0
ldy #$58
sty c64lib.SPRITE_0_Y
lda #SPRITES.ENEMY_STANDING
sta SPRITE_1
ldy #$70
sty c64lib.SPRITE_1_Y
lda #SPRITES.TANK_BODY_LE
sta SPRITE_2
lda #SPRITES.TANK_TAIL_LE
sta SPRITE_3
ldy #$8c
sty c64lib.SPRITE_2_Y
sty c64lib.SPRITE_3_Y
lda #SPRITES.ARSIONIST_FRONT
sta SPRITE_4
ldy #$a0
sty c64lib.SPRITE_4_Y
ldx #$30
stx c64lib.SPRITE_0_X
stx c64lib.SPRITE_1_X
stx c64lib.SPRITE_2_X
stx c64lib.SPRITE_4_X
ldx #$45
stx c64lib.SPRITE_3_X
lda #0
sta c64lib.SPRITE_MSB_X
lda #YELLOW
sta c64lib.SPRITE_0_COLOR
lda #ORANGE
sta c64lib.SPRITE_1_COLOR
sta c64lib.SPRITE_4_COLOR
lda #WHITE
sta c64lib.SPRITE_2_COLOR
sta c64lib.SPRITE_3_COLOR
EnableMultiSprite(%01111111, true)
// Draw text instruction
ldx #Title1LabelLen
!:
lda Title1Label, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(2, 1), x
dex
bne !-
ldx #Title2LabelLen
!:
lda Title2Label, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(2, 2), x
dex
bne !-
ldx #Title3LabelLen
!:
lda Title3Label, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(2, 3), x
dex
bne !-
ldx #RangerLabelLen
!:
lda RangerLabel, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(10, 6), x
dex
bne !-
ldx #WoodcutterLabelLen
!:
lda WoodcutterLabel, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(10, 9), x
dex
bne !-
ldx #TankLabelLen
!:
lda TankLabel, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(10, 12), x
dex
bne !-
ldx #ArsionistLabelLen
!:
lda ArsionistLabel, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(10, 15), x
dex
bne !-
ldx #FireLabelLen
!:
lda FireLabel, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(2, 20), x
dex
bne !-
ldx #Fire2LabelLen
!:
lda Fire2Label, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(8, 21), x
dex
bne !-
ldx #Fire3LabelLen
!:
lda Fire3Label, x
sta ScreenMemoryBaseAddress + c64lib_getTextOffset(2, 23), x
dex
bne !-
SetupColorMap($40)
!:
IsBackArrowPressed()
beq !-
jsr DisableAllSprites
CopyScreenRam(MapDummyArea, ScreenMemoryBaseAddress)
rts
.label Title1LabelLen = 30
Title1Label: .byte $00, $0e, $10, $17, $06, $00, $13, $02, $0f, $08
.byte $06, $13, $00, $02, $04, $13, $10, $14, $14, $00
.byte $15, $09, $06, $00, $14, $04, $13, $06, $06, $0f
.byte $26
.label Title2LabelLen = 32
Title2Label: .byte $00, $13, $06, $02, $04, $09, $00, $1a, $10, $16
.byte $13, $00, $06, $0f, $06, $0e, $0a, $06, $14, $00
.byte $02, $0f, $05, $00, $07, $0a, $0f, $06, $00, $15
.byte $09, $06, $0e
.label Title3LabelLen = 20
Title3Label: .byte $00, $02, $14, $00, $14, $10, $10, $0f, $00, $02
.byte $14, $00, $11, $10, $14, $14, $0a, $03, $0d, $06
.byte $28
.label RangerLabelLen = 11
RangerLabel: .byte $00, $1a, $10, $16, $13, $00, $13, $02, $0f, $08
.byte $06, $13
.label WoodcutterLabelLen = 24
WoodcutterLabel: .byte $00, $2c, $2a, $00, $11, $10, $0a, $0f, $15, $14
.byte $00, $07, $10, $13, $00, $18, $10, $10, $05, $04
.byte $16, $15, $15, $06, $13
.label TankLabelLen = 18
TankLabel: .byte $00, $2f, $2a, $00, $11, $10, $0a, $0f, $15, $14
.byte $00, $07, $10, $13, $00, $15, $02, $0f, $0c
.label ArsionistLabelLen = 23
ArsionistLabel: .byte $00, $30, $2a, $00, $11, $10, $0a, $0f, $15, $14
.byte $00, $07, $10, $13, $00, $02, $13, $14, $0a, $10
.byte $0f, $0a, $14, $15
.label FireLabelLen = 32
FireLabel: .byte $00, $07, $0a, $13, $06, $00, $00, $13, $02, $0f
.byte $08, $06, $13, $00, $08, $10, $00, $02, $04, $13
.byte $10, $14, $14, $00, $10, $03, $14, $15, $02, $04
.byte $0d, $06, $14
.label Fire2LabelLen = 17
Fire2Label: .byte $00, $22, $11, $10, $0a, $0f, $15, $14, $00, $13
.byte $06, $12, $16, $0a, $13, $06, $05, $23
.label Fire3LabelLen = 19
Fire3Label: .byte $00, $1d, $00, $00, $00, $00, $00, $03, $02, $04
.byte $0c, $00, $15, $10, $00, $0a, $0f, $15, $13, $10
.label ScreenMemoryBaseAddress = $4000
.label SPRITE_0 = ScreenMemoryBaseAddress + $3f8
.label SPRITE_1 = ScreenMemoryBaseAddress + $3f9
.label SPRITE_2 = ScreenMemoryBaseAddress + $3fa
.label SPRITE_3 = ScreenMemoryBaseAddress + $3fb
.label SPRITE_4 = ScreenMemoryBaseAddress + $3fc
.label SPRITE_5 = ScreenMemoryBaseAddress + $3fd
.label SPRITE_6 = ScreenMemoryBaseAddress + $3fe
.label SPRITE_7 = ScreenMemoryBaseAddress + $3ff
}
#import "_utils.asm"
#import "_label.asm"
#import "_keyboard.asm"
#import "chipset/lib/vic2-global.asm"