prog8/examples/test.p8

28 lines
796 B
Plaintext
Raw Normal View History

2024-03-03 21:35:54 +00:00
%import math
2024-03-03 20:47:42 +00:00
%import monogfx
main {
sub start() {
monogfx.hires()
2024-03-03 21:35:54 +00:00
monogfx.drawmode(monogfx.MODE_INVERT)
ubyte tt
2024-03-03 21:35:54 +00:00
repeat {
ubyte tts=tt
word x1 = math.sin8(tts)
word y1 = math.cos8(tts)
tts += 256/3
word x2 = math.sin8(tts)
word y2 = math.cos8(tts)
tts += 256/3
word x3 = math.sin8(tts)
word y3 = math.cos8(tts)
monogfx.line(320+x1*2 as uword, 240+y1 as uword, 320+x2 as uword, 240+y2 as uword, true)
monogfx.line(320+x2*2 as uword, 240+y2 as uword, 320+x3 as uword, 240+y3 as uword, true)
monogfx.line(320+x3*2 as uword, 240+y3 as uword, 320+x1 as uword, 240+y1 as uword, true)
tt++
2024-03-03 21:35:54 +00:00
}
2024-03-01 18:45:16 +00:00
}
}