add red crosshair to worldgen demo

This commit is contained in:
asrael 2025-11-20 10:24:33 -06:00
parent 59be43d80e
commit 25038d3ec0

View file

@ -185,6 +185,13 @@
(pxl8.world_render world [cam-x eye-y cam-z]) (pxl8.world_render world [cam-x eye-y cam-z])
(let [cx (/ (pxl8.get_width) 2)
cy (/ (pxl8.get_height) 2)
crosshair-size 4
red-color 18]
(pxl8.line (- cx crosshair-size) cy (+ cx crosshair-size) cy red-color)
(pxl8.line cx (- cy crosshair-size) cx (+ cy crosshair-size) red-color))
(pxl8.text (.. "fps: " (string.format "%.1f" (pxl8.get_fps))) 5 5 12) (pxl8.text (.. "fps: " (string.format "%.1f" (pxl8.get_fps))) 5 5 12)
(pxl8.text (.. "pos: " (string.format "%.0f" cam-x) "," (pxl8.text (.. "pos: " (string.format "%.0f" cam-x) ","
(string.format "%.0f" cam-y) "," (string.format "%.0f" cam-y) ","