summaryrefslogtreecommitdiff
path: root/src/game.h
blob: b8dae9f8aa121e52dbfdb5a3fad3833ee13eb05c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#include "entity.h"

enum { MAX_ENTITIES = 128 };

typedef struct Game {
	unsigned int uuid;
	bool queue_next_scene;
	int queue_restart_scene;
	int player_dir;
	double spike_angle;
	Entity entities[MAX_ENTITIES];
} Game;

void game_init(Game *this);
void game_deinit(Game *this);
void game_update(Game *this);
void game_draw(Game *this);
void game_restart_scene(Game *this);
Entity *game_create_entity(Game *this);
int game_entity_count(Game *this, unsigned int type);
Entity *game_get_entity(Game *this, unsigned int type);