-
Notifications
You must be signed in to change notification settings - Fork 10
/
charset07.s
50 lines (43 loc) · 1.5 KB
/
charset07.s
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
processor 6502
include memory.s
include mainsym.s
org lvlCodeStart
UpdateLevel: inc animDelay
lda animDelay
and #$07
bne SkipMonitor
ldx #$00
ScrollMonitor: lda chars+216*8+1,x
sta chars+216*8,x
lda chars+217*8+1,x
sta chars+217*8,x
inx
cpx #$07
bcc ScrollMonitor
lda animDelay
and #$08
beq EmptyRow
inc randomIndex
ldx randomIndex
lda randomAreaStart,x
ora #%10101010
sta chars+216*8+7
lda randomAreaStart+$100,x
ora #%10101010
sta chars+217*8+7
SkipMonitor: rts
EmptyRow: lda #$ff
sta chars+216*8+7
sta chars+217*8+7
rts
animDelay: dc.b 0
randomIndex: dc.b 0
org charInfo
incbin bg/world07.chi
incbin bg/world07.chc
org chars
incbin bg/world07.chr
org charsetLoadProperties
dc.b 0 ;Water splash color override
dc.b 0 ;Water toxicity delay counter ($80=not affected by filter)
dc.b 20+$80 ;Air toxicity delay counter ($80=not affected by filter)