1
0
Fork 0
forked from AbleOS/ableos
This commit is contained in:
Able 2024-10-16 07:34:19 -05:00
parent 6ff65eee41
commit fac573837f
2 changed files with 5 additions and 4 deletions

View file

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

View file

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