Attached input handling and timer decrements.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user