forked from AbleOS/ableos
obliterate redundant code
This commit is contained in:
parent
89e5e2c0ad
commit
507704234f
|
@ -5,7 +5,6 @@ stn := @use("stn")
|
||||||
example := fn(): void {
|
example := fn(): void {
|
||||||
screen := render.init(true)
|
screen := render.init(true)
|
||||||
mouse_pos := stn.math.Vec2(int).(0, 0)
|
mouse_pos := stn.math.Vec2(int).(0, 0)
|
||||||
prev_pos := mouse_pos
|
|
||||||
bg_colour := render.BLACK
|
bg_colour := render.BLACK
|
||||||
pen_colour := render.WHITE
|
pen_colour := render.WHITE
|
||||||
loop {
|
loop {
|
||||||
|
@ -14,8 +13,6 @@ example := fn(): void {
|
||||||
mouse_pos.x = stn.math.clamp(int, mouse_pos.x + mouse.x_change, 10, @bitcast(screen.width) - 10)
|
mouse_pos.x = stn.math.clamp(int, mouse_pos.x + mouse.x_change, 10, @bitcast(screen.width) - 10)
|
||||||
mouse_pos.y = stn.math.clamp(int, mouse_pos.y - mouse.y_change, 10, @bitcast(screen.height) - 10)
|
mouse_pos.y = stn.math.clamp(int, mouse_pos.y - mouse.y_change, 10, @bitcast(screen.height) - 10)
|
||||||
|
|
||||||
prev_pos = mouse_pos
|
|
||||||
|
|
||||||
if mouse.left {
|
if mouse.left {
|
||||||
screen.put_filled_circle(@bitcast(mouse_pos), 10, pen_colour)
|
screen.put_filled_circle(@bitcast(mouse_pos), 10, pen_colour)
|
||||||
} else if mouse.right {
|
} else if mouse.right {
|
||||||
|
|
Loading…
Reference in a new issue