diff --git a/LEGO1/lego/legoomni/include/legonamedplane.h b/LEGO1/lego/legoomni/include/legonamedplane.h index cdd50221..89497b31 100644 --- a/LEGO1/lego/legoomni/include/legonamedplane.h +++ b/LEGO1/lego/legoomni/include/legonamedplane.h @@ -13,6 +13,10 @@ struct LegoNamedPlane { // FUNCTION: LEGO1 0x10033a70 // LegoNamedPlane::~LegoNamedPlane + // Unclear whether getters/setters were used. + // Act1State::Serialize seems to access `m_name` directly (only matches like that) + // Act1State::PlaceActors though seems to require extensive use of getters to improve + const char* GetName() const { return m_name.GetData(); } const Mx3DPointFloat& GetPosition() { return m_position; } const Mx3DPointFloat& GetDirection() { return m_direction; } @@ -23,9 +27,6 @@ struct LegoNamedPlane { void SetDirection(const Mx3DPointFloat& p_direction) { m_direction = p_direction; } void SetUp(const Mx3DPointFloat& p_up) { m_up = p_up; } - // TODO: Unclear whether this was defined - MxBool IsPresent() { return strcmp(m_name.GetData(), "") != 0; } - // FUNCTION: LEGO1 0x100344d0 MxResult Serialize(LegoStorage* p_storage) { diff --git a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp index 69a624ee..4efaea03 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp @@ -752,7 +752,7 @@ void LegoPathActor::UpdatePlane(LegoNamedPlane& p_namedPlane) // FUNCTION: LEGO1 0x1002f830 void LegoPathActor::PlaceActor(LegoNamedPlane& p_namedPlane) { - if (p_namedPlane.IsPresent()) { + if (strcmp(p_namedPlane.m_name.GetData(), "")) { LegoWorld* world = CurrentWorld(); world->PlaceActor(this, p_namedPlane.GetName(), 0, 0.5f, 1, 0.5f); SetLocation(p_namedPlane.GetPosition(), p_namedPlane.GetDirection(), p_namedPlane.GetUp(), TRUE); diff --git a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index 5ade0b3a..ccbaa0c3 100644 --- a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -339,7 +339,7 @@ void RegistrationBook::FUN_100778c0() if (GameState()->GetCurrentAct() == LegoGameState::e_act1) { Act1State* act1state = (Act1State*) GameState()->GetState("Act1State"); - if (act1state->m_helicopterPlane.IsPresent()) { + if (strcmp(act1state->m_helicopterPlane.m_name.GetData(), "")) { InvokeAction(Extra::e_start, m_atomId, CopterScript::c_Helicopter_Actor, NULL); NotificationManager()->Send( this, @@ -349,7 +349,7 @@ void RegistrationBook::FUN_100778c0() m_unk0x2b8++; } - if (act1state->m_jetskiPlane.IsPresent()) { + if (strcmp(act1state->m_jetskiPlane.m_name.GetData(), "")) { InvokeAction(Extra::e_start, m_atomId, JetskiScript::c_Jetski_Actor, NULL); NotificationManager()->Send( this, @@ -359,7 +359,7 @@ void RegistrationBook::FUN_100778c0() m_unk0x2b8++; } - if (act1state->m_dunebuggyPlane.IsPresent()) { + if (strcmp(act1state->m_dunebuggyPlane.m_name.GetData(), "")) { InvokeAction(Extra::e_start, m_atomId, DunecarScript::c_DuneBugy_Actor, NULL); NotificationManager()->Send( this, @@ -369,7 +369,7 @@ void RegistrationBook::FUN_100778c0() m_unk0x2b8++; } - if (act1state->m_racecarPlane.IsPresent()) { + if (strcmp(act1state->m_racecarPlane.m_name.GetData(), "")) { InvokeAction(Extra::e_start, m_atomId, RacecarScript::c_RaceCar_Actor, NULL); NotificationManager()->Send( this, diff --git a/LEGO1/viewmanager/viewmanager.h b/LEGO1/viewmanager/viewmanager.h index 051fe0fa..cda8d480 100644 --- a/LEGO1/viewmanager/viewmanager.h +++ b/LEGO1/viewmanager/viewmanager.h @@ -42,6 +42,7 @@ class ViewManager { // FUNCTION: BETA10 0x100576b0 const CompoundObject& GetROIs() { return rois; } + // FUNCTION: BETA10 0x100e1260 void Add(ViewROI* p_roi) { rois.push_back(p_roi); } // SYNTHETIC: LEGO1 0x100a6000