diff --git a/examples/bdmusic.p8 b/examples/bdmusic.p8 index 1a9619703..f68ecc39f 100644 --- a/examples/bdmusic.p8 +++ b/examples/bdmusic.p8 @@ -16,7 +16,7 @@ sub start() { void c64.CHRIN() c64.CLEARSCR() - while true { + forever { uword note for note in notes { ubyte note1 = lsb(note) diff --git a/examples/compiled/bdmusic-irq.prg b/examples/compiled/bdmusic-irq.prg index 07f420346..837380e3c 100644 Binary files a/examples/compiled/bdmusic-irq.prg and b/examples/compiled/bdmusic-irq.prg differ diff --git a/examples/compiled/bdmusic.prg b/examples/compiled/bdmusic.prg index c360b4ad5..306f56e1f 100644 Binary files a/examples/compiled/bdmusic.prg and b/examples/compiled/bdmusic.prg differ diff --git a/examples/compiled/cube3d-float.prg b/examples/compiled/cube3d-float.prg index 47ed3b890..ee4876a19 100644 Binary files a/examples/compiled/cube3d-float.prg and b/examples/compiled/cube3d-float.prg differ diff --git a/examples/compiled/cube3d-sprites.prg b/examples/compiled/cube3d-sprites.prg index e8ac116b6..ffd6f636c 100644 Binary files a/examples/compiled/cube3d-sprites.prg and b/examples/compiled/cube3d-sprites.prg differ diff --git a/examples/compiled/cube3d.prg b/examples/compiled/cube3d.prg index 22faa9ed1..21cdb5707 100644 Binary files a/examples/compiled/cube3d.prg and b/examples/compiled/cube3d.prg differ diff --git a/examples/compiled/examples.d64 b/examples/compiled/examples.d64 index c32fb3795..8e9d2b1a1 100644 Binary files a/examples/compiled/examples.d64 and b/examples/compiled/examples.d64 differ diff --git a/examples/compiled/fibonacci.prg b/examples/compiled/fibonacci.prg index 7fbebc741..1d27b79ca 100644 Binary files a/examples/compiled/fibonacci.prg and b/examples/compiled/fibonacci.prg differ diff --git a/examples/compiled/hello.prg b/examples/compiled/hello.prg index 3952b2871..e05aef68e 100644 Binary files a/examples/compiled/hello.prg and b/examples/compiled/hello.prg differ diff --git a/examples/compiled/lines-circles.prg b/examples/compiled/lines-circles.prg new file mode 100644 index 000000000..d16e25245 Binary files /dev/null and b/examples/compiled/lines-circles.prg differ diff --git a/examples/compiled/mandelbrot.prg b/examples/compiled/mandelbrot.prg index f0eb19909..fcb35699e 100644 Binary files a/examples/compiled/mandelbrot.prg and b/examples/compiled/mandelbrot.prg differ diff --git a/examples/compiled/numbergame.prg b/examples/compiled/numbergame.prg index 50d0d8dcb..2d3c936df 100644 Binary files a/examples/compiled/numbergame.prg and b/examples/compiled/numbergame.prg differ diff --git a/examples/compiled/primes.prg b/examples/compiled/primes.prg index c9e5b382b..53a6c1829 100644 Binary files a/examples/compiled/primes.prg and b/examples/compiled/primes.prg differ diff --git a/examples/compiled/rasterbars.prg b/examples/compiled/rasterbars.prg index 0d24178cd..2f68c2e9d 100644 Binary files a/examples/compiled/rasterbars.prg and b/examples/compiled/rasterbars.prg differ diff --git a/examples/compiled/sorting.prg b/examples/compiled/sorting.prg index 0a34b46e5..082768825 100644 Binary files a/examples/compiled/sorting.prg and b/examples/compiled/sorting.prg differ diff --git a/examples/compiled/sprites.prg b/examples/compiled/sprites.prg index 23c3a64ee..700fabc0b 100644 Binary files a/examples/compiled/sprites.prg and b/examples/compiled/sprites.prg differ diff --git a/examples/compiled/swirl-float.prg b/examples/compiled/swirl-float.prg index 1e5e2405c..34ab19661 100644 Binary files a/examples/compiled/swirl-float.prg and b/examples/compiled/swirl-float.prg differ diff --git a/examples/compiled/swirl.prg b/examples/compiled/swirl.prg index e7408862b..9c31cdbe2 100644 Binary files a/examples/compiled/swirl.prg and b/examples/compiled/swirl.prg differ diff --git a/examples/compiled/tehtriz.prg b/examples/compiled/tehtriz.prg index 964b6f50b..cdd712e9e 100644 Binary files a/examples/compiled/tehtriz.prg and b/examples/compiled/tehtriz.prg differ diff --git a/examples/compiled/wizzine.prg b/examples/compiled/wizzine.prg index e467f3b89..cafcdfa11 100644 Binary files a/examples/compiled/wizzine.prg and b/examples/compiled/wizzine.prg differ diff --git a/examples/cube3d-float.p8 b/examples/cube3d-float.p8 index 80d3ca067..cac704538 100644 --- a/examples/cube3d-float.p8 +++ b/examples/cube3d-float.p8 @@ -19,7 +19,7 @@ main { sub start() { float time=0.0 - while true { + forever { rotate_vertices(time) c64scr.clear_screenchars(32) draw_edges() @@ -78,7 +78,7 @@ main { for i in 0 to len(xcoor)-1 { rz = rotatedz[i] if rz >= 0.1 { - persp = (5.0+rz)/height + persp = (5.0+rz)/(height as float) sx = rotatedx[i] / persp + width/2.0 as ubyte sy = rotatedy[i] / persp + height/2.0 as ubyte c64scr.setcc(sx, sy, 46, i+2) @@ -88,7 +88,7 @@ main { for i in 0 to len(xcoor)-1 { rz = rotatedz[i] if rz < 0.1 { - persp = (5.0+rz)/height + persp = (5.0+rz)/(height as float) sx = rotatedx[i] / persp + width/2.0 as ubyte sy = rotatedy[i] / persp + height/2.0 as ubyte c64scr.setcc(sx, sy, 81, i+2) diff --git a/examples/cube3d-sprites.p8 b/examples/cube3d-sprites.p8 index e1cf61548..5ca3d9c76 100644 --- a/examples/cube3d-sprites.p8 +++ b/examples/cube3d-sprites.p8 @@ -82,7 +82,7 @@ main { uword angley uword anglez word rz=33 - while true { + forever { c64.TIME_LO=0 rotate_vertices(msb(anglex), msb(angley), msb(anglez)) position_sprites() diff --git a/examples/cube3d.p8 b/examples/cube3d.p8 index 726caeac6..b3f6ba6d6 100644 --- a/examples/cube3d.p8 +++ b/examples/cube3d.p8 @@ -22,7 +22,7 @@ main { uword angley uword anglez word rz=33 - while true { + forever { rotate_vertices(msb(anglex), msb(angley), msb(anglez)) c64scr.clear_screenchars(32) draw_edges() diff --git a/examples/lines_circles.p8 b/examples/lines_circles.p8 index dcc53000e..4b50144bb 100644 --- a/examples/lines_circles.p8 +++ b/examples/lines_circles.p8 @@ -46,7 +46,7 @@ main { if dx >= dy { ; TODO fix assembler problem when defining label here - while true { + forever { c64scr.setcc(x, y, 42, 5) if x==x2 return @@ -59,7 +59,7 @@ main { } } else { ; TODO fix assembler problem when defining label here - while true { + forever { c64scr.setcc(x, y, 42, 5) if y == y2 return diff --git a/examples/primes.p8 b/examples/primes.p8 index 3cfb65436..45058c20c 100644 --- a/examples/primes.p8 +++ b/examples/primes.p8 @@ -12,7 +12,7 @@ main { ; calculate primes c64scr.print("prime numbers up to 255:\n\n") ubyte amount=0 - while true { + forever { ubyte prime = find_next_prime() if prime==0 break diff --git a/examples/rasterbars.p8 b/examples/rasterbars.p8 index 6ce48044b..2ad195977 100644 --- a/examples/rasterbars.p8 +++ b/examples/rasterbars.p8 @@ -8,7 +8,7 @@ main { c64.SCROLY &= %11101111 ; blank the screen c64utils.set_rasterirq_excl(40) ; register exclusive raster irq handler - while true { + forever { ; enjoy the moving bars :) } diff --git a/examples/swirl-float.p8 b/examples/swirl-float.p8 index f50d547b8..2958e61cf 100644 --- a/examples/swirl-float.p8 +++ b/examples/swirl-float.p8 @@ -11,7 +11,7 @@ main { float t ubyte color - while true { + forever { float x = sin(t) float y = cos(t*1.1356) ubyte xx=(x * width/2.2) + width/2.0 as ubyte diff --git a/examples/swirl.p8 b/examples/swirl.p8 index f7d6dcdc6..a6f639bee 100644 --- a/examples/swirl.p8 +++ b/examples/swirl.p8 @@ -15,7 +15,7 @@ main { Ball ball - while true { + forever { 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)