prog8/examples/swirl.p8

25 lines
444 B
Plaintext
Raw Normal View History

%import c64utils
2018-09-30 23:01:39 +00:00
~ main {
const uword width = 40
const uword height = 25
2018-09-30 23:01:39 +00:00
sub start() {
uword anglex
uword angley
2018-10-10 07:21:20 +00:00
ubyte color
2018-09-30 23:01:39 +00:00
while true {
ubyte x = msb(sin8u(msb(anglex)) as uword * width)
ubyte y = msb(cos8u(msb(angley)) as uword * height)
c64scr.setcc(x, y, 81, color)
anglex+=800
angley+=947
2018-09-30 23:01:39 +00:00
color++
}
}
}