2020-08-27 18:10:22 +02:00
|
|
|
%import c64textio
|
2019-01-05 16:09:05 +01:00
|
|
|
%import c64flt
|
2019-01-05 02:42:58 +01:00
|
|
|
|
2019-07-29 23:11:13 +02:00
|
|
|
main {
|
2019-01-05 02:42:58 +01:00
|
|
|
|
|
|
|
const uword width = 40
|
|
|
|
const uword height = 25
|
|
|
|
|
2020-08-31 21:01:18 +02:00
|
|
|
struct Ball {
|
2019-01-05 02:42:58 +01:00
|
|
|
float t
|
|
|
|
ubyte color
|
2020-08-31 21:01:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
sub start() {
|
|
|
|
|
|
|
|
Ball ball
|
2019-01-05 02:42:58 +01:00
|
|
|
|
2020-07-25 16:25:02 +02:00
|
|
|
repeat {
|
2020-08-31 21:01:18 +02: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 02:42:58 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|