]> git.jsancho.org Git - lugaru.git/blob - Source/Globals.cpp
Cleaned up Objects handling
[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 "Graphic/Stereo.hpp"
22 #include "Math/Quaternions.hpp"
23 #include "Objects/Weapons.hpp"
24
25 #include <SDL.h>
26 #include <string>
27
28 bool visibleloading = 0;
29
30 float volume = 0;
31 bool ismotionblur = false;
32 float usermousesensitivity = 0;
33 bool floatjump = false;
34 bool cellophane = false;
35 bool autoslomo = false;
36 bool decals = false;
37 bool invertmouse = false;
38 bool texttoggle = false;
39 float blurness = 0;
40 float targetblurness = 0;
41 float windvar = 0;
42 float precipdelay = 0;
43 float gamespeed = 0;
44 float oldgamespeed = 0;
45 int difficulty = 0;
46 float multiplier = 0;
47 float realmultiplier = 0;
48 float screenwidth = 0, screenheight = 0;
49 bool fullscreen = 0;
50 float viewdistance = 0;
51 XYZ viewer;
52 XYZ viewerfacing;
53 float fadestart = 0;
54 int environment = 0;
55 float texscale = 0;
56 float gravity = 0;
57 Light light;
58 Terrain terrain;
59
60 SDL_Window *sdlwindow;
61
62 int kTextureSize = 0;
63 int detail = 0;
64 FRUSTUM frustum;
65 float texdetail = 0;
66 float realtexdetail = 0;
67 float playerdist = 0;
68 int slomo = 0;
69 float slomodelay = 0;
70 GLubyte bloodText[512 * 512 * 3] = {0};
71 GLubyte wolfbloodText[512 * 512 * 3] = {0};
72 int bloodtoggle = 0;
73 float camerashake = 0;
74 float woozy = 0;
75 float blackout = 0;
76 bool foliage = false;
77 bool musictoggle = false;
78 bool trilinear;
79 Weapons weapons;
80 bool damageeffects = false;
81 bool ambientsound = false;
82 bool mousejump = false;
83 bool freeze = false;
84 bool winfreeze = false;
85 float flashamount = 0, flashr = 0, flashg = 0, flashb = 0;
86 int flashdelay = 0;
87 float motionbluramount = 0;
88 bool stillloading = false;
89 bool showpoints = false;
90 bool showdamagebar = false;
91 bool alwaysblur = false;
92 bool immediate = false;
93 bool velocityblur = false;
94 XYZ windvector;
95 int mainmenu = 0;
96 int whichjointstartarray[26] = {0};
97 int whichjointendarray[26] = {0};
98
99 float smoketex = 0;
100
101 float slomospeed = 0;
102 float slomofreq = 0;
103
104 int tutoriallevel = 0;
105 int tutorialstage = 0;
106 float tutorialstagetime = 0;
107 float tutorialmaxtime = 0;
108 float tutorialsuccess = 0;
109
110 bool againbonus = false;
111
112 float damagedealt = 0;
113
114 int maptype = 0;
115
116 int editoractive = 0;
117 int editorpathtype = 0;
118
119 bool reversaltrain = false;
120 bool cananger = false;
121 bool canattack = false;
122
123 bool skyboxtexture = false;
124 float skyboxr = 0;
125 float skyboxg = 0;
126 float skyboxb = 0;
127 float skyboxlightr = 0;
128 float skyboxlightg = 0;
129 float skyboxlightb = 0;
130
131 int hostile = 0;
132 float hostiletime = 0;
133
134 XYZ envsound[30];
135 float envsoundvol[30] = {0};
136 float envsoundlife[30] = {0};
137 int numenvsounds;
138
139 bool devtools = false;
140
141 bool gamestarted = false;
142
143 StereoMode stereomode =  stereoNone;
144 StereoMode newstereomode = stereoNone;
145 float stereoseparation = 0.05;
146 bool  stereoreverse = false;