1 #ifndef INC_SHOT_H
2 #define INC_SHOT_H
3 
4 #include <SDL/SDL.h>
5 
6 class Shot
7 {
8     private:
9 	int timeLived;
10     public:
11 	CartCoord pos;
12 	RelPolarCoord vel;
13 
14 	int dead;
is_dead(const Shot & shot)15 	static int is_dead(const Shot& shot)
16 	    { return shot.dead; }
17 
18 	int weight;
19 
20 	bool super;
21 
22 	Shot(CartCoord ipos, RelPolarCoord ivel, int iweight=1,
23 		bool isuper=false) :
24 	    timeLived(0),
25 	    pos(ipos), vel(ivel), dead(0), weight(iweight), super(isuper)
26 	{}
27 
28 	// time in ms
29 	void update(int time);
30 
31 	int hit(int damage);
32 	int die();
33 
34 	void draw(SDL_Surface* surface, const View& view, View*
35 	    boundView=NULL, bool noAA=false);
36 };
37 
38 
39 #endif /* INC_SHOT_H */
40