Compare commits

...

4 Commits

Author SHA1 Message Date
kaetemi 8e5a515968 Merge with develop
--HG--
branch : feature-light_cycle
10 years ago
kaetemi db19afaafc Increase sheet versions
--HG--
branch : feature-light_cycle
10 years ago
kaetemi 057bf71967 Allow different light cycle for different continents [breaks packed sheets]
--HG--
branch : feature-light_cycle
10 years ago
kaetemi ea657234d9 Branch feature-light_cycle
--HG--
branch : feature-light_cycle
10 years ago

@ -300,6 +300,9 @@ void CContinentParameters::build(const NLGEORGES::UFormElm &item)
if(readSeason<EGSPD::CSeason::Invalid)
ForceDisplayedSeason[season]= readSeason;
}
// Read light cycle
item.getValueByName(LightCycle, "LightCycle");
}
@ -393,6 +396,8 @@ void CContinentParameters::serial(class NLMISC::IStream &f) throw(NLMISC::EStrea
f.serial(SkySheet[i]);
f.serialEnum(ForceDisplayedSeason[i]);
}
//
f.serial(LightCycle);
}
//=========================================================================

@ -62,9 +62,12 @@ public:
/// LandscapeIG filename.
std::string LandscapeIG;
// New Sky system : gives name of the sky sheet per season. If present, this bypass the SkyDay & SkyNight fields
/// New Sky system : gives name of the sky sheet per season. If present, this bypass the SkyDay & SkyNight fields
std::string SkySheet[EGSPD::CSeason::Invalid];
/// Light Cycle sheet
std::string LightCycle;
/// SkyDay filename.
std::string SkyDay;

@ -420,6 +420,11 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
progress.progress (0);
progress.pushCropedValues (0, 1.f/3.f);
{
H_AUTO(InitRZWorldLightCycle)
loadWorldLightCycle(CSheetId(LightCycle));
}
{
H_AUTO(InitRZWorldIndoor)
if (!ClientCfg.Light)

@ -587,7 +587,7 @@ void CContinentManager::reloadWeather()
WeatherManager.init();
// Load description of light cycles for each season.
loadWorldLightCycle();
loadWorldLightCycle(CSheetId::Unknown); //FIXME
// Load global weather function parameters
loadWeatherFunctionParams();

@ -411,7 +411,7 @@ static void initWeather()
{
WeatherManager.init();
// Load description of light cycles for each season.
loadWorldLightCycle();
loadWorldLightCycle(CSheetId::Unknown); // FIXME
// Load global weather function parameters
loadWeatherFunctionParams();
//

@ -442,7 +442,7 @@ class CAHReloadSeason: public IActionHandler
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
{
// reload all parameters for weather
loadWorldLightCycle();
loadWorldLightCycle(CSheetId::Unknown); // FIXME
loadWeatherFunctionParams();
WeatherManager.init();
ContinentMngr.reloadWeather();

@ -103,8 +103,8 @@ CTypeVersion TypeVersion [] =
// CTypeVersion("mission", 0),
CTypeVersion("race_stats", 3),
CTypeVersion("light_cycle", 0),
CTypeVersion("weather_setup", 1),
CTypeVersion("continent", 12),
CTypeVersion("weather_setup", 2),
CTypeVersion("continent", 13),
CTypeVersion("world", 1),
CTypeVersion("weather_function_params", 2),
CTypeVersion("mission_icon", 0),

@ -87,9 +87,14 @@ void buildLightCycleDesc(CLightCycleDesc &dest,EGSPD::CSeason::TSeason season)
else dest.DuskRatio = 0.5f;
}
void loadWorldLightCycle()
void loadWorldLightCycle(CSheetId lightCycle)
{
CEntitySheet *sheet = SheetMngr.get(CSheetId("ryzom.light_cycle"));
nldebug("Load light cycle '%s'", lightCycle.toString().c_str());
if (lightCycle == CSheetId::Unknown)
lightCycle = CSheetId("ryzom.light_cycle");
CEntitySheet *sheet = SheetMngr.get(lightCycle);
nlassert(sheet);
if (sheet->type() != CEntitySheet::LIGHT_CYCLE)
{

@ -20,6 +20,7 @@
#define CL_WORLD_LIGHT_CYCLE_H
#include <nel/misc/sheet_id.h>
#include "game_share/season.h"
struct CLightCycleDesc;
@ -47,7 +48,7 @@ extern EGSPD::CSeason::TSeason StartupSeason;
extern CWeatherFunctionParamsSheet *WeatherFunctionParams;
// load the world light cycle from a sheet
void loadWorldLightCycle();
void loadWorldLightCycle(NLMISC::CSheetId lightCycleSheet);
// load the weather function params
void loadWeatherFunctionParams();

Loading…
Cancel
Save