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