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