build system 3
[henge/webcc.git] / src / henge / core / state.c
diff --git a/src/henge/core/state.c b/src/henge/core/state.c
new file mode 100644 (file)
index 0000000..18701ef
--- /dev/null
@@ -0,0 +1,50 @@
+/*!@file
+  \brief   main state machine for the engine
+  \details initializes necessary subsystems before invoking the preloader,
+  which loads initial game data, before finally invoking the
+  main loop gameloop(void)
+  \author  Mihrtec
+  \date    2016
+  ------------------------------------------------------------------------------*/
+#ifdef __EMSCRIPTEN__
+#include <SDL_ttf.h>
+#include <emscripten/emscripten.h>
+#else
+#include <SDL2/SDL_ttf.h>
+#endif
+#include <SDL2/SDL.h>
+#include <SDL2/SDL_image.h>
+
+/* Exposed functions */
+int         state_init(void);
+void        state_tick(uint32_t);
+const char* state_get_error(void);
+void        state_quit(void);
+void        state_handle_event(SDL_Event *);
+
+int
+state_init()
+{ return 0;
+}
+
+void
+state_tick(uint32_t delta_ticks)
+{
+}
+
+const char*
+state_get_error()
+{ static char err[5] = "Ass!";
+  return (const char *)&err;
+}
+
+void
+state_quit()
+{
+}
+
+void
+state_handle_event(SDL_Event *event)
+{
+}
+