Shooter (OpenGL Visual Demo)
This is a small demo of a first person shooter...
- Category Technology Demos
- Size 208.2 KB
- Program by MASMO
Shooter (OpenGL Visual Demo)
This is a small demo of a first person shooter. There are two available weapons that are activated with the keys of the mouse. The ground is taken by an image gif and subsequently convert in heightmap. In the Data directory is present the program Bgif to effect the conversion. The demo occupies 208Kbytes.
This is a small demo of a first person shooter. They are available two weapons that are activated with the keys of the mouse. The ground is taken by an image gif and subsequently convert in heightmap. In the Data directory is present the program Bgif to effect the conversion. The demo occupies 208Kbytes.
Routine Description
AUX_RGBImageRec *LoadBMP(char *Filename) Loads a bitmap image (called by LoadGLTextures)
int LoadGLTextures() Load Bitmaps And Convert To Textures
void VectorNormalize() ..... Vector Functions (used by Luce)
void glPrint(char *ll,float x,float y,float z,float dim,float dir,float r,float g,float b) My routine for print with opengl :
Char *ll => the line
x,y,z => the coordinates
dim => the font dimension
dir => not used for now
r,g,b => the color
void Luce(double x, double y, double z,double dimensione,float r,float g,float b,float iox,float ioy,float ioz,int Tex) Adds a particle with:
x,y,z => Position
dimensione => Size
r,g,b => Color
iox,ioy,ioz => Camera Position
Tex => Texture Number
void LoadTerrain() Loads the heightmap from the file terra.pix
void Init(void) Initializes the global variables
void DrawTerrain(void) Draws the terrain (only a matrix of 40x40)
void DrawRifleFuoco(void) Draws the gun and the fire gun
void ChangeTerrain(void) After a bomb explosion the terrain changes
void InitEsplosione(void) Init the bomb explosion
bool Visibile(double xa,double za,double xb,double zb) Return true if the quad is in front, false otherwise
void DrawEsplosione(void) Draw the bomb explosion
void InitBomb(void) Init the bomb movement
void MoveBomb(void) Move the bomb
void DrawBomb(void) Draws the bomb sphere
void InitBullet(void) Inits a bullet
void MoveBullet(int nbul) Moves a bullet
Draws the bullets Draws all the bullets
void GestioneY(void) Calculates the vertical position for the observer
GLvoid ReSizeGLScene(GLsizei width, GLsizei height)
int InitGL(GLvoid)
int DrawGLScene(GLvoid)
GLvoid KillGLWindow(GLvoid)
BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
LRESULT CALLBACK WndProc(..)
int WINAPI WinMain(..)
The Asteroid is an Milkshape Object (see Nehe Web Pages)
These routines have been taken by the examples of NeHe