+
+ ; checks debug flags and decides if
+ ; update should be suspended
+ ; inputs:
+ ; debug_flags
+ ; returns:
+ ; flag z: 0 -> do not suspend
+ ; flag z: 1 -> do suspend
+debug_should_suspend_update:
+ call debug_update
+
+ ld a, [debug_flags]
+ and a, DEBUG_F_ENABLE
+ ret
; updates debug code
; when in debug mode the
ret
update_game:
- ; tick rng every frame
- call rand
-
; clear oam
; TODO: only clear used OAM
call shadow_oam_clear
+
+ ; do we skip update this frame?
+ call debug_should_suspend_update
+ ret nz
+
+ ; tick rng every frame
+ call rand
call player_update
call player_draw
call ui_update
- call debug_update
; TODO: update map routine