Fix css style order when using external css files
[ryzomcore.git] / ryzom / client / src / weather.h
blob96aef7882392fe8178d139585885aafe9f770c11
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2014 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/>.
22 #ifndef CL_WORLD_LIGHT_CYCLE_H
23 #define CL_WORLD_LIGHT_CYCLE_H
26 #include "game_share/season.h"
28 struct CLightCycleDesc;
29 struct CLightCycle;
30 class CLightCycleManager;
31 class CWeatherManagerClient;
32 class CWeatherFunctionParamsSheet;
34 // release memory
35 void releaseWeather();
37 // Description of light cycle in ryzom (for each season) , should be initialized from a georges sheet
38 extern CLightCycle WorldLightCycle;
39 /** This setup light of objects in the world depending on the hour. It has a light cycle descriptor which must be setuped at each season change (see buildLightCycleDesc).
40 * It may interract with a weather manager to know when to override lighting of the scene (in case of bad weather).
42 extern CLightCycleManager LightCycleManager;
43 // This manage precipitations and blend weather setups. This allow to know the current weather (if fog or light must be overriden)
44 extern CWeatherManagerClient WeatherManager;
45 // The last season computed from computeCurrSeason, updated in the main loop / in teleport. Update code based on season should use this value
46 extern EGSPD::CSeason::TSeason CurrSeason;
47 // The startup season, updated at init and when a new continent is selected
48 extern EGSPD::CSeason::TSeason StartupSeason;
49 // Parameter for weather function generation
50 extern CWeatherFunctionParamsSheet *WeatherFunctionParams;
52 // load the world light cycle from a sheet
53 void loadWorldLightCycle();
55 // load the weather function params
56 void loadWeatherFunctionParams();
58 // Tool fct : build a CSeasonLightCycle for the given season
59 void buildLightCycleDesc(CLightCycleDesc &dest, EGSPD::CSeason::TSeason season);
61 // Small update of the weather manager
62 void updateWeatherManager(class CContinent *continent);
64 // Full update of the weather manager
65 void updateWeatherManager(const NLMISC::CMatrix &camMatrix, CContinent *continent);
67 // Some extern value
68 extern float ManualWeatherValue;
69 extern EGSPD::CSeason::TSeason ManualSeasonValue;
70 extern bool ForceTrueWeatherValue;
71 extern float DayNightCycleHour;
72 extern float ForcedDayNightCycleHour;
74 class CWeatherFunctionParamsSheetBase;
75 class CWeatherFunction;
78 // update server driven weather value
79 void updateDBDrivenWeatherValue();
81 float getBlendedWeather(uint64 day,
82 float hour,
83 const CWeatherFunctionParamsSheetBase &wfp,
84 const CWeatherFunction wf[EGSPD::CSeason::Invalid]
87 EGSPD::CSeason::TSeason computeCurrSeason();
89 #endif