summaryrefslogtreecommitdiff
path: root/src/engine/M_game.h
blob: 41888c80aa9dbcf9a88eadda367c67ebcebf5d71 (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
34
#pragma once

#include <SDL3/SDL_init.h>
#include <SDL3/SDL_video.h>
#include <SDL3/SDL_timer.h>
#include <SDL3/SDL_mouse.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"
#include "M_cube.h"

typedef struct {
	SDL_Window *window;
	SDL_GLContext gpu;

	int window_width, window_height;
	float mouse_sens;
	int running;
	M_RenderInfo render_info;

	M_BlockAtlas block_atlas;

	M_Player player;
} M_Game;

int M_initGame(M_Game *game, const char *window_title);
int M_killGame(M_Game *game);

int M_handleEvents(M_Game *game);