Merge branch '138-toggle-free-look-with-hotkey' into main/gingo-test
[ryzomcore.git] / ryzom / client / src / global.h
blobecfa323e0e7840b41524f64a1a8d2c35485c2972
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010-2020 Winch Gate Property Limited
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2013-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program 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 Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef CL_GLOBAL_H
22 #define CL_GLOBAL_H
24 #include "nel/misc/types_nl.h"
25 #include "3d_notes.h"
26 #include "progress.h"
29 // tmp
30 #define USE_WATER_ENV_MAP
33 // ***************************************************************************
34 namespace NLWEB
36 class CHttpPackageProvider;
39 namespace NL3D
41 class UDriver;
42 class USCene;
43 class UInstanceGroup;
44 class ULandscape;
45 class UCloudScape;
46 class UCamera;
47 class UVisualCollisionManager;
48 class UMaterial;
49 class UTextContext;
50 class UWaterEnvMap;
51 class IStereoDisplay;
52 class IStereoHMD;
53 class CFXAA;
56 class CEntityAnimationManager;
57 class CSoundManager;
58 class CContinent;
59 class CWaterEnvMapRdr;
62 // ***************************************************************************
64 enum TBackground
66 StartBackground = 0,
67 ElevatorBackground,
68 TeleportKamiBackground,
69 TeleportKaravanBackground,
70 ResurectKamiBackground,
71 ResurectKaravanBackground,
72 EndBackground,
73 CustomBackground,
74 IntroNVidia,
75 LoadBackground,
78 // Camera Setup
79 const float SceneRootCameraZNear = 20.0f;
80 const float SceneRootCameraZFar = 20000.0f;
81 const float SkyCameraZFar = 500.0f;
82 const float CameraSetupZNear = 0.15f;
84 // Misc
85 const float ExtraZoneLoadingVision = 100.f;
88 // ***************************************************************************
89 // Data
90 extern NLWEB::CHttpPackageProvider *HttpPackageProvider; // Http provider from on-the-fly downloaded game data
92 // Main System
93 extern NL3D::UDriver *Driver; // The main 3D Driver
94 extern NL3D::IStereoDisplay *StereoDisplay; // Stereo display
95 extern NL3D::IStereoHMD *StereoHMD; // Head mount display
96 extern bool StereoDisplayAttached; // Is stereo display handling the display mode
97 extern CSoundManager *SoundMngr; // the sound manager
98 extern NL3D::UMaterial GenericMat; // Generic Material
99 extern NL3D::UTextContext *TextContext; // Context for all the text in the client.
101 // Effects
102 extern NL3D::CFXAA *FXAA;
104 // Main 3D Objects
105 extern NL3D::UScene *Scene;
106 extern NL3D::UScene *SceneRoot;
107 extern NL3D::UInstanceGroup *BackgroundIG;
108 extern NL3D::ULandscape *Landscape;
109 extern NL3D::UCloudScape *CloudScape;
110 extern NL3D::UCamera MainCam;
111 extern NL3D::UVisualCollisionManager *CollisionManager;
112 #ifdef USE_WATER_ENV_MAP
113 extern CWaterEnvMapRdr WaterEnvMapRdr;
114 extern NL3D::UWaterEnvMap *WaterEnvMap;
115 extern uint WaterEnvMapRefCount;
116 extern NL3D::UCamera WaterEnvMapSkyCam;
117 extern NL3D::UCamera WaterEnvMapCanopyCam;
118 #endif
120 // Network Walls
121 extern bool UserCharPosReceived;
122 extern bool SabrinaPhraseBookLoaded;
124 // Main scene matrices.
125 extern NLMISC::CMatrix MainSceneViewMatrix; // Matrix to transform from world space to camera space
126 extern NLMISC::CMatrix InvMainSceneViewMatrix; // Matrix to transform from camera space to world space
128 // Misc
129 extern bool InitCloudScape; // tells that the cloud scape must be reinitialized
130 extern CEntityAnimationManager *EAM;
131 extern CProgress ProgressBar;
132 extern TBackground LoadingBackground;
133 extern std::string LoadingBackgroundBG;
134 extern std::string LoadingMusic;
135 extern CContinent *LoadingContinent;
136 extern bool ConnectionReadySent;
137 extern bool PermanentlyBanned;
138 extern bool IgnoreEntityDbUpdates;
140 // VR
141 extern std::vector<std::pair<
142 std::string, std::string> > VRDeviceCache;
144 extern std::string Cookie, FSAddr;
145 extern std::string RingMainURL;
146 extern std::string NewsAtProgress;
147 extern bool FreeTrial;
149 void resetTextContext (const char *font, bool resetInterfaceManager);
151 #endif // CL_GLOBAL_H
153 /* End of global.h */