renamed input_*down functions to input_get_*down
parent
0a37a3278d
commit
6fb60c254d
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue