1 /*
2   Copyright (C) 2000 Xavier Hosxe <xhosxe@free.fr>
3 
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8 
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13 
14   You should have received a copy of the GNU General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18 
19 #ifndef __TANK__
20 #define __TANK__
21 
22 
23 #include <stdlib.h>
24 #include "sprite.hpp"
25 #include "list.hpp"
26 #include "explosion.hpp"
27 
28 class Tank : public Sprite {
29 public:
30     enum enum_state {
31         NORMAL,
32             MOVING,
33             TURNING,
34             TURNING_TOURELLE,
35             SHOOTING,
36             PREPARE_SHOOT,
37             UNDEF
38     } ;
39 
40     Tank(List *list, int x, int shield);
41     ~Tank();
42     void draw();
43 	void drawShadowable();
44     void move();
45     void collision(Sprite *);
46     static int numberOfTanks_;
47     static void  initList();
48 protected:
49     int state_;
50     float tetay1_,tetay2_;
51     int shield_;
52     Sprite *toShot;
53     float tetay2_goal ;
54     float dtetay2_;
55     float cpt_;
56     float chaine1_, chaine2_;
57     static int m_nBigCubeList ;
58     static int m_nLittleCubeList ;
59 };
60 
61 
62 class TankFire : public Sprite {
63 public:
64     TankFire(List *list, Tank *tank, float x, float y, float z,float dx, float dz,float rotated);
65     void draw();
66 	void drawShadowable();
67     void move();
68     void collision(Sprite *);
69 
70 protected:
71     float tetay_,rotated_;
72 
73 };
74 
75 
76 #endif
77 
78 
79 
80