Skip to content

Commit

Permalink
SkateBoard: name m_unk0x160 -> m_pizzaVisible (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzSwirlz authored Dec 24, 2024
1 parent 63f16fd commit bb29d28
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions LEGO1/lego/legoomni/include/skateboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SkateBoard : public IslePathActor {
MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4
void Exit() override; // vtable+0xe4

void SetUnknown0x160(MxBool p_unk0x160) { m_unk0x160 = p_unk0x160; }
void SetPizzaVisible(MxBool p_pizzaVisible) { m_pizzaVisible = p_pizzaVisible; }

void ActivateSceneActions();
void EnableScenePresentation(MxBool p_enable);
Expand All @@ -43,7 +43,7 @@ class SkateBoard : public IslePathActor {
// SkateBoard::`scalar deleting destructor'

private:
MxBool m_unk0x160; // 0x160
MxBool m_pizzaVisible; // 0x160
Act1State* m_act1state; // 0x164
};

Expand Down
8 changes: 4 additions & 4 deletions LEGO1/lego/legoomni/src/actors/pizza.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void Pizza::FUN_100382b0()
TickleManager()->UnregisterClient(this);
m_unk0x90 = INT_MIN;
m_skateBoard->EnableScenePresentation(FALSE);
m_skateBoard->SetUnknown0x160(FALSE);
m_skateBoard->SetPizzaVisible(FALSE);
MxTrace("Pizza mission: idle\n");
}
}
Expand Down Expand Up @@ -379,7 +379,7 @@ MxResult Pizza::Tickle()
if (m_unk0x90 != INT_MIN && m_unk0x94 + m_unk0x90 <= time) {
m_unk0x90 = INT_MIN;
m_skateBoard->EnableScenePresentation(FALSE);
m_skateBoard->SetUnknown0x160(FALSE);
m_skateBoard->SetPizzaVisible(FALSE);
TickleManager()->UnregisterClient(this);
}

Expand Down Expand Up @@ -425,7 +425,7 @@ MxResult Pizza::Tickle()
assert(m_mission);

if (Timer()->GetTime() > m_mission->m_startTime + 5000) {
m_skateBoard->SetUnknown0x160(FALSE);
m_skateBoard->SetPizzaVisible(FALSE);
m_skateBoard->EnableScenePresentation(FALSE);
TickleManager()->UnregisterClient(this);
m_mission->UpdateScore(LegoState::e_grey);
Expand Down Expand Up @@ -473,7 +473,7 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
m_state->m_unk0x0c = 4;
m_state->SetUnknown0xb0(IsleScript::c_noneIsle);
UserActor()->SetActorState(LegoPathActor::c_initial);
m_skateBoard->SetUnknown0x160(TRUE);
m_skateBoard->SetPizzaVisible(TRUE);
m_world->PlaceActor(m_skateBoard, "int37", 2, 0.5, 3, 0.5);

#ifdef COMPAT_MODE
Expand Down
10 changes: 5 additions & 5 deletions LEGO1/lego/legoomni/src/actors/skateboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DECOMP_SIZE_ASSERT(SkateBoard, 0x168)
// FUNCTION: LEGO1 0x1000fd40
SkateBoard::SkateBoard()
{
m_unk0x160 = FALSE;
m_pizzaVisible = FALSE;
m_maxLinearVel = 15.0;
m_unk0x150 = 3.5;
m_unk0x148 = 1;
Expand Down Expand Up @@ -60,7 +60,7 @@ void SkateBoard::Exit()
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
pizza->StopActions();
pizza->FUN_100382b0();
m_unk0x160 = FALSE;
m_pizzaVisible = FALSE;
}

IslePathActor::Exit();
Expand Down Expand Up @@ -97,7 +97,7 @@ MxLong SkateBoard::HandleClick()
ControlManager()->Register(this);
}

EnableScenePresentation(m_unk0x160);
EnableScenePresentation(m_pizzaVisible);

Vector3 position = m_roi->GetWorldPosition();
AnimationManager()->FUN_10064670(&position);
Expand Down Expand Up @@ -132,7 +132,7 @@ void SkateBoard::EnableScenePresentation(MxBool p_enable)
if (presenter) {
presenter->Enable(p_enable);
}
else if (m_unk0x160) {
else if (m_pizzaVisible) {
NotificationManager()->Send(this, MxNotificationParam(c_notificationType0, NULL));
}
}
Expand All @@ -141,7 +141,7 @@ void SkateBoard::EnableScenePresentation(MxBool p_enable)
// FUNCTION: BETA10 0x100f5472
MxLong SkateBoard::HandleNotification0()
{
EnableScenePresentation(m_unk0x160);
EnableScenePresentation(m_pizzaVisible);
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions LEGO1/lego/legoomni/src/worlds/isle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ MxBool Isle::Escape()
if (UserActor()) {
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit();
m_skateboard->SetUnknown0x160(FALSE);
m_skateboard->SetPizzaVisible(FALSE);
}
}

Expand Down Expand Up @@ -1272,7 +1272,7 @@ void Isle::FUN_10033350()
if (UserActor()) {
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit();
m_skateboard->SetUnknown0x160(FALSE);
m_skateboard->SetPizzaVisible(FALSE);
}
}

Expand Down

0 comments on commit bb29d28

Please sign in to comment.