Commit code circa 2006
This commit is contained in:
55
common.h
Executable file
55
common.h
Executable file
@@ -0,0 +1,55 @@
|
||||
#ifndef __COMMON_H__
|
||||
#define __COMMON_H__
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
/* global defines */
|
||||
#define SCREEN_WIDTH 640
|
||||
#define SCREEN_HEIGHT 480
|
||||
#define SCREEN_BPP 16
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
/* main screen surface */
|
||||
SDL_Surface *surface;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GLfloat x;
|
||||
GLfloat y;
|
||||
GLfloat z;
|
||||
} Vector;
|
||||
|
||||
Vector cameraPosition = {0.0F, 0.0F, 0.0F};
|
||||
Vector cameraLook = {0.0F, 0.0F, -1.0F};
|
||||
|
||||
char *pTextures[] = {"pBlue.bmp", "pGreen.pcx", "pRed.pcx"};
|
||||
|
||||
/* copy v2 to v1 */
|
||||
void vectorCopy(Vector *v1, Vector *v2)
|
||||
{
|
||||
v1->x = v2->x;
|
||||
v1->y = v2->y;
|
||||
v1->z = v2->y;
|
||||
}
|
||||
|
||||
/* returns a floating point value between -ceiling and ceiling */
|
||||
GLfloat frand(GLfloat ceiling)
|
||||
{
|
||||
if ( ((rand() / ((RAND_MAX+1)/2) )) < 0)
|
||||
return (rand() / ( ((float) RAND_MAX+1) / -ceiling));
|
||||
else
|
||||
return (rand() / ( ((float) RAND_MAX+1) / ceiling));
|
||||
}
|
||||
|
||||
#include "particle.h"
|
||||
#include "draw.h"
|
||||
#include "init.h"
|
||||
|
||||
PEmitter theEmitter[2];
|
||||
|
||||
#endif // __COMMON_H__ 1
|
||||
Reference in New Issue
Block a user