]> git.jsancho.org Git - lugaru.git/blob - Source/Globals.cpp
Moved Skeleton and Animation to their own folder.
[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 int numhotspots = 0;
112 XYZ hotspot[40];
113 int hotspottype[40] = {0};
114 float hotspotsize[40] = {0};
115 char hotspottext[40][256] = {0};
116 int currenthotspot = 0;
117 int killhotspot = 0;
118
119 float smoketex = 0;
120
121 float slomospeed = 0;
122 float slomofreq = 0;
123
124 int tutoriallevel = 0;
125 int tutorialstage = 0;
126 float tutorialstagetime = 0;
127 float tutorialmaxtime = 0;
128 float tutorialsuccess = 0;
129
130 bool againbonus = false;
131
132 float damagedealt = 0;
133
134 int maptype = 0;
135
136 int editoractive = 0;
137 int editorpathtype = 0;
138
139 bool reversaltrain = false;
140 bool cananger = false;
141 bool canattack = false;
142
143 bool skyboxtexture = false;
144 float skyboxr = 0;
145 float skyboxg = 0;
146 float skyboxb = 0;
147 float skyboxlightr = 0;
148 float skyboxlightg = 0;
149 float skyboxlightb = 0;
150
151 int hostile = 0;
152 float hostiletime = 0;
153
154 XYZ envsound[30];
155 float envsoundvol[30] = {0};
156 float envsoundlife[30] = {0};
157 int numenvsounds;
158
159 bool debugmode = false;
160
161 bool campaign = false;
162
163 bool gamestarted = false;
164
165 StereoMode stereomode =  stereoNone;
166 StereoMode newstereomode = stereoNone;
167 float stereoseparation = 0.05;
168 bool  stereoreverse = false;