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