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