-
Notifications
You must be signed in to change notification settings - Fork 0
/
g_engine.h
72 lines (68 loc) · 1.58 KB
/
g_engine.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/******************************/
#define NORTH 1
#define SOUTH 2
#define WEST 3
#define EAST 4
/******************************/
class Entity
{
public:
Entity();
~Entity();
int getx();
int gety();
void setxy(int x1, int y1);
int getspeed();
void setspeed(int s);
void setchr(CHR *c);
int get_waypointx();
int get_waypointy();
void set_waypoint(int x1, int y1);
void set_waypoint_relative(int x1, int y1);
void stalk(Entity *e);
Entity* getfollower();
void registerfollower(Entity *e);
bool ready();
void think();
void thinkanim();
int GetArg();
void draw();
void set_face(int d);
int get_face();
void stopanim();
void stop();
void set_movescript(char *s);
void set_wander(int x1, int y1, int x2, int y2, int step, int delay);
void set_wanderzone(int step, int delay);
void move_tick();
void do_movescript();
void do_wander();
void do_wanderzone();
bool visible, active;
int x, y;
int waypointx, waypointy;
int speed, speedct;
int delay;
CHR *chr;
Entity *follow, *follower;
int actscript;
int face, framect, specframe, animdelay;
char movestr[256], moveofs, *animofs;
char movecode;
int wx1, wy1, wx2, wy2, wstep, wdelay;
};
/******************************/
extern Entity *entity[256], *myself;
extern int entities, player;
extern int xwin, ywin;
extern int cameratracking, tracker;
extern bool done;
extern MAP *current_map;
/******************************/
void Engine_Start(char *map);
void Render();
void RenderEntities();
void ProcessEntities();
int AllocateEntity(int x, int y, char *chr);
bool EntityObstructed(int ex, int ey);
/******************************/