mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Implement/match LegoWorld::FUN_10021790 (#486)
* Implement/match LegoWorld::FUN_10021790 * Improve match * Match * Specify python package versions * Use wildcard version * Use const atom * Use const atom
This commit is contained in:
committed by
GitHub
parent
5f413165cc
commit
a3868e3808
@@ -168,9 +168,48 @@ MxPresenter* LegoWorld::FindPresenter(const char* p_presenter, const char* p_nam
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10021790
|
||||
MxPresenter* LegoWorld::FUN_10021790(MxAtomId& p_atom, MxS32 p_entityId)
|
||||
// FUNCTION: LEGO1 0x10021790
|
||||
MxCore* LegoWorld::FUN_10021790(const MxAtomId& p_atom, MxS32 p_entityId)
|
||||
{
|
||||
LegoEntityListCursor entityCursor(m_entityList);
|
||||
LegoEntity* entity;
|
||||
|
||||
while (entityCursor.Next(entity)) {
|
||||
if (entity->GetAtom() == p_atom && entity->GetEntityId() == p_entityId)
|
||||
return entity;
|
||||
}
|
||||
|
||||
MxPresenterListCursor presenterCursor0xb8(&m_list0xb8);
|
||||
MxPresenter* presenter;
|
||||
|
||||
while (presenterCursor0xb8.Next(presenter)) {
|
||||
MxDSAction* action = presenter->GetAction();
|
||||
|
||||
if (action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId)
|
||||
return presenter;
|
||||
}
|
||||
|
||||
MxPresenterListCursor presenterCursor0x80(&m_list0x80);
|
||||
|
||||
while (presenterCursor0x80.Next(presenter)) {
|
||||
MxDSAction* action = presenter->GetAction();
|
||||
|
||||
if (action && action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId)
|
||||
return presenter;
|
||||
}
|
||||
|
||||
for (MxPresenterSet::iterator it = m_set0xa8.begin(); it != m_set0xa8.end(); it++) {
|
||||
MxCore* core = *it;
|
||||
|
||||
if (core->IsA("MxPresenter")) {
|
||||
MxPresenter* presenter = (MxPresenter*) *it;
|
||||
MxDSAction* action = presenter->GetAction();
|
||||
|
||||
if (action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId)
|
||||
return *it;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user