diff options
| author | realtradam <[email protected]> | 2023-05-30 18:27:27 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-05-30 18:27:27 -0400 |
| commit | fdffc6ef7cc37ae1c4d78f5f869d2b8f027d5aaa (patch) | |
| tree | f94c6c1a5a523d23b9ddd76c821587f16d84da1e /src/debug.c | |
| parent | c43ac3e4ce4375b6fa1fa9927e20ff4f88504429 (diff) | |
| download | TOJam2023-fdffc6ef7cc37ae1c4d78f5f869d2b8f027d5aaa.tar.gz TOJam2023-fdffc6ef7cc37ae1c4d78f5f869d2b8f027d5aaa.zip | |
fix rendering bug and clean up some code
Diffstat (limited to 'src/debug.c')
| -rw-r--r-- | src/debug.c | 50 |
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() + ); +} |
