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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
#ifndef _SPRITE_H_
#define _SPRITE_H_
#include "Quaternions.h"
#include <GL/gl.h>
#include <GL/glu.h>
#include "Files.h"
#include "Quaternions.h"
#include "Camera.h"
#include "Models.h"
#include "Fog.h"
//
// Model Structures
//
#define maxsprites 2000
#define muzzleflashsprite 1
#define smokesprite 2
#define smokespritenoup 3
#define flashsprite 6
#define grenadesprite 7
#define pinsprite 8
#define spoonsprite 9
#define bloodspritedown 10
#define bloodspritenoup 11
#define particlesspritedown 12
#define snowsprite 13
#define rainsprite 14
#define bullet 4
#define bulletinstant 5
class Sprites{
public:
GLuint flaretextureptr;
GLuint muzzleflaretextureptr;
GLuint smoketextureptr;
GLuint bullettextureptr;
GLuint bloodtextureptr;
GLuint raintextureptr;
GLuint snowtextureptr;
int howmanysprites;
XYZ location[maxsprites];
XYZ oldlocation[maxsprites];
XYZ velocity[maxsprites];
XYZ initialvelocity[maxsprites];
float size[maxsprites];
float initialsize[maxsprites];
float brightness[maxsprites];
float initialbrightness[maxsprites];
float color1[maxsprites];
float color2[maxsprites];
float color3[maxsprites];
float alivetime[maxsprites];
float rotation[maxsprites];
int type[maxsprites];
int owner[maxsprites];
void draw();
int DeleteSprite(int which);
int MakeSprite(int atype, float abrightness, float acolor1, float acolor2, float acolor3, XYZ alocation, XYZ avelocity, float asize);
int MakeSprite(int atype, float abrightness, float acolor1, float acolor2, float acolor3, XYZ alocation, XYZ avelocity, float asize, int aowner);
void DoStuff();
void LoadMuzzleFlareTexture(char *fileName);
void LoadFlareTexture(char *fileName);
void LoadSmokeTexture(char *fileName);
void LoadBulletTexture(char *fileName);
void LoadBloodTexture(char *fileName);
void LoadSnowTexture(char *fileName);
void LoadRainTexture(char *fileName);
~Sprites() {
glDeleteTextures( 1, (const GLuint *)muzzleflaretextureptr );
glDeleteTextures( 1, (const GLuint *)flaretextureptr );
glDeleteTextures( 1, (const GLuint *)bullettextureptr );
glDeleteTextures( 1, (const GLuint *)smoketextureptr );
glDeleteTextures( 1, (const GLuint *)bloodtextureptr );
glDeleteTextures( 1, (const GLuint *)raintextureptr );
glDeleteTextures( 1, (const GLuint *)snowtextureptr );
};
};
#endif
|