]>
Commit | Line | Data |
---|---|---|
10a0e290 BB |
1 | /* |
2 | * Module Name: Game_overwatch | |
3 | * Description: Keep track of all the game citizens and their interactions. | |
4 | * This is the heavy part of the engine. | |
5 | */ | |
6 | ||
7 | class Actor; | |
8 | class Map; | |
9 | class Game_overwatch | |
10 | { | |
11 | ||
12 | //citizen linked list. | |
13 | struct citizen{ | |
14 | Actor * val; | |
15 | citizen * next; | |
16 | }; | |
17 | ||
18 | ||
19 | citizen * head; | |
20 | ||
21 | int population, dudelock; | |
22 | int leftkey, rightkey, zkey, xkey, ckey; | |
23 | ||
24 | ||
25 | public: | |
26 | Game_overwatch(void); | |
27 | ~Game_overwatch(void); | |
28 | ||
29 | void move_in(Actor *); | |
30 | void move_out(Actor *); | |
31 | int get_population(); | |
32 | void check_collisions(Map *); | |
33 | static bool line_colliding(int, int, int, int, int, int, int, int, int); | |
34 | void reset_collisions(); | |
35 | void collision_callback(Actor *, Actor *); | |
36 | void draw(SDL_Surface *, Map *); | |
37 | void act(SDL_Surface *, Map *, bool[]); | |
38 | void animate(); | |
39 | void handlephysics(Map*, int, int); | |
40 | void handleinput(Actor *, bool[]); | |
41 | void kill(Actor *); | |
42 | void dieloop(); | |
43 | ||
44 | }; |