]> git.jsancho.org Git - lugaru.git/blob - Source/Globals.cpp
More work.
[lugaru.git] / Source / Globals.cpp
1 #include "gamegl.h"
2 #include "Quaternions.h"
3 #include "Lights.h"
4 #include "Skeleton.h"
5 #include "fmod.h"
6 #include "Terrain.h"
7 #include "Sprites.h"
8 //#include <agl.h>
9 #include "Frustum.h"
10 #include "Objects.h"
11 #include "Weapons.h"
12 #include "Person.h"
13 #include "TGALoader.h"
14
15 #include "Constants.h"
16
17 bool visibleloading = 0;
18 FSOUND_SAMPLE   *samp[100] = {0};
19 FSOUND_STREAM * strm[20] = {0};
20 int channels[100] = {0};
21
22 float volume = 0;bool buttons[3] = {0};
23 bool oldbuttons[3] = {0};
24 bool ismotionblur = 0;
25 float usermousesensitivity = 0;
26 bool floatjump = 0;
27 bool cellophane = 0;
28 bool autoslomo = 0;
29 bool decals = 0;
30 bool invertmouse = 0;
31 bool texttoggle = 0;
32 float blurness = 0;
33 float targetblurness = 0;
34 float windvar = 0;
35 float precipdelay = 0;
36 float gamespeed = 0;
37 float oldgamespeed = 0;
38 float tintr = 0,tintg = 0,tintb = 0;
39 int difficulty = 0;
40 float multiplier = 0;
41 float realmultiplier = 0;
42 float screenwidth = 0,screenheight = 0;
43 float viewdistance = 0;
44 XYZ viewer;
45 XYZ viewerfacing;
46 XYZ lightlocation;
47 float fadestart = 0;
48 int environment = 0;
49 float texscale = 0;
50 float gravity = 0;
51 Light light;
52 Animation animation[animation_count];
53 Skeleton testskeleton;
54 int numsounds = 0;
55 Terrain terrain;
56 Sprites sprites;
57 float sps = 0;
58 #ifdef WIN32
59 HDC hDC;
60 #else
61 AGLContext gaglContext;
62 #endif
63 int kTextureSize = 0;
64 int detail = 0;
65 FRUSTUM frustum;
66 float texdetail = 0;
67 float realtexdetail = 0;
68 float terraindetail = 0;
69 float playerdist = 0;
70 Objects objects;
71 int slomo = 0;
72 float slomodelay = 0;
73 GLubyte bloodText[512*512*3] = {0};
74 GLubyte wolfbloodText[512*512*3] = {0};
75 float colors[3] = {0};
76 int bloodtoggle = 0;
77 bool osx = 0;
78 float camerashake = 0;
79 float woozy = 0;
80 float blackout = 0;
81 bool foliage = 0;
82 bool musictoggle = 0;
83 bool trilinear;
84 Weapons weapons;
85 bool damageeffects = 0;
86 //apvector<Person> player(maxplayers);
87 Person player[maxplayers];
88 int numplayers = 0;
89 bool ambientsound = 0;
90 bool mousejump = 0;
91 bool freeze = 0;
92 bool winfreeze = 0;
93 float flashamount = 0,flashr = 0,flashg = 0,flashb = 0;
94 int flashdelay = 0;
95 bool vblsync = 0;
96 float motionbluramount = 0;
97 bool keyboardfrozen = 0;
98 int newnetmessages = 0;
99 char netmessages[256] = {0};
100 char mapname[256] = {0};
101 bool loadingstuff = 0;
102 bool stillloading = 0;
103 bool showpoints = 0;
104 bool alwaysblur = 0;
105 bool immediate = 0;
106 bool velocityblur = 0;
107 int test = 0;
108 XYZ windvector;
109 short vRefNum = 0;
110 long dirID = 0;
111 int mainmenu = 0;
112 int oldmainmenu = 0;
113 GLubyte texturearray[512*512*3] = {0};
114 int loadscreencolor = 0;
115 int whichjointstartarray[26] = {0};
116 int whichjointendarray[26] = {0};
117 int kBitsPerPixel = 0;
118
119 int numhotspots = 0;
120 XYZ hotspot[40];
121 int hotspottype[40] = {0};
122 float hotspotsize[40] = {0};
123 char hotspottext[40][256] = {0};
124 int currenthotspot = 0; 
125 int winhotspot = 0;
126 int windialogue = 0;
127 int killhotspot = 0;
128
129 float menupulse = 0;
130
131 int numdialogues = 0;
132 int numdialogueboxes[max_dialogues] = {0};
133 int dialoguetype[max_dialogues] = {0};
134 int dialogueboxlocation[max_dialogues][max_dialoguelength] = {0};
135 float dialogueboxcolor[max_dialogues][max_dialoguelength][3] = {0};
136 int dialogueboxsound[max_dialogues][max_dialoguelength] = {0};
137 char dialoguetext[max_dialogues][max_dialoguelength][128] = {0};
138 char dialoguename[max_dialogues][max_dialoguelength][64] = {0};
139 XYZ dialoguecamera[max_dialogues][max_dialoguelength] = {0};
140 XYZ participantlocation[max_dialogues][10] = {0};
141 int participantfocus[max_dialogues][max_dialoguelength] = {0};
142 int participantaction[max_dialogues][max_dialoguelength] = {0};
143 float participantrotation[max_dialogues][10] = {0};
144 XYZ participantfacing[max_dialogues][max_dialoguelength][10] = {0};
145 float dialoguecamerarotation[max_dialogues][max_dialoguelength] = {0};
146 float dialoguecamerarotation2[max_dialogues][max_dialoguelength] = {0};
147 int indialogue = 0;
148 int whichdialogue = 0;
149 int directing = 0;
150 float dialoguetime = 0;
151 int dialoguegonethrough[20] = {0};
152
153 float smoketex = 0;
154
155 float slomospeed = 0;
156 float slomofreq = 0;
157
158 int tutoriallevel = 0;
159 int tutorialstage = 0;
160 float tutorialstagetime = 0;
161 float tutorialmaxtime = 0;
162 float tutorialsuccess = 0;
163
164 bool againbonus = 0;
165
166 float damagedealt = 0;
167 float damagetaken = 0;
168
169 int maptype = 0;
170
171 int editoractive = 0;
172 int editorpathtype = 0;
173
174 bool reversaltrain = 0;
175 bool cananger = 0;
176 bool canattack = 0;
177
178 bool skyboxtexture = 0;
179 float skyboxr = 0;
180 float skyboxg = 0;
181 float skyboxb = 0;
182 float skyboxlightr = 0;
183 float skyboxlightg = 0;
184 float skyboxlightb = 0;
185
186 float bonusnum[100] = {0};
187
188 int hostile = 0;
189 float hostiletime = 0;
190
191 XYZ envsound[30] = {0};
192 float envsoundvol[30] = {0};
193 float envsoundlife[30] = {0};
194 int numenvsounds;
195
196
197 bool tilt2weird = 0;
198 bool tiltweird = 0;
199 bool midweird = 0;
200 bool proportionweird = 0;
201 bool vertexweird[6] = {0};
202 TGAImageRec texture;
203 bool debugmode = 0;
204
205 int oldbonus = 0;
206 int bonus = 0;
207 float bonusvalue = 0;
208 float bonustotal = 0;
209 float startbonustotal = 0;
210 float bonustime = 0;
211
212 int numaccounts = 0;
213 int accountactive = 0;
214 int accountdifficulty[10] = {0};
215 int accountprogress[10] = {0};
216 float accountpoints[10] = {0};
217 float accounthighscore[10][50] = {0};
218 float accountfasttime[10][50] = {0};
219 bool accountunlocked[10][60] = {0};
220 char accountname[10][256] = {0};
221 float accountcampaignhighscore[10] = {0};
222 float accountcampaignfasttime[10] = {0};
223 float accountcampaignscore[10] = {0};
224 float accountcampaigntime[10] = {0};
225 int accountcampaignchoicesmade[10] = {0};int accountcampaignchoices[10][5000] = {0};
226 bool won = 0;
227
228
229 bool campaign = 0;
230
231 int numfalls = 0;
232 int numflipfail = 0;
233 int numseen = 0;
234 int numresponded = 0;
235 int numstaffattack = 0;
236 int numswordattack = 0;
237 int numknifeattack = 0;
238 int numunarmedattack = 0;
239 int numescaped = 0;
240 int numflipped = 0;
241 int numwallflipped = 0;
242 int numthrowkill = 0;
243 int numafterkill = 0;
244 int numreversals = 0;
245 int numattacks = 0;
246 int maxalarmed = 0;
247
248 bool gamestarted = 0;
249
250 //TextureList textures;