-
Notifications
You must be signed in to change notification settings - Fork 10
/
charset06.s
61 lines (52 loc) · 1.67 KB
/
charset06.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
51
52
53
54
55
56
57
58
59
60
61
processor 6502
include memory.s
include mainsym.s
org lvlCodeStart
UpdateLevel: inc bgAnimDelay
lda bgAnimDelay
and #$03
bne ULSkipFlash
ldx bgAnimIndex
lda randomAreaStart,x
jsr BgAnimSub
sta chars+96*8+5
lda randomAreaStart,x
lsr
lsr
jsr BgAnimSub
sta chars+99*8+1
lda randomAreaStart,x
lsr
lsr
lsr
lsr
jsr BgAnimSub
sta chars+99*8+5
inx
stx bgAnimIndex
ULSkipFlash: lda bgAnimDelay
and #$1f
bne ULSkipCursor
lda chars+226*8+1
eor #%00110000
sta chars+226*8+1
ULSkipCursor: rts
BgAnimSub: and #$03
tay
lda lightTbl,y
rts
lightTbl: dc.b %01010110
dc.b %01011110
dc.b %11010110
dc.b %11011110
bgAnimDelay: dc.b 0
bgAnimIndex: dc.b 0
org charInfo
incbin bg/world06.chi
incbin bg/world06.chc
org chars
incbin bg/world06.chr
org charsetLoadProperties
dc.b 0 ;Water splash color override
dc.b 0 ;Water toxicity delay counter ($80=not affected by filter)
dc.b 0 ;Air toxicity delay counter