From fdffc6ef7cc37ae1c4d78f5f869d2b8f027d5aaa Mon Sep 17 00:00:00 2001 From: realtradam Date: Tue, 30 May 2023 18:27:27 -0400 Subject: fix rendering bug and clean up some code --- src/debug.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/debug.c (limited to 'src/debug.c') diff --git a/src/debug.c b/src/debug.c new file mode 100644 index 0000000..0dddf54 --- /dev/null +++ b/src/debug.c @@ -0,0 +1,50 @@ +#include "rodeo.h" +#include "enemies.h" +#include "debug.h" + +void draw_debug_text(cstr renderer_name, float fps_display) +{ + rodeo_debug_text_draw( + 1, + 1, + " using %s renderer ", + cstr_str( + &renderer_name + ) + ); + + rodeo_debug_text_draw( + 2, + 2, + " frame count: %"PRIu64" ", + rodeo_frame_count_get() + ); + + rodeo_debug_text_draw( + 2, + 3, + " fps: %.2f ", + fps_display + ); + + rodeo_debug_text_draw( + 2, + 4, + " enemy count: %d ", + get_enemy_count() + ); + + rodeo_debug_text_draw( + 2, + 5, + " ghost count: %d ", + get_ghost_count() + ); + + rodeo_debug_text_draw( + 2, + 6, + " total count: %d ", + get_ghost_count() + get_enemy_count() + ); +} -- cgit v1.2.3