]> git.jsancho.org Git - lugaru.git/blob - Source/Weapons.h
Added GPL license and headers.
[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 "fmod.h"
30 #include "Skeleton.h"
31 #include "Models.h"
32 #include "Constants.h"
33 #include "Terrain.h"
34 #include "Sprites.h"
35 #include "Person.h"
36 #include <cmath>
37
38 #define max_weapons 30
39 #define max_weaponinstances 20
40
41 #define knife 1
42 #define sword 2
43 #define staff 3
44
45 class Weapons
46 {
47 public:
48
49         float rotation1[max_weaponinstances];
50         float rotation2[max_weaponinstances];
51         float rotation3[max_weaponinstances];
52         float bigrotation[max_weaponinstances];
53         float bigtilt[max_weaponinstances];
54         float bigtilt2[max_weaponinstances];
55         float smallrotation[max_weaponinstances];
56         float smallrotation2[max_weaponinstances];
57
58         int numweapons;
59         float damage[max_weaponinstances];
60         XYZ tippoint[max_weaponinstances];
61         XYZ oldtippoint[max_weaponinstances];
62         XYZ position[max_weaponinstances];
63         float lastmult[max_weaponinstances];
64         XYZ oldposition[max_weaponinstances];
65         XYZ velocity[max_weaponinstances];
66         XYZ tipvelocity[max_weaponinstances];
67         int type[max_weaponinstances];
68         int oldowner[max_weaponinstances];
69         int owner[max_weaponinstances];
70         int bloody[max_weaponinstances];
71         float blooddrip[max_weaponinstances];
72         float blooddripdelay[max_weaponinstances];
73         bool onfire[max_weaponinstances];
74         float flamedelay[max_weaponinstances];
75         bool missed[max_weaponinstances];
76         float mass[max_weaponinstances];
77         float tipmass[max_weaponinstances];
78         float length[max_weaponinstances];
79         float freetime[max_weaponinstances];
80         bool firstfree[max_weaponinstances];
81         bool physics[max_weaponinstances];
82         float drawhowmany[max_weaponinstances];
83         bool hitsomething[max_weaponinstances];
84
85         XYZ lastdrawnposition[max_weaponinstances];
86         XYZ lastdrawntippoint[max_weaponinstances];
87         float lastdrawnrotation1[max_weaponinstances];
88         float lastdrawnrotation2[max_weaponinstances];
89         float lastdrawnrotation3[max_weaponinstances];
90         float lastdrawnbigrotation[max_weaponinstances];
91         float lastdrawnbigtilt[max_weaponinstances];
92         float lastdrawnbigtilt2[max_weaponinstances];
93         float lastdrawnsmallrotation[max_weaponinstances];
94         float lastdrawnsmallrotation2[max_weaponinstances];
95         int lastdrawnanim[max_weaponinstances];
96
97         Model throwingknifemodel;
98         GLuint knifetextureptr;
99         GLuint lightbloodknifetextureptr;
100         GLuint bloodknifetextureptr;
101
102         Model swordmodel;
103         GLuint swordtextureptr;
104         GLuint lightbloodswordtextureptr;
105         GLuint bloodswordtextureptr;
106
107         Model staffmodel;
108         GLuint stafftextureptr;
109
110         int Draw();
111         void DoStuff();
112
113         Weapons();
114
115         ~Weapons();
116 };
117
118 #endif