diff --git a/src/fencer.c b/src/fencer.c index 708c920..21d49af 100644 --- a/src/fencer.c +++ b/src/fencer.c @@ -10,14 +10,22 @@ #include "sprite.h" #include "tilemap.h" #include "player.h" +#include #include static Player* player = NULL; static Level* level = NULL; static -void play() { +void toggle_info_key(int down) { + if(down) { + g_debug_log_lvl = (g_debug_log_lvl + 1) % 4; + } +} +static +void play() { + input_add_key_action(SDL_SCANCODE_F1, &toggle_info_key); g_camera.fov = 40; player = malloc(sizeof(Player)); @@ -36,6 +44,7 @@ static void draw() { level_draw(level); sprite_entity_draw(Player_as_SpriteEntity(player)); + physics_entity_debug_draw(Player_as_PhysicsEntity(player)); } int main(int argc, char* argv[]) {