diff options
| author | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-05-09 18:38:21 -0700 |
|---|---|---|
| committer | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-05-09 18:38:21 -0700 |
| commit | eb9466c8d3d18d65eb4bab2f6770f55cba9d8de3 (patch) | |
| tree | bd2c49b56d9a4bdc30e3aec5ad0b3139b398c566 /util.lua | |
| parent | 78fd742b1e276aec3eb1e939542ef51c3231b060 (diff) | |
| download | dyl8-eb9466c8d3d18d65eb4bab2f6770f55cba9d8de3.tar.gz dyl8-eb9466c8d3d18d65eb4bab2f6770f55cba9d8de3.zip | |
Adding a simple grid-based camera
Diffstat (limited to 'util.lua')
| -rw-r--r-- | util.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,9 @@ update_hooks = {} +function AddUpdateHook(f) + update_hooks[#update_hooks + 1] = f +end + -- https://pico-8.fandom.com/wiki/Qsort function qsort(a, c, l, r) c, l, r = c or function(a, b) return a < b end, l or 1, r or #a @@ -99,7 +103,7 @@ function _update_button_states(_dt) end end end -update_hooks[1] = _update_button_states +AddUpdateHook(_update_button_states) function button_just_pressed(id) return _button_states[id] == "just_pressed" end
\ No newline at end of file |
