summaryrefslogtreecommitdiff
path: root/src/engine/M_game.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/M_game.h')
-rw-r--r--src/engine/M_game.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/engine/M_game.h b/src/engine/M_game.h
new file mode 100644
index 0000000..a0b7942
--- /dev/null
+++ b/src/engine/M_game.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <SDL3/SDL_init.h>
+#include <SDL3/SDL_video.h>
+#include <SDL3/SDL_timer.h>
+
+#include <glad/gl.h>
+
+//#include "M_types.h"
+#include "M_render.h"
+#include "M_player.h"
+//#include "M_object.h"
+#include "M_block.h"
+
+typedef struct {
+ SDL_Window *window;
+ SDL_GLContext gpu;
+
+ int window_width, window_height;
+ int running;
+ M_RenderInfo render_info;
+
+ M_BlockAtlas block_atlas;
+
+ M_Player player;
+
+ SDL_Thread *event_handler;
+} M_Game;
+
+int M_initGame(M_Game *game, const char *window_title);
+int M_killGame(M_Game *game);
+
+int SDLCALL M_handleEvents(void* arg);