Attached input handling and timer decrements.

This commit is contained in:
2026-05-28 07:03:59 +02:00
parent 380dffbf83
commit 11ef572634
+4
View File
@@ -23,8 +23,11 @@ run_system :: proc(s: ^System) {
// Do a cpu cycle
// Cap at 60hz/60fps
for _ in 0..<CYCLES_PER_FRAME {
handle_input(s)
cycle(s)
}
if s.delay_timer > 0 { s.delay_timer -= 1 }
if s.sound_timer > 0 { s.sound_timer -= 1 }
render_display_buffer(&s.display)
@@ -34,6 +37,7 @@ run_system :: proc(s: ^System) {
rl.CloseWindow()
}
// update display with display buffer bits
render_display_buffer :: proc(display_buffer: ^[32][64]u8) {
// get row