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