1
0
Fork 0
forked from AbleOS/ableos
This commit is contained in:
peony 2024-10-25 16:28:45 +02:00
commit 223a1c15ad
2 changed files with 5 additions and 4 deletions

View file

@ -50,7 +50,7 @@ main := fn(): int {
vel_inner.x = -vel_inner.x
color = random.range(render.Color, render.black, render.white)
}
if pos_inner.y == 0 | pos_inner.y == window.height - side {
if pos_inner.y == 20 | pos_inner.y == window.height - side {
vel_inner.y = -vel_inner.y
color = random.range(render.Color, render.black, render.white)
}
@ -59,11 +59,12 @@ main := fn(): int {
window_count := 0
loop {
render.clear(window, render.black)
render.put_rect(screen, .(0, 0), .(screen.width - 1, screen.height - 1), render.white)
// Draw the decorators
{
render.put_rect(window, .(0, 0), .(window.width - 1, window.height - 1), render.white)
// render.put_rect(window, .(0, 0), .(window.width - 1, 20), render.white)
render.put_rect(window, .(0, 0), .(window.width - 1, 20), render.white)
}
render.put_filled_rect(window, pos_inner, .(side, side), color)

View file

@ -55,8 +55,8 @@ example := fn(): void {
y += cell_size
}
render.put_hline(screen, seeker.y * cell_size + halfcell + scroll, 0, width, render.light_green)
render.put_vline(screen, seeker.x * cell_size + halfcell + scroll, 0, height, render.light_green)
render.put_hline(screen, seeker.y * cell_size + halfcell + scroll, 0, width, render.blue)
render.put_vline(screen, seeker.x * cell_size + halfcell + scroll, 0, height, render.blue)
render.sync(screen)