Implement/match LegoAct2::HandleEndAction and related (#1184)

* Implement/match LegoAct2::HandleEndAction

* Reorder
This commit is contained in:
Christian Semmler
2024-12-02 10:58:08 -07:00
committed by GitHub
parent 8b9f6f1007
commit a0a114135a
11 changed files with 314 additions and 54 deletions

View File

@@ -1,6 +1,7 @@
#include "act2brick.h"
#include "legocachesoundmanager.h"
#include "legocharactermanager.h"
#include "legosoundmanager.h"
#include "legoworld.h"
#include "misc.h"
@@ -32,6 +33,21 @@ Act2Brick::~Act2Brick()
TickleManager()->UnregisterClient(this);
}
// FUNCTION: LEGO1 0x1007a620
// FUNCTION: BETA10 0x10012ba2
void Act2Brick::Remove()
{
StopWhistleSound();
CurrentWorld()->Remove(this);
if (m_roi != NULL) {
CharacterManager()->ReleaseActor(m_roi->GetName());
m_roi = NULL;
}
m_unk0x164 = 0;
}
// FUNCTION: LEGO1 0x1007a750
MxResult Act2Brick::VTable0x94(LegoPathActor* p_actor, MxBool)
{
@@ -108,3 +124,11 @@ void Act2Brick::StopWhistleSound()
m_whistleSound = NULL;
}
}
// FUNCTION: LEGO1 0x1007aa00
void Act2Brick::Mute(MxBool p_muted)
{
if (m_whistleSound != NULL) {
m_whistleSound->MuteSilence(p_muted);
}
}

View File

@@ -144,6 +144,6 @@ void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
void LegoActor::Mute(MxBool p_muted)
{
if (m_sound != NULL) {
m_sound->Mute(p_muted);
m_sound->MuteStop(p_muted);
}
}