Make conditional more realistic, move MxTime to mxtypes.h, add TODO for MxTickleManager::Tickle.

This commit is contained in:
Brendan Dougherty 2023-07-20 16:14:49 -05:00
parent 9ffbf07958
commit c5797206dd
3 changed files with 5 additions and 3 deletions

View File

@ -29,16 +29,18 @@ MxTickleManager::~MxTickleManager()
}
}
// TODO: Match.
// OFFSET: LEGO1 0x100bdde0
MxResult MxTickleManager::Tickle()
{
MxTime time = Timer()->GetTime();
MxTickleClientPtrList::iterator it = m_clients.begin();
while (it != m_clients.end()) {
MxTickleClient *client = *it;
if ((client->GetFlags() & TICKLE_MANAGER_FLAG_DESTROY) == 0) {
if (client->GetLastUpdateTime() != time && time <= client->GetLastUpdateTime())
if (client->GetLastUpdateTime() >= time)
client->SetLastUpdateTime(-client->GetTickleInterval());
if ((client->GetTickleInterval() + client->GetLastUpdateTime()) < time) {

View File

@ -6,8 +6,6 @@
#include "compat.h"
typedef MxS32 MxTime;
class MxTickleClient
{
public:

View File

@ -25,6 +25,8 @@ typedef int MxLong;
typedef unsigned int MxULong;
#endif
typedef MxS32 MxTime;
typedef MxLong MxResult;
const MxResult SUCCESS = 0;
const MxResult FAILURE = -1;