#include "all.h" void handle_keyboard_event(unsigned char key, int x, int y) { (void)x; (void)y; float fraction = 0.05f; switch (key) { case 27: exit(0); break; case 'w': game.y_offset += fraction; break; case 's': game.y_offset -= fraction; break; case 'a': game.x_offset -= fraction; break; case 'd': game.x_offset += fraction; break; case '+': game.target_fps += 5; printf("Target FPS: %d\n", game.target_fps); break; case '-': if (game.target_fps > 5) game.target_fps -= 5; printf("Target FPS: %d\n", game.target_fps); break; default: printf("Unknown key: %c\n", key); break; } }