2019-01-20 16:45:57 +00:00
|
|
|
%output raw
|
|
|
|
%launcher none
|
2019-01-08 00:27:25 +00:00
|
|
|
%import c64flt
|
|
|
|
|
2019-07-29 21:11:13 +00:00
|
|
|
main {
|
2019-01-08 00:27:25 +00:00
|
|
|
|
|
|
|
const uword width = 320
|
|
|
|
const uword height = 200
|
|
|
|
|
|
|
|
sub start() {
|
|
|
|
|
|
|
|
vm_gfx_clearscr(0)
|
|
|
|
|
|
|
|
float t
|
|
|
|
ubyte color
|
|
|
|
|
|
|
|
while true {
|
|
|
|
float x = sin(t*1.01) + cos(t*1.1234)
|
|
|
|
float y = cos(t) + sin(t*0.03456)
|
2019-01-09 21:01:47 +00:00
|
|
|
vm_gfx_pixel(screenx(x), screeny(y), color/16)
|
2019-01-08 00:27:25 +00:00
|
|
|
t += 0.01
|
|
|
|
color++
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sub screenx(float x) -> word {
|
2019-01-15 20:35:15 +00:00
|
|
|
return (x*width/4.1) + width / 2.0 as word
|
2019-01-08 00:27:25 +00:00
|
|
|
}
|
|
|
|
sub screeny(float y) -> word {
|
2019-01-15 20:35:15 +00:00
|
|
|
return (y*height/4.1) + height / 2.0 as word
|
2019-01-08 00:27:25 +00:00
|
|
|
}
|
|
|
|
}
|