mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 09:24:17 +00:00
Consolidate state and building entity classes (#989)
This commit is contained in:
committed by
GitHub
parent
73bb37596e
commit
133a312aee
@@ -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