mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Re-enable some outcommented sky code
This commit is contained in:
parent
3da8f6e62e
commit
1c151f2f0a
@ -219,6 +219,26 @@ namespace MWRender
|
||||
updateAmbient();
|
||||
}
|
||||
|
||||
void RenderingManager::skySetDate(int day, int month)
|
||||
{
|
||||
mSky->setDate(day, month);
|
||||
}
|
||||
|
||||
int RenderingManager::skyGetMasserPhase() const
|
||||
{
|
||||
return mSky->getMasserPhase();
|
||||
}
|
||||
|
||||
int RenderingManager::skyGetSecundaPhase() const
|
||||
{
|
||||
return mSky->getSecundaPhase();
|
||||
}
|
||||
|
||||
void RenderingManager::skySetMoonColour(bool red)
|
||||
{
|
||||
mSky->setMoonColour(red);
|
||||
}
|
||||
|
||||
void RenderingManager::configureAmbient(const ESM::Cell *cell)
|
||||
{
|
||||
setAmbientColour(SceneUtil::colourFromRGB(cell->mAmbi.mAmbient));
|
||||
@ -593,6 +613,8 @@ namespace MWRender
|
||||
|
||||
void RenderingManager::clear()
|
||||
{
|
||||
mSky->setMoonColour(false);
|
||||
|
||||
notifyWorldSpaceChanged();
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,11 @@ namespace MWRender
|
||||
|
||||
void setAmbientColour(const osg::Vec4f& colour);
|
||||
|
||||
void skySetDate(int day, int month);
|
||||
int skyGetMasserPhase() const;
|
||||
int skyGetSecundaPhase() const;
|
||||
void skySetMoonColour(bool red);
|
||||
|
||||
void setSunDirection(const osg::Vec3f& direction);
|
||||
void setSunColour(const osg::Vec4f& colour);
|
||||
|
||||
|
@ -473,7 +473,6 @@ SkyManager::SkyManager(osg::Group* parentNode, Resource::SceneManager* sceneMana
|
||||
, mCreated(false)
|
||||
, mMoonRed(false)
|
||||
, mIsStorm(false)
|
||||
, mHour(0.0f)
|
||||
, mDay(0)
|
||||
, mMonth(0)
|
||||
, mCloudAnimationTimer(0.f)
|
||||
@ -886,11 +885,6 @@ void SkyManager::setSecundaFade(const float fade)
|
||||
mSecunda->setAlpha(fade);
|
||||
}
|
||||
|
||||
void SkyManager::setHour(double hour)
|
||||
{
|
||||
mHour = static_cast<float>(hour);
|
||||
}
|
||||
|
||||
void SkyManager::setDate(int day, int month)
|
||||
{
|
||||
mDay = day;
|
||||
|
@ -117,7 +117,6 @@ namespace MWRender
|
||||
|
||||
bool mIsStorm;
|
||||
|
||||
float mHour;
|
||||
int mDay;
|
||||
int mMonth;
|
||||
|
||||
|
@ -134,9 +134,8 @@ namespace MWWorld
|
||||
{
|
||||
if (mSky && (isCellExterior() || isCellQuasiExterior()))
|
||||
{
|
||||
//mRendering->skySetHour (mGlobalVariables["gamehour"].getFloat());
|
||||
//mRendering->skySetDate (mGlobalVariables["day"].getInteger(),
|
||||
// mGlobalVariables["month"].getInteger());
|
||||
mRendering->skySetDate (mGlobalVariables["day"].getInteger(),
|
||||
mGlobalVariables["month"].getInteger());
|
||||
|
||||
mRendering->setSkyEnabled(true);
|
||||
}
|
||||
@ -812,8 +811,6 @@ namespace MWWorld
|
||||
|
||||
mGlobalVariables["gamehour"].setFloat(static_cast<float>(hour));
|
||||
|
||||
//mRendering->skySetHour (hour);
|
||||
|
||||
mWeatherManager->setHour(static_cast<float>(hour));
|
||||
|
||||
if (days>0)
|
||||
@ -849,7 +846,7 @@ namespace MWWorld
|
||||
mGlobalVariables["day"].setInteger (day);
|
||||
mGlobalVariables["month"].setInteger (month);
|
||||
|
||||
//mRendering->skySetDate (day, month);
|
||||
mRendering->skySetDate(day, month);
|
||||
}
|
||||
|
||||
void World::setMonth (int month)
|
||||
@ -870,7 +867,7 @@ namespace MWWorld
|
||||
if (years>0)
|
||||
mGlobalVariables["year"].setInteger (years+mGlobalVariables["year"].getInteger());
|
||||
|
||||
//mRendering->skySetDate (mGlobalVariables["day"].getInteger(), month);
|
||||
mRendering->skySetDate (mGlobalVariables["day"].getInteger(), month);
|
||||
}
|
||||
|
||||
int World::getDay() const
|
||||
@ -916,36 +913,24 @@ namespace MWWorld
|
||||
|
||||
bool World::toggleSky()
|
||||
{
|
||||
#if 0
|
||||
if (mSky)
|
||||
{
|
||||
mSky = false;
|
||||
mRendering->skyDisable();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
mSky = true;
|
||||
mRendering->skyEnable();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
mSky = !mSky;
|
||||
mRendering->setSkyEnabled(mSky);
|
||||
return mSky;
|
||||
}
|
||||
|
||||
int World::getMasserPhase() const
|
||||
{
|
||||
return 0;//mRendering->skyGetMasserPhase();
|
||||
return mRendering->skyGetMasserPhase();
|
||||
}
|
||||
|
||||
int World::getSecundaPhase() const
|
||||
{
|
||||
return 0;//mRendering->skyGetSecundaPhase();
|
||||
return mRendering->skyGetSecundaPhase();
|
||||
}
|
||||
|
||||
void World::setMoonColour (bool red)
|
||||
{
|
||||
//mRendering->skySetMoonColour (red);
|
||||
mRendering->skySetMoonColour (red);
|
||||
}
|
||||
|
||||
float World::getTimeScaleFactor() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user