Skip to content

Commit

Permalink
Implement/match LegoWorld::ActorExists
Browse files Browse the repository at this point in the history
  • Loading branch information
foxtacles committed Jan 11, 2025
1 parent 4d3481d commit bb75f36
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LEGO1/lego/legoomni/include/legopathcontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ class LegoPathController : public MxCore {
MxFloat& p_param5
);

// FUNCTION: BETA10 0x100e0160
MxBool ActorExists(LegoPathActor* p_actor) { return m_actors.find(p_actor) == m_actors.end() ? FALSE : TRUE; }

static MxResult Init();
static MxResult Reset();

Expand Down
1 change: 1 addition & 0 deletions LEGO1/lego/legoomni/include/legoworld.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class LegoWorld : public LegoEntity {
Vector3& p_direction
);
void RemoveActor(LegoPathActor* p_actor);
MxBool ActorExists(LegoPathActor* p_actor);
void FUN_1001fda0(LegoAnimPresenter* p_presenter);
void FUN_1001fe90(LegoAnimPresenter* p_presenter);
LegoPathBoundary* FindPathBoundary(const char* p_name);
Expand Down
15 changes: 15 additions & 0 deletions LEGO1/lego/legoomni/src/entity/legoworld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,21 @@ void LegoWorld::RemoveActor(LegoPathActor* p_actor)
}
}

// FUNCTION: BETA10 0x100da560
MxBool LegoWorld::ActorExists(LegoPathActor* p_actor)
{
LegoPathControllerListCursor cursor(&m_list0x68);
LegoPathController* controller;

while (cursor.Next(controller)) {
if (controller->ActorExists(p_actor) == TRUE) {
return TRUE;
}
}

return FALSE;
}

// FUNCTION: LEGO1 0x1001fda0
// FUNCTION: BETA10 0x100da621
void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter)
Expand Down

0 comments on commit bb75f36

Please sign in to comment.