(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
55 /* Light parameters */
56 extern GLfloat lightShine;
57 extern GLfloat lightGlobalModel[];
58 extern GLfloat lightGlobalEmission[];
59 extern GLfloat lightBallSize;
60
61 // Directories containing models
62 extern char *dirDefault1;
63 extern char *dirDefault2;
64
65 // Stores the directory name for the meshes and textures.
66 extern char dataDir[];
67
68 extern int startx, starty;
69
70 /* Size of floor, from -n to n */
71 extern int floorSize;
72 extern float squareSize;
73
74 /* Current camera position */
75 extern GLfloat camx, camy, camz, keyrot;
76 extern GLfloat factor;
77
78 /* Length of axis lines */
79 extern GLfloat lineLength;
80
81 /* Beginning width, height */
82 extern int width, height;
83
84 /* Zoom and rotate tracking */
85 extern GLfloat zoom, rotate, camAngle;
86 extern GLfloat zoomFactor, camRotateFactor, camAngleFactor;
87 extern GLfloat leftrightFactor, nearfarFactor, bigsmallFactor, updownFactor, rotateFactor, texscaleFactor;
88
89 /* Texture state tracking */
90 extern int currentGroundTexture, currentMeshTexture;
91
92 #endif  /* GLOBALS_H */

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