mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-24 05:53:51 +00:00
e5b1843089
# Conflicts: # apps/openmw/mwbase/world.hpp # apps/openmw/mwgui/jailscreen.cpp # apps/openmw/mwmechanics/activespells.cpp # apps/openmw/mwmechanics/aiactivate.cpp # apps/openmw/mwmechanics/aiactivate.hpp # apps/openmw/mwmechanics/creaturestats.cpp # apps/openmw/mwscript/aiextensions.cpp # apps/openmw/mwscript/statsextensions.cpp # apps/openmw/mwworld/worldimp.cpp # apps/openmw/mwworld/worldimp.hpp
73 lines
1.6 KiB
C++
73 lines
1.6 KiB
C++
#ifndef GAME_MWWORLD_DATETIMEMANAGER_H
|
|
#define GAME_MWWORLD_DATETIMEMANAGER_H
|
|
|
|
#include <string>
|
|
|
|
namespace ESM
|
|
{
|
|
struct EpochTimeStamp;
|
|
}
|
|
|
|
namespace MWWorld
|
|
{
|
|
class Globals;
|
|
class TimeStamp;
|
|
|
|
class DateTimeManager
|
|
{
|
|
int mDaysPassed = 0;
|
|
int mDay = 0;
|
|
int mMonth = 0;
|
|
int mYear = 0;
|
|
float mGameHour = 0.f;
|
|
float mTimeScale = 0.f;
|
|
|
|
void setHour(double hour);
|
|
void setDay(int day);
|
|
void setMonth(int month);
|
|
|
|
/*
|
|
Start of tes3mp addition
|
|
|
|
Make it possible to set the year from elsewhere
|
|
*/
|
|
void setYear(int year);
|
|
/*
|
|
End of tes3mp addition
|
|
*/
|
|
|
|
/*
|
|
Start of tes3mp addition
|
|
|
|
Make it possible to set the number of days passed from elsewhere
|
|
*/
|
|
void setDaysPassed(int daysPassed);
|
|
/*
|
|
End of tes3mp addition
|
|
*/
|
|
|
|
/*
|
|
Start of tes3mp addition
|
|
|
|
Make it possible to set a custom timeScale from elsewhere
|
|
*/
|
|
void setTimeScale(float timeScale);
|
|
/*
|
|
End of tes3mp addition
|
|
*/
|
|
|
|
public:
|
|
std::string getMonthName(int month) const;
|
|
TimeStamp getTimeStamp() const;
|
|
ESM::EpochTimeStamp getEpochTimeStamp() const;
|
|
float getTimeScaleFactor() const;
|
|
|
|
void advanceTime(double hours, Globals& globalVariables);
|
|
|
|
void setup(Globals& globalVariables);
|
|
bool updateGlobalInt(const std::string& name, int value);
|
|
bool updateGlobalFloat(const std::string& name, float value);
|
|
};
|
|
}
|
|
|
|
#endif
|