1 /* 2 Copyright (C) 2003, 2010 - Wolfire Games 3 Copyright (C) 2010-2017 - 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/XYZ.hpp" 23 #include "Objects/Weapons.hpp" 24 25 #include <SDL.h> 26 #include <string> 27 28 bool visibleloading = false; 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 decalstoggle = 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 int bloodtoggle = 0; 71 float camerashake = 0; 72 float woozy = 0; 73 float blackout = 0; 74 bool foliage = false; 75 bool musictoggle = false; 76 bool trilinear; 77 Weapons weapons; 78 bool damageeffects = false; 79 bool ambientsound = false; 80 bool mousejump = false; 81 bool freeze = false; 82 bool winfreeze = false; 83 float flashamount = 0, flashr = 0, flashg = 0, flashb = 0; 84 int flashdelay = 0; 85 float motionbluramount = 0; 86 bool stillloading = false; 87 bool showpoints = false; 88 bool showdamagebar = false; 89 bool alwaysblur = false; 90 bool immediate = false; 91 bool velocityblur = false; 92 XYZ windvector; 93 int mainmenu = 0; 94 int whichjointstartarray[26] = { 0 }; 95 int whichjointendarray[26] = { 0 }; 96 97 float smoketex = 0; 98 99 float slomospeed = 0; 100 float slomofreq = 0; 101 102 bool againbonus = false; 103 104 float damagedealt = 0; 105 106 int maptype = 0; 107 108 int editoractive = 0; 109 int editorpathtype = 0; 110 111 bool reversaltrain = false; 112 bool cananger = false; 113 bool canattack = false; 114 115 bool skyboxtexture = false; 116 float skyboxr = 0; 117 float skyboxg = 0; 118 float skyboxb = 0; 119 float skyboxlightr = 0; 120 float skyboxlightg = 0; 121 float skyboxlightb = 0; 122 123 int hostile = 0; 124 float hostiletime = 0; 125 126 XYZ envsound[30]; 127 float envsoundvol[30] = { 0 }; 128 float envsoundlife[30] = { 0 }; 129 int numenvsounds; 130 131 bool devtools = false; 132 133 bool gamestarted = false; 134 135 StereoMode stereomode = stereoNone; 136 StereoMode newstereomode = stereoNone; 137 float stereoseparation = 0.05; 138 bool stereoreverse = false; 139