mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 08:29:25 +00:00
25 lines
564 B
Lua
25 lines
564 B
Lua
%import math
|
|
%import textio
|
|
%zeropage basicsafe
|
|
|
|
; Note: this program can be compiled for multiple target systems.
|
|
|
|
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++
|
|
}
|
|
}
|
|
}
|