From 74ae3605e0f8eb742ebe7b4b03438b62bff57d54 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 19 May 2012 09:31:45 +0200 Subject: [PATCH] Issue #256: added getTimeStamp function to World --- apps/openmw/mwworld/world.cpp | 6 ++++++ apps/openmw/mwworld/world.hpp | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/apps/openmw/mwworld/world.cpp b/apps/openmw/mwworld/world.cpp index 4adaf79183..eeda92277e 100644 --- a/apps/openmw/mwworld/world.cpp +++ b/apps/openmw/mwworld/world.cpp @@ -471,6 +471,12 @@ namespace MWWorld mRendering->skySetDate (mGlobalVariables->getInt ("day"), month); } + TimeStamp World::getTimeStamp() const + { + return TimeStamp (mGlobalVariables->getFloat ("gamehour"), + mGlobalVariables->getInt ("dayspassed")); + } + bool World::toggleSky() { if (mSky) diff --git a/apps/openmw/mwworld/world.hpp b/apps/openmw/mwworld/world.hpp index 7359f8b902..49a3cf0296 100644 --- a/apps/openmw/mwworld/world.hpp +++ b/apps/openmw/mwworld/world.hpp @@ -18,6 +18,7 @@ #include "physicssystem.hpp" #include "cells.hpp" #include "localscripts.hpp" +#include "timestamp.hpp" #include #include @@ -185,6 +186,9 @@ namespace MWWorld void setDay (int day); ///< Set in-game time day. + TimeStamp getTimeStamp() const; + ///< Return current in-game time stamp. + bool toggleSky(); ///< \return Resulting mode