-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcharset10.s
90 lines (81 loc) · 2.39 KB
/
charset10.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
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
processor 6502
include memory.s
include mainsym.s
org lvlCodeStart
UpdateLevel: inc bgDelay
lda bgDelay
tay
and #$07
bne UL_SkipWater1
tax
jsr UL_ScrollWaterSub
lda chars+102*8
pha
UL_ScrollBubbles:
lda chars+102*8+1,x
sta chars+102*8,x
inx
cpx #$06
bcc UL_ScrollBubbles
pla
sta chars+102*8+6
UL_SkipWater1: tya
and #$0f
bne UL_SkipWater2
ldx #$02
jsr UL_ScrollWaterSub
UL_SkipWater2: tya
and #$1f
bne ULSkipCursor
lda chars+178*8+6
eor #%00100000
sta chars+178*8+6
ULSkipCursor: tya
and #$03
bne ULSkipLights
tax
inc ULRandom+1
ULRandom: lda randomAreaStart
pha
jsr ULLightSub
pla
lsr
lsr
pha
ldx #$08
jsr ULLightSub
pla
lsr
lsr
ldx #$10
ULLightSub: and #$03
tay
lda lightTbl,y
sta chars+238*8+2,x
ULSkipLights: rts
UL_ScrollWaterSub:
lda chars+101*8,x
asl
rol chars+100*8,x
adc #$00
asl
rol chars+100*8,x
adc #$00
sta chars+101*8,x
lda chars+100*8,x
sta chars+103*8,x
rts
bgDelay: dc.b 0
lightTbl: dc.b %00010001
dc.b %00010011
dc.b %00110001
dc.b %00110011
org charInfo
incbin bg/world10.chi
incbin bg/world10.chc
org chars
incbin bg/world10.chr
org charsetLoadProperties
dc.b 5 ;Water splash color override
dc.b 10+$80 ;Water toxicity delay counter ($80=not affected by filter)
dc.b 30 ;Air toxicity delay counter