mirror of
https://github.com/irmen/prog8.git
synced 2024-08-26 15:29:46 +00:00
25 lines
552 B
Lua
25 lines
552 B
Lua
%import math
|
|
%import textio
|
|
%zeropage basicsafe
|
|
|
|
; Note: this program is compatible with C64 and CX16.
|
|
|
|
main {
|
|
const uword screenwidth = txt.DEFAULT_WIDTH
|
|
const uword screenheight = txt.DEFAULT_HEIGHT
|
|
uword anglex
|
|
uword angley
|
|
ubyte color
|
|
|
|
sub start() {
|
|
repeat {
|
|
ubyte x = msb(math.sin8u(msb(anglex)) * screenwidth)
|
|
ubyte y = msb(math.cos8u(msb(angley)) * screenheight)
|
|
txt.setcc(x, y, 81, color)
|
|
anglex+=366
|
|
angley+=291
|
|
color++
|
|
}
|
|
}
|
|
}
|