Cleaned some code, drastically reduced memory footprint.

This commit is contained in:
2021-09-05 15:02:02 -07:00
parent cb447a6033
commit 2285568480
19 changed files with 263 additions and 108 deletions

View File

@ -13,8 +13,8 @@
#define WINDOW_WIDTH_DEFAULT 1280
#define WINDOW_HEIGHT_DEFAULT WINDOW_WIDTH_DEFAULT/16*9
#define GLFW_PLATFORM_INPUT_MOUSE_X (inputsource_t)512
#define GLFW_PLATFORM_INPUT_MOUSE_Y (inputsource_t)513
#define GLFW_PLATFORM_INPUT_MOUSE_X (inputsource_t)0xFF
#define GLFW_PLATFORM_INPUT_MOUSE_Y (inputsource_t)0xFE
/** The current running game state. */
extern game_t *GAME_STATE;
@ -48,4 +48,13 @@ void glfwOnKey(GLFWwindow *window,
void glfwOnError(int error, const char* description);
void glfwOnCursor(GLFWwindow *window, double x, double y);
void glfwOnCursor(GLFWwindow *window, double x, double y);
/**
* Get the game engine specific input source for a given GLFW Key code.
*
* @param key Key to get the input source for.
* @return The input source.
*/
inputsource_t glfwGetInputSourceForKey(int32_t key);