]> git.jsancho.org Git - lugaru.git/blob - Source/Globals.cpp
Remove Constants.h
[lugaru.git] / Source / Globals.cpp
1 /*
2 Copyright (C) 2003, 2010 - Wolfire Games
3
4 This file is part of Lugaru.
5
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.
10
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.  
14
15 See the GNU General Public License for more details.
16
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.
20 */
21
22 #include "SDL.h"
23
24 #include "gamegl.h"
25 #include "Quaternions.h"
26 #include "Lights.h"
27 #include "Skeleton.h"
28 #include "Terrain.h"
29 #include "Sprite.h"
30 #include "Frustum.h"
31 #include "Objects.h"
32 #include "Weapons.h"
33 #include "Person.h"
34 #include "TGALoader.h"
35 #include "openal_wrapper.h"
36 #include "Stereo.h"
37
38 #include "Animation.h"
39
40 bool visibleloading = 0;
41
42 float volume = 0;
43 bool ismotionblur = 0;
44 float usermousesensitivity = 0;
45 bool floatjump = 0;
46 bool cellophane = 0;
47 bool autoslomo = 0;
48 bool decals = 0;
49 bool invertmouse = 0;
50 bool texttoggle = 0;
51 float blurness = 0;
52 float targetblurness = 0;
53 float windvar = 0;
54 float precipdelay = 0;
55 float gamespeed = 0;
56 float oldgamespeed = 0;
57 float tintr = 0,tintg = 0,tintb = 0;
58 int difficulty = 0;
59 float multiplier = 0;
60 float realmultiplier = 0;
61 float screenwidth = 0,screenheight = 0;
62 float viewdistance = 0;
63 XYZ viewer;
64 XYZ viewerfacing;
65 XYZ lightlocation;
66 float fadestart = 0;
67 int environment = 0;
68 float texscale = 0;
69 float gravity = 0;
70 Light light;
71 Animation animation[animation_count];
72 Skeleton testskeleton;
73 int numsounds = 0;
74 Terrain terrain;
75 float sps = 0;
76
77 SDL_Surface *sdlscreen;
78
79 int kTextureSize = 0;
80 int detail = 0;
81 FRUSTUM frustum;
82 float texdetail = 0;
83 float realtexdetail = 0;
84 float terraindetail = 0;
85 float playerdist = 0;
86 Objects objects;
87 int slomo = 0;
88 float slomodelay = 0;
89 GLubyte bloodText[512*512*3] = {0};
90 GLubyte wolfbloodText[512*512*3] = {0};
91 float colors[3] = {0};
92 int bloodtoggle = 0;
93 bool osx = 0;
94 float camerashake = 0;
95 float woozy = 0;
96 float blackout = 0;
97 bool foliage = 0;
98 bool musictoggle = 0;
99 bool trilinear;
100 Weapons weapons;
101 bool damageeffects = 0;
102 int numplayers = 0;
103 bool ambientsound = 0;
104 bool mousejump = 0;
105 bool freeze = 0;
106 bool winfreeze = 0;
107 float flashamount = 0,flashr = 0,flashg = 0,flashb = 0;
108 int flashdelay = 0;
109 bool vblsync = 0;
110 float motionbluramount = 0;
111 bool keyboardfrozen = 0;
112 char mapname[256] = {0};
113 bool loadingstuff = 0;
114 bool stillloading = 0;
115 bool showpoints = 0;
116 bool showdamagebar = 0;
117 bool alwaysblur = 0;
118 bool immediate = 0;
119 bool velocityblur = 0;
120 int test = 0;
121 XYZ windvector;
122 short vRefNum = 0;
123 long dirID = 0;
124 int mainmenu = 0;
125 int oldmainmenu = 0;
126 int loadscreencolor = 0;
127 int whichjointstartarray[26] = {0};
128 int whichjointendarray[26] = {0};
129 int kBitsPerPixel = 0;
130
131 int numhotspots = 0;
132 XYZ hotspot[40];
133 int hotspottype[40] = {0};
134 float hotspotsize[40] = {0};
135 char hotspottext[40][256] = {0};
136 int currenthotspot = 0; 
137 int winhotspot = 0;
138 int windialogue = 0;
139 int killhotspot = 0;
140
141 float menupulse = 0;
142
143 float smoketex = 0;
144
145 float slomospeed = 0;
146 float slomofreq = 0;
147
148 int tutoriallevel = 0;
149 int tutorialstage = 0;
150 float tutorialstagetime = 0;
151 float tutorialmaxtime = 0;
152 float tutorialsuccess = 0;
153
154 bool againbonus = 0;
155
156 float damagedealt = 0;
157
158 int maptype = 0;
159
160 int editoractive = 0;
161 int editorpathtype = 0;
162
163 bool reversaltrain = 0;
164 bool cananger = 0;
165 bool canattack = 0;
166
167 bool skyboxtexture = 0;
168 float skyboxr = 0;
169 float skyboxg = 0;
170 float skyboxb = 0;
171 float skyboxlightr = 0;
172 float skyboxlightg = 0;
173 float skyboxlightb = 0;
174
175 int hostile = 0;
176 float hostiletime = 0;
177
178 XYZ envsound[30]; // = {0};
179 float envsoundvol[30] = {0};
180 float envsoundlife[30] = {0};
181 int numenvsounds;
182
183
184 bool tilt2weird = 0;
185 bool tiltweird = 0;
186 bool midweird = 0;
187 bool proportionweird = 0;
188 bool vertexweird[6] = {0};
189 TGAImageRec texture;
190 bool debugmode = 0;
191
192 bool won = 0;
193
194
195 bool campaign = 0;
196
197 bool gamestarted = 0;
198
199 //TextureList textures;
200
201 StereoMode stereomode =  stereoNone;
202 StereoMode newstereomode = stereoNone;
203 float stereoseparation = 0.05;
204 bool  stereoreverse = false;