]> git.jsancho.org Git - lugaru.git/blob - Source/Globals.cpp
Sorted all source files in folders
[lugaru.git] / Source / Globals.cpp
1 /*
2 Copyright (C) 2003, 2010 - Wolfire Games
3 Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
4
5 This file is part of Lugaru.
6
7 Lugaru is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 Lugaru is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "SDL.h"
22
23 #include <string>
24
25 #include "Graphic/Stereo.h"
26 #include "Math/Quaternions.h"
27 #include "Objects/Weapons.h"
28
29 bool visibleloading = 0;
30
31 float volume = 0;
32 bool ismotionblur = false;
33 float usermousesensitivity = 0;
34 bool floatjump = false;
35 bool cellophane = false;
36 bool autoslomo = false;
37 bool decals = false;
38 bool invertmouse = false;
39 bool texttoggle = false;
40 float blurness = 0;
41 float targetblurness = 0;
42 float windvar = 0;
43 float precipdelay = 0;
44 float gamespeed = 0;
45 float oldgamespeed = 0;
46 int difficulty = 0;
47 float multiplier = 0;
48 float realmultiplier = 0;
49 float screenwidth = 0, screenheight = 0;
50 bool fullscreen = 0;
51 float viewdistance = 0;
52 XYZ viewer;
53 XYZ viewerfacing;
54 float fadestart = 0;
55 int environment = 0;
56 float texscale = 0;
57 float gravity = 0;
58 Light light;
59 Terrain terrain;
60
61 SDL_Window *sdlwindow;
62
63 int kTextureSize = 0;
64 int detail = 0;
65 FRUSTUM frustum;
66 float texdetail = 0;
67 float realtexdetail = 0;
68 float playerdist = 0;
69 Objects objects;
70 int slomo = 0;
71 float slomodelay = 0;
72 GLubyte bloodText[512 * 512 * 3] = {0};
73 GLubyte wolfbloodText[512 * 512 * 3] = {0};
74 int bloodtoggle = 0;
75 float camerashake = 0;
76 float woozy = 0;
77 float blackout = 0;
78 bool foliage = false;
79 bool musictoggle = false;
80 bool trilinear;
81 Weapons weapons;
82 bool damageeffects = false;
83 bool ambientsound = false;
84 bool mousejump = false;
85 bool freeze = false;
86 bool winfreeze = false;
87 float flashamount = 0, flashr = 0, flashg = 0, flashb = 0;
88 int flashdelay = 0;
89 float motionbluramount = 0;
90 bool stillloading = false;
91 bool showpoints = false;
92 bool showdamagebar = false;
93 bool alwaysblur = false;
94 bool immediate = false;
95 bool velocityblur = false;
96 XYZ windvector;
97 int mainmenu = 0;
98 int whichjointstartarray[26] = {0};
99 int whichjointendarray[26] = {0};
100
101 float smoketex = 0;
102
103 float slomospeed = 0;
104 float slomofreq = 0;
105
106 int tutoriallevel = 0;
107 int tutorialstage = 0;
108 float tutorialstagetime = 0;
109 float tutorialmaxtime = 0;
110 float tutorialsuccess = 0;
111
112 bool againbonus = false;
113
114 float damagedealt = 0;
115
116 int maptype = 0;
117
118 int editoractive = 0;
119 int editorpathtype = 0;
120
121 bool reversaltrain = false;
122 bool cananger = false;
123 bool canattack = false;
124
125 bool skyboxtexture = false;
126 float skyboxr = 0;
127 float skyboxg = 0;
128 float skyboxb = 0;
129 float skyboxlightr = 0;
130 float skyboxlightg = 0;
131 float skyboxlightb = 0;
132
133 int hostile = 0;
134 float hostiletime = 0;
135
136 XYZ envsound[30];
137 float envsoundvol[30] = {0};
138 float envsoundlife[30] = {0};
139 int numenvsounds;
140
141 bool devtools = false;
142
143 bool gamestarted = false;
144
145 StereoMode stereomode =  stereoNone;
146 StereoMode newstereomode = stereoNone;
147 float stereoseparation = 0.05;
148 bool  stereoreverse = false;