add support for +:= etc.

This commit is contained in:
2022-05-07 23:51:25 +02:00
parent 01d64baaab
commit 2cf47085c1
2 changed files with 65 additions and 38 deletions

View File

@@ -1,15 +1,16 @@
import "env.memory" memory(2);
import "env.time" fn time() -> f32;
export fn tic(time: i32) {
export fn upd() {
let i: i32;
loop pixels {
let lazy x = (i % 320) as f32 - 160.1;
let lazy y = (i / 320 - 120) as f32;
let lazy dist = 10000.0 / (x*x + y*y);
let lazy t = time as f32 / 20 as f32;
let lazy dist = 1024_f / (x*x + y*y);
let inline t = time() * 4_f;
i?120 = (x * dist + t) as i32 ^ (y * dist + t) as i32;
i?120 = (x * dist + t) as i32 ^ (y * dist + t) as i32 | -32;
branch_if (i := i + 1) < 320*240: pixels
branch_if (i +:= 1) < 320*240: pixels
}
}