mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 11:16:42 +01:00
update curlywas, use 'include "microw8-api.cwa"' in examples
This commit is contained in:
@@ -1,11 +1,4 @@
|
||||
import "env.time" fn time() -> f32;
|
||||
import "env.circle" fn circle(f32, f32, f32, i32);
|
||||
import "env.cls" fn cls(i32);
|
||||
import "env.randomSeed" fn seed(i32);
|
||||
import "env.randomf" fn randomf() -> f32;
|
||||
import "env.sin" fn sin(f32) -> f32;
|
||||
import "env.cos" fn cos(f32) -> f32;
|
||||
import "env.fmod" fn fmod(f32, f32) -> f32;
|
||||
include "microw8-api.cwa"
|
||||
|
||||
export fn upd() {
|
||||
cls(0);
|
||||
@@ -15,10 +8,10 @@ export fn upd() {
|
||||
let inline rocket = i #>> 9;
|
||||
let lazy local_time = fmod(time() + rocket as f32 / 5 as f32, 2 as f32);
|
||||
let lazy rocket = rocket + nearest(time() - local_time) as i32 * 10;
|
||||
seed(rocket);
|
||||
randomSeed(rocket);
|
||||
let inline x = randomf() * 645 as f32;
|
||||
let y = randomf() * 133 as f32;
|
||||
let lazy angle = { seed(i); randomf() } * 44 as f32;
|
||||
let lazy angle = { randomSeed(i); randomf() } * 44 as f32;
|
||||
let inline dx = sin(angle);
|
||||
let inline dy = cos(angle);
|
||||
let lazy dist = local_time * (randomf() * 44 as f32);
|
||||
|
||||
Reference in New Issue
Block a user