true 16-bit color... glorious
This commit is contained in:
parent
3dccce8a81
commit
b1e8525c3e
30 changed files with 678 additions and 652 deletions
|
|
@ -3,6 +3,7 @@
|
|||
(var world nil)
|
||||
|
||||
(var auto-run? false)
|
||||
(var auto-run-cancel-key nil)
|
||||
(var cam-pitch 0)
|
||||
(var cam-x 1000)
|
||||
(var cam-y 64)
|
||||
|
|
@ -77,7 +78,15 @@
|
|||
|
||||
(fn update [dt]
|
||||
(when (pxl8.key_pressed "`")
|
||||
(set auto-run? (not auto-run?)))
|
||||
(set auto-run? (not auto-run?))
|
||||
(when (and auto-run? (pxl8.key_down "w"))
|
||||
(set auto-run-cancel-key "w")))
|
||||
(when (and auto-run? (not auto-run-cancel-key) (or (pxl8.key_down "w") (pxl8.key_down "s")))
|
||||
(set auto-run? false)
|
||||
(when (pxl8.key_down "s")
|
||||
(set auto-run-cancel-key "s")))
|
||||
(when (and auto-run-cancel-key (not (pxl8.key_down auto-run-cancel-key)))
|
||||
(set auto-run-cancel-key nil))
|
||||
|
||||
(when (pxl8.world_is_loaded world)
|
||||
(let [forward-x (- (math.sin cam-yaw))
|
||||
|
|
@ -94,7 +103,7 @@
|
|||
(when (or (pxl8.key_down "w") auto-run?)
|
||||
(set move-forward (+ move-forward 1)))
|
||||
|
||||
(when (pxl8.key_down "s")
|
||||
(when (and (pxl8.key_down "s") (not= auto-run-cancel-key "s"))
|
||||
(set move-forward (- move-forward 1)))
|
||||
|
||||
(when (pxl8.key_down "a")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue