2018-10-21 21:03:15 +00:00
|
|
|
%import c64utils
|
2018-09-30 23:01:39 +00:00
|
|
|
|
2019-07-29 21:11:13 +00:00
|
|
|
main {
|
2018-09-30 23:01:39 +00:00
|
|
|
|
2019-01-08 00:27:25 +00:00
|
|
|
const uword width = 40
|
|
|
|
const uword height = 25
|
2018-10-02 20:52:05 +00:00
|
|
|
|
2019-07-12 17:01:36 +00:00
|
|
|
struct Ball {
|
2019-01-08 00:27:25 +00:00
|
|
|
uword anglex
|
|
|
|
uword angley
|
2018-10-10 07:21:20 +00:00
|
|
|
ubyte color
|
2019-07-12 17:01:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub start() {
|
|
|
|
|
|
|
|
Ball ball
|
2018-09-30 23:01:39 +00:00
|
|
|
|
2018-12-19 01:51:22 +00:00
|
|
|
while true {
|
2019-07-12 17:01:36 +00:00
|
|
|
ubyte x = msb(sin8u(msb(ball.anglex)) as uword * width)
|
|
|
|
ubyte y = msb(cos8u(msb(ball.angley)) as uword * height)
|
|
|
|
c64scr.setcc(x, y, 81, ball.color)
|
2019-01-08 00:27:25 +00:00
|
|
|
|
2019-07-12 17:01:36 +00:00
|
|
|
ball.anglex+=800
|
|
|
|
ball.angley+=947
|
|
|
|
ball.color++
|
2018-09-30 23:01:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|