From 14a81b0f2a739be835057aa33c0e5d10cdc4810d Mon Sep 17 00:00:00 2001 From: Sara Date: Sat, 15 Jul 2023 20:15:25 +0200 Subject: [PATCH] removed preset initialization functions --- src/game.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/src/game.c b/src/game.c index 37f1f8e..9c5d0ed 100644 --- a/src/game.c +++ b/src/game.c @@ -7,35 +7,8 @@ #include "SDL2/SDL_mouse.h" #include "SDL2/SDL_scancode.h" -void on_quit_key(int down) { - // Q is pressed or released - if(down) { - // stop running when Q is pressed - g_context.running = 0; - } -} - -void on_horizontal(int axis) { - // when A or D is pressed or released -} - -void on_vertical(int axis) { - // W or S is pressed or released -} - -void on_click(int down) { - // when the left mouse button is pressed down - // float mouse_x, mouse_y; - // mouse_world_position(&mouse_x, &mouse_y); -} - void start_game() { // called when the game is done initializing the backend and ready to start - g_active_view.width = 21; - add_key_listener(SDL_SCANCODE_UNKNOWN, SDL_SCANCODE_Q, &on_quit_key); - add_key_listener(SDL_SCANCODE_S, SDL_SCANCODE_W, &on_horizontal); - add_key_listener(SDL_SCANCODE_A, SDL_SCANCODE_D, &on_vertical); - add_mouse_button_listener(SDL_BUTTON_LMASK, &on_click); } void update_game() { @@ -48,4 +21,6 @@ void update_ui() { // render calls made in this function will be in *screen* space } -void game_exit() {} +void game_exit() { + // called when the game shuts down +}