From 10a0e290ac07524dc129cc2b227b0f9e95df0f8e Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 16 Apr 2012 09:39:52 -0500 Subject: first commit --- game_overwatch.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 game_overwatch.h (limited to 'game_overwatch.h') diff --git a/game_overwatch.h b/game_overwatch.h new file mode 100644 index 0000000..ecaa069 --- /dev/null +++ b/game_overwatch.h @@ -0,0 +1,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(); + +}; \ No newline at end of file -- cgit