]> git.jsancho.org Git - lugaru.git/blob - Source/Objects.h
41c81df7caaec03baec4b42e590e6bdb4f531f0a
[lugaru.git] / Source / Objects.h
1 #ifndef _OBJECTS_H_
2 #define _OBJECTS_H_
3
4 #include "Quaternions.h"
5 #include "gamegl.h"
6 #include "TGALoader.h"
7 #include "Quaternions.h"
8 #include "Frustum.h"
9 #include "Lights.h"
10 #include "Models.h"
11 #include "Terrain.h"
12 #include "Sprites.h"
13 #include <vector>
14 //
15 // Model Structures
16 //
17
18 #define max_objects 300
19
20 #define boxtype 0
21 #define weirdtype 1
22 #define spiketype 2
23 #define treetrunktype 3
24 #define treeleavestype 4
25 #define bushtype 5
26 #define rocktype 6
27 #define walltype 7
28 #define chimneytype 8
29 #define platformtype 9
30 #define tunneltype 11
31 #define cooltype 12
32 #define firetype 13
33
34
35 class Objects{
36 public:
37         XYZ center;
38         float radius;
39         XYZ position[max_objects];
40         int type[max_objects];
41         float rotation[max_objects];
42         float rotation2[max_objects];
43         float rotx[max_objects];
44         float rotxvel[max_objects];
45         float roty[max_objects];
46         float rotyvel[max_objects];
47         int numobjects;
48         bool possible[max_objects];
49         Model model[max_objects];
50         Model displaymodel[max_objects];
51         float friction[max_objects];
52         float scale[max_objects];
53         float messedwith[max_objects];
54         float checked[max_objects];
55         GLuint  boxtextureptr;
56         GLuint  treetextureptr;
57         GLuint  bushtextureptr;
58         GLuint  rocktextureptr;
59         float shadowed[max_objects];
60         float occluded[max_objects];
61         bool checkcollide(XYZ startpoint, XYZ endpoint,int which);
62         bool onfire[max_objects];
63         float flamedelay[max_objects];
64
65         void SphereCheckPossible(XYZ *p1,float radius);
66         void DeleteObject(int which);
67         void MakeObject(int atype, XYZ where, float arotation, float ascale);
68         void MakeObject(int atype, XYZ where, float arotation, float arotation2, float ascale);
69         void Draw();
70         void DoShadows();
71         void DoStuff();
72
73         Objects();
74         ~Objects();
75 };
76
77 #endif
78