diff --git a/LEGO1/lego/legoomni/include/helicopter.h b/LEGO1/lego/legoomni/include/helicopter.h index 1e7b860b..8b2b08c7 100644 --- a/LEGO1/lego/legoomni/include/helicopter.h +++ b/LEGO1/lego/legoomni/include/helicopter.h @@ -12,7 +12,7 @@ class Act3; // SIZE 0x0c class HelicopterState : public LegoState { public: - HelicopterState() : m_unk0x08(0) {} + HelicopterState() : m_status(0) {} // FUNCTION: LEGO1 0x1000e0b0 MxBool IsSerializable() override { return FALSE; } // vtable+0x14 @@ -20,7 +20,7 @@ class HelicopterState : public LegoState { // FUNCTION: LEGO1 0x1000e0c0 MxBool Reset() override { - m_unk0x08 = 0; + m_status = 0; return TRUE; } // vtable+0x18 @@ -41,7 +41,7 @@ class HelicopterState : public LegoState { // SYNTHETIC: LEGO1 0x1000e190 // HelicopterState::`scalar deleting destructor' - MxU32 m_unk0x08; // 0x08 + MxU32 m_status; // 0x08 }; // VTABLE: LEGO1 0x100d40f8 diff --git a/LEGO1/lego/legoomni/src/actors/helicopter.cpp b/LEGO1/lego/legoomni/src/actors/helicopter.cpp index 59772499..4687a7e6 100644 --- a/LEGO1/lego/legoomni/src/actors/helicopter.cpp +++ b/LEGO1/lego/legoomni/src/actors/helicopter.cpp @@ -102,7 +102,7 @@ void Helicopter::Exit() } } - m_state->m_unk0x08 = 0; + m_state->m_status = 0; RemoveFromCurrentWorld(m_script, IsleScript::c_HelicopterDashboard_Bitmap); RemoveFromCurrentWorld(m_script, IsleScript::c_HelicopterArms_Ctl); RemoveFromCurrentWorld(m_script, IsleScript::c_Helicopter_TakeOff_Ctl); @@ -198,7 +198,7 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param) ((Act3*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); } - else if (m_state->m_unk0x08 != 0) { + else if (m_state->m_status != 0) { break; } @@ -213,9 +213,9 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param) Act1State* act1State = (Act1State*) GameState()->GetState("Act1State"); assert(act1State); - if (m_state->m_unk0x08 == 0) { + if (m_state->m_status == 0) { act1State->m_state = Act1State::e_helicopter; - m_state->m_unk0x08 = 1; + m_state->m_status = 1; m_world->RemoveActor(this); InvokeAction(Extra::ActionType::e_start, script, IsleScript::c_HelicopterTakeOff_Anim, NULL); SetActorState(c_initial); @@ -229,8 +229,8 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param) break; } - if (m_state->m_unk0x08 == 2) { - m_state->m_unk0x08 = 3; + if (m_state->m_status == 2) { + m_state->m_status = 3; m_world->RemoveActor(this); InvokeAction(Extra::ActionType::e_start, script, IsleScript::c_HelicopterLand_Anim, NULL); SetActorState(c_disabled); @@ -313,7 +313,7 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param) { MxLong result = 0; - switch (m_state->m_unk0x08) { + switch (m_state->m_status) { case 1: { if (GameState()->GetCurrentAct() == LegoGameState::e_act1) { Act1State* act1State = (Act1State*) GameState()->GetState("Act1State"); @@ -333,7 +333,7 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param) ); } - m_state->m_unk0x08 = 2; + m_state->m_status = 2; MxMatrix matrix; matrix.SetIdentity(); @@ -374,7 +374,7 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param) ); } - m_state->m_unk0x08 = 0; + m_state->m_status = 0; result = 1; break; } @@ -402,8 +402,8 @@ void Helicopter::VTable0x74(Matrix4& p_transform) // FUNCTION: LEGO1 0x10003ee0 void Helicopter::Animate(float p_time) { - if (m_state->m_unk0x08 == 4 || m_state->m_unk0x08 == 5) { - float f = m_unk0x1f0 - p_time + 3000.0f; + if (m_state->m_status == 4 || m_state->m_status == 5) { + float f = m_cameraTransitionTime - p_time + 3000.0f; if (f >= 0) { float f2 = f / -3000.0f + 1; if (f2 < 0) { @@ -429,7 +429,7 @@ void Helicopter::Animate(float p_time) m_world->GetCameraController()->TransformPointOfView(mat, 0); } else { - if (m_state->m_unk0x08 == 4) { + if (m_state->m_status == 4) { ((Act3*) m_world)->FUN_10073400(); } else { @@ -491,8 +491,8 @@ void Helicopter::SetupCameraTransition(const Matrix4& p_matrix) // FUNCTION: LEGO1 0x10004640 void Helicopter::StartGoodEndingCamera(const Matrix4& p_matrix) { - if (m_state->m_unk0x08 != 4 && m_state->m_unk0x08 != 5) { - m_state->m_unk0x08 = 4; + if (m_state->m_status != 4 && m_state->m_status != 5) { + m_state->m_status = 4; SetupCameraTransition(p_matrix); } } @@ -500,8 +500,8 @@ void Helicopter::StartGoodEndingCamera(const Matrix4& p_matrix) // FUNCTION: LEGO1 0x10004670 void Helicopter::StartBadEndingCamera(const Matrix4& p_matrix) { - if (m_state->m_unk0x08 != 4 && m_state->m_unk0x08 != 5) { - m_state->m_unk0x08 = 5; + if (m_state->m_status != 4 && m_state->m_status != 5) { + m_state->m_status = 5; SetupCameraTransition(p_matrix); } } diff --git a/LEGO1/lego/legoomni/src/worlds/act3.cpp b/LEGO1/lego/legoomni/src/worlds/act3.cpp index 2cdf2d4c..130d1fb0 100644 --- a/LEGO1/lego/legoomni/src/worlds/act3.cpp +++ b/LEGO1/lego/legoomni/src/worlds/act3.cpp @@ -650,7 +650,7 @@ MxLong Act3::Notify(MxParam& p_param) m_state->m_state = Act3State::e_initial; Disable(TRUE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); m_copter->HandleClick(); - m_copter->m_state->m_unk0x08 = 1; + m_copter->m_state->m_status = 1; m_copter->HandleEndAnim((LegoEndAnimNotificationParam&) param); } break;