Gered
648832d939
full disclosure: i'm a bit unsure of what is the best way to do this at this point in time. the end goal with this project is that it becomes a library to be used by other apps (of course), but need tests to test various library functionality. unsure how best to organize this with cmake (and since i'm using clion, i kind of would prefer it works nicely and integrated with the ide...). i figure this is going to be a trial and error approach that will evolve over the next while
31 lines
670 B
C
31 lines
670 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "vm/vm_stdinc.h"
|
|
#include "vm/vm_input_codes.h"
|
|
#include "SDL.h"
|
|
|
|
bool input_init();
|
|
void input_destroy();
|
|
|
|
void input_on_key_event(SDL_Event *event);
|
|
void input_on_mouse_event(SDL_Event *event);
|
|
|
|
bool input_is_key_down(KEYS key);
|
|
bool input_is_key_pressed(KEYS key);
|
|
void input_lock_key(KEYS key);
|
|
bool input_is_mouse_button_down(MOUSE_BUTTONS button);
|
|
bool input_is_mouse_button_pressed(MOUSE_BUTTONS button);
|
|
void input_lock_mouse_button(MOUSE_BUTTONS button);
|
|
int input_get_mouse_delta_x();
|
|
int input_get_mouse_delta_y();
|
|
uint input_get_mouse_x();
|
|
uint input_get_mouse_y();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|