ableos/sysdata/programs/render_example/src/examples/random.hb

17 lines
442 B
Plaintext
Raw Normal View History

2024-09-13 16:41:31 -05:00
.{random} := @use("../../../../libraries/stn/src/lib.hb")
render := @use("../../../../libraries/render/src/lib.hb")
example := fn(): void {
render.init()
render.doublebuffer(false)
render.clear(render.black)
loop {
2024-10-12 15:39:09 -05:00
x := random.range(int, 0, 1024)
y := random.range(int, 0, 768)
r := random.range(int, 0, 255)
g := random.range(int, 0, 75)
b := random.range(int, 0, 155)
2024-09-13 16:41:31 -05:00
render.put_pixel(.(x, y), .(b, g, r, 255))
}
return
}