]> git.jsancho.org Git - lugaru.git/blob - Source/Weapons.h
Remove Constants.h
[lugaru.git] / Source / Weapons.h
1 /*
2 Copyright (C) 2003, 2010 - Wolfire Games
3
4 This file is part of Lugaru.
5
6 Lugaru is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
14
15 See the GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20 */
21
22 #ifndef _WEAPONS_H_
23 #define _WEAPONS_H_
24
25 /**> HEADER FILES <**/
26
27 #include "gamegl.h"
28 #include "Quaternions.h"
29 #include "Skeleton.h"
30 #include "Models.h"
31 #include "Terrain.h"
32 #include "Sprite.h"
33 #include "Person.h"
34 #include <cmath>
35
36 #define max_weapons 30
37 #define max_weaponinstances 20
38
39 #define knife 1
40 #define sword 2
41 #define staff 3
42
43 class Weapons
44 {
45 public:
46
47         float rotation1[max_weaponinstances];
48         float rotation2[max_weaponinstances];
49         float rotation3[max_weaponinstances];
50         float bigrotation[max_weaponinstances];
51         float bigtilt[max_weaponinstances];
52         float bigtilt2[max_weaponinstances];
53         float smallrotation[max_weaponinstances];
54         float smallrotation2[max_weaponinstances];
55
56         int numweapons;
57         float damage[max_weaponinstances];
58         XYZ tippoint[max_weaponinstances];
59         XYZ oldtippoint[max_weaponinstances];
60         XYZ position[max_weaponinstances];
61         float lastmult[max_weaponinstances];
62         XYZ oldposition[max_weaponinstances];
63         XYZ velocity[max_weaponinstances];
64         XYZ tipvelocity[max_weaponinstances];
65         int type[max_weaponinstances];
66         int oldowner[max_weaponinstances];
67         int owner[max_weaponinstances];
68         int bloody[max_weaponinstances];
69         float blooddrip[max_weaponinstances];
70         float blooddripdelay[max_weaponinstances];
71         bool onfire[max_weaponinstances];
72         float flamedelay[max_weaponinstances];
73         bool missed[max_weaponinstances];
74         float mass[max_weaponinstances];
75         float tipmass[max_weaponinstances];
76         float length[max_weaponinstances];
77         float freetime[max_weaponinstances];
78         bool firstfree[max_weaponinstances];
79         bool physics[max_weaponinstances];
80         float drawhowmany[max_weaponinstances];
81         bool hitsomething[max_weaponinstances];
82
83         XYZ lastdrawnposition[max_weaponinstances];
84         XYZ lastdrawntippoint[max_weaponinstances];
85         float lastdrawnrotation1[max_weaponinstances];
86         float lastdrawnrotation2[max_weaponinstances];
87         float lastdrawnrotation3[max_weaponinstances];
88         float lastdrawnbigrotation[max_weaponinstances];
89         float lastdrawnbigtilt[max_weaponinstances];
90         float lastdrawnbigtilt2[max_weaponinstances];
91         float lastdrawnsmallrotation[max_weaponinstances];
92         float lastdrawnsmallrotation2[max_weaponinstances];
93         int lastdrawnanim[max_weaponinstances];
94
95         Model throwingknifemodel;
96         GLuint knifetextureptr;
97         GLuint lightbloodknifetextureptr;
98         GLuint bloodknifetextureptr;
99
100         Model swordmodel;
101         GLuint swordtextureptr;
102         GLuint lightbloodswordtextureptr;
103         GLuint bloodswordtextureptr;
104
105         Model staffmodel;
106         GLuint stafftextureptr;
107
108         int Draw();
109         void DoStuff();
110
111         Weapons();
112
113         ~Weapons();
114 };
115
116 extern Weapons weapons;
117 #endif