metaforce/Runtime/CTimeProvider.cpp

33 lines
683 B
C++
Raw Normal View History

2015-10-27 20:04:02 +00:00
#include "CTimeProvider.hpp"
#if 0
2016-03-04 23:04:53 +00:00
#include "Graphics/CGraphics.hpp"
2015-10-27 20:04:02 +00:00
#endif
2016-03-04 23:04:53 +00:00
namespace urde
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
}
}