2020-08-27 16:10:22 +00:00
|
|
|
%import c64textio
|
2019-01-05 15:09:05 +00:00
|
|
|
%import c64flt
|
2019-01-05 01:42:58 +00:00
|
|
|
|
2019-07-29 21:11:13 +00:00
|
|
|
main {
|
2019-01-05 01:42:58 +00:00
|
|
|
|
|
|
|
const uword width = 40
|
|
|
|
const uword height = 25
|
|
|
|
|
2020-08-31 19:01:18 +00:00
|
|
|
struct Ball {
|
2019-01-05 01:42:58 +00:00
|
|
|
float t
|
|
|
|
ubyte color
|
2020-08-31 19:01:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub start() {
|
|
|
|
|
|
|
|
Ball ball
|
2019-01-05 01:42:58 +00:00
|
|
|
|
2020-07-25 14:25:02 +00:00
|
|
|
repeat {
|
2020-08-31 19:01:18 +00:00
|
|
|
ubyte xx=(sin(ball.t) * width/2.1) + width/2.0 as ubyte
|
|
|
|
ubyte yy=(cos(ball.t*1.1356) * height/2.1) + height/2.0 as ubyte
|
|
|
|
txt.setcc(xx, yy, 81, ball.color)
|
|
|
|
ball.t += 0.08
|
|
|
|
ball.color++
|
2019-01-05 01:42:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|