3 #include <GLFW/glfw3.h>
5 #include "engine/_prelude.h"
9 void keyboardInput(int key, int scancode UNUSED, int action, int mods UNUSED) {
12 if (action == GLFW_PRESS) {
13 startMovement(DIRECTION_UP);
15 else if (action == GLFW_RELEASE) {
16 stopMovement(DIRECTION_UP);
20 if (action == GLFW_PRESS) {
21 startMovement(DIRECTION_DOWN);
23 else if (action == GLFW_RELEASE) {
24 stopMovement(DIRECTION_DOWN);
28 if (action == GLFW_PRESS) {
29 startMovement(DIRECTION_LEFT);
31 else if (action == GLFW_RELEASE) {
32 stopMovement(DIRECTION_LEFT);
36 if (action == GLFW_PRESS) {
37 startMovement(DIRECTION_RIGHT);
39 else if (action == GLFW_RELEASE) {
40 stopMovement(DIRECTION_RIGHT);