19 #ifndef OPENXCOM_GAMETIME_H
20 #define OPENXCOM_GAMETIME_H
23 #include <yaml-cpp/yaml.h>
33 enum TimeTrigger { TIME_5SEC, TIME_10MIN, TIME_30MIN, TIME_1HOUR, TIME_1DAY, TIME_1MONTH };
43 int _second, _minute, _hour, _weekday, _day, _month, _year;
46 GameTime(
int weekday,
int day,
int month,
int year,
int hour,
int minute,
int second);
50 void load(
const YAML::Node& node);
52 YAML::Node
save()
const;
GameTime(int weekday, int day, int month, int year, int hour, int minute, int second)
Creates a new ingame time at a certain point.
Definition: GameTime.cpp:35
int getMonth() const
Gets the ingame month.
Definition: GameTime.cpp:229
YAML::Node save() const
Saves the time to YAML.
Definition: GameTime.cpp:65
int getYear() const
Gets the ingame year.
Definition: GameTime.cpp:249
void load(const YAML::Node &node)
Loads the time from YAML.
Definition: GameTime.cpp:50
TimeTrigger
Enumerator for time periods.
Definition: GameTime.h:33
int getSecond() const
Gets the ingame second.
Definition: GameTime.cpp:143
~GameTime()
Cleans up the ingame time.
Definition: GameTime.cpp:42
Contains strings used throughout the game for localization.
Definition: Language.h:42
std::wstring getDayString(Language *lang) const
Returns the localized representation of the current ingame day with the cardinal operator.
Definition: GameTime.cpp:201
int getWeekday() const
Gets the ingame weekday.
Definition: GameTime.cpp:170
Stores the current ingame time/date according to GMT.
Definition: GameTime.h:40
int getDay() const
Gets the ingame day.
Definition: GameTime.cpp:190
int getHour() const
Gets the ingame hour.
Definition: GameTime.cpp:161
std::string getMonthString() const
Returns a localizable-string representation of the current ingame month.
Definition: GameTime.cpp:239
double getDaylight() const
Gets the position of the daylight according to the ingame time.
Definition: GameTime.cpp:260
int getMinute() const
Gets the ingame minute.
Definition: GameTime.cpp:152
std::string getWeekdayString() const
Returns a localizable-string representation of the current ingame weekday.
Definition: GameTime.cpp:180
TimeTrigger advance()
Advances the time by 5 seconds.
Definition: GameTime.cpp:84