forked from AbleOS/ableos
23 lines
563 B
Plaintext
23 lines
563 B
Plaintext
|
.{Vec2, sin, cos} := @use("../../../../libraries/stn/src/lib.hb").math
|
||
|
render := @use("../../../../libraries/render/src/lib.hb")
|
||
|
|
||
|
/* expected result:
|
||
|
words */
|
||
|
|
||
|
psf := @embed("../../../../consolefonts/tamsyn/10x20r.psf")
|
||
|
|
||
|
example := fn(): void {
|
||
|
screen := render.init(true)
|
||
|
font := render.text.font_from_psf2(@bitcast(&psf))
|
||
|
t := 0
|
||
|
str := "Hello, World!
|
||
|
This is a test
|
||
|
of multiline rendering\0"
|
||
|
loop {
|
||
|
render.clear(screen, render.black)
|
||
|
render.put_text(screen, font, .(t, t % screen.height), render.red, str)
|
||
|
render.sync(screen)
|
||
|
t += 1
|
||
|
}
|
||
|
return
|
||
|
}
|