mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-22 07:41:16 +00:00
Make conditional more realistic, move MxTime to mxtypes.h, add TODO for MxTickleManager::Tickle.
This commit is contained in:
parent
9ffbf07958
commit
c5797206dd
@ -29,16 +29,18 @@ MxTickleManager::~MxTickleManager()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Match.
|
||||||
// OFFSET: LEGO1 0x100bdde0
|
// OFFSET: LEGO1 0x100bdde0
|
||||||
MxResult MxTickleManager::Tickle()
|
MxResult MxTickleManager::Tickle()
|
||||||
{
|
{
|
||||||
MxTime time = Timer()->GetTime();
|
MxTime time = Timer()->GetTime();
|
||||||
|
|
||||||
MxTickleClientPtrList::iterator it = m_clients.begin();
|
MxTickleClientPtrList::iterator it = m_clients.begin();
|
||||||
|
|
||||||
while (it != m_clients.end()) {
|
while (it != m_clients.end()) {
|
||||||
MxTickleClient *client = *it;
|
MxTickleClient *client = *it;
|
||||||
if ((client->GetFlags() & TICKLE_MANAGER_FLAG_DESTROY) == 0) {
|
if ((client->GetFlags() & TICKLE_MANAGER_FLAG_DESTROY) == 0) {
|
||||||
if (client->GetLastUpdateTime() != time && time <= client->GetLastUpdateTime())
|
if (client->GetLastUpdateTime() >= time)
|
||||||
client->SetLastUpdateTime(-client->GetTickleInterval());
|
client->SetLastUpdateTime(-client->GetTickleInterval());
|
||||||
|
|
||||||
if ((client->GetTickleInterval() + client->GetLastUpdateTime()) < time) {
|
if ((client->GetTickleInterval() + client->GetLastUpdateTime()) < time) {
|
||||||
|
|||||||
@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
typedef MxS32 MxTime;
|
|
||||||
|
|
||||||
class MxTickleClient
|
class MxTickleClient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -25,6 +25,8 @@ typedef int MxLong;
|
|||||||
typedef unsigned int MxULong;
|
typedef unsigned int MxULong;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef MxS32 MxTime;
|
||||||
|
|
||||||
typedef MxLong MxResult;
|
typedef MxLong MxResult;
|
||||||
const MxResult SUCCESS = 0;
|
const MxResult SUCCESS = 0;
|
||||||
const MxResult FAILURE = -1;
|
const MxResult FAILURE = -1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user