#pragma once #include #define WINDOW_WIDTH 640 #define WINDOW_HEIGHT 480 #define WINDOW_TITLE "Voxel Engine" typedef struct { // screen size int width; int height; // input bool key_down[GLFW_KEY_LAST]; bool key_pressed[GLFW_KEY_LAST]; bool btn_down[GLFW_MOUSE_BUTTON_LAST]; bool btn_pressed[GLFW_MOUSE_BUTTON_LAST]; // cursor double mouse_x; double mouse_y; double mouse_x_last; double moues_y_last; // time double last_time; // glfw GLFWwindow *window; GLFWmonitor *monitor; } Window; extern Window window; extern double delta_time; int window_init(void); bool window_closed(void); void window_update(void); void window_swap(void); void window_close(void); int window_grab_cursor(void); int window_release_cursor(void); bool key_down(int key); bool key_pressed(int key); bool btn_down(int button); bool btn_pressed(int button);