(no commit message)
[atyndall/cits2231.git] / globals.h
1 /**
2  * Global Variables Header File
3  * @author Ashley Tyndall (20915779), Jenna de la Harpe (20367932)
4  */
5
6 #include "types.h"
7
8 #ifndef GLOBALS_H
9 #define GLOBALS_H
10
11 // Defined values
12 #define NMESH 54        // The number of meshes (in the models-textures dir)
13 #define NTEXTURE 30     // The number of textures (in the models-textures dir)
14 #define MAXOBJECTS 256
15
16 #define LIGHTS 2        // Number of lights in program
17
18 #ifndef M_PI
19 #define M_PI 3.14159265358979323846
20 #endif
21
22 // Meshes and textures arrays
23 extern mesh* meshes[];
24 extern texture* textures[];
25
26 // Menu arrays
27 extern const char *textureMenuEntries[];
28 extern const char *objectMenuEntries[];
29
30 // Scene object arrays
31 extern SceneObject sceneObjs[];
32 extern int nObjects;
33 extern int curObject;
34 extern int buttonSelected;
35 extern int manipulateState;
36
37 /* Light object arrays and default values */
38 extern LightObject lightObjs[];
39
40 extern GLfloat defaultPosition[];
41
42 extern GLfloat defaultAmbient[];
43 extern GLfloat defaultDiffuse[];
44 extern GLfloat defaultSpecular[];
45 extern GLfloat defaultDirection[];
46
47 extern GLfloat defaultCutoff;
48 extern GLfloat defaultExponent;
49
50 /* Material types */
51 extern GLfloat materialAmbient[];
52 extern GLfloat materialDiffuse[];
53 extern GLfloat materialSpecular[];
54 extern GLfloat materialShine;
55
56 /* Light parameters */
57 extern GLfloat lightShine;
58 extern GLfloat lightGlobalModel[];
59 extern GLfloat lightGlobalEmission[];
60 extern GLfloat lightBallSize;
61
62 // Directories containing models
63 extern char *dirDefault1;
64 extern char *dirDefault2;
65
66 // Stores the directory name for the meshes and textures.
67 extern char dataDir[];
68
69 extern int startx, starty;
70
71 /* Size of floor, from -n to n */
72 extern int floorSize;
73 extern float squareSize;
74
75 /* Current camera position */
76 extern GLfloat camx, camy, camz, keyrot;
77 extern GLfloat factor;
78
79 /* Length of axis lines */
80 extern GLfloat lineLength;
81
82 /* Beginning width, height */
83 extern int width, height;
84
85 /* Zoom and rotate tracking */
86 extern GLfloat zoom, rotate, camAngle;
87 extern GLfloat zoomFactor, camRotateFactor, camAngleFactor;
88 extern GLfloat leftrightFactor, nearfarFactor, bigsmallFactor;
89 extern GLfloat updownFactor, rotateFactor, texscaleFactor;
90 extern GLfloat lleftrightFactor, lnearfarFactor;
91
92 /* Texture state tracking */
93 extern int currentGroundTexture, currentMeshTexture;
94
95 #endif  /* GLOBALS_H */

UCC git Repository :: git.ucc.asn.au