mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
Remove IsPresent
This commit is contained in:
parent
8108eac88c
commit
f9babc4f63
@ -13,6 +13,10 @@ struct LegoNamedPlane {
|
|||||||
// FUNCTION: LEGO1 0x10033a70
|
// FUNCTION: LEGO1 0x10033a70
|
||||||
// LegoNamedPlane::~LegoNamedPlane
|
// 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 char* GetName() const { return m_name.GetData(); }
|
||||||
const Mx3DPointFloat& GetPosition() { return m_position; }
|
const Mx3DPointFloat& GetPosition() { return m_position; }
|
||||||
const Mx3DPointFloat& GetDirection() { return m_direction; }
|
const Mx3DPointFloat& GetDirection() { return m_direction; }
|
||||||
@ -23,9 +27,6 @@ struct LegoNamedPlane {
|
|||||||
void SetDirection(const Mx3DPointFloat& p_direction) { m_direction = p_direction; }
|
void SetDirection(const Mx3DPointFloat& p_direction) { m_direction = p_direction; }
|
||||||
void SetUp(const Mx3DPointFloat& p_up) { m_up = p_up; }
|
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
|
// FUNCTION: LEGO1 0x100344d0
|
||||||
MxResult Serialize(LegoStorage* p_storage)
|
MxResult Serialize(LegoStorage* p_storage)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -752,7 +752,7 @@ void LegoPathActor::UpdatePlane(LegoNamedPlane& p_namedPlane)
|
|||||||
// FUNCTION: LEGO1 0x1002f830
|
// FUNCTION: LEGO1 0x1002f830
|
||||||
void LegoPathActor::PlaceActor(LegoNamedPlane& p_namedPlane)
|
void LegoPathActor::PlaceActor(LegoNamedPlane& p_namedPlane)
|
||||||
{
|
{
|
||||||
if (p_namedPlane.IsPresent()) {
|
if (strcmp(p_namedPlane.m_name.GetData(), "")) {
|
||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
world->PlaceActor(this, p_namedPlane.GetName(), 0, 0.5f, 1, 0.5f);
|
world->PlaceActor(this, p_namedPlane.GetName(), 0, 0.5f, 1, 0.5f);
|
||||||
SetLocation(p_namedPlane.GetPosition(), p_namedPlane.GetDirection(), p_namedPlane.GetUp(), TRUE);
|
SetLocation(p_namedPlane.GetPosition(), p_namedPlane.GetDirection(), p_namedPlane.GetUp(), TRUE);
|
||||||
|
|||||||
@ -339,7 +339,7 @@ void RegistrationBook::FUN_100778c0()
|
|||||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
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);
|
InvokeAction(Extra::e_start, m_atomId, CopterScript::c_Helicopter_Actor, NULL);
|
||||||
NotificationManager()->Send(
|
NotificationManager()->Send(
|
||||||
this,
|
this,
|
||||||
@ -349,7 +349,7 @@ void RegistrationBook::FUN_100778c0()
|
|||||||
m_unk0x2b8++;
|
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);
|
InvokeAction(Extra::e_start, m_atomId, JetskiScript::c_Jetski_Actor, NULL);
|
||||||
NotificationManager()->Send(
|
NotificationManager()->Send(
|
||||||
this,
|
this,
|
||||||
@ -359,7 +359,7 @@ void RegistrationBook::FUN_100778c0()
|
|||||||
m_unk0x2b8++;
|
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);
|
InvokeAction(Extra::e_start, m_atomId, DunecarScript::c_DuneBugy_Actor, NULL);
|
||||||
NotificationManager()->Send(
|
NotificationManager()->Send(
|
||||||
this,
|
this,
|
||||||
@ -369,7 +369,7 @@ void RegistrationBook::FUN_100778c0()
|
|||||||
m_unk0x2b8++;
|
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);
|
InvokeAction(Extra::e_start, m_atomId, RacecarScript::c_RaceCar_Actor, NULL);
|
||||||
NotificationManager()->Send(
|
NotificationManager()->Send(
|
||||||
this,
|
this,
|
||||||
|
|||||||
@ -42,6 +42,7 @@ class ViewManager {
|
|||||||
// FUNCTION: BETA10 0x100576b0
|
// FUNCTION: BETA10 0x100576b0
|
||||||
const CompoundObject& GetROIs() { return rois; }
|
const CompoundObject& GetROIs() { return rois; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x100e1260
|
||||||
void Add(ViewROI* p_roi) { rois.push_back(p_roi); }
|
void Add(ViewROI* p_roi) { rois.push_back(p_roi); }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a6000
|
// SYNTHETIC: LEGO1 0x100a6000
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user