mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 19:26:43 +01:00
add first iteration font and print functions
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user