2015-10-27 20:04:02 +00:00
|
|
|
#include "CTimeProvider.hpp"
|
|
|
|
#if 0
|
|
|
|
#include "CGraphics.hpp"
|
|
|
|
#endif
|
|
|
|
|
2016-02-13 09:02:47 +00:00
|
|
|
namespace pshag
|
2015-10-27 20:04:02 +00:00
|
|
|
{
|
2016-02-07 16:15:43 +00:00
|
|
|
CTimeProvider* CTimeProvider::g_currentTimeProvider = nullptr;
|
2015-10-27 20:04:02 +00:00
|
|
|
CTimeProvider::CTimeProvider(const float& time)
|
2016-02-07 16:15:43 +00:00
|
|
|
: x0_currentTime(time), x8_lastProvider(g_currentTimeProvider)
|
2015-10-27 20:04:02 +00:00
|
|
|
{
|
|
|
|
if (x8_lastProvider != nullptr)
|
|
|
|
x8_lastProvider->x4_first = false;
|
|
|
|
|
2016-02-18 16:14:57 +00:00
|
|
|
g_currentTimeProvider = this;
|
|
|
|
|
2015-10-27 20:04:02 +00:00
|
|
|
#if 0
|
|
|
|
CGraphics::SetExternalTimeProvider(this);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
CTimeProvider::~CTimeProvider()
|
|
|
|
{
|
2016-02-07 16:15:43 +00:00
|
|
|
g_currentTimeProvider = x8_lastProvider;
|
|
|
|
if (g_currentTimeProvider)
|
|
|
|
g_currentTimeProvider->x4_first = true;
|
2015-10-27 20:04:02 +00:00
|
|
|
#if 0
|
|
|
|
CGraphics::SetExternalTimeProvider(g_TimeProvider);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|