-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentity.h
44 lines (35 loc) · 1.17 KB
/
entity.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
35
36
37
38
39
40
41
42
43
44
//
// Created by Saturnation on 2/11/2018.
//
#ifndef LIBTCOD_TUTORIAL_ENTITY_H
#define LIBTCOD_TUTORIAL_ENTITY_H
#include <libtcod/color.h>
#include <libtcod/fov_types.h>
struct game_map;
struct entity_list;
struct entity {
int x;
int y;
char c;
TCOD_color_t color;
char *name;
bool blocks;
struct fighter *fighter;
void (*ai_action)(struct entity *, struct entity *, TCOD_Map *, struct game_map *, struct entity_list *);
};
#include "components/fighter.h"
#include "map/game_map.h"
#include "data/list.h"
struct entity *create_entity(int x,
int y,
char c,
TCOD_color_t color,
char *name,
bool blocks,
struct fighter *fighter,
void(*ai_action)(struct entity *,
struct entity *, TCOD_Map *,
struct game_map *,
struct entity_list *));
void move(struct entity *e, int dx, int dy);
#endif //LIBTCOD_TUTORIAL_ENTITY_H