mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-20 15:40:32 +00:00
Merge branch 'dead_code' into 'master'
Remove dead code See merge request OpenMW/openmw!4412
This commit is contained in:
commit
c60e0539cc
@ -686,11 +686,6 @@ namespace MWRender
|
||||
updateAmbient();
|
||||
}
|
||||
|
||||
void RenderingManager::skySetDate(int day, int month)
|
||||
{
|
||||
mSky->setDate(day, month);
|
||||
}
|
||||
|
||||
int RenderingManager::skyGetMasserPhase() const
|
||||
{
|
||||
return mSky->getMasserPhase();
|
||||
|
@ -135,7 +135,6 @@ namespace MWRender
|
||||
|
||||
void setAmbientColour(const osg::Vec4f& colour);
|
||||
|
||||
void skySetDate(int day, int month);
|
||||
int skyGetMasserPhase() const;
|
||||
int skyGetSecundaPhase() const;
|
||||
void skySetMoonColour(bool red);
|
||||
|
@ -238,11 +238,8 @@ namespace MWRender
|
||||
, mAtmosphereNightRoll(0.f)
|
||||
, mCreated(false)
|
||||
, mIsStorm(false)
|
||||
, mDay(0)
|
||||
, mMonth(0)
|
||||
, mTimescaleClouds(Fallback::Map::getBool("Weather_Timescale_Clouds"))
|
||||
, mCloudAnimationTimer(0.f)
|
||||
, mRainTimer(0.f)
|
||||
, mStormParticleDirection(MWWorld::Weather::defaultDirection())
|
||||
, mStormDirection(MWWorld::Weather::defaultDirection())
|
||||
, mClouds()
|
||||
@ -250,8 +247,6 @@ namespace MWRender
|
||||
, mCloudBlendFactor(0.f)
|
||||
, mCloudSpeed(0.f)
|
||||
, mStarsOpacity(0.f)
|
||||
, mRemainingTransitionTime(0.f)
|
||||
, mRainEnabled(false)
|
||||
, mRainSpeed(0.f)
|
||||
, mRainDiameter(0.f)
|
||||
, mRainMinHeight(0.f)
|
||||
@ -263,7 +258,6 @@ namespace MWRender
|
||||
, mWindSpeed(0.f)
|
||||
, mBaseWindSpeed(0.f)
|
||||
, mEnabled(true)
|
||||
, mSunEnabled(true)
|
||||
, mSunglareEnabled(true)
|
||||
, mPrecipitationAlpha(0.f)
|
||||
, mDirtyParticlesEffect(false)
|
||||
@ -921,12 +915,6 @@ namespace MWRender
|
||||
mSecunda->setState(state);
|
||||
}
|
||||
|
||||
void SkyManager::setDate(int day, int month)
|
||||
{
|
||||
mDay = day;
|
||||
mMonth = month;
|
||||
}
|
||||
|
||||
void SkyManager::setGlareTimeOfDayFade(float val)
|
||||
{
|
||||
mSun->setGlareTimeOfDayFade(val);
|
||||
|
@ -54,12 +54,6 @@ namespace MWRender
|
||||
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
void setHour(double hour);
|
||||
///< will be called even when sky is disabled.
|
||||
|
||||
void setDate(int day, int month);
|
||||
///< will be called even when sky is disabled.
|
||||
|
||||
int getMasserPhase() const;
|
||||
///< 0 new moon, 1 waxing or waning cresecent, 2 waxing or waning half,
|
||||
/// 3 waxing or waning gibbous, 4 full moon
|
||||
@ -85,8 +79,6 @@ namespace MWRender
|
||||
|
||||
float getPrecipitationAlpha() const;
|
||||
|
||||
void setRainSpeed(float speed);
|
||||
|
||||
void setStormParticleDirection(const osg::Vec3f& direction);
|
||||
|
||||
void setSunDirection(const osg::Vec3f& direction);
|
||||
@ -165,14 +157,9 @@ namespace MWRender
|
||||
|
||||
bool mIsStorm;
|
||||
|
||||
int mDay;
|
||||
int mMonth;
|
||||
|
||||
bool mTimescaleClouds;
|
||||
float mCloudAnimationTimer;
|
||||
|
||||
float mRainTimer;
|
||||
|
||||
// particle system rotation is independent of cloud rotation internally
|
||||
osg::Vec3f mStormParticleDirection;
|
||||
osg::Vec3f mStormDirection;
|
||||
@ -190,9 +177,6 @@ namespace MWRender
|
||||
|
||||
VFS::Path::Normalized mCurrentParticleEffect;
|
||||
|
||||
float mRemainingTransitionTime;
|
||||
|
||||
bool mRainEnabled;
|
||||
std::string mRainEffect;
|
||||
float mRainSpeed;
|
||||
float mRainDiameter;
|
||||
@ -206,7 +190,6 @@ namespace MWRender
|
||||
float mBaseWindSpeed;
|
||||
|
||||
bool mEnabled;
|
||||
bool mSunEnabled;
|
||||
bool mSunglareEnabled;
|
||||
|
||||
float mPrecipitationAlpha;
|
||||
|
@ -183,22 +183,19 @@ namespace MWWorld
|
||||
return months[month];
|
||||
}
|
||||
|
||||
bool DateTimeManager::updateGlobalFloat(GlobalVariableName name, float value)
|
||||
void DateTimeManager::updateGlobalFloat(GlobalVariableName name, float value)
|
||||
{
|
||||
if (name == Globals::sGameHour)
|
||||
{
|
||||
setHour(value);
|
||||
return true;
|
||||
}
|
||||
else if (name == Globals::sDay)
|
||||
{
|
||||
setDay(static_cast<int>(value));
|
||||
return true;
|
||||
}
|
||||
else if (name == Globals::sMonth)
|
||||
{
|
||||
setMonth(static_cast<int>(value));
|
||||
return true;
|
||||
}
|
||||
else if (name == Globals::sYear)
|
||||
{
|
||||
@ -212,26 +209,21 @@ namespace MWWorld
|
||||
{
|
||||
mDaysPassed = static_cast<int>(value);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DateTimeManager::updateGlobalInt(GlobalVariableName name, int value)
|
||||
void DateTimeManager::updateGlobalInt(GlobalVariableName name, int value)
|
||||
{
|
||||
if (name == Globals::sGameHour)
|
||||
{
|
||||
setHour(static_cast<float>(value));
|
||||
return true;
|
||||
}
|
||||
else if (name == Globals::sDay)
|
||||
{
|
||||
setDay(value);
|
||||
return true;
|
||||
}
|
||||
else if (name == Globals::sMonth)
|
||||
{
|
||||
setMonth(value);
|
||||
return true;
|
||||
}
|
||||
else if (name == Globals::sYear)
|
||||
{
|
||||
@ -245,8 +237,6 @@ namespace MWWorld
|
||||
{
|
||||
mDaysPassed = value;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void DateTimeManager::setSimulationTimeScale(float scale)
|
||||
|
@ -53,8 +53,8 @@ namespace MWWorld
|
||||
private:
|
||||
friend class World;
|
||||
void setup(Globals& globalVariables);
|
||||
bool updateGlobalInt(GlobalVariableName name, int value);
|
||||
bool updateGlobalFloat(GlobalVariableName name, float value);
|
||||
void updateGlobalInt(GlobalVariableName name, int value);
|
||||
void updateGlobalFloat(GlobalVariableName name, float value);
|
||||
void advanceTime(double hours, Globals& globalVariables);
|
||||
|
||||
void setHour(double hour);
|
||||
|
@ -241,7 +241,6 @@ namespace MWWorld
|
||||
{
|
||||
if (mSky && (isCellExterior() || isCellQuasiExterior()))
|
||||
{
|
||||
updateSkyDate();
|
||||
mRendering->setSkyEnabled(true);
|
||||
}
|
||||
else
|
||||
@ -635,19 +634,13 @@ namespace MWWorld
|
||||
|
||||
void World::setGlobalInt(GlobalVariableName name, int value)
|
||||
{
|
||||
bool dateUpdated = mTimeManager->updateGlobalInt(name, value);
|
||||
if (dateUpdated)
|
||||
updateSkyDate();
|
||||
|
||||
mTimeManager->updateGlobalInt(name, value);
|
||||
mGlobalVariables[name].setInteger(value);
|
||||
}
|
||||
|
||||
void World::setGlobalFloat(GlobalVariableName name, float value)
|
||||
{
|
||||
bool dateUpdated = mTimeManager->updateGlobalFloat(name, value);
|
||||
if (dateUpdated)
|
||||
updateSkyDate();
|
||||
|
||||
mTimeManager->updateGlobalFloat(name, value);
|
||||
mGlobalVariables[name].setFloat(value);
|
||||
}
|
||||
|
||||
@ -921,7 +914,6 @@ namespace MWWorld
|
||||
|
||||
mWeatherManager->advanceTime(hours, incremental);
|
||||
mTimeManager->advanceTime(hours, mGlobalVariables);
|
||||
updateSkyDate();
|
||||
|
||||
if (!incremental)
|
||||
{
|
||||
@ -3854,12 +3846,6 @@ namespace MWWorld
|
||||
mWorldScene->reportStats(frameNumber, stats);
|
||||
}
|
||||
|
||||
void World::updateSkyDate()
|
||||
{
|
||||
ESM::EpochTimeStamp currentDate = mTimeManager->getEpochTimeStamp();
|
||||
mRendering->skySetDate(currentDate.mDay, currentDate.mMonth);
|
||||
}
|
||||
|
||||
std::vector<MWWorld::Ptr> World::getAll(const ESM::RefId& id)
|
||||
{
|
||||
return mWorldModel.getAll(id);
|
||||
|
@ -172,8 +172,6 @@ namespace MWWorld
|
||||
|
||||
void fillGlobalVariables();
|
||||
|
||||
void updateSkyDate();
|
||||
|
||||
void loadContentFiles(const Files::Collections& fileCollections, const std::vector<std::string>& content,
|
||||
ToUTF8::Utf8Encoder* encoder, Loading::Listener* listener);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user