summary refs log tree commit diff
path: root/src/Decals.h
blob: e6e9b37596a7e2a569a4ba244f1ccdf25cf522ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _DECALS_H_
#define _DECALS_H_

#include "Quaternions.h"
#include "Files.h"
#include "Quaternions.h"
#include "Camera.h"
#include "Models.h"
#include "Fog.h"
//
// Model Structures
//

#define maxdecals 120

class Decals{
	public:
				GLuint 				bulletholetextureptr;
				GLuint 				cratertextureptr;
				GLuint 				bloodtextureptr[11];

				int howmanydecals;

				int type[maxdecals];

				XYZ points[8*maxdecals];
				int numpoints[maxdecals];
				float texcoordsx[8*maxdecals];
				float texcoordsy[8*maxdecals];
				float alivetime[maxdecals];

				void draw();

				int DeleteDecal(int which);
				int MakeDecal(int atype, XYZ location, float size, XYZ normal, int poly, Model *model, XYZ move, float rotation);

				void DoStuff();
				void LoadBulletHoleTexture(char *fileName);
				void LoadCraterTexture(char *fileName);
				void LoadBloodTexture(char *fileName, int which);

				~Decals() {
					glDeleteTextures( 1, (const GLuint *)bulletholetextureptr );
					glDeleteTextures( 1, (const GLuint *)cratertextureptr );
					glDeleteTextures( 11, (const GLuint *)bloodtextureptr );
				};
};

#endif