forked from AbleOS/ableos
16 lines
462 B
Plaintext
16 lines
462 B
Plaintext
.{random} := @use("../../../../libraries/stn/src/lib.hb")
|
|
render := @use("../../../../libraries/render/src/lib.hb")
|
|
|
|
example := fn(): void {
|
|
screen := render.init(false)
|
|
render.clear(screen, render.black)
|
|
loop {
|
|
x := random.range(uint, 0, screen.width)
|
|
y := random.range(uint, 0, screen.height)
|
|
r := random.range(u8, 0, 255)
|
|
g := random.range(u8, 0, 75)
|
|
b := random.range(u8, 0, 155)
|
|
render.put_pixel(screen, .(x, y), .(b, g, r, 255))
|
|
}
|
|
return
|
|
} |