aboutsummaryrefslogtreecommitdiffstats
path: root/yage/yage.h
diff options
context:
space:
mode:
Diffstat (limited to 'yage/yage.h')
-rw-r--r--yage/yage.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/yage/yage.h b/yage/yage.h
new file mode 100644
index 00000000..6157e6bf
--- /dev/null
+++ b/yage/yage.h
@@ -0,0 +1,63 @@
+/* ----------------------------------------------------------------------------
+ * yage.h
+ *
+ * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
+ * See file LICENSE for more details
+ * ----------------------------------------------------------------------------
+ */
+
+/** @file Includes all the headers in the main YAGE project.
+ *
+ * This does not include
+ */
+
+#ifndef YAGE_YAGE_H
+#define YAGE_YAGE_H
+
+#include "camera2d.h"
+#include "glslprogram.h"
+#include "imageloader.h"
+#include "inputmanager.h"
+#include "iomanager.h"
+#include "picopng.h"
+#include "resourcemanager.h"
+#include "spritebatch.h"
+#include "texture.h"
+#include "vertex.h"
+#include "window.h"
+
+#include <SDL2/SDL.h>
+
+#include <stdexcept>
+
+/** Project namespace.
+ *
+ * Avoids collision as all the classes and global functions are wrapped in.
+ * it.
+ */
+namespace yage
+{
+
+/** Initializes YAGE.
+ *
+ * This is only there to initialize SDL2.
+ *
+ * @return Returns true if the initialization was successful.
+ */
+bool init()
+{
+ return SDL_Init(SDL_INIT_VIDEO);
+}
+
+/** Quit and cleanup YAGE
+ *
+ * SDL2 needs to clean itself up.
+ */
+void quit()
+{
+ SDL_Quit();
+}
+
+} // namespace yage
+
+#endif