summaryrefslogtreecommitdiff
path: root/src/engine/M_game.h
blob: a0b794266e92e744ff8b7ace19ab7216668c185f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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);