Court is now in session
This commit is contained in:
@ -11,6 +11,11 @@ game_t *runningGame = NULL;
|
||||
int32_t main() {
|
||||
// Attempt to init GLFW
|
||||
if(!glfwInit()) return NULL;
|
||||
|
||||
// Setup window hints
|
||||
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, false);
|
||||
|
||||
// Create Window
|
||||
window = glfwCreateWindow(WINDOW_WIDTH_DEFAULT, WINDOW_HEIGHT_DEFAULT,
|
||||
"", NULL, NULL
|
||||
);
|
||||
@ -28,6 +33,8 @@ int32_t main() {
|
||||
glfwSetWindowSizeCallback(window, &glfwOnResize);
|
||||
glfwSetKeyCallback(window, &glfwOnKey);
|
||||
|
||||
glfwSetErrorCallback (&glfwOnError);
|
||||
|
||||
// Init the game
|
||||
if(gameInit()) {
|
||||
// Bind initial keys
|
||||
@ -87,4 +94,8 @@ void glfwOnKey(GLFWwindow *window,
|
||||
} else if(action == GLFW_RELEASE) {
|
||||
INPUT_STATE.buffer[key] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void glfwOnError(int error, const char* description) {
|
||||
fputs(description, stderr);
|
||||
}
|
Reference in New Issue
Block a user