--- /dev/null
+#ifndef ENGINE_PRELUDE_H_
+#define ENGINE_PRELUDE_H_
+
+#ifdef __GNUC__
+
+# define UNUSED __attribute__((unused))
+
+#else // __GNUC__
+
+# define UNUSED
+
+#endif // __GNUC__
+
+#endif // ENGINE_PRELUDE_H_
#include <GL/glxew.h>
#include <GLFW/glfw3.h>
+#include "_prelude.h"
#include "input.h"
#include "logger.h"
#include "performance.h"
.swapInterval = 1 };
}
-static void onGlfwError(int error, const char* description) {
+static void onGlfwError(int error UNUSED, const char* description) {
logError("GLFW error: %s", description);
}
#include <stdbool.h>
+#include "_prelude.h"
#include "render.h"
static void (*keyboardInputCallback) (int, int, int, int);
-void onKeyboardEvent(GLFWwindow* window, int key, int scancode, int action, int mods) {
+void onKeyboardEvent(GLFWwindow* window UNUSED, int key, int scancode, int action, int mods) {
if (!(mods & GLFW_MOD_CONTROL)) {
if (keyboardInputCallback) {
keyboardInputCallback(key, scancode, action, mods);
#include "ui.h"
+#include "_prelude.h"
#include "render.h"
-void resizeStage(GLFWwindow* window, int width, int height) {
+void resizeStage(GLFWwindow* window UNUSED, int width, int height) {
if (height == 0)
height = 1;
#include <GLFW/glfw3.h>
+#include "engine/_prelude.h"
+
#include "player.h"
-void keyboardInput(int key, int scancode, int action, int mods) {
+void keyboardInput(int key, int scancode UNUSED, int action, int mods UNUSED) {
switch (key) {
case GLFW_KEY_W:
if (action == GLFW_PRESS) {