New comments for input.c

This commit is contained in:
KikooDX 2020-12-21 13:31:21 +01:00
parent 69a22c0020
commit 733533a35d
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ void input_step(Input *input) {
}
void input_init(Input *input) {
/* initialize all values to S_UP, avoid random bugs */
input->keys[K_LEFT] = KEY_LEFT;
input->keys[K_RIGHT] = KEY_RIGHT;
input->keys[K_UP] = KEY_UP;
@ -34,6 +35,7 @@ void input_init(Input *input) {
}
void input_draw_debug(Input *input) {
/* debug function that draws all keys state */
for (int i = 0; i < KEYS_COUNT; ++i) {
dprint(0, i * 10, C_BLACK, "%d", i);
dprint(16, i * 10, C_BLACK, "%d", input->states[i]);