X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=globals.h;h=c75caf7b164a6cbb560c8fbe73d581b63136abed;hp=e85ea2597e80243b9176a36fe83542f7e0352dca;hb=5b211bce232b1e75aa7cd3a08c533a8dd446f2fa;hpb=d3465c5cd0e6e9b414e669e8c8aa464b03f2fd24 diff --git a/globals.h b/globals.h index e85ea25..c75caf7 100644 --- a/globals.h +++ b/globals.h @@ -9,10 +9,16 @@ #define GLOBALS_H // Defined values -#define NMESH 54 // The number of meshes (in the models-textures dir) +#define NMESH 54 // The number of meshes (in the models-textures dir) #define NTEXTURE 30 // The number of textures (in the models-textures dir) #define MAXOBJECTS 256 +#define LIGHTS 2 // Number of lights in program + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + // Meshes and textures arrays extern mesh* meshes[]; extern texture* textures[]; @@ -24,47 +30,65 @@ extern const char *objectMenuEntries[]; // Scene object arrays extern SceneObject sceneObjs[]; extern int nObjects; +extern int curObject; +extern int buttonSelected; +extern int manipulateState; -// Directories containing models -extern char *dirDefault1; -extern char *dirDefault2; +/* Light object arrays and default values */ +extern LightObject lightObjs[]; -// Stores the directory name for the meshes and textures. -extern char dataDir[]; +extern GLfloat defaultPosition[]; -// Lighting -extern GLfloat lightColor[]; -extern GLfloat lightPosition[]; +extern GLfloat defaultAmbient[]; +extern GLfloat defaultDiffuse[]; +extern GLfloat defaultSpecular[]; +extern GLfloat defaultDirection[]; -extern int moving, startx, starty; -extern int lightMoving, lightStartX, lightStartY; +extern GLfloat defaultCutoff; +extern GLfloat defaultExponent; +/* Material types */ +extern GLfloat materialAmbient[]; +extern GLfloat materialDiffuse[]; +extern GLfloat materialSpecular[]; -extern float jump; -extern float lightAngle, lightHeight; -extern GLfloat angle; -extern GLfloat angle2; +/* Light parameters */ +extern GLfloat lightShine; +extern GLfloat lightGlobalModel[]; +extern GLfloat lightGlobalEmission[]; +extern GLfloat lightBallSize; -/* Near and far parameters */ -extern GLfloat near; -extern GLfloat far; +// Directories containing models +extern char *dirDefault1; +extern char *dirDefault2; -/* Zoom factor for mouse movements */ -extern GLfloat zoomFactor; +// Stores the directory name for the meshes and textures. +extern char dataDir[]; -/* Recursion level for floor drawing */ -extern int drawFloorRecurse; +extern int startx, starty; /* Size of floor, from -n to n */ extern int floorSize; +extern float squareSize; + +/* Current camera position */ +extern GLfloat camx, camy, camz, keyrot; +extern GLfloat factor; + +/* Length of axis lines */ +extern GLfloat lineLength; + +/* Beginning width, height */ +extern int width, height; -/* Light 0 parameters */ -extern GLfloat diffuse0[]; -extern GLfloat ambient0[]; -extern GLfloat specular0[]; -extern GLfloat emission0[]; -extern GLfloat light0_pos[]; -extern GLfloat glightmodel[]; +/* Zoom and rotate tracking */ +extern GLfloat zoom, rotate, camAngle; +extern GLfloat zoomFactor, camRotateFactor, camAngleFactor; +extern GLfloat leftrightFactor, nearfarFactor, bigsmallFactor; +extern GLfloat updownFactor, rotateFactor, texscaleFactor; +extern GLfloat lleftrightFactor, lnearfarFactor; -#endif /* GLOBALS_H */ +/* Texture state tracking */ +extern int currentGroundTexture, currentMeshTexture; +#endif /* GLOBALS_H */ \ No newline at end of file