removed preset initialization functions

pull/14/head
Sara 2023-07-15 20:15:25 +02:00
parent ec50000130
commit 14a81b0f2a
1 changed files with 3 additions and 28 deletions

View File

@ -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
}