2 Copyright (C) 2003, 2010 - Wolfire Games
4 This file is part of Lugaru.
6 Lugaru is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 See the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include "Quaternions.h"
34 #include "TGALoader.h"
35 #include "openal_wrapper.h"
38 #include "Constants.h"
40 bool visibleloading = 0;
41 OPENAL_SAMPLE *samp[100] = {0};
42 OPENAL_STREAM * strm[20] = {0};
43 int channels[100] = {0};
45 float volume = 0;bool buttons[3] = {0};
46 bool oldbuttons[3] = {0};
47 bool ismotionblur = 0;
48 float usermousesensitivity = 0;
56 float targetblurness = 0;
58 float precipdelay = 0;
60 float oldgamespeed = 0;
61 float tintr = 0,tintg = 0,tintb = 0;
64 float realmultiplier = 0;
65 float screenwidth = 0,screenheight = 0;
66 float viewdistance = 0;
75 Animation animation[animation_count];
76 Skeleton testskeleton;
82 SDL_Surface *sdlscreen;
88 float realtexdetail = 0;
89 float terraindetail = 0;
94 GLubyte bloodText[512*512*3] = {0};
95 GLubyte wolfbloodText[512*512*3] = {0};
96 float colors[3] = {0};
99 float camerashake = 0;
103 bool musictoggle = 0;
106 bool damageeffects = 0;
107 //apvector<Person> player(maxplayers);
108 Person player[maxplayers];
110 bool ambientsound = 0;
114 float flashamount = 0,flashr = 0,flashg = 0,flashb = 0;
117 float motionbluramount = 0;
118 bool keyboardfrozen = 0;
119 char mapname[256] = {0};
120 bool loadingstuff = 0;
121 bool stillloading = 0;
123 bool showdamagebar = 0;
126 bool velocityblur = 0;
133 GLubyte texturearray[512*512*3] = {0};
134 int loadscreencolor = 0;
135 int whichjointstartarray[26] = {0};
136 int whichjointendarray[26] = {0};
137 int kBitsPerPixel = 0;
141 int hotspottype[40] = {0};
142 float hotspotsize[40] = {0};
143 char hotspottext[40][256] = {0};
144 int currenthotspot = 0;
151 int numdialogues = 0;
152 int numdialogueboxes[max_dialogues] = {0};
153 int dialoguetype[max_dialogues] = {0};
154 int dialogueboxlocation[max_dialogues][max_dialoguelength] = {0};
155 float dialogueboxcolor[max_dialogues][max_dialoguelength][3] = {0};
156 int dialogueboxsound[max_dialogues][max_dialoguelength] = {0};
157 char dialoguetext[max_dialogues][max_dialoguelength][128] = {0};
158 char dialoguename[max_dialogues][max_dialoguelength][64] = {0};
159 XYZ dialoguecamera[max_dialogues][max_dialoguelength]; //l = {0};
160 XYZ participantlocation[max_dialogues][10]; // = {0};
161 int participantfocus[max_dialogues][max_dialoguelength] = {0};
162 int participantaction[max_dialogues][max_dialoguelength] = {0};
163 float participantrotation[max_dialogues][10] = {0};
164 XYZ participantfacing[max_dialogues][max_dialoguelength][10]; // = {0};
165 float dialoguecamerarotation[max_dialogues][max_dialoguelength] = {0};
166 float dialoguecamerarotation2[max_dialogues][max_dialoguelength] = {0};
168 int whichdialogue = 0;
170 float dialoguetime = 0;
171 int dialoguegonethrough[20] = {0};
175 float slomospeed = 0;
178 int tutoriallevel = 0;
179 int tutorialstage = 0;
180 float tutorialstagetime = 0;
181 float tutorialmaxtime = 0;
182 float tutorialsuccess = 0;
186 float damagedealt = 0;
187 float damagetaken = 0;
191 int editoractive = 0;
192 int editorpathtype = 0;
194 bool reversaltrain = 0;
198 bool skyboxtexture = 0;
202 float skyboxlightr = 0;
203 float skyboxlightg = 0;
204 float skyboxlightb = 0;
206 float bonusnum[100] = {0};
209 float hostiletime = 0;
211 XYZ envsound[30]; // = {0};
212 float envsoundvol[30] = {0};
213 float envsoundlife[30] = {0};
220 bool proportionweird = 0;
221 bool vertexweird[6] = {0};
227 float bonusvalue = 0;
228 float bonustotal = 0;
229 float startbonustotal = 0;
233 int accountactive = 0;
234 int accountdifficulty[10] = {0};
235 int accountprogress[10] = {0};
236 float accountpoints[10] = {0};
237 float accounthighscore[10][50] = {0};
238 float accountfasttime[10][50] = {0};
239 bool accountunlocked[10][60] = {0};
240 char accountname[10][256] = {0};
241 float accountcampaignhighscore[10] = {0};
242 float accountcampaignfasttime[10] = {0};
243 float accountcampaignscore[10] = {0};
244 float accountcampaigntime[10] = {0};
245 int accountcampaignchoicesmade[10] = {0};int accountcampaignchoices[10][5000] = {0};
254 int numresponded = 0;
255 int numstaffattack = 0;
256 int numswordattack = 0;
257 int numknifeattack = 0;
258 int numunarmedattack = 0;
261 int numwallflipped = 0;
262 int numthrowkill = 0;
263 int numafterkill = 0;
264 int numreversals = 0;
268 bool gamestarted = 0;
270 //TextureList textures;
272 StereoMode stereomode = stereoNone;
273 StereoMode newstereomode = stereoNone;
274 float stereoseparation = 0.05;
275 bool stereoreverse = false;