Implement LegoWorld::Find (#489)

* Implement LegoWorld::FUN_100213a0

* Rename lists

* Rename cursors

* Rename cursor

* Rename functions

* Remove a comment

* Rename more functions

* Fix return type
This commit is contained in:
Christian Semmler
2024-01-26 16:00:02 -05:00
committed by GitHub
parent 0a672d2146
commit b6aac26269
20 changed files with 154 additions and 91 deletions

View File

@@ -398,13 +398,13 @@ void LegoGameState::SetSomeEnumState(undefined4 p_state)
// FUNCTION: LEGO1 0x1003ceb0
void LegoGameState::FUN_1003ceb0()
{
if (FindEntityByAtomIdOrEntityId(*g_isleScript, 0)) {
if (FindWorld(*g_isleScript, 0)) {
m_currentAct = 0;
}
else if (FindEntityByAtomIdOrEntityId(*g_act2mainScript, 0)) {
else if (FindWorld(*g_act2mainScript, 0)) {
m_currentAct = 1;
}
else if (FindEntityByAtomIdOrEntityId(*g_act3Script, 0)) {
else if (FindWorld(*g_act3Script, 0)) {
m_currentAct = 2;
}
else {

View File

@@ -99,7 +99,8 @@ void InvokeAction(Extra::ActionType p_actionId, MxAtomId& p_pAtom, int p_targetE
// FUNCTION: LEGO1 0x1003e670
MxBool CheckIfEntityExists(MxBool p_enable, const char* p_filename, MxS32 p_entityId)
{
LegoWorld* world = (LegoWorld*) FindEntityByAtomIdOrEntityId(MxAtomId(p_filename, e_lowerCase2), p_entityId);
LegoWorld* world = FindWorld(MxAtomId(p_filename, e_lowerCase2), p_entityId);
if (world) {
world->VTable0x68(p_enable);
return TRUE;