stratgame
diff src/part.h @ 0:86b53f76899f
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 21 May 2012 19:07:40 +0300 |
parents | |
children | 369b51c9e4a8 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/part.h Mon May 21 19:07:40 2012 +0300 1.3 @@ -0,0 +1,27 @@ 1.4 +#ifndef GAME_H_ 1.5 +#define GAME_H_ 1.6 + 1.7 +class Part; 1.8 + 1.9 +extern Part *cur_part; 1.10 +extern Part *game_part, *menu_part; 1.11 + 1.12 +class Part { 1.13 +protected: 1.14 + unsigned long current_time; 1.15 + 1.16 +public: 1.17 + virtual ~Part(); 1.18 + 1.19 + virtual void update(unsigned long msec); 1.20 + virtual void draw() const = 0; 1.21 + 1.22 + virtual void reshape(int x, int y); 1.23 + virtual void key(int key, bool pressed); 1.24 + virtual void mouse_button(int bn, bool pressed); 1.25 + virtual void mouse_motion(int x, int y); 1.26 + virtual void spaceball_motion(int x, int y, int z, int rx, int ry, int rz); 1.27 + virtual void spaceball_button(int bn, bool pressed); 1.28 +}; 1.29 + 1.30 +#endif /* GAME_H_ */