add first iteration font and print functions

This commit is contained in:
2021-12-01 09:08:21 +01:00
parent 8695a222f0
commit 1cc480cd48
12 changed files with 232 additions and 11 deletions

View File

@@ -6,6 +6,7 @@ import "env.isButtonPressed" fn btn(i32) -> i32;
import "env.random" fn random() -> i32;
import "env.randomSeed" fn randomSeed(i32);
import "env.cls" fn cls(i32);
import "env.printInt" fn printInt(i32);
global mut pz: i32 = 4;
global mut px: f32 = 2.0;
@@ -21,6 +22,8 @@ export fn upd() {
s = s + 0.1 - (f + control_speed) * btn(4 <| cls(4)) as f32;
f = f * 0.7;
printInt(pz);
loop lines {
let lazy z = (4000 / (y := y + 1) + pz) / 20;
let lazy x = px - ({randomSeed(z); random()} >> 30) as f32;
@@ -57,4 +60,4 @@ export fn upd() {
px = px + (btn(3) - btn(2)) as f32 * control_speed;
py = py + s;
pz = pz + 1;
}
}