mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 00:44:21 +00:00
Consolidate state and building entity classes (#989)
This commit is contained in:
committed by
GitHub
parent
73bb37596e
commit
133a312aee
@@ -1,296 +0,0 @@
|
||||
#include "act1state.h"
|
||||
|
||||
#include "legonamedtexture.h"
|
||||
#include "legoutils.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Act1State, 0x26c)
|
||||
DECOMP_SIZE_ASSERT(Act1State::NamedPlane, 0x4c)
|
||||
|
||||
// GLOBAL: ISLE 0x100f37f0
|
||||
MxS32 g_unk0x100f37f0[] = {
|
||||
Act1State::e_unk953,
|
||||
Act1State::e_unk954,
|
||||
Act1State::e_unk955,
|
||||
};
|
||||
|
||||
extern MxAtomId* g_isleScript;
|
||||
|
||||
// STUB: LEGO1 0x100334b0
|
||||
Act1State::Act1State() : m_unk0x00c(0), m_unk0x00e(0), m_unk0x008(NULL), m_unk0x010(0)
|
||||
{
|
||||
m_unk0x01e = FALSE;
|
||||
m_unk0x018 = 1;
|
||||
m_unk0x010 = 0;
|
||||
m_planeActive = FALSE;
|
||||
m_unk0x00e = 0;
|
||||
m_unk0x01f = FALSE;
|
||||
m_unk0x008 = g_unk0x100f37f0;
|
||||
m_unk0x014 = -1;
|
||||
m_unk0x022 = FALSE;
|
||||
m_unk0x154 = NULL;
|
||||
m_unk0x158 = NULL;
|
||||
m_unk0x15c = NULL;
|
||||
m_unk0x160 = NULL;
|
||||
m_unk0x1b0 = NULL;
|
||||
m_unk0x021 = 1;
|
||||
m_elevFloor = Act1State::c_floor1;
|
||||
m_unk0x00c = sizeOfArray(g_unk0x100f37f0);
|
||||
m_unk0x1b4 = NULL;
|
||||
m_unk0x1b8 = NULL;
|
||||
m_unk0x208 = NULL;
|
||||
m_unk0x20c = NULL;
|
||||
m_unk0x25c = NULL;
|
||||
m_unk0x260 = NULL;
|
||||
m_unk0x264 = NULL;
|
||||
m_unk0x268 = NULL;
|
||||
SetFlag();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10033ac0
|
||||
MxResult Act1State::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
LegoState::Serialize(p_legoFile);
|
||||
|
||||
m_unk0x024.Serialize(p_legoFile);
|
||||
m_unk0x070.Serialize(p_legoFile);
|
||||
m_unk0x0bc.Serialize(p_legoFile);
|
||||
m_unk0x108.Serialize(p_legoFile);
|
||||
m_unk0x164.Serialize(p_legoFile);
|
||||
m_unk0x1bc.Serialize(p_legoFile);
|
||||
m_unk0x210.Serialize(p_legoFile);
|
||||
|
||||
if (p_legoFile->IsWriteMode()) {
|
||||
if (m_unk0x108.GetName()->Compare("") != 0) {
|
||||
if (m_unk0x154) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x154);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "chwind.gif");
|
||||
}
|
||||
if (m_unk0x158) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x158);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "chjetl.gif");
|
||||
}
|
||||
if (m_unk0x15c) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x15c);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "chjetr.gif");
|
||||
}
|
||||
}
|
||||
if (m_unk0x164.GetName()->Compare("") != 0) {
|
||||
if (m_unk0x1b0) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x1b0);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "jsfrnt.gif");
|
||||
}
|
||||
if (m_unk0x1b4) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x1b4);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "jswnsh.gif");
|
||||
}
|
||||
}
|
||||
if (m_unk0x1bc.GetName()->Compare("") != 0) {
|
||||
if (m_unk0x208) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x208);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "dbfrfn.gif");
|
||||
}
|
||||
}
|
||||
if (m_unk0x210.GetName()->Compare("") != 0) {
|
||||
if (m_unk0x25c) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x25c);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "rcfrnt.gif");
|
||||
}
|
||||
if (m_unk0x260) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x260);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "rcback.gif");
|
||||
}
|
||||
if (m_unk0x264) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x264);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "rctail.gif");
|
||||
}
|
||||
}
|
||||
|
||||
p_legoFile->Write(&m_unk0x010, sizeof(m_unk0x010));
|
||||
p_legoFile->Write(&m_unk0x022, sizeof(m_unk0x022));
|
||||
}
|
||||
else if (p_legoFile->IsReadMode()) {
|
||||
if (m_unk0x108.GetName()->Compare("") != 0) {
|
||||
m_unk0x154 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x154 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x158 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x158 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x15c = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x15c == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
if (m_unk0x164.GetName()->Compare("") != 0) {
|
||||
m_unk0x1b0 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x1b0 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x1b4 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x1b4 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
if (m_unk0x1bc.GetName()->Compare("") != 0) {
|
||||
m_unk0x208 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x208 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
if (m_unk0x210.GetName()->Compare("") != 0) {
|
||||
m_unk0x25c = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x25c == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x260 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x260 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x264 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x264 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
p_legoFile->Read(&m_unk0x010, sizeof(m_unk0x010));
|
||||
p_legoFile->Read(&m_unk0x022, sizeof(m_unk0x022));
|
||||
}
|
||||
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10034660
|
||||
void Act1State::FUN_10034660()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100346a0
|
||||
void Act1State::FUN_100346a0()
|
||||
{
|
||||
if (m_unk0x014 != -1) {
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, m_unk0x014, NULL);
|
||||
m_unk0x014 = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100346d0
|
||||
MxBool Act1State::SetFlag()
|
||||
{
|
||||
m_unk0x024.SetName("");
|
||||
m_unk0x070.SetName("");
|
||||
m_unk0x0bc.SetName("");
|
||||
m_unk0x022 = FALSE;
|
||||
m_unk0x108.SetName("");
|
||||
|
||||
if (m_unk0x154) {
|
||||
delete m_unk0x154;
|
||||
m_unk0x154 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x158) {
|
||||
delete m_unk0x158;
|
||||
m_unk0x158 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x15c) {
|
||||
delete m_unk0x15c;
|
||||
m_unk0x15c = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x160) {
|
||||
delete m_unk0x160;
|
||||
m_unk0x160 = NULL;
|
||||
}
|
||||
|
||||
m_unk0x164.SetName("");
|
||||
|
||||
if (m_unk0x1b0) {
|
||||
delete m_unk0x1b0;
|
||||
m_unk0x1b0 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x1b4) {
|
||||
delete m_unk0x1b4;
|
||||
m_unk0x1b4 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x1b8) {
|
||||
delete m_unk0x1b8;
|
||||
m_unk0x1b8 = NULL;
|
||||
}
|
||||
|
||||
m_unk0x1bc.SetName("");
|
||||
|
||||
if (m_unk0x208) {
|
||||
delete m_unk0x208;
|
||||
m_unk0x208 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x20c) {
|
||||
delete m_unk0x20c;
|
||||
m_unk0x20c = NULL;
|
||||
}
|
||||
|
||||
m_unk0x210.SetName("");
|
||||
|
||||
if (m_unk0x25c) {
|
||||
delete m_unk0x25c;
|
||||
m_unk0x25c = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x260) {
|
||||
delete m_unk0x260;
|
||||
m_unk0x260 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x264) {
|
||||
delete m_unk0x264;
|
||||
m_unk0x264 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x268) {
|
||||
delete m_unk0x268;
|
||||
m_unk0x268 = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10034b60
|
||||
void Act1State::FUN_10034b60()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10034d00
|
||||
void Act1State::FUN_10034d00()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "legoact2state.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoAct2State, 0x10)
|
||||
|
||||
// FUNCTION: LEGO1 0x1000df70
|
||||
MxBool LegoAct2State::IsSerializable()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "act3state.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Act3State, 0x0c)
|
||||
|
||||
// FUNCTION: LEGO1 0x1000e2f0
|
||||
MxBool Act3State::IsSerializable()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "ambulance.h"
|
||||
|
||||
#include "ambulancemissionstate.h"
|
||||
#include "decomp.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legogamestate.h"
|
||||
@@ -14,6 +13,7 @@
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Ambulance, 0x184)
|
||||
DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24)
|
||||
|
||||
// FUNCTION: LEGO1 0x10035ee0
|
||||
Ambulance::Ambulance()
|
||||
@@ -152,3 +152,27 @@ void Ambulance::FUN_10037250()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100373a0
|
||||
AmbulanceMissionState::AmbulanceMissionState()
|
||||
{
|
||||
m_unk0x10 = 0;
|
||||
m_unk0x12 = 0;
|
||||
m_unk0x14 = 0;
|
||||
m_unk0x08 = 0;
|
||||
m_unk0x16 = 0;
|
||||
m_unk0x0c = 0;
|
||||
m_unk0x18 = 0;
|
||||
m_score1 = 0;
|
||||
m_score2 = 0;
|
||||
m_score3 = 0;
|
||||
m_score4 = 0;
|
||||
m_score5 = 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10037440
|
||||
MxResult AmbulanceMissionState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
176
LEGO1/lego/legoomni/src/actors/buildings.cpp
Normal file
176
LEGO1/lego/legoomni/src/actors/buildings.cpp
Normal file
@@ -0,0 +1,176 @@
|
||||
#include "buildings.h"
|
||||
|
||||
#include "act2main_actions.h"
|
||||
#include "act3.h"
|
||||
#include "act3_actions.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoact2.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoutils.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(BeachHouseEntity, 0x68)
|
||||
DECOMP_SIZE_ASSERT(GasStationEntity, 0x68)
|
||||
DECOMP_SIZE_ASSERT(HospitalEntity, 0x68)
|
||||
DECOMP_SIZE_ASSERT(InfoCenterEntity, 0x68)
|
||||
DECOMP_SIZE_ASSERT(JailEntity, 0x68)
|
||||
DECOMP_SIZE_ASSERT(PoliceEntity, 0x68)
|
||||
DECOMP_SIZE_ASSERT(RaceStandsEntity, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x100150c0
|
||||
MxLong InfoCenterEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
switch (GameState()->GetCurrentAct()) {
|
||||
case LegoGameState::Act::e_act1: {
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->FUN_10033350();
|
||||
isle->SetDestLocation(LegoGameState::Area::e_infomain);
|
||||
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
act1state->SetUnknown18(0);
|
||||
break;
|
||||
}
|
||||
case LegoGameState::Act::e_act2: {
|
||||
LegoAct2* act2 = (LegoAct2*) FindWorld(*g_act2mainScript, Act2mainScript::c__Act2Main);
|
||||
act2->SetUnknown0x1150(2);
|
||||
|
||||
LegoAct2State* act2state = (LegoAct2State*) GameState()->GetState("LegoAct2State");
|
||||
if (act2state) {
|
||||
act2state->SetUnknown0x0c(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LegoGameState::Act::e_act3:
|
||||
Act3* act3 = (Act3*) FindWorld(*g_act3Script, Act3Script::c__Act3);
|
||||
act3->SetUnknown4270(2);
|
||||
break;
|
||||
}
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100151d0
|
||||
MxLong GasStationEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||
|
||||
if (state->GetUnknown18() != 8) {
|
||||
state->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_garage);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10015270
|
||||
MxLong HospitalEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
|
||||
|
||||
if (act1State->GetUnknown18() != 10) {
|
||||
act1State->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_hospital);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10015310
|
||||
MxLong PoliceEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||
|
||||
if (state->GetUnknown18() != 10) {
|
||||
state->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_police);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100153b0
|
||||
MxLong BeachHouseEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||
state->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_jetskibuild);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10015450
|
||||
MxLong RaceStandsEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||
state->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_racecarbuild);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "helicopter.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "act3.h"
|
||||
#include "act3_actions.h"
|
||||
#include "helicopterstate.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "jukebox.h"
|
||||
@@ -19,6 +17,7 @@
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Helicopter, 0x230)
|
||||
DECOMP_SIZE_ASSERT(HelicopterState, 0x0c)
|
||||
DECOMP_SIZE_ASSERT(Mx3DPointFloat, 0x14)
|
||||
DECOMP_SIZE_ASSERT(Mx4DPointFloat, 0x18)
|
||||
DECOMP_SIZE_ASSERT(MxMatrix, 0x48)
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#include "isle_actions.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legocarbuild.h"
|
||||
#include "legonavcontroller.h"
|
||||
#include "legopathboundary.h"
|
||||
#include "legoutils.h"
|
||||
#include "legovehiclebuildstate.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "jukeboxstate.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoutils.h"
|
||||
#include "misc.h"
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include "pizza.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "isle_actions.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxticklemanager.h"
|
||||
#include "pizzamissionstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Pizza, 0x9c)
|
||||
DECOMP_SIZE_ASSERT(PizzaMissionState, 0xb0)
|
||||
DECOMP_SIZE_ASSERT(PizzaMissionState::Entry, 0x20)
|
||||
|
||||
// FUNCTION: LEGO1 0x10037ef0
|
||||
Pizza::Pizza()
|
||||
@@ -98,3 +98,22 @@ undefined4 Pizza::HandleEndAction(MxEndActionNotificationParam&)
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100393c0
|
||||
MxResult PizzaMissionState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10039510
|
||||
PizzaMissionState::Entry* PizzaMissionState::GetState(MxU8 p_id)
|
||||
{
|
||||
for (MxS16 i = 0; i < 5; i++) {
|
||||
if (m_state[i].m_id == p_id) {
|
||||
return m_state + i;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "pizza.h"
|
||||
#include "pizzamissionstate.h"
|
||||
#include "pizzeriastate.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Pizzeria, 0x84)
|
||||
DECOMP_SIZE_ASSERT(PizzeriaState, 0x58)
|
||||
DECOMP_SIZE_ASSERT(PizzeriaState::StateStruct, 0x14)
|
||||
|
||||
// FUNCTION: LEGO1 0x100179c0
|
||||
MxResult Pizzeria::Create(MxDSAction& p_dsAction)
|
||||
@@ -63,3 +63,22 @@ undefined4 Pizzeria::HandleClick()
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10017af0
|
||||
PizzeriaState::PizzeriaState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10017d70
|
||||
MxU32 PizzeriaState::FUN_10017d70()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10017da0
|
||||
MxResult PizzeriaState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "radio.h"
|
||||
|
||||
#include "isle_actions.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoworld.h"
|
||||
@@ -10,10 +11,52 @@
|
||||
#include "mxcontrolpresenter.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "radiostate.h"
|
||||
#include "mxtimer.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Radio, 0x10)
|
||||
DECOMP_SIZE_ASSERT(RadioState, 0x30)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3218
|
||||
JukeboxScript::Script g_unk0x100f3218[6] = {
|
||||
JukeboxScript::c_sns002ra_Audio,
|
||||
JukeboxScript::c_sns001ja_Audio,
|
||||
JukeboxScript::c_snsc01js_Audio,
|
||||
JukeboxScript::c_snsb01js_Audio,
|
||||
JukeboxScript::c_snsa01js_Audio,
|
||||
JukeboxScript::c_sns009ra_Audio
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3230
|
||||
JukeboxScript::Script g_unk0x100f3230[14] = {
|
||||
JukeboxScript::c_ham035ra_Audio,
|
||||
JukeboxScript::c_ham039ra_Audio,
|
||||
JukeboxScript::c_sns005ra_Audio,
|
||||
JukeboxScript::c_sns078pa_Audio,
|
||||
JukeboxScript::c_ham036ra_Audio,
|
||||
JukeboxScript::c_sns006ra_Audio,
|
||||
JukeboxScript::c_sns013ra_Audio,
|
||||
JukeboxScript::c_sns004ra_Audio,
|
||||
JukeboxScript::c_sns079pa_Audio,
|
||||
JukeboxScript::c_sns007ra_Audio,
|
||||
JukeboxScript::c_sns008ra_Audio,
|
||||
JukeboxScript::c_hpz037ma_Audio,
|
||||
JukeboxScript::c_sns003ra_Audio,
|
||||
JukeboxScript::c_sns010ra_Audio,
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3268
|
||||
JukeboxScript::Script g_unk0x100f3268[9] = {
|
||||
JukeboxScript::c_CentralRoads_Music,
|
||||
JukeboxScript::c_BeachBlvd_Music,
|
||||
JukeboxScript::c_ResidentalArea_Music,
|
||||
JukeboxScript::c_Radio1_Music,
|
||||
JukeboxScript::c_Radio2_Music,
|
||||
JukeboxScript::c_Radio3_Music,
|
||||
JukeboxScript::c_Radio4_Music,
|
||||
JukeboxScript::c_Radio5_Music,
|
||||
JukeboxScript::c_Radio6_Music,
|
||||
};
|
||||
|
||||
// FUNCTION: LEGO1 0x1002c850
|
||||
Radio::Radio()
|
||||
@@ -162,3 +205,56 @@ void Radio::CreateState()
|
||||
|
||||
m_state = state;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002ce10
|
||||
RadioState::RadioState()
|
||||
{
|
||||
srand(Timer()->GetTime());
|
||||
|
||||
MxS32 random = rand();
|
||||
m_unk0x2c = random % 3;
|
||||
|
||||
m_unk0x08[0] = LegoState::Playlist((MxU32*) g_unk0x100f3218, sizeof(g_unk0x100f3218) / sizeof(g_unk0x100f3218[0]));
|
||||
m_unk0x08[0].SetUnknown0x08(rand() % (sizeof(g_unk0x100f3218) / sizeof(g_unk0x100f3218[0])));
|
||||
|
||||
m_unk0x08[1] = LegoState::Playlist((MxU32*) g_unk0x100f3230, sizeof(g_unk0x100f3230) / sizeof(g_unk0x100f3230[0]));
|
||||
m_unk0x08[1].SetUnknown0x08(rand() % (sizeof(g_unk0x100f3230) / sizeof(g_unk0x100f3230[0])));
|
||||
|
||||
m_unk0x08[2] = LegoState::Playlist((MxU32*) g_unk0x100f3268, sizeof(g_unk0x100f3268) / sizeof(g_unk0x100f3268[0]));
|
||||
m_unk0x08[2].SetUnknown0x08(rand() % (sizeof(g_unk0x100f3268) / sizeof(g_unk0x100f3268[0])));
|
||||
|
||||
m_active = FALSE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002cf50
|
||||
MxBool RadioState::IsSerializable()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d090
|
||||
MxU32 RadioState::FUN_1002d090()
|
||||
{
|
||||
if (m_unk0x2c == 2) {
|
||||
m_unk0x2c = 0;
|
||||
}
|
||||
else {
|
||||
m_unk0x2c++;
|
||||
}
|
||||
|
||||
return m_unk0x08[m_unk0x2c].Next();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d0c0
|
||||
MxBool RadioState::FUN_1002d0c0(const MxAtomId& p_atom, MxU32 p_objectId)
|
||||
{
|
||||
if (*g_jukeboxScript == p_atom) {
|
||||
for (MxS16 i = 0; i < 3; i++) {
|
||||
if (m_unk0x08[i].Contains(p_objectId)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "skateboard.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "decomp.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
#include "mxmisc.h"
|
||||
#include "mxtimer.h"
|
||||
#include "mxvariabletable.h"
|
||||
#include "towtrackmissionstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(TowTrack, 0x180)
|
||||
DECOMP_SIZE_ASSERT(TowTrackMissionState, 0x28)
|
||||
|
||||
// FUNCTION: LEGO1 0x1004c720
|
||||
TowTrack::TowTrack()
|
||||
@@ -131,3 +131,73 @@ void TowTrack::FUN_1004dbe0()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004dd30
|
||||
TowTrackMissionState::TowTrackMissionState()
|
||||
{
|
||||
m_unk0x12 = 0;
|
||||
m_unk0x14 = 0;
|
||||
m_unk0x16 = 0;
|
||||
m_unk0x08 = 0;
|
||||
m_unk0x18 = 0;
|
||||
m_unk0x0c = 0;
|
||||
m_unk0x1a = 0;
|
||||
m_unk0x10 = 0;
|
||||
m_score1 = 0;
|
||||
m_score2 = 0;
|
||||
m_score3 = 0;
|
||||
m_score4 = 0;
|
||||
m_score5 = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004dde0
|
||||
MxResult TowTrackMissionState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
LegoState::Serialize(p_legoFile);
|
||||
|
||||
if (p_legoFile->IsReadMode()) {
|
||||
p_legoFile->Read(&m_unk0x12, sizeof(m_unk0x12));
|
||||
p_legoFile->Read(&m_unk0x14, sizeof(m_unk0x14));
|
||||
p_legoFile->Read(&m_unk0x16, sizeof(m_unk0x16));
|
||||
p_legoFile->Read(&m_unk0x18, sizeof(m_unk0x18));
|
||||
p_legoFile->Read(&m_unk0x1a, sizeof(m_unk0x1a));
|
||||
p_legoFile->Read(&m_score1, sizeof(m_score1));
|
||||
p_legoFile->Read(&m_score2, sizeof(m_score2));
|
||||
p_legoFile->Read(&m_score3, sizeof(m_score3));
|
||||
p_legoFile->Read(&m_score4, sizeof(m_score4));
|
||||
p_legoFile->Read(&m_score5, sizeof(m_score5));
|
||||
}
|
||||
else if (p_legoFile->IsWriteMode()) {
|
||||
MxU16 write = m_unk0x12;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_unk0x14;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_unk0x16;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_unk0x18;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_unk0x1a;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score1;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score2;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score3;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score4;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score5;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#include "helicopterstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(HelicopterState, 0x0c)
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "legocarbuild.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoCarBuild, 0x34c)
|
||||
DECOMP_SIZE_ASSERT(LegoVehicleBuildState, 0x50)
|
||||
|
||||
// STUB: LEGO1 0x100226d0
|
||||
LegoCarBuild::LegoCarBuild()
|
||||
@@ -61,3 +62,20 @@ MxBool LegoCarBuild::Escape()
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10025f30
|
||||
LegoVehicleBuildState::LegoVehicleBuildState(char* p_classType)
|
||||
{
|
||||
m_className = p_classType;
|
||||
m_unk0x4c = 0;
|
||||
m_unk0x4d = FALSE;
|
||||
m_unk0x4e = FALSE;
|
||||
m_placedPartCount = 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10026120
|
||||
MxResult LegoVehicleBuildState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "legocarbuildanimpresenter.h"
|
||||
#include "legocarbuildpresenter.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoCarBuildAnimPresenter, 0x150)
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#include "legovehiclebuildstate.h"
|
||||
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoVehicleBuildState, 0x50)
|
||||
|
||||
// FUNCTION: LEGO1 0x10025f30
|
||||
LegoVehicleBuildState::LegoVehicleBuildState(char* p_classType)
|
||||
{
|
||||
this->m_className = p_classType;
|
||||
this->m_unk0x4c = 0;
|
||||
this->m_unk0x4d = FALSE;
|
||||
this->m_unk0x4e = FALSE;
|
||||
this->m_placedPartCount = 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10026120
|
||||
MxResult LegoVehicleBuildState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
#include "animstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(AnimState, 0x1c)
|
||||
DECOMP_SIZE_ASSERT(ModelInfo, 0x30)
|
||||
DECOMP_SIZE_ASSERT(AnimInfo, 0x30)
|
||||
|
||||
// FUNCTION: LEGO1 0x10064ff0
|
||||
AnimState::AnimState()
|
||||
{
|
||||
m_unk0x0c = 0;
|
||||
m_unk0x10 = NULL;
|
||||
m_unk0x14 = 0;
|
||||
m_unk0x18 = NULL;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10065150
|
||||
AnimState::~AnimState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100651d0
|
||||
void AnimState::FUN_100651d0(MxU32, AnimInfo*, MxU32&)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10065240
|
||||
void AnimState::FUN_10065240(MxU32, AnimInfo*, MxU32)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100652d0
|
||||
MxResult AnimState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100654f0
|
||||
MxBool AnimState::SetFlag()
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "3dmanager/lego3dmanager.h"
|
||||
#include "anim/legoanim.h"
|
||||
#include "animstate.h"
|
||||
#include "define.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoanimmmpresenter.h"
|
||||
@@ -37,6 +36,9 @@ DECOMP_SIZE_ASSERT(LegoAnimationManager::Character, 0x18)
|
||||
DECOMP_SIZE_ASSERT(LegoAnimationManager::Vehicle, 0x08)
|
||||
DECOMP_SIZE_ASSERT(LegoAnimationManager::Extra, 0x18)
|
||||
DECOMP_SIZE_ASSERT(LegoTranInfo, 0x78)
|
||||
DECOMP_SIZE_ASSERT(AnimState, 0x1c)
|
||||
DECOMP_SIZE_ASSERT(AnimInfo, 0x30)
|
||||
DECOMP_SIZE_ASSERT(ModelInfo, 0x30)
|
||||
|
||||
// GLOBAL: LEGO1 0x100d8b28
|
||||
MxU8 g_unk0x100d8b28[] = {0, 1, 2, 4, 8, 16};
|
||||
@@ -2820,3 +2822,44 @@ void LegoAnimationManager::FUN_10064b50(MxLong p_time)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10064ff0
|
||||
AnimState::AnimState()
|
||||
{
|
||||
m_unk0x0c = 0;
|
||||
m_unk0x10 = NULL;
|
||||
m_unk0x14 = 0;
|
||||
m_unk0x18 = NULL;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10065150
|
||||
AnimState::~AnimState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100651d0
|
||||
void AnimState::FUN_100651d0(MxU32, AnimInfo*, MxU32&)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10065240
|
||||
void AnimState::FUN_10065240(MxU32, AnimInfo*, MxU32)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100652d0
|
||||
MxResult AnimState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100654f0
|
||||
MxBool AnimState::SetFlag()
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "legogamestate.h"
|
||||
|
||||
#include "3dmanager/lego3dmanager.h"
|
||||
#include "act1state.h"
|
||||
#include "act2main_actions.h"
|
||||
#include "act3_actions.h"
|
||||
#include "carrace_actions.h"
|
||||
@@ -15,7 +14,7 @@
|
||||
#include "helicopter.h"
|
||||
#include "histbook_actions.h"
|
||||
#include "hospital_actions.h"
|
||||
#include "infocenterstate.h"
|
||||
#include "infocenter.h"
|
||||
#include "infodoor_actions.h"
|
||||
#include "infomain_actions.h"
|
||||
#include "infoscor_actions.h"
|
||||
|
||||
@@ -7,27 +7,22 @@
|
||||
#include "dunebuggy.h"
|
||||
#include "elevatorbottom.h"
|
||||
#include "gasstation.h"
|
||||
#include "gasstationstate.h"
|
||||
#include "helicopter.h"
|
||||
#include "helicopterstate.h"
|
||||
#include "historybook.h"
|
||||
#include "hospital.h"
|
||||
#include "hospitalstate.h"
|
||||
#include "infocenter.h"
|
||||
#include "infocenterdoor.h"
|
||||
#include "infocenterstate.h"
|
||||
#include "isle.h"
|
||||
#include "jetskirace.h"
|
||||
#include "lego3dwavepresenter.h"
|
||||
#include "legoact2.h"
|
||||
#include "legoact2state.h"
|
||||
#include "legoactioncontrolpresenter.h"
|
||||
#include "legoactor.h"
|
||||
#include "legoactorpresenter.h"
|
||||
#include "legoanimactor.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legocarbuild.h"
|
||||
#include "legocarbuildanimpresenter.h"
|
||||
#include "legocarbuildpresenter.h"
|
||||
#include "legocarraceactor.h"
|
||||
#include "legoentity.h"
|
||||
#include "legoentitypresenter.h"
|
||||
@@ -51,52 +46,34 @@
|
||||
#include "mxcontrolpresenter.h"
|
||||
#include "mxvideopresenter.h"
|
||||
#include "pizza.h"
|
||||
#include "pizzamissionstate.h"
|
||||
#include "police.h"
|
||||
#include "policestate.h"
|
||||
#include "registrationbook.h"
|
||||
#include "score.h"
|
||||
#include "scorestate.h"
|
||||
#include "skateboard.h"
|
||||
// #include "act2genactor.h"
|
||||
#include "act2policestation.h"
|
||||
#include "act3.h"
|
||||
#include "act3state.h"
|
||||
#include "ambulance.h"
|
||||
#include "ambulancemissionstate.h"
|
||||
#include "bike.h"
|
||||
#include "doors.h"
|
||||
#include "jetski.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legoanimmmpresenter.h"
|
||||
#include "motocycle.h"
|
||||
#include "racecar.h"
|
||||
#include "towtrack.h"
|
||||
#include "towtrackmissionstate.h"
|
||||
// #include "act3cop.h"
|
||||
// #include "act3brickster.h"
|
||||
#include "act1state.h"
|
||||
#include "act3actor.h"
|
||||
#include "act3shark.h"
|
||||
#include "animstate.h"
|
||||
#include "beachhouseentity.h"
|
||||
#include "buildings.h"
|
||||
#include "bumpbouy.h"
|
||||
#include "carracestate.h"
|
||||
#include "caveentity.h"
|
||||
#include "gasstationentity.h"
|
||||
#include "hospitalentity.h"
|
||||
#include "infocenterentity.h"
|
||||
#include "jailentity.h"
|
||||
#include "jetskiracestate.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukeboxentity.h"
|
||||
#include "jukeboxstate.h"
|
||||
#include "mxcompositemediapresenter.h"
|
||||
#include "pizzeria.h"
|
||||
#include "pizzeriastate.h"
|
||||
#include "policeentity.h"
|
||||
#include "raceskel.h"
|
||||
#include "racestandsentity.h"
|
||||
#include "radiostate.h"
|
||||
|
||||
// TODO: Before HospitalState, add all of the different LegoVehicleBuildState's
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "legoutils.h"
|
||||
|
||||
#include "3dmanager/lego3dmanager.h"
|
||||
#include "act1state.h"
|
||||
#include "anim/legoanim.h"
|
||||
#include "isle.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legoanimpresenter.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "legonavcontroller.h"
|
||||
|
||||
#include "3dmanager/lego3dmanager.h"
|
||||
#include "infocenterstate.h"
|
||||
#include "infocenter.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legocameracontroller.h"
|
||||
#include "legogamestate.h"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
#include "gasstationentity.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoutils.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(GasStationEntity, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x100151d0
|
||||
MxLong GasStationEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||
|
||||
if (state->GetUnknown18() != 8) {
|
||||
state->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_garage);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#include "gasstationstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(GasStationState, 0x24)
|
||||
|
||||
// FUNCTION: LEGO1 0x10005eb0
|
||||
GasStationState::GasStationState()
|
||||
{
|
||||
m_unk0x18 = 0;
|
||||
m_unk0x1a = 0;
|
||||
m_unk0x1c = 0;
|
||||
m_unk0x1e = 0;
|
||||
m_unk0x20 = 0;
|
||||
|
||||
undefined4* unk0x08 = m_unk0x08;
|
||||
unk0x08[0] = -1;
|
||||
unk0x08[1] = -1;
|
||||
unk0x08[2] = -1;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10006300
|
||||
MxResult GasStationState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10006430
|
||||
void GasStationState::FUN_10006430(undefined4)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10006490
|
||||
void GasStationState::FUN_10006490()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
#include "ambulancemissionstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24)
|
||||
|
||||
// FUNCTION: LEGO1 0x100373a0
|
||||
AmbulanceMissionState::AmbulanceMissionState()
|
||||
{
|
||||
m_unk0x10 = 0;
|
||||
m_unk0x12 = 0;
|
||||
m_unk0x14 = 0;
|
||||
m_unk0x08 = 0;
|
||||
m_unk0x16 = 0;
|
||||
m_unk0x0c = 0;
|
||||
m_unk0x18 = 0;
|
||||
m_score1 = 0;
|
||||
m_score2 = 0;
|
||||
m_score3 = 0;
|
||||
m_score4 = 0;
|
||||
m_score5 = 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10037440
|
||||
MxResult AmbulanceMissionState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
#include "hospitalentity.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoutils.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(HospitalEntity, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x10015270
|
||||
MxLong HospitalEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
|
||||
|
||||
if (act1State->GetUnknown18() != 10) {
|
||||
act1State->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_hospital);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
#include "hospitalstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(HospitalState, 0x18)
|
||||
|
||||
// FUNCTION: LEGO1 0x10076370
|
||||
HospitalState::HospitalState()
|
||||
{
|
||||
m_unk0x0c = 0;
|
||||
m_unk0x0e = 0;
|
||||
m_unk0x10 = 0;
|
||||
m_unk0x12 = 0;
|
||||
m_unk0x14 = 0;
|
||||
m_unk0x16 = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10076530
|
||||
MxResult HospitalState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
LegoState::Serialize(p_legoFile);
|
||||
|
||||
if (p_legoFile->IsWriteMode()) {
|
||||
// A write variable needs to be used here, otherwise
|
||||
// the compiler aggresively optimizes the function
|
||||
MxS16 write;
|
||||
|
||||
write = m_unk0x0c;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x0c));
|
||||
write = m_unk0x0e;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x0e));
|
||||
write = m_unk0x10;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x10));
|
||||
write = m_unk0x12;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
write = m_unk0x14;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x14));
|
||||
write = m_unk0x16;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x16));
|
||||
}
|
||||
else if (p_legoFile->IsReadMode()) {
|
||||
p_legoFile->Read(&m_unk0x0c, sizeof(m_unk0x0c));
|
||||
p_legoFile->Read(&m_unk0x0e, sizeof(m_unk0x0e));
|
||||
p_legoFile->Read(&m_unk0x10, sizeof(m_unk0x10));
|
||||
p_legoFile->Read(&m_unk0x12, sizeof(m_unk0x12));
|
||||
p_legoFile->Read(&m_unk0x14, sizeof(m_unk0x14));
|
||||
p_legoFile->Read(&m_unk0x16, sizeof(m_unk0x16));
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
#include "infocenterentity.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "act2main_actions.h"
|
||||
#include "act3.h"
|
||||
#include "act3_actions.h"
|
||||
#include "act3state.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoact2.h"
|
||||
#include "legoact2state.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoutils.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(InfoCenterEntity, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x100150c0
|
||||
MxLong InfoCenterEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
switch (GameState()->GetCurrentAct()) {
|
||||
case LegoGameState::Act::e_act1: {
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->FUN_10033350();
|
||||
isle->SetDestLocation(LegoGameState::Area::e_infomain);
|
||||
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
act1state->SetUnknown18(0);
|
||||
break;
|
||||
}
|
||||
case LegoGameState::Act::e_act2: {
|
||||
LegoAct2* act2 = (LegoAct2*) FindWorld(*g_act2mainScript, Act2mainScript::c__Act2Main);
|
||||
act2->SetUnknown0x1150(2);
|
||||
|
||||
LegoAct2State* act2state = (LegoAct2State*) GameState()->GetState("LegoAct2State");
|
||||
if (act2state) {
|
||||
act2state->SetUnknown0x0c(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LegoGameState::Act::e_act3:
|
||||
Act3* act3 = (Act3*) FindWorld(*g_act3Script, Act3Script::c__Act3);
|
||||
act3->SetUnknown4270(2);
|
||||
break;
|
||||
}
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
#include "infocenterstate.h"
|
||||
|
||||
#include "infocenter.h"
|
||||
#include "infomain_actions.h"
|
||||
#include "mxstillpresenter.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(InfocenterState, 0x94)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f76a8
|
||||
InfomainScript::Script g_exitDialogueAct1[14] = {
|
||||
InfomainScript::c_iic019in_RunAnim,
|
||||
InfomainScript::c_iic020in_RunAnim,
|
||||
InfomainScript::c_iic021in_RunAnim,
|
||||
InfomainScript::c_iic022in_RunAnim,
|
||||
InfomainScript::c_iic023in_RunAnim,
|
||||
InfomainScript::c_iic024in_RunAnim,
|
||||
InfomainScript::c_iic025in_RunAnim,
|
||||
InfomainScript::c_iic026in_RunAnim,
|
||||
InfomainScript::c_iic027in_RunAnim,
|
||||
InfomainScript::c_iica28in_RunAnim,
|
||||
InfomainScript::c_iicb28in_RunAnim,
|
||||
InfomainScript::c_iicc28in_RunAnim,
|
||||
InfomainScript::c_iic029in_RunAnim,
|
||||
InfomainScript::c_iic032in_RunAnim
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f76e0
|
||||
InfomainScript::Script g_exitDialogueAct23[6] = {
|
||||
InfomainScript::c_iic027in_RunAnim,
|
||||
InfomainScript::c_iic029in_RunAnim,
|
||||
InfomainScript::c_iic048in_RunAnim,
|
||||
InfomainScript::c_iic056in_RunAnim,
|
||||
InfomainScript::c_iicx23in_RunAnim
|
||||
// Zero-terminated
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f76f8
|
||||
InfomainScript::Script g_returnDialogueAct1[6] = {
|
||||
InfomainScript::c_iicx26in_RunAnim,
|
||||
InfomainScript::c_iic033in_RunAnim,
|
||||
InfomainScript::c_iic034in_RunAnim,
|
||||
InfomainScript::c_iic035in_RunAnim,
|
||||
InfomainScript::c_iic036in_RunAnim
|
||||
// Zero-terminated
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7710
|
||||
InfomainScript::Script g_returnDialogueAct2[4] = {
|
||||
InfomainScript::c_iic048in_RunAnim,
|
||||
InfomainScript::c_iic049in_RunAnim,
|
||||
InfomainScript::c_iic050in_RunAnim,
|
||||
// Zero-terminated
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7720
|
||||
InfomainScript::Script g_returnDialogueAct3[4] = {
|
||||
InfomainScript::c_iic055in_RunAnim,
|
||||
InfomainScript::c_iic056in_RunAnim,
|
||||
InfomainScript::c_iic057in_RunAnim,
|
||||
InfomainScript::c_iic058in_RunAnim
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7730
|
||||
InfomainScript::Script g_leaveDialogueAct1[4] = {
|
||||
InfomainScript::c_iic039in_PlayWav,
|
||||
InfomainScript::c_iic040in_PlayWav,
|
||||
InfomainScript::c_iic041in_PlayWav,
|
||||
InfomainScript::c_iic042in_PlayWav
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7740
|
||||
InfomainScript::Script g_leaveDialogueAct2[4] = {
|
||||
InfomainScript::c_iic051in_PlayWav,
|
||||
InfomainScript::c_iic052in_PlayWav,
|
||||
InfomainScript::c_iic053in_PlayWav,
|
||||
InfomainScript::c_iic054in_PlayWav
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7750
|
||||
InfomainScript::Script g_leaveDialogueAct3[4] = {
|
||||
InfomainScript::c_iic059in_PlayWav,
|
||||
InfomainScript::c_iic060in_PlayWav,
|
||||
InfomainScript::c_iic061in_PlayWav,
|
||||
// Zero-terminated
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7760
|
||||
InfomainScript::Script g_bricksterDialogue[2] = {
|
||||
InfomainScript::c_sbleh2br_PlayWav,
|
||||
InfomainScript::c_snshahbr_PlayWav
|
||||
};
|
||||
|
||||
// FUNCTION: LEGO1 0x10071600
|
||||
InfocenterState::InfocenterState()
|
||||
{
|
||||
m_exitDialogueAct1 = LegoState::Playlist((MxU32*) g_exitDialogueAct1, sizeOfArray(g_exitDialogueAct1));
|
||||
m_exitDialogueAct23 = LegoState::Playlist((MxU32*) g_exitDialogueAct23, sizeOfArray(g_exitDialogueAct23) - 1);
|
||||
|
||||
m_returnDialogue[LegoGameState::e_act1] =
|
||||
LegoState::Playlist((MxU32*) g_returnDialogueAct1, sizeOfArray(g_returnDialogueAct1) - 1);
|
||||
|
||||
m_returnDialogue[LegoGameState::e_act2] =
|
||||
LegoState::Playlist((MxU32*) g_returnDialogueAct2, sizeOfArray(g_returnDialogueAct2) - 1);
|
||||
|
||||
m_returnDialogue[LegoGameState::e_act3] =
|
||||
LegoState::Playlist((MxU32*) g_returnDialogueAct3, sizeOfArray(g_returnDialogueAct3));
|
||||
|
||||
m_leaveDialogue[LegoGameState::e_act1] =
|
||||
LegoState::Playlist((MxU32*) g_leaveDialogueAct1, sizeOfArray(g_leaveDialogueAct1));
|
||||
|
||||
m_leaveDialogue[LegoGameState::e_act2] =
|
||||
LegoState::Playlist((MxU32*) g_leaveDialogueAct2, sizeOfArray(g_leaveDialogueAct2));
|
||||
|
||||
m_leaveDialogue[LegoGameState::e_act3] =
|
||||
LegoState::Playlist((MxU32*) g_leaveDialogueAct3, sizeOfArray(g_leaveDialogueAct3) - 1);
|
||||
|
||||
m_bricksterDialogue = LegoState::Playlist((MxU32*) g_bricksterDialogue, sizeOfArray(g_bricksterDialogue));
|
||||
|
||||
memset(m_letters, 0, sizeof(m_letters));
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10071920
|
||||
InfocenterState::~InfocenterState()
|
||||
{
|
||||
MxS16 i = 0;
|
||||
do {
|
||||
if (GetNameLetter(i) != NULL) {
|
||||
delete GetNameLetter(i)->GetAction();
|
||||
delete GetNameLetter(i);
|
||||
}
|
||||
i++;
|
||||
} while (i < GetMaxNameLength());
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#include "scorestate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(ScoreState, 0x0c)
|
||||
|
||||
// FUNCTION: LEGO1 0x1000de20
|
||||
MxBool ScoreState::IsSerializable()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000de30
|
||||
MxBool ScoreState::SetFlag()
|
||||
{
|
||||
m_playCubeTutorial = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
#include "beachhouseentity.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoutils.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(BeachHouseEntity, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x100153b0
|
||||
MxLong BeachHouseEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||
state->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_jetskibuild);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "jukeboxstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(JukeBoxState, 0x10)
|
||||
|
||||
// FUNCTION: LEGO1 0x1000f300
|
||||
MxBool JukeBoxState::IsSerializable()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
#include "radiostate.h"
|
||||
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxtimer.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(RadioState, 0x30)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3218
|
||||
JukeboxScript::Script g_unk0x100f3218[6] = {
|
||||
JukeboxScript::c_sns002ra_Audio,
|
||||
JukeboxScript::c_sns001ja_Audio,
|
||||
JukeboxScript::c_snsc01js_Audio,
|
||||
JukeboxScript::c_snsb01js_Audio,
|
||||
JukeboxScript::c_snsa01js_Audio,
|
||||
JukeboxScript::c_sns009ra_Audio
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3230
|
||||
JukeboxScript::Script g_unk0x100f3230[14] = {
|
||||
JukeboxScript::c_ham035ra_Audio,
|
||||
JukeboxScript::c_ham039ra_Audio,
|
||||
JukeboxScript::c_sns005ra_Audio,
|
||||
JukeboxScript::c_sns078pa_Audio,
|
||||
JukeboxScript::c_ham036ra_Audio,
|
||||
JukeboxScript::c_sns006ra_Audio,
|
||||
JukeboxScript::c_sns013ra_Audio,
|
||||
JukeboxScript::c_sns004ra_Audio,
|
||||
JukeboxScript::c_sns079pa_Audio,
|
||||
JukeboxScript::c_sns007ra_Audio,
|
||||
JukeboxScript::c_sns008ra_Audio,
|
||||
JukeboxScript::c_hpz037ma_Audio,
|
||||
JukeboxScript::c_sns003ra_Audio,
|
||||
JukeboxScript::c_sns010ra_Audio,
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3268
|
||||
JukeboxScript::Script g_unk0x100f3268[9] = {
|
||||
JukeboxScript::c_CentralRoads_Music,
|
||||
JukeboxScript::c_BeachBlvd_Music,
|
||||
JukeboxScript::c_ResidentalArea_Music,
|
||||
JukeboxScript::c_Radio1_Music,
|
||||
JukeboxScript::c_Radio2_Music,
|
||||
JukeboxScript::c_Radio3_Music,
|
||||
JukeboxScript::c_Radio4_Music,
|
||||
JukeboxScript::c_Radio5_Music,
|
||||
JukeboxScript::c_Radio6_Music,
|
||||
};
|
||||
|
||||
// FUNCTION: LEGO1 0x1002ce10
|
||||
RadioState::RadioState()
|
||||
{
|
||||
srand(Timer()->GetTime());
|
||||
|
||||
MxS32 random = rand();
|
||||
m_unk0x2c = random % 3;
|
||||
|
||||
m_unk0x08[0] = LegoState::Playlist((MxU32*) g_unk0x100f3218, sizeof(g_unk0x100f3218) / sizeof(g_unk0x100f3218[0]));
|
||||
m_unk0x08[0].SetUnknown0x08(rand() % (sizeof(g_unk0x100f3218) / sizeof(g_unk0x100f3218[0])));
|
||||
|
||||
m_unk0x08[1] = LegoState::Playlist((MxU32*) g_unk0x100f3230, sizeof(g_unk0x100f3230) / sizeof(g_unk0x100f3230[0]));
|
||||
m_unk0x08[1].SetUnknown0x08(rand() % (sizeof(g_unk0x100f3230) / sizeof(g_unk0x100f3230[0])));
|
||||
|
||||
m_unk0x08[2] = LegoState::Playlist((MxU32*) g_unk0x100f3268, sizeof(g_unk0x100f3268) / sizeof(g_unk0x100f3268[0]));
|
||||
m_unk0x08[2].SetUnknown0x08(rand() % (sizeof(g_unk0x100f3268) / sizeof(g_unk0x100f3268[0])));
|
||||
|
||||
m_active = FALSE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002cf50
|
||||
MxBool RadioState::IsSerializable()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d090
|
||||
MxU32 RadioState::FUN_1002d090()
|
||||
{
|
||||
if (m_unk0x2c == 2) {
|
||||
m_unk0x2c = 0;
|
||||
}
|
||||
else {
|
||||
m_unk0x2c++;
|
||||
}
|
||||
|
||||
return m_unk0x08[m_unk0x2c].Next();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d0c0
|
||||
MxBool RadioState::FUN_1002d0c0(const MxAtomId& p_atom, MxU32 p_objectId)
|
||||
{
|
||||
if (*g_jukeboxScript == p_atom) {
|
||||
for (MxS16 i = 0; i < 3; i++) {
|
||||
if (m_unk0x08[i].Contains(p_objectId)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "legopathstruct.h"
|
||||
|
||||
#include "isle.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "jukeboxstate.h"
|
||||
#include "legohideanimpresenter.h"
|
||||
#include "legopathactor.h"
|
||||
#include "legoutils.h"
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#include "pizzamissionstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(PizzaMissionStateEntry, 0x20)
|
||||
DECOMP_SIZE_ASSERT(PizzaMissionState, 0xb0)
|
||||
|
||||
// STUB: LEGO1 0x100393c0
|
||||
MxResult PizzaMissionState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10039510
|
||||
PizzaMissionStateEntry* PizzaMissionState::GetState(MxU8 p_id)
|
||||
{
|
||||
for (MxS16 i = 0; i < 5; i++) {
|
||||
if (m_state[i].m_id == p_id) {
|
||||
return m_state + i;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
#include "pizzeriastate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(PizzeriaState, 0x58)
|
||||
|
||||
// STUB: LEGO1 0x10017af0
|
||||
PizzeriaState::PizzeriaState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10017d70
|
||||
MxU32 PizzeriaState::FUN_10017d70()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10017da0
|
||||
MxResult PizzeriaState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
#include "policeentity.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoutils.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(PoliceEntity, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x10015310
|
||||
MxLong PoliceEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||
|
||||
if (state->GetUnknown18() != 10) {
|
||||
state->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_police);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
#include "policestate.h"
|
||||
|
||||
#include "islepathactor.h"
|
||||
#include "misc.h"
|
||||
#include "mxdsaction.h"
|
||||
#include "mxmisc.h"
|
||||
#include "police.h"
|
||||
#include "police_actions.h"
|
||||
#include "scripts.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(PoliceState, 0x10)
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e7c0
|
||||
PoliceState::PoliceState()
|
||||
{
|
||||
m_unk0x0c = 0;
|
||||
m_policeScript = (rand() % 2 == 0) ? PoliceScript::c_nps002la_RunAnim : PoliceScript::c_nps001ni_RunAnim;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e990
|
||||
MxResult PoliceState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
LegoState::Serialize(p_legoFile);
|
||||
|
||||
if (p_legoFile->IsReadMode()) {
|
||||
p_legoFile->Read(&m_policeScript, sizeof(m_policeScript));
|
||||
}
|
||||
else {
|
||||
PoliceScript::Script policeScript = m_policeScript;
|
||||
p_legoFile->Write(&policeScript, sizeof(m_policeScript));
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005ea40
|
||||
void PoliceState::FUN_1005ea40()
|
||||
{
|
||||
PoliceScript::Script policeScript;
|
||||
|
||||
if (m_unk0x0c == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (CurrentActor()->GetActorId()) {
|
||||
case 4:
|
||||
policeScript = PoliceScript::c_nps002la_RunAnim;
|
||||
m_policeScript = policeScript;
|
||||
break;
|
||||
case 5:
|
||||
policeScript = PoliceScript::c_nps001ni_RunAnim;
|
||||
m_policeScript = policeScript;
|
||||
break;
|
||||
default:
|
||||
policeScript = m_policeScript;
|
||||
m_policeScript = policeScript == PoliceScript::c_nps002la_RunAnim ? PoliceScript::c_nps001ni_RunAnim
|
||||
: PoliceScript::c_nps002la_RunAnim;
|
||||
}
|
||||
|
||||
{
|
||||
MxDSAction action;
|
||||
action.SetObjectId(policeScript);
|
||||
action.SetAtomId(*g_policeScript);
|
||||
Start(&action);
|
||||
}
|
||||
|
||||
m_unk0x0c = 1;
|
||||
}
|
||||
@@ -4,6 +4,9 @@
|
||||
#include "mxnotificationmanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoRace, 0x144)
|
||||
DECOMP_SIZE_ASSERT(RaceState::Entry, 0x06)
|
||||
// TODO: Must be 0x2c but current structure is incorrect
|
||||
// DECOMP_SIZE_ASSERT(RaceState, 0x2c)
|
||||
|
||||
// FUNCTION: LEGO1 0x1000dab0
|
||||
undefined4 LegoRace::VTable0x78(undefined4)
|
||||
@@ -87,3 +90,30 @@ void LegoRace::Enable(MxBool p_enable)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10015f30
|
||||
RaceState::RaceState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10016140
|
||||
MxResult RaceState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10016280
|
||||
RaceState::Entry* RaceState::GetState(MxU8 p_id)
|
||||
{
|
||||
for (MxS16 i = 0;; i++) {
|
||||
if (i >= 5) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (m_state[i].m_id == p_id) {
|
||||
return m_state + i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#include "racestandsentity.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoutils.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(RaceStandsEntity, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x10015450
|
||||
MxLong RaceStandsEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||
state->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_racecarbuild);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
#include "racestate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(RaceStateEntry, 0x06)
|
||||
|
||||
// TODO: Must be 0x2c but current structure is incorrect
|
||||
// DECOMP_SIZE_ASSERT(RaceState, 0x2c)
|
||||
|
||||
// STUB: LEGO1 0x10015f30
|
||||
RaceState::RaceState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10016140
|
||||
MxResult RaceState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10016280
|
||||
RaceStateEntry* RaceState::GetState(MxU8 p_id)
|
||||
{
|
||||
for (MxS16 i = 0;; i++) {
|
||||
if (i >= 5) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (m_state[i].m_id == p_id) {
|
||||
return m_state + i;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
#include "towtrackmissionstate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(TowTrackMissionState, 0x28)
|
||||
|
||||
// FUNCTION: LEGO1 0x1004dd30
|
||||
TowTrackMissionState::TowTrackMissionState()
|
||||
{
|
||||
m_unk0x12 = 0;
|
||||
m_unk0x14 = 0;
|
||||
m_unk0x16 = 0;
|
||||
m_unk0x08 = 0;
|
||||
m_unk0x18 = 0;
|
||||
m_unk0x0c = 0;
|
||||
m_unk0x1a = 0;
|
||||
m_unk0x10 = 0;
|
||||
m_score1 = 0;
|
||||
m_score2 = 0;
|
||||
m_score3 = 0;
|
||||
m_score4 = 0;
|
||||
m_score5 = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004dde0
|
||||
MxResult TowTrackMissionState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
LegoState::Serialize(p_legoFile);
|
||||
|
||||
if (p_legoFile->IsReadMode()) {
|
||||
p_legoFile->Read(&m_unk0x12, sizeof(m_unk0x12));
|
||||
p_legoFile->Read(&m_unk0x14, sizeof(m_unk0x14));
|
||||
p_legoFile->Read(&m_unk0x16, sizeof(m_unk0x16));
|
||||
p_legoFile->Read(&m_unk0x18, sizeof(m_unk0x18));
|
||||
p_legoFile->Read(&m_unk0x1a, sizeof(m_unk0x1a));
|
||||
p_legoFile->Read(&m_score1, sizeof(m_score1));
|
||||
p_legoFile->Read(&m_score2, sizeof(m_score2));
|
||||
p_legoFile->Read(&m_score3, sizeof(m_score3));
|
||||
p_legoFile->Read(&m_score4, sizeof(m_score4));
|
||||
p_legoFile->Read(&m_score5, sizeof(m_score5));
|
||||
}
|
||||
else if (p_legoFile->IsWriteMode()) {
|
||||
MxU16 write = m_unk0x12;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_unk0x14;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_unk0x16;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_unk0x18;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_unk0x1a;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score1;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score2;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score3;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score4;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
|
||||
write = m_score5;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "act3.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Act3, 0x4274)
|
||||
DECOMP_SIZE_ASSERT(Act3State, 0x0c)
|
||||
|
||||
// STUB: LEGO1 0x10072270
|
||||
Act3::Act3()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "elevatorbottom.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "elevbott_actions.h"
|
||||
#include "isle.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legocontrolmanager.h"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "gasstation.h"
|
||||
|
||||
#include "garage_actions.h"
|
||||
#include "gasstationstate.h"
|
||||
#include "islepathactor.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
@@ -21,6 +20,7 @@
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(GasStation, 0x128)
|
||||
DECOMP_SIZE_ASSERT(GasStationState, 0x24)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0160
|
||||
undefined4 g_unk0x100f0160 = 3;
|
||||
@@ -419,3 +419,37 @@ MxBool GasStation::Escape()
|
||||
m_destLocation = LegoGameState::Area::e_infomain;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10005eb0
|
||||
GasStationState::GasStationState()
|
||||
{
|
||||
m_unk0x18 = 0;
|
||||
m_unk0x1a = 0;
|
||||
m_unk0x1c = 0;
|
||||
m_unk0x1e = 0;
|
||||
m_unk0x20 = 0;
|
||||
|
||||
undefined4* unk0x08 = m_unk0x08;
|
||||
unk0x08[0] = -1;
|
||||
unk0x08[1] = -1;
|
||||
unk0x08[2] = -1;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10006300
|
||||
MxResult GasStationState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10006430
|
||||
void GasStationState::FUN_10006430(undefined4)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10006490
|
||||
void GasStationState::FUN_10006490()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "hospital.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "hospital_actions.h"
|
||||
#include "hospitalstate.h"
|
||||
#include "isle.h"
|
||||
#include "islepathactor.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
@@ -22,6 +21,7 @@
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Hospital, 0x12c)
|
||||
DECOMP_SIZE_ASSERT(HospitalState, 0x18)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7918
|
||||
undefined4 g_unk0x100f7918 = 3;
|
||||
@@ -671,3 +671,49 @@ MxBool Hospital::Escape()
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10076370
|
||||
HospitalState::HospitalState()
|
||||
{
|
||||
m_unk0x0c = 0;
|
||||
m_unk0x0e = 0;
|
||||
m_unk0x10 = 0;
|
||||
m_unk0x12 = 0;
|
||||
m_unk0x14 = 0;
|
||||
m_unk0x16 = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10076530
|
||||
MxResult HospitalState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
LegoState::Serialize(p_legoFile);
|
||||
|
||||
if (p_legoFile->IsWriteMode()) {
|
||||
// A write variable needs to be used here, otherwise
|
||||
// the compiler aggresively optimizes the function
|
||||
MxS16 write;
|
||||
|
||||
write = m_unk0x0c;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x0c));
|
||||
write = m_unk0x0e;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x0e));
|
||||
write = m_unk0x10;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x10));
|
||||
write = m_unk0x12;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||
write = m_unk0x14;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x14));
|
||||
write = m_unk0x16;
|
||||
p_legoFile->Write(&write, sizeof(m_unk0x16));
|
||||
}
|
||||
else if (p_legoFile->IsReadMode()) {
|
||||
p_legoFile->Read(&m_unk0x0c, sizeof(m_unk0x0c));
|
||||
p_legoFile->Read(&m_unk0x0e, sizeof(m_unk0x0e));
|
||||
p_legoFile->Read(&m_unk0x10, sizeof(m_unk0x10));
|
||||
p_legoFile->Read(&m_unk0x12, sizeof(m_unk0x12));
|
||||
p_legoFile->Read(&m_unk0x14, sizeof(m_unk0x14));
|
||||
p_legoFile->Read(&m_unk0x16, sizeof(m_unk0x16));
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
#include "infocenter.h"
|
||||
|
||||
#include "act3state.h"
|
||||
#include "act3.h"
|
||||
#include "credits_actions.h"
|
||||
#include "helicopterstate.h"
|
||||
#include "infocenterstate.h"
|
||||
#include "helicopter.h"
|
||||
#include "infomain_actions.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legoact2state.h"
|
||||
#include "legoact2.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legobuildingmanager.h"
|
||||
#include "legocharactermanager.h"
|
||||
@@ -29,13 +28,13 @@
|
||||
#include "mxticklemanager.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "mxutilities.h"
|
||||
#include "radiostate.h"
|
||||
#include "scripts.h"
|
||||
#include "sndanim_actions.h"
|
||||
#include "viewmanager/viewmanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Infocenter, 0x1d8)
|
||||
DECOMP_SIZE_ASSERT(InfocenterMapEntry, 0x18)
|
||||
DECOMP_SIZE_ASSERT(InfocenterState, 0x94)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f76a0
|
||||
const char* g_object2x4red = "2x4red";
|
||||
@@ -43,6 +42,90 @@ const char* g_object2x4red = "2x4red";
|
||||
// GLOBAL: LEGO1 0x100f76a4
|
||||
const char* g_object2x4grn = "2x4grn";
|
||||
|
||||
// GLOBAL: LEGO1 0x100f76a8
|
||||
InfomainScript::Script g_exitDialogueAct1[14] = {
|
||||
InfomainScript::c_iic019in_RunAnim,
|
||||
InfomainScript::c_iic020in_RunAnim,
|
||||
InfomainScript::c_iic021in_RunAnim,
|
||||
InfomainScript::c_iic022in_RunAnim,
|
||||
InfomainScript::c_iic023in_RunAnim,
|
||||
InfomainScript::c_iic024in_RunAnim,
|
||||
InfomainScript::c_iic025in_RunAnim,
|
||||
InfomainScript::c_iic026in_RunAnim,
|
||||
InfomainScript::c_iic027in_RunAnim,
|
||||
InfomainScript::c_iica28in_RunAnim,
|
||||
InfomainScript::c_iicb28in_RunAnim,
|
||||
InfomainScript::c_iicc28in_RunAnim,
|
||||
InfomainScript::c_iic029in_RunAnim,
|
||||
InfomainScript::c_iic032in_RunAnim
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f76e0
|
||||
InfomainScript::Script g_exitDialogueAct23[6] = {
|
||||
InfomainScript::c_iic027in_RunAnim,
|
||||
InfomainScript::c_iic029in_RunAnim,
|
||||
InfomainScript::c_iic048in_RunAnim,
|
||||
InfomainScript::c_iic056in_RunAnim,
|
||||
InfomainScript::c_iicx23in_RunAnim
|
||||
// Zero-terminated
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f76f8
|
||||
InfomainScript::Script g_returnDialogueAct1[6] = {
|
||||
InfomainScript::c_iicx26in_RunAnim,
|
||||
InfomainScript::c_iic033in_RunAnim,
|
||||
InfomainScript::c_iic034in_RunAnim,
|
||||
InfomainScript::c_iic035in_RunAnim,
|
||||
InfomainScript::c_iic036in_RunAnim
|
||||
// Zero-terminated
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7710
|
||||
InfomainScript::Script g_returnDialogueAct2[4] = {
|
||||
InfomainScript::c_iic048in_RunAnim,
|
||||
InfomainScript::c_iic049in_RunAnim,
|
||||
InfomainScript::c_iic050in_RunAnim,
|
||||
// Zero-terminated
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7720
|
||||
InfomainScript::Script g_returnDialogueAct3[4] = {
|
||||
InfomainScript::c_iic055in_RunAnim,
|
||||
InfomainScript::c_iic056in_RunAnim,
|
||||
InfomainScript::c_iic057in_RunAnim,
|
||||
InfomainScript::c_iic058in_RunAnim
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7730
|
||||
InfomainScript::Script g_leaveDialogueAct1[4] = {
|
||||
InfomainScript::c_iic039in_PlayWav,
|
||||
InfomainScript::c_iic040in_PlayWav,
|
||||
InfomainScript::c_iic041in_PlayWav,
|
||||
InfomainScript::c_iic042in_PlayWav
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7740
|
||||
InfomainScript::Script g_leaveDialogueAct2[4] = {
|
||||
InfomainScript::c_iic051in_PlayWav,
|
||||
InfomainScript::c_iic052in_PlayWav,
|
||||
InfomainScript::c_iic053in_PlayWav,
|
||||
InfomainScript::c_iic054in_PlayWav
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7750
|
||||
InfomainScript::Script g_leaveDialogueAct3[4] = {
|
||||
InfomainScript::c_iic059in_PlayWav,
|
||||
InfomainScript::c_iic060in_PlayWav,
|
||||
InfomainScript::c_iic061in_PlayWav,
|
||||
// Zero-terminated
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7760
|
||||
InfomainScript::Script g_bricksterDialogue[2] = {
|
||||
InfomainScript::c_sbleh2br_PlayWav,
|
||||
InfomainScript::c_snshahbr_PlayWav
|
||||
};
|
||||
|
||||
// FUNCTION: LEGO1 0x1006ea20
|
||||
Infocenter::Infocenter()
|
||||
{
|
||||
@@ -1462,3 +1545,45 @@ void Infocenter::StopBookAnimation()
|
||||
action.SetUnknown24(-2);
|
||||
DeleteObject(action);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10071600
|
||||
InfocenterState::InfocenterState()
|
||||
{
|
||||
m_exitDialogueAct1 = LegoState::Playlist((MxU32*) g_exitDialogueAct1, sizeOfArray(g_exitDialogueAct1));
|
||||
m_exitDialogueAct23 = LegoState::Playlist((MxU32*) g_exitDialogueAct23, sizeOfArray(g_exitDialogueAct23) - 1);
|
||||
|
||||
m_returnDialogue[LegoGameState::e_act1] =
|
||||
LegoState::Playlist((MxU32*) g_returnDialogueAct1, sizeOfArray(g_returnDialogueAct1) - 1);
|
||||
|
||||
m_returnDialogue[LegoGameState::e_act2] =
|
||||
LegoState::Playlist((MxU32*) g_returnDialogueAct2, sizeOfArray(g_returnDialogueAct2) - 1);
|
||||
|
||||
m_returnDialogue[LegoGameState::e_act3] =
|
||||
LegoState::Playlist((MxU32*) g_returnDialogueAct3, sizeOfArray(g_returnDialogueAct3));
|
||||
|
||||
m_leaveDialogue[LegoGameState::e_act1] =
|
||||
LegoState::Playlist((MxU32*) g_leaveDialogueAct1, sizeOfArray(g_leaveDialogueAct1));
|
||||
|
||||
m_leaveDialogue[LegoGameState::e_act2] =
|
||||
LegoState::Playlist((MxU32*) g_leaveDialogueAct2, sizeOfArray(g_leaveDialogueAct2));
|
||||
|
||||
m_leaveDialogue[LegoGameState::e_act3] =
|
||||
LegoState::Playlist((MxU32*) g_leaveDialogueAct3, sizeOfArray(g_leaveDialogueAct3) - 1);
|
||||
|
||||
m_bricksterDialogue = LegoState::Playlist((MxU32*) g_bricksterDialogue, sizeOfArray(g_bricksterDialogue));
|
||||
|
||||
memset(m_letters, 0, sizeof(m_letters));
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10071920
|
||||
InfocenterState::~InfocenterState()
|
||||
{
|
||||
MxS16 i = 0;
|
||||
do {
|
||||
if (GetNameLetter(i) != NULL) {
|
||||
delete GetNameLetter(i)->GetAction();
|
||||
delete GetNameLetter(i);
|
||||
}
|
||||
i++;
|
||||
} while (i < GetMaxNameLength());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "infocenterdoor.h"
|
||||
|
||||
#include "infocenterstate.h"
|
||||
#include "infocenter.h"
|
||||
#include "infodoor_actions.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
#include "isle.h"
|
||||
|
||||
#include "3dmanager/lego3dmanager.h"
|
||||
#include "act1state.h"
|
||||
#include "ambulance.h"
|
||||
#include "bike.h"
|
||||
#include "carracestate.h"
|
||||
#include "carrace.h"
|
||||
#include "dunebuggy.h"
|
||||
#include "helicopter.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "jetski.h"
|
||||
#include "jetskiracestate.h"
|
||||
#include "jetskirace.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "jukeboxentity.h"
|
||||
#include "legoanimationmanager.h"
|
||||
@@ -18,6 +17,7 @@
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legoinputmanager.h"
|
||||
#include "legomain.h"
|
||||
#include "legonamedtexture.h"
|
||||
#include "legoutils.h"
|
||||
#include "legovariables.h"
|
||||
#include "legovideomanager.h"
|
||||
@@ -37,11 +37,20 @@
|
||||
#include "skateboard.h"
|
||||
#include "towtrack.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Act1State, 0x26c)
|
||||
DECOMP_SIZE_ASSERT(Act1State::NamedPlane, 0x4c)
|
||||
DECOMP_SIZE_ASSERT(Isle, 0x140)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f1198
|
||||
MxU32 g_isleFlags = 0x7f;
|
||||
|
||||
// GLOBAL: ISLE 0x100f37f0
|
||||
MxS32 g_unk0x100f37f0[] = {
|
||||
Act1State::e_unk953,
|
||||
Act1State::e_unk954,
|
||||
Act1State::e_unk955,
|
||||
};
|
||||
|
||||
// FUNCTION: LEGO1 0x10030820
|
||||
Isle::Isle()
|
||||
{
|
||||
@@ -1271,3 +1280,283 @@ void Isle::FUN_10033350()
|
||||
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100334b0
|
||||
Act1State::Act1State() : m_unk0x00c(0), m_unk0x00e(0), m_unk0x008(NULL), m_unk0x010(0)
|
||||
{
|
||||
m_unk0x01e = FALSE;
|
||||
m_unk0x018 = 1;
|
||||
m_unk0x010 = 0;
|
||||
m_planeActive = FALSE;
|
||||
m_unk0x00e = 0;
|
||||
m_unk0x01f = FALSE;
|
||||
m_unk0x008 = g_unk0x100f37f0;
|
||||
m_unk0x014 = -1;
|
||||
m_unk0x022 = FALSE;
|
||||
m_unk0x154 = NULL;
|
||||
m_unk0x158 = NULL;
|
||||
m_unk0x15c = NULL;
|
||||
m_unk0x160 = NULL;
|
||||
m_unk0x1b0 = NULL;
|
||||
m_unk0x021 = 1;
|
||||
m_elevFloor = Act1State::c_floor1;
|
||||
m_unk0x00c = sizeOfArray(g_unk0x100f37f0);
|
||||
m_unk0x1b4 = NULL;
|
||||
m_unk0x1b8 = NULL;
|
||||
m_unk0x208 = NULL;
|
||||
m_unk0x20c = NULL;
|
||||
m_unk0x25c = NULL;
|
||||
m_unk0x260 = NULL;
|
||||
m_unk0x264 = NULL;
|
||||
m_unk0x268 = NULL;
|
||||
SetFlag();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10033ac0
|
||||
MxResult Act1State::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
LegoState::Serialize(p_legoFile);
|
||||
|
||||
m_unk0x024.Serialize(p_legoFile);
|
||||
m_unk0x070.Serialize(p_legoFile);
|
||||
m_unk0x0bc.Serialize(p_legoFile);
|
||||
m_unk0x108.Serialize(p_legoFile);
|
||||
m_unk0x164.Serialize(p_legoFile);
|
||||
m_unk0x1bc.Serialize(p_legoFile);
|
||||
m_unk0x210.Serialize(p_legoFile);
|
||||
|
||||
if (p_legoFile->IsWriteMode()) {
|
||||
if (m_unk0x108.GetName()->Compare("") != 0) {
|
||||
if (m_unk0x154) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x154);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "chwind.gif");
|
||||
}
|
||||
if (m_unk0x158) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x158);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "chjetl.gif");
|
||||
}
|
||||
if (m_unk0x15c) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x15c);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "chjetr.gif");
|
||||
}
|
||||
}
|
||||
if (m_unk0x164.GetName()->Compare("") != 0) {
|
||||
if (m_unk0x1b0) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x1b0);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "jsfrnt.gif");
|
||||
}
|
||||
if (m_unk0x1b4) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x1b4);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "jswnsh.gif");
|
||||
}
|
||||
}
|
||||
if (m_unk0x1bc.GetName()->Compare("") != 0) {
|
||||
if (m_unk0x208) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x208);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "dbfrfn.gif");
|
||||
}
|
||||
}
|
||||
if (m_unk0x210.GetName()->Compare("") != 0) {
|
||||
if (m_unk0x25c) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x25c);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "rcfrnt.gif");
|
||||
}
|
||||
if (m_unk0x260) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x260);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "rcback.gif");
|
||||
}
|
||||
if (m_unk0x264) {
|
||||
WriteNamedTexture(p_legoFile, m_unk0x264);
|
||||
}
|
||||
else {
|
||||
FUN_1003f540(p_legoFile, "rctail.gif");
|
||||
}
|
||||
}
|
||||
|
||||
p_legoFile->Write(&m_unk0x010, sizeof(m_unk0x010));
|
||||
p_legoFile->Write(&m_unk0x022, sizeof(m_unk0x022));
|
||||
}
|
||||
else if (p_legoFile->IsReadMode()) {
|
||||
if (m_unk0x108.GetName()->Compare("") != 0) {
|
||||
m_unk0x154 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x154 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x158 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x158 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x15c = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x15c == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
if (m_unk0x164.GetName()->Compare("") != 0) {
|
||||
m_unk0x1b0 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x1b0 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x1b4 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x1b4 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
if (m_unk0x1bc.GetName()->Compare("") != 0) {
|
||||
m_unk0x208 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x208 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
if (m_unk0x210.GetName()->Compare("") != 0) {
|
||||
m_unk0x25c = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x25c == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x260 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x260 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk0x264 = ReadNamedTexture(p_legoFile);
|
||||
if (m_unk0x264 == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
p_legoFile->Read(&m_unk0x010, sizeof(m_unk0x010));
|
||||
p_legoFile->Read(&m_unk0x022, sizeof(m_unk0x022));
|
||||
}
|
||||
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10034660
|
||||
void Act1State::FUN_10034660()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100346a0
|
||||
void Act1State::FUN_100346a0()
|
||||
{
|
||||
if (m_unk0x014 != -1) {
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, m_unk0x014, NULL);
|
||||
m_unk0x014 = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100346d0
|
||||
MxBool Act1State::SetFlag()
|
||||
{
|
||||
m_unk0x024.SetName("");
|
||||
m_unk0x070.SetName("");
|
||||
m_unk0x0bc.SetName("");
|
||||
m_unk0x022 = FALSE;
|
||||
m_unk0x108.SetName("");
|
||||
|
||||
if (m_unk0x154) {
|
||||
delete m_unk0x154;
|
||||
m_unk0x154 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x158) {
|
||||
delete m_unk0x158;
|
||||
m_unk0x158 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x15c) {
|
||||
delete m_unk0x15c;
|
||||
m_unk0x15c = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x160) {
|
||||
delete m_unk0x160;
|
||||
m_unk0x160 = NULL;
|
||||
}
|
||||
|
||||
m_unk0x164.SetName("");
|
||||
|
||||
if (m_unk0x1b0) {
|
||||
delete m_unk0x1b0;
|
||||
m_unk0x1b0 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x1b4) {
|
||||
delete m_unk0x1b4;
|
||||
m_unk0x1b4 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x1b8) {
|
||||
delete m_unk0x1b8;
|
||||
m_unk0x1b8 = NULL;
|
||||
}
|
||||
|
||||
m_unk0x1bc.SetName("");
|
||||
|
||||
if (m_unk0x208) {
|
||||
delete m_unk0x208;
|
||||
m_unk0x208 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x20c) {
|
||||
delete m_unk0x20c;
|
||||
m_unk0x20c = NULL;
|
||||
}
|
||||
|
||||
m_unk0x210.SetName("");
|
||||
|
||||
if (m_unk0x25c) {
|
||||
delete m_unk0x25c;
|
||||
m_unk0x25c = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x260) {
|
||||
delete m_unk0x260;
|
||||
m_unk0x260 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x264) {
|
||||
delete m_unk0x264;
|
||||
m_unk0x264 = NULL;
|
||||
}
|
||||
|
||||
if (m_unk0x268) {
|
||||
delete m_unk0x268;
|
||||
m_unk0x268 = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10034b60
|
||||
void Act1State::FUN_10034b60()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10034d00
|
||||
void Act1State::FUN_10034d00()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "jukebox.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "isle.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "jukeboxstate.h"
|
||||
#include "jukeboxw_actions.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legogamestate.h"
|
||||
@@ -17,6 +16,7 @@
|
||||
#include "mxvideopresenter.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(JukeBox, 0x104)
|
||||
DECOMP_SIZE_ASSERT(JukeBoxState, 0x10)
|
||||
|
||||
// FUNCTION: LEGO1 0x1005d660
|
||||
JukeBox::JukeBox()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "legoact2.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoAct2, 0x1154)
|
||||
DECOMP_SIZE_ASSERT(LegoAct2State, 0x10)
|
||||
|
||||
// FUNCTION: LEGO1 0x1004fe10
|
||||
MxBool LegoAct2::VTable0x5c()
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "police_actions.h"
|
||||
#include "policestate.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Police, 0x110)
|
||||
DECOMP_SIZE_ASSERT(PoliceState, 0x10)
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e130
|
||||
Police::Police()
|
||||
@@ -196,3 +197,60 @@ MxBool Police::Escape()
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e7c0
|
||||
PoliceState::PoliceState()
|
||||
{
|
||||
m_unk0x0c = 0;
|
||||
m_policeScript = (rand() % 2 == 0) ? PoliceScript::c_nps002la_RunAnim : PoliceScript::c_nps001ni_RunAnim;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e990
|
||||
MxResult PoliceState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
LegoState::Serialize(p_legoFile);
|
||||
|
||||
if (p_legoFile->IsReadMode()) {
|
||||
p_legoFile->Read(&m_policeScript, sizeof(m_policeScript));
|
||||
}
|
||||
else {
|
||||
PoliceScript::Script policeScript = m_policeScript;
|
||||
p_legoFile->Write(&policeScript, sizeof(m_policeScript));
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005ea40
|
||||
void PoliceState::FUN_1005ea40()
|
||||
{
|
||||
PoliceScript::Script policeScript;
|
||||
|
||||
if (m_unk0x0c == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (CurrentActor()->GetActorId()) {
|
||||
case 4:
|
||||
policeScript = PoliceScript::c_nps002la_RunAnim;
|
||||
m_policeScript = policeScript;
|
||||
break;
|
||||
case 5:
|
||||
policeScript = PoliceScript::c_nps001ni_RunAnim;
|
||||
m_policeScript = policeScript;
|
||||
break;
|
||||
default:
|
||||
policeScript = m_policeScript;
|
||||
m_policeScript = policeScript == PoliceScript::c_nps002la_RunAnim ? PoliceScript::c_nps001ni_RunAnim
|
||||
: PoliceScript::c_nps002la_RunAnim;
|
||||
}
|
||||
|
||||
{
|
||||
MxDSAction action;
|
||||
action.SetObjectId(policeScript);
|
||||
action.SetAtomId(*g_policeScript);
|
||||
Start(&action);
|
||||
}
|
||||
|
||||
m_unk0x0c = 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "registrationbook.h"
|
||||
|
||||
#include "infocenterstate.h"
|
||||
#include "infocenter.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legogamestate.h"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include "score.h"
|
||||
|
||||
#include "ambulancemissionstate.h"
|
||||
#include "carracestate.h"
|
||||
#include "ambulance.h"
|
||||
#include "carrace.h"
|
||||
#include "infoscor_actions.h"
|
||||
#include "jetskiracestate.h"
|
||||
#include "jetski.h"
|
||||
#include "jetskirace.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legocontrolmanager.h"
|
||||
@@ -17,13 +18,12 @@
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "mxnotificationparam.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "pizzamissionstate.h"
|
||||
#include "racestate.h"
|
||||
#include "scorestate.h"
|
||||
#include "pizza.h"
|
||||
#include "scripts.h"
|
||||
#include "towtrackmissionstate.h"
|
||||
#include "towtrack.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Score, 0x104)
|
||||
DECOMP_SIZE_ASSERT(ScoreState, 0x0c)
|
||||
|
||||
// FUNCTION: LEGO1 0x10001000
|
||||
Score::Score()
|
||||
|
||||
Reference in New Issue
Block a user