renamed input_*down functions to input_get_*down

pull/5/head
Sara 2023-05-11 21:08:13 +02:00
parent 0a37a3278d
commit 6fb60c254d
2 changed files with 4 additions and 4 deletions

View File

@ -150,11 +150,11 @@ void input_notify_event(SDL_Event event) {
} }
} }
int input_keydown(SDL_Scancode scancode) { int input_get_keydown(SDL_Scancode scancode) {
return g_key_states[scancode]; return g_key_states[scancode];
} }
int input_mousedown(int mousebtn) { int input_get_mousedown(int mousebtn) {
uint32_t mask = SDL_BUTTON(mousebtn); uint32_t mask = SDL_BUTTON(mousebtn);
return (SDL_GetMouseState(NULL, NULL) & mask) != 0; return (SDL_GetMouseState(NULL, NULL) & mask) != 0;
} }

View File

@ -54,9 +54,9 @@ extern void mouse_world_position(float* ox, float* oy);
extern void input_init(); extern void input_init();
extern void update_input(); extern void update_input();
extern int input_keydown(SDL_Scancode scancode);
extern int input_mousedown(int mousebtn);
extern void input_notify_event(SDL_Event event); extern void input_notify_event(SDL_Event event);
extern int input_get_keydown(SDL_Scancode scancode);
extern int input_get_mousedown(int mousebtn);
#ifdef __cplusplus #ifdef __cplusplus
} }