mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 00:44:21 +00:00
Implement/match Act3::Enable (#1198)
* Implement Act3::Enable * Match * Change back to private * Remove unused function
This commit is contained in:
committed by
GitHub
parent
1aff40dd94
commit
564fb7f7c0
@@ -2,19 +2,25 @@
|
||||
|
||||
#include "3dmanager/lego3dmanager.h"
|
||||
#include "act3_actions.h"
|
||||
#include "act3brickster.h"
|
||||
#include "act3cop.h"
|
||||
#include "act3shark.h"
|
||||
#include "helicopter.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legobuildingmanager.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legomain.h"
|
||||
#include "legonavcontroller.h"
|
||||
#include "legoplantmanager.h"
|
||||
#include "legoutils.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "misc.h"
|
||||
#include "mxbackgroundaudiomanager.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "mxticklemanager.h"
|
||||
#include "mxtimer.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Act3, 0x4274)
|
||||
@@ -37,7 +43,7 @@ Act3::Act3()
|
||||
m_brickster = NULL;
|
||||
m_copter = NULL;
|
||||
m_shark = NULL;
|
||||
m_unk0x4214 = -1;
|
||||
m_time = -1;
|
||||
m_unk0x421e = 0;
|
||||
|
||||
memset(m_unk0x4230, 0, sizeof(m_unk0x4230));
|
||||
@@ -204,10 +210,85 @@ void Act3::FUN_10073430()
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10073a90
|
||||
// FUNCTION: LEGO1 0x10073a90
|
||||
void Act3::Enable(MxBool p_enable)
|
||||
{
|
||||
// TODO
|
||||
if ((MxBool) m_set0xd0.empty() == p_enable) {
|
||||
return;
|
||||
}
|
||||
|
||||
LegoWorld::Enable(p_enable);
|
||||
|
||||
if (p_enable) {
|
||||
if (GameState()->m_previousArea == LegoGameState::e_infomain) {
|
||||
GameState()->StopArea(LegoGameState::e_infomain);
|
||||
}
|
||||
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
PlayMusic(JukeboxScript::c_Act3Music);
|
||||
GameState()->SetDirty(TRUE);
|
||||
|
||||
if (m_time > 0) {
|
||||
MxFloat delta = Timer()->GetTime() - m_time - 100.0f;
|
||||
m_time = -1.0f;
|
||||
|
||||
m_cop1->SetLastTime(m_cop1->GetLastTime() + delta);
|
||||
m_cop1->SetActorTime(m_cop1->GetActorTime() + delta);
|
||||
m_cop1->SetUnknown0x20(m_cop1->GetUnknown0x20() + delta);
|
||||
m_cop1->SetUnknown0x1c(m_cop1->GetUnknown0x1c() + delta);
|
||||
|
||||
m_cop2->SetLastTime(m_cop2->GetLastTime() + delta);
|
||||
m_cop2->SetActorTime(m_cop2->GetActorTime() + delta);
|
||||
m_cop2->SetUnknown0x20(m_cop2->GetUnknown0x20() + delta);
|
||||
m_cop2->SetUnknown0x1c(m_cop2->GetUnknown0x1c() + delta);
|
||||
|
||||
m_brickster->SetLastTime(m_brickster->GetLastTime() + delta);
|
||||
m_brickster->SetActorTime(m_brickster->GetActorTime() + delta);
|
||||
m_brickster->SetUnknown0x20(m_brickster->GetUnknown0x20() + delta);
|
||||
m_brickster->SetUnknown0x24(m_brickster->GetUnknown0x24() + delta);
|
||||
m_brickster->SetUnknown0x50(m_brickster->GetUnknown0x50() + delta);
|
||||
m_brickster->SetUnknown0x1c(m_brickster->GetUnknown0x1c() + delta);
|
||||
|
||||
m_copter->SetLastTime(m_copter->GetLastTime() + delta);
|
||||
m_copter->SetActorTime(m_copter->GetActorTime() + delta);
|
||||
|
||||
m_shark->SetLastTime(m_shark->GetLastTime() + delta);
|
||||
m_shark->SetActorTime(m_shark->GetActorTime() + delta);
|
||||
m_shark->SetUnknown0x2c(m_shark->GetUnknown0x2c() + delta);
|
||||
|
||||
MxS32 i;
|
||||
for (i = 0; i < (MxS32) sizeOfArray(m_pizzas); i++) {
|
||||
if (m_pizzas[i].GetFlags() & Act3Ammo::c_bit4) {
|
||||
m_pizzas[i].SetLastTime(m_pizzas[i].GetLastTime() + delta);
|
||||
m_pizzas[i].SetActorTime(m_pizzas[i].GetActorTime() + delta);
|
||||
m_pizzas[i].SetUnknown0x158(m_pizzas[i].GetUnknown0x158() + delta);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < (MxS32) sizeOfArray(m_donuts); i++) {
|
||||
if (m_donuts[i].GetFlags() & Act3Ammo::c_bit4) {
|
||||
m_donuts[i].SetLastTime(m_donuts[i].GetLastTime() + delta);
|
||||
m_donuts[i].SetActorTime(m_donuts[i].GetActorTime() + delta);
|
||||
m_donuts[i].SetUnknown0x158(m_donuts[i].GetUnknown0x158() + delta);
|
||||
}
|
||||
}
|
||||
|
||||
PlaceActor(m_copter);
|
||||
m_copter->GetBoundary()->AddActor(m_copter);
|
||||
|
||||
InputManager()->SetWorld(this);
|
||||
InputManager()->Register(this);
|
||||
SetUserActor(m_copter);
|
||||
m_copter->VTable0xa8();
|
||||
SetAppCursor(e_cursorArrow);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SetUserActor(NULL);
|
||||
BackgroundAudioManager()->Stop();
|
||||
m_time = Timer()->GetTime();
|
||||
TickleManager()->UnregisterClient(this);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10073e40
|
||||
|
||||
Reference in New Issue
Block a user