]> git.jsancho.org Git - lugaru.git/blob - Source/Globals.cpp
Add an option to toggle fullscreen
[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 = false;
44 float usermousesensitivity = 0;
45 bool floatjump = false;
46 bool cellophane = false;
47 bool autoslomo = false;
48 bool decals = false;
49 bool invertmouse = false;
50 bool texttoggle = false;
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 bool fullscreen = 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_Window *sdlwindow;
79
80 int kTextureSize = 0;
81 int detail = 0;
82 FRUSTUM frustum;
83 float texdetail = 0;
84 float realtexdetail = 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 = false;
94 float camerashake = 0;
95 float woozy = 0;
96 float blackout = 0;
97 bool foliage = false;
98 bool musictoggle = false;
99 bool trilinear;
100 Weapons weapons;
101 bool damageeffects = false;
102 bool ambientsound = false;
103 bool mousejump = false;
104 bool freeze = false;
105 bool winfreeze = false;
106 float flashamount = 0, flashr = 0, flashg = 0, flashb = 0;
107 int flashdelay = 0;
108 bool vblsync = false;
109 float motionbluramount = 0;
110 bool keyboardfrozen = false;
111 bool loadingstuff = false;
112 bool stillloading = false;
113 bool showpoints = false;
114 bool showdamagebar = false;
115 bool alwaysblur = false;
116 bool immediate = false;
117 bool velocityblur = false;
118 int test = 0;
119 XYZ windvector;
120 short vRefNum = 0;
121 long dirID = 0;
122 int mainmenu = 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 killhotspot = 0;
134
135 float menupulse = 0;
136
137 float smoketex = 0;
138
139 float slomospeed = 0;
140 float slomofreq = 0;
141
142 int tutoriallevel = 0;
143 int tutorialstage = 0;
144 float tutorialstagetime = 0;
145 float tutorialmaxtime = 0;
146 float tutorialsuccess = 0;
147
148 bool againbonus = false;
149
150 float damagedealt = 0;
151
152 int maptype = 0;
153
154 int editoractive = 0;
155 int editorpathtype = 0;
156
157 bool reversaltrain = false;
158 bool cananger = false;
159 bool canattack = false;
160
161 bool skyboxtexture = false;
162 float skyboxr = 0;
163 float skyboxg = 0;
164 float skyboxb = 0;
165 float skyboxlightr = 0;
166 float skyboxlightg = 0;
167 float skyboxlightb = 0;
168
169 int hostile = 0;
170 float hostiletime = 0;
171
172 XYZ envsound[30]; // = {0};
173 float envsoundvol[30] = {0};
174 float envsoundlife[30] = {0};
175 int numenvsounds;
176
177
178 bool tilt2weird = false;
179 bool tiltweird = false;
180 bool midweird = false;
181 bool proportionweird = false;
182 bool vertexweird[6] = {0};
183 TGAImageRec texture;
184 bool debugmode = false;
185
186
187 bool campaign = false;
188
189 bool gamestarted = false;
190
191 //TextureList textures;
192
193 StereoMode stereomode =  stereoNone;
194 StereoMode newstereomode = stereoNone;
195 float stereoseparation = 0.05;
196 bool  stereoreverse = false;