aboutsummaryrefslogtreecommitdiff
path: root/game_overwatch.h
blob: ecaa0690313db50ad7eae10c35a3141582538649 (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
35
36
37
38
39
40
41
42
43
44
/*
 * Module Name: Game_overwatch
 * Description: Keep track of all the game citizens and their interactions.
 *              This is the heavy part of the engine.
 */

class Actor;
class Map;
class Game_overwatch
{
	
	//citizen linked list.
	struct citizen{
		Actor * val;
		citizen * next;
	};
	
	
	citizen * head;
	
	int population, dudelock;
	int leftkey, rightkey, zkey, xkey, ckey;
	
	
public:
	Game_overwatch(void);
	~Game_overwatch(void);
	
	void move_in(Actor *);
	void move_out(Actor *);
	int get_population();
	void check_collisions(Map *);
	static bool line_colliding(int, int, int, int, int, int, int, int, int);
	void reset_collisions();
	void collision_callback(Actor *, Actor *);
	void draw(SDL_Surface *, Map *);
	void act(SDL_Surface *, Map *, bool[]);
	void animate();
	void handlephysics(Map*, int, int);
	void handleinput(Actor *, bool[]);
	void kill(Actor *);
	void dieloop();
	
};