-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvoxelsheep.asm
80 lines (77 loc) · 1.52 KB
/
voxelsheep.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
copysheep
ldx sheepgfxaddr
ldy #$460
clr xcnt
clr ycnt
copysheeplp
lda ,x+
sta ,y
leay 1,y
inc xcnt
lda xcnt
cmpa #16
bne copysheeplp
leay 48,y
clr xcnt
inc ycnt
lda ycnt
cmpa #12
bne copysheeplp
rts
copysheepscrn
ldx #$4A0
ldy #$4B0
clr xcnt
clr ycnt
copysheepscrnlp
ldd ,x++
std ,y++
inc xcnt
lda xcnt
cmpa #24
bne copysheepscrnlp
clr xcnt
inc ycnt
leax 16,x
leay 16,y
lda ycnt
cmpa #12
bne copysheepscrnlp
rts
sheepmain
lda vscnt
cmpa #15
bne skipsheep
clr vscnt
inc sceneval
bra sheepend
skipsheep
lda sheepflag
cmpa #0
beq dosheep
jsr sheepinit
dosheep
jsr copysheepscrn
inc vscnt2
lda vscnt2
cmpa #2
bne sheepend
clr vscnt2
jsr copysheep
ldx sheepgfxaddr
leax 192,x
cmpx #sheepgfxend-32
bne skipgfxreset
ldx #sheepgfx
stx sheepgfxaddr
skipgfxreset
stx sheepgfxaddr
sheepend
rts
sheepgfx
;includebin "voxel/sheeplong1.bin"
;includebin "voxel/sheeplong2.bin"
;includebin "voxel/sheeplong3.bin"
includebin "voxel/sheep5.bin"
;includebin "voxel/sheep6.bin"
sheepgfxend