summaryrefslogtreecommitdiffhomepage
path: root/src/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c50
1 files changed, 50 insertions, 0 deletions
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()
+ );
+}