2020-09-20 23:49:36 +02:00
|
|
|
%import textio
|
|
|
|
%import floats
|
|
|
|
%zeropage floatsafe
|
2019-01-05 02:42:58 +01:00
|
|
|
|
2020-09-20 23:49:36 +02:00
|
|
|
; Note: this program is compatible with C64 and CX16.
|
2019-01-05 02:42:58 +01:00
|
|
|
|
2020-09-20 23:49:36 +02:00
|
|
|
main {
|
2019-01-05 02:42:58 +01:00
|
|
|
|
2020-08-31 21:01:18 +02:00
|
|
|
sub start() {
|
|
|
|
|
2021-04-29 00:01:20 +02:00
|
|
|
float ball_t
|
|
|
|
ubyte ball_color
|
2019-01-05 02:42:58 +01:00
|
|
|
|
2020-07-25 16:25:02 +02:00
|
|
|
repeat {
|
2022-04-22 00:45:54 +02:00
|
|
|
ubyte xx=(floats.sin(ball_t) * txt.DEFAULT_WIDTH/2.1) + txt.DEFAULT_WIDTH/2.0 as ubyte
|
|
|
|
ubyte yy=(floats.cos(ball_t*1.1356) * txt.DEFAULT_HEIGHT/2.1) + txt.DEFAULT_HEIGHT/2.0 as ubyte
|
2021-04-29 00:01:20 +02:00
|
|
|
txt.setcc(xx, yy, 81, ball_color)
|
|
|
|
ball_t += 0.08
|
|
|
|
ball_color++
|
2019-01-05 02:42:58 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|