2020-09-20 21:49:36 +00:00
|
|
|
%import textio
|
|
|
|
%import floats
|
|
|
|
%zeropage floatsafe
|
2019-01-05 01:42:58 +00:00
|
|
|
|
2020-09-20 21:49:36 +00:00
|
|
|
; Note: this program is compatible with C64 and CX16.
|
2019-01-05 01:42:58 +00:00
|
|
|
|
2020-09-20 21:49:36 +00:00
|
|
|
main {
|
2019-01-05 01:42:58 +00:00
|
|
|
|
2020-08-31 19:01:18 +00:00
|
|
|
sub start() {
|
|
|
|
|
2021-04-28 22:01:20 +00:00
|
|
|
float ball_t
|
|
|
|
ubyte ball_color
|
2019-01-05 01:42:58 +00:00
|
|
|
|
2020-07-25 14:25:02 +00:00
|
|
|
repeat {
|
2021-04-28 22:01:20 +00:00
|
|
|
ubyte xx=(sin(ball_t) * txt.DEFAULT_WIDTH/2.1) + txt.DEFAULT_WIDTH/2.0 as ubyte
|
|
|
|
ubyte yy=(cos(ball_t*1.1356) * txt.DEFAULT_HEIGHT/2.1) + txt.DEFAULT_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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|