-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.h
34 lines (28 loc) · 803 Bytes
/
game.h
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
#ifndef GAME_H
#define GAME_H
#include "entity.h"
#include "map.h"
#include <stdint.h>
typedef enum {
MENU_STATE,
GAME_STATE
} state_t;
extern state_t game_state;
extern float game_tick;
extern float game_time;
extern vector * game_entities_list_all;
extern vector * game_entities_list_friendly;
extern vector * game_entities_list_enemies;
extern entity_t * game_entity_player;
extern int game_map_index;
extern int game_reset_level;
void game_free_entities();
void game_entities_enemies_push(entity_t ** e);
void game_entities_enemies_pop(entity_t ** e);
void game_entities_friendly_push(entity_t ** e);
void game_entities_friendly_pop(entity_t ** e);
void game_init(int map_index);
entity_t * game_spawn (entity_params_t *);
void game_run(float time_now);
void game_next_level();
#endif