Merge commit 'ba378eb22442d71fe4f23a5c818cdfad16d3b16d' into new-isle-decomp

This commit is contained in:
Anonymous Maarten 2024-06-25 17:56:33 +02:00
commit 3d59615274
162 changed files with 3527 additions and 3166 deletions

View File

@ -318,14 +318,12 @@ target_link_libraries(omni PRIVATE dsound winmm libsmacker)
add_library(lego1 SHARED
LEGO1/define.cpp
LEGO1/lego/legoomni/src/act1/act1state.cpp
LEGO1/lego/legoomni/src/act2/legoact2state.cpp
LEGO1/lego/legoomni/src/act3/act3shark.cpp
LEGO1/lego/legoomni/src/act3/act3state.cpp
LEGO1/lego/legoomni/src/actors/act2actor.cpp
LEGO1/lego/legoomni/src/actors/act3actor.cpp
LEGO1/lego/legoomni/src/actors/act3shark.cpp
LEGO1/lego/legoomni/src/actors/ambulance.cpp
LEGO1/lego/legoomni/src/actors/bike.cpp
LEGO1/lego/legoomni/src/actors/buildings.cpp
LEGO1/lego/legoomni/src/actors/bumpbouy.cpp
LEGO1/lego/legoomni/src/actors/doors.cpp
LEGO1/lego/legoomni/src/actors/dunebuggy.cpp
@ -349,11 +347,9 @@ add_library(lego1 SHARED
LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp
LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp
LEGO1/lego/legoomni/src/build/buildingentity.cpp
LEGO1/lego/legoomni/src/build/helicopterstate.cpp
LEGO1/lego/legoomni/src/build/legobuildingmanager.cpp
LEGO1/lego/legoomni/src/build/legocarbuild.cpp
LEGO1/lego/legoomni/src/build/legovehiclebuildstate.cpp
LEGO1/lego/legoomni/src/common/animstate.cpp
LEGO1/lego/legoomni/src/build/legocarbuildpresenter.cpp
LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp
LEGO1/lego/legoomni/src/common/legoactors.cpp
LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp
@ -390,18 +386,7 @@ add_library(lego1 SHARED
LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp
LEGO1/lego/legoomni/src/entity/legoworld.cpp
LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp
LEGO1/lego/legoomni/src/gasstation/gasstationentity.cpp
LEGO1/lego/legoomni/src/gasstation/gasstationstate.cpp
LEGO1/lego/legoomni/src/hospital/ambulancemissionstate.cpp
LEGO1/lego/legoomni/src/hospital/hospitalentity.cpp
LEGO1/lego/legoomni/src/hospital/hospitalstate.cpp
LEGO1/lego/legoomni/src/infocenter/infocenterentity.cpp
LEGO1/lego/legoomni/src/infocenter/infocenterstate.cpp
LEGO1/lego/legoomni/src/infocenter/scorestate.cpp
LEGO1/lego/legoomni/src/input/legoinputmanager.cpp
LEGO1/lego/legoomni/src/isle/beachhouseentity.cpp
LEGO1/lego/legoomni/src/isle/jukeboxstate.cpp
LEGO1/lego/legoomni/src/isle/radiostate.cpp
LEGO1/lego/legoomni/src/main/legomain.cpp
LEGO1/lego/legoomni/src/main/scripts.cpp
LEGO1/lego/legoomni/src/notify/legoeventnotificationparam.cpp
@ -412,22 +397,14 @@ add_library(lego1 SHARED
LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp
LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp
LEGO1/lego/legoomni/src/paths/legopathstruct.cpp
LEGO1/lego/legoomni/src/pizzeria/pizzamissionstate.cpp
LEGO1/lego/legoomni/src/pizzeria/pizzeriastate.cpp
LEGO1/lego/legoomni/src/police/policeentity.cpp
LEGO1/lego/legoomni/src/police/policestate.cpp
LEGO1/lego/legoomni/src/race/carrace.cpp
LEGO1/lego/legoomni/src/race/jetskirace.cpp
LEGO1/lego/legoomni/src/race/legorace.cpp
LEGO1/lego/legoomni/src/race/legoraceactor.cpp
LEGO1/lego/legoomni/src/race/legoracecar.cpp
LEGO1/lego/legoomni/src/race/legoracemap.cpp
LEGO1/lego/legoomni/src/race/racestandsentity.cpp
LEGO1/lego/legoomni/src/race/raceskel.cpp
LEGO1/lego/legoomni/src/race/racestate.cpp
LEGO1/lego/legoomni/src/towtrack/towtrackmissionstate.cpp
LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp
LEGO1/lego/legoomni/src/video/legocarbuildanimpresenter.cpp
LEGO1/lego/legoomni/src/video/legoflctexturepresenter.cpp
LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp
LEGO1/lego/legoomni/src/video/legolocomotionanimpresenter.cpp

View File

@ -162,16 +162,10 @@ void IsleApp::Close()
TransitionManager()->SetWaitIndicator(NULL);
Lego()->StopTimer();
MxLong lVar8;
do {
lVar8 = Streamer()->Close(NULL);
} while (lVar8 == 0);
while (Lego()) {
if (Lego()->DoesEntityExist(ds)) {
break;
while (Streamer()->Close(NULL) == SUCCESS) {
}
while (Lego() && !Lego()->DoesEntityExist(ds)) {
Timer()->GetRealTime();
TickleManager()->Tickle();
}
@ -469,8 +463,8 @@ MxResult IsleApp::SetupWindow()
}
GameState()->SetSavePath(m_savePath);
GameState()->SerializePlayersInfo(1);
GameState()->SerializeScoreHistory(1);
GameState()->SerializePlayersInfo(LegoStorage::c_read);
GameState()->SerializeScoreHistory(LegoStorage::c_read);
MxS32 iVar10;
switch (m_islandQuality) {

View File

@ -18,6 +18,18 @@
// LIBRARY: ISLE 0x407ec0
// ___CxxFrameHandler
// LIBRARY: ISLE 0x4080ec
// __global_unwind2
// LIBRARY: ISLE 0x40812e
// __local_unwind2
// LIBRARY: ISLE 0x4081b9
// __NLG_Notify1
// LIBRARY: ISLE 0x4081c2
// __NLG_Notify
// LIBRARY: ISLE 0x4081e0
// _srand
@ -30,6 +42,9 @@
// LIBRARY: ISLE 0x4082d0
// _atoi
// LIBRARY: ISLE 0x408490
// __amsg_exit
// LIBRARY: ISLE 0x4084c0
// ?_query_new_handler@@YAP6AHI@ZXZ
@ -42,22 +57,295 @@
// LIBRARY: ISLE 0x408630
// _abort
// LIBRARY: ISLE 0x408650
// ___InternalCxxFrameHandler
// LIBRARY: ISLE 0x408b30
// ___FrameUnwindToState
// LIBRARY: ISLE 0x4090c0
// __CallSettingFrame@12
// LIBRARY: ISLE 0x409110
// __mtinit
// LIBRARY: ISLE 0x409170
// __initptd
// LIBRARY: ISLE 0x409190
// __getptd
// LIBRARY: ISLE 0x409200
// __isctype
// LIBRARY: ISLE 0x4092e0
// ?terminate@@YAXXZ
// LIBRARY: ISLE 0x409360
// ?_inconsistency@@YAXXZ
// LIBRARY: ISLE 0x4093e0
// __cinit
// LIBRARY: ISLE 0x409410
// _exit
// LIBRARY: ISLE 0x409430
// __exit
// LIBRARY: ISLE 0x409550
// __XcptFilter
// LIBRARY: ISLE 0x4096d0
// __ismbblead
// LIBRARY: ISLE 0x409730
// __setenvp
// LIBRARY: ISLE 0x409820
// __setargv
// LIBRARY: ISLE 0x409a90
// ___crtGetEnvironmentStringsA
// LIBRARY: ISLE 0x409c20
// __setmbcp
// LIBRARY: ISLE 0x409f30
// ___initmbctable
// LIBRARY: ISLE 0x409f40
// __ioinit
// LIBRARY: ISLE 0x40a120
// __heap_init
// LIBRARY: ISLE 0x40a160
// __FF_MSGBANNER
// LIBRARY: ISLE 0x40a1a0
// __NMSG_WRITE
// LIBRARY: ISLE 0x40a3a0
// __mtinitlocks
// LIBRARY: ISLE 0x40a3d0
// __lock
// LIBRARY: ISLE 0x40a440
// __unlock
// LIBRARY: ISLE 0x40a540
// __flsbuf
// LIBRARY: ISLE 0x40a690
// __output
// LIBRARY: ISLE 0x40b090
// _write_multi_char
// LIBRARY: ISLE 0x40b0d0
// _write_string
// LIBRARY: ISLE 0x40b150
// _raise
// LIBRARY: ISLE 0x40b780
// ___crtGetStringTypeA
// LIBRARY: ISLE 0x40b8b0
// ___sbh_new_region
// LIBRARY: ISLE 0x40ba20
// ___crtMessageBoxA
// LIBRARY: ISLE 0x40bac0
// _strncpy
// LIBRARY: ISLE 0x40bcb0
// __write
// LIBRARY: ISLE 0x40bd30
// __write_lk
// LIBRARY: ISLE 0x40bf30
// __lseek
// LIBRARY: ISLE 0x40bfb0
// __lseek_lk
// LIBRARY: ISLE 0x40c040
// __getbuf
// LIBRARY: ISLE 0x40c090
// __isatty
// LIBRARY: ISLE 0x40c0c0
// _wctomb
// LIBRARY: ISLE 0x40c120
// __wctomb_lk
// LIBRARY: ISLE 0x40c1c0
// __aulldiv
// LIBRARY: ISLE 0x40c230
// __aullrem
// LIBRARY: ISLE 0x40c2b0
// __dosmaperr
// LIBRARY: ISLE 0x40c330
// __errno
// LIBRARY: ISLE 0x40c340
// ___doserrno
// LIBRARY: ISLE 0x40c710
// __get_osfhandle
// LIBRARY: ISLE 0x40c760
// __lock_fhandle
// LIBRARY: ISLE 0x40c7d0
// __unlock_fhandle
// LIBRARY: ISLE 0x40c810
// __fptrap
// GLOBAL: ISLE 0x40f448
// ___lookuptable
// GLOBAL: ISLE 0x410000
// ___xc_a
// GLOBAL: ISLE 0x410008
// ___xc_z
// GLOBAL: ISLE 0x41000c
// ___xi_a
// GLOBAL: ISLE 0x410018
// ___xi_z
// GLOBAL: ISLE 0x41068c
// __NLG_Destination
// GLOBAL: ISLE 0x41069c
// __aenvptr
// GLOBAL: ISLE 0x4106a8
// ___error_mode
// GLOBAL: ISLE 0x4106ac
// ___app_type
// GLOBAL: ISLE 0x4106c0
// ___tlsindex
// GLOBAL: ISLE 0x4106c8
// __pctype
// GLOBAL: ISLE 0x4108d4
// ___mb_cur_max
// GLOBAL: ISLE 0x4108e0
// ?__pInconsistency@@3P6AXXZA
// GLOBAL: ISLE 0x4108e8
// __osver
// GLOBAL: ISLE 0x4108ec
// __winver
// GLOBAL: ISLE 0x4108f0
// __winmajor
// GLOBAL: ISLE 0x4108f4
// __winminor
// GLOBAL: ISLE 0x4108f8
// ___argc
// GLOBAL: ISLE 0x4108fc
// ___argv
// GLOBAL: ISLE 0x410904
// __environ
// GLOBAL: ISLE 0x410914
// __pgmptr
// GLOBAL: ISLE 0x410928
// __XcptActTab
// GLOBAL: ISLE 0x4109a0
// __First_FPE_Indx
// GLOBAL: ISLE 0x4109a4
// __Num_FPE
// GLOBAL: ISLE 0x4109b8
// __mbctype
// GLOBAL: ISLE 0x410abc
// ___mbcodepage
// GLOBAL: ISLE 0x410ac0
// ___mblcid
// GLOBAL: ISLE 0x410ac8
// ___mbulinfo
// GLOBAL: ISLE 0x410bd0
// ___badioinfo
// GLOBAL: ISLE 0x410c88
// __adbgmsg
// GLOBAL: ISLE 0x410c90
// __locktable
// GLOBAL: ISLE 0x410d50
// __newmode
// GLOBAL: ISLE 0x410d54
// ___nullstring
// GLOBAL: ISLE 0x410d58
// ___wnullstring
// GLOBAL: ISLE 0x410d90
// ___lc_codepage
// GLOBAL: ISLE 0x410d98
// ___small_block_heap
// GLOBAL: ISLE 0x411850
// __cflush
// XGLOBAL ISLE 0x4125f8
// ?_pnhHeap@@3P6AHI@ZA
// GLOBAL: ISLE 0x412888
// ___setlc_active
// GLOBAL: ISLE 0x41288c
// ___unguarded_readlc_active
// GLOBAL: ISLE 0x4138a4
// __crtheap
// GLOBAL: ISLE 0x4138b0
// ___pioinfo
// GLOBAL: ISLE 0x4139b0
// __nhandle
// GLOBAL: ISLE 0x4139bc
// __FPinit
// GLOBAL: ISLE 0x4139c0
// __acmdln
#endif

View File

@ -1,136 +0,0 @@
#ifndef ACT1STATE_H
#define ACT1STATE_H
#include "legostate.h"
class LegoNamedTexture;
// VTABLE: LEGO1 0x100d7028
// SIZE 0x26c
class Act1State : public LegoState {
public:
enum ElevatorFloor {
c_floor1 = 1,
c_floor2,
c_floor3
};
enum {
e_unk953 = 953,
e_unk954 = 954,
e_unk955 = 955,
};
// SIZE 0x4c
class NamedPlane {
public:
// FUNCTION: LEGO1 0x10033800
NamedPlane() {}
inline void SetName(const char* p_name) { m_name = p_name; }
inline const MxString* GetName() const { return &m_name; }
// FUNCTION: LEGO1 0x100344d0
MxResult Serialize(LegoFile* p_file)
{
if (p_file->IsWriteMode()) {
p_file->WriteString(m_name);
p_file->WriteVector3(m_point1);
p_file->WriteVector3(m_point2);
p_file->WriteVector3(m_point3);
}
else if (p_file->IsReadMode()) {
p_file->ReadString(m_name);
p_file->ReadVector3(m_point1);
p_file->ReadVector3(m_point2);
p_file->ReadVector3(m_point3);
}
return SUCCESS;
}
private:
MxString m_name; // 0x00
Mx3DPointFloat m_point1; // 0x10
Mx3DPointFloat m_point2; // 0x24
Mx3DPointFloat m_point3; // 0x38
};
Act1State();
// FUNCTION: LEGO1 0x100338a0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0154
return "Act1State";
}
// FUNCTION: LEGO1 0x100338b0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, Act1State::ClassName()) || LegoState::IsA(p_name);
}
MxBool SetFlag() override; // vtable+0x18
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
void FUN_10034660();
void FUN_100346a0();
void FUN_10034b60();
void FUN_10034d00();
inline MxU32 GetUnknown18() { return m_unk0x018; }
inline ElevatorFloor GetElevatorFloor() { return (ElevatorFloor) m_elevFloor; }
inline MxU8 GetUnknown21() { return m_unk0x021; }
inline void SetUnknown18(MxU32 p_unk0x18) { m_unk0x018 = p_unk0x18; }
inline void SetElevatorFloor(ElevatorFloor p_elevFloor) { m_elevFloor = p_elevFloor; }
inline void SetUnknown21(MxU8 p_unk0x21) { m_unk0x021 = p_unk0x21; }
// SYNTHETIC: LEGO1 0x10033960
// Act1State::`scalar deleting destructor'
friend class Isle;
friend class SkateBoard;
protected:
MxS32* m_unk0x008; // 0x008 FIXME: count for m_unk0x008
MxS16 m_unk0x00c; // 0x00c
undefined2 m_unk0x00e; // 0x00e
undefined2 m_unk0x010; // 0x010
undefined m_unk0x012; // 0x012
MxS32 m_unk0x014; // 0x014
MxU32 m_unk0x018; // 0x018
MxS16 m_elevFloor; // 0x01c
MxBool m_unk0x01e; // 0x01e
MxBool m_unk0x01f; // 0x01f
MxBool m_planeActive; // 0x020
undefined m_unk0x021; // 0x021
MxBool m_unk0x022; // 0x022
undefined m_unk0x023; // 0x023
NamedPlane m_unk0x024; // 0x024
NamedPlane m_unk0x070; // 0x070
NamedPlane m_unk0x0bc; // 0x0bc
NamedPlane m_unk0x108; // 0x108
LegoNamedTexture* m_unk0x154; // 0x154
LegoNamedTexture* m_unk0x158; // 0x158
LegoNamedTexture* m_unk0x15c; // 0x15c
MxCore* m_unk0x160; // 0x160
NamedPlane m_unk0x164; // 0x164
LegoNamedTexture* m_unk0x1b0; // 0x1b0
LegoNamedTexture* m_unk0x1b4; // 0x1b4
MxCore* m_unk0x1b8; // 0x1b8
NamedPlane m_unk0x1bc; // 0x1bc
LegoNamedTexture* m_unk0x208; // 0x208
MxCore* m_unk0x20c; // 0x20c
NamedPlane m_unk0x210; // 0x210
LegoNamedTexture* m_unk0x25c; // 0x25c
LegoNamedTexture* m_unk0x260; // 0x260
LegoNamedTexture* m_unk0x264; // 0x264
MxCore* m_unk0x268; // 0x268
};
// FUNCTION: LEGO1 0x10033a70
// Act1State::NamedPlane::~NamedPlane
#endif // ACT1STATE_H

View File

@ -1,8 +1,41 @@
#ifndef ACT3_H
#define ACT3_H
#include "legostate.h"
#include "legoworld.h"
// VTABLE: LEGO1 0x100d4fc8
// SIZE 0x0c
class Act3State : public LegoState {
public:
inline Act3State() { m_unk0x08 = 0; }
// FUNCTION: LEGO1 0x1000e300
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f03f0
return "Act3State";
}
// FUNCTION: LEGO1 0x1000e310
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, Act3State::ClassName()) || LegoState::IsA(p_name);
}
// FUNCTION: LEGO1 0x1000e2f0
MxBool IsSerializable() override { return FALSE; }
// SYNTHETIC: LEGO1 0x1000e3c0
// Act3State::`scalar deleting destructor'
inline undefined4 GetUnknown0x08() { return m_unk0x08; }
// TODO: Most likely getters/setters are not used according to BETA.
undefined4 m_unk0x08; // 0x08
};
// VTABLE: LEGO1 0x100d9628
// SIZE 0x4274
class Act3 : public LegoWorld {

View File

@ -1,36 +0,0 @@
#ifndef ACT3STATE_H
#define ACT3STATE_H
#include "legostate.h"
// VTABLE: LEGO1 0x100d4fc8
// SIZE 0x0c
class Act3State : public LegoState {
public:
inline Act3State() { m_unk0x08 = 0; }
// FUNCTION: LEGO1 0x1000e300
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f03f0
return "Act3State";
}
// FUNCTION: LEGO1 0x1000e310
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, Act3State::ClassName()) || LegoState::IsA(p_name);
}
MxBool IsSerializable() override;
// SYNTHETIC: LEGO1 0x1000e3c0
// Act3State::`scalar deleting destructor'
inline undefined4 GetUnknown0x08() { return m_unk0x08; }
private:
undefined4 m_unk0x08; // 0x08
};
#endif // ACT3STATE_H

View File

@ -2,8 +2,65 @@
#define AMBULANCE_H
#include "islepathactor.h"
#include "legostate.h"
class AmbulanceMissionState;
class MxEndActionNotificationParam;
// VTABLE: LEGO1 0x100d72a0
// SIZE 0x24
class AmbulanceMissionState : public LegoState {
public:
AmbulanceMissionState();
// FUNCTION: LEGO1 0x10037600
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f00e8
return "AmbulanceMissionState";
}
// FUNCTION: LEGO1 0x10037610
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, AmbulanceMissionState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
inline MxU16 GetScore(MxU8 p_id)
{
switch (p_id) {
case 1:
return m_score1;
case 2:
return m_score2;
case 3:
return m_score3;
case 4:
return m_score4;
case 5:
return m_score5;
default:
return 0;
}
}
// SYNTHETIC: LEGO1 0x100376c0
// AmbulanceMissionState::`scalar deleting destructor'
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
MxU16 m_unk0x10; // 0x10
MxU16 m_unk0x12; // 0x12
MxU16 m_unk0x14; // 0x14
MxU16 m_unk0x16; // 0x16
MxU16 m_unk0x18; // 0x18
MxU16 m_score1; // 0x1a
MxU16 m_score2; // 0x1c
MxU16 m_score3; // 0x1e
MxU16 m_score4; // 0x20
MxU16 m_score5; // 0x22
};
// VTABLE: LEGO1 0x100d71a8
// SIZE 0x184
@ -31,10 +88,12 @@ class Ambulance : public IslePathActor {
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c
void VTable0x70(float p_float) override; // vtable+0x70
MxU32 HandleClick() override; // vtable+0xcc
MxU32 HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxU32 VTable0xdc(MxType19NotificationParam&) override; // vtable+0xdc
void VTable0xe4() override; // vtable+0xe4
MxLong HandleClick() override; // vtable+0xcc
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxLong HandleNotification19(MxType19NotificationParam& p_param) override; // vtable+0xdc
void Exit() override; // vtable+0xe4
virtual MxLong HandleButtonDown(LegoControlManagerEvent& p_param); // vtable+0xf0
virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf4
void CreateState();
void FUN_10036e60();

View File

@ -1,62 +0,0 @@
#ifndef AMBULANCEMISSIONSTATE_H
#define AMBULANCEMISSIONSTATE_H
#include "legostate.h"
// VTABLE: LEGO1 0x100d72a0
// SIZE 0x24
class AmbulanceMissionState : public LegoState {
public:
AmbulanceMissionState();
// FUNCTION: LEGO1 0x10037600
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f00e8
return "AmbulanceMissionState";
}
// FUNCTION: LEGO1 0x10037610
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, AmbulanceMissionState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
inline MxU16 GetScore(MxU8 p_id)
{
switch (p_id) {
case 1:
return m_score1;
case 2:
return m_score2;
case 3:
return m_score3;
case 4:
return m_score4;
case 5:
return m_score5;
default:
return 0;
}
}
// SYNTHETIC: LEGO1 0x100376c0
// AmbulanceMissionState::`scalar deleting destructor'
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
MxU16 m_unk0x10; // 0x10
MxU16 m_unk0x12; // 0x12
MxU16 m_unk0x14; // 0x14
MxU16 m_unk0x16; // 0x16
MxU16 m_unk0x18; // 0x18
MxU16 m_score1; // 0x1a
MxU16 m_score2; // 0x1c
MxU16 m_score3; // 0x1e
MxU16 m_score4; // 0x20
MxU16 m_score5; // 0x22
};
#endif // AMBULANCEMISSIONSTATE_H

View File

@ -1,71 +0,0 @@
#ifndef ANIMSTATE_H
#define ANIMSTATE_H
#include "legostate.h"
// SIZE 0x30
struct ModelInfo {
char* m_name; // 0x00
MxU8 m_unk0x04; // 0x04
float m_location[3]; // 0x08
float m_direction[3]; // 0x14
float m_up[3]; // 0x20
MxU8 m_unk0x2c; // 0x2c
};
// SIZE 0x30
struct AnimInfo {
char* m_name; // 0x00
MxU32 m_objectId; // 0x04
MxS16 m_location; // 0x08
MxBool m_unk0x0a; // 0x0a
MxU8 m_unk0x0b; // 0x0b
MxU8 m_unk0x0c; // 0x0c
MxU8 m_unk0x0d; // 0x0d
float m_unk0x10[4]; // 0x10
MxU8 m_modelCount; // 0x20
MxU16 m_unk0x22; // 0x22
ModelInfo* m_models; // 0x24
MxS8 m_unk0x28; // 0x28
MxBool m_unk0x29; // 0x29
MxS8 m_unk0x2a[3]; // 0x2a
};
// VTABLE: LEGO1 0x100d8d80
// SIZE 0x1c
class AnimState : public LegoState {
public:
AnimState();
~AnimState() override; // vtable+0x00
// FUNCTION: LEGO1 0x10065070
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0460
return "AnimState";
}
// FUNCTION: LEGO1 0x10065080
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, AnimState::ClassName()) || LegoState::IsA(p_name);
}
MxBool SetFlag() override; // vtable+0x18
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
void FUN_100651d0(MxU32, AnimInfo*, MxU32&);
void FUN_10065240(MxU32, AnimInfo*, MxU32);
// SYNTHETIC: LEGO1 0x10065130
// AnimState::`scalar deleting destructor'
private:
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
void* m_unk0x10; // 0x10
undefined4 m_unk0x14; // 0x14
void* m_unk0x18; // 0x18
};
#endif // ANIMSTATE_H

View File

@ -1,29 +0,0 @@
#ifndef BEACHHOUSEENTITY_H
#define BEACHHOUSEENTITY_H
#include "buildingentity.h"
// VTABLE: LEGO1 0x100d4a18
// SIZE 0x68
class BeachHouseEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000ee80
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0314
return "BeachHouseEntity";
}
// FUNCTION: LEGO1 0x1000ee90
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, BeachHouseEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override;
// SYNTHETIC: LEGO1 0x1000f970
// BeachHouseEntity::`scalar deleting destructor'
};
#endif // BEACHHOUSEENTITY_H

View File

@ -24,9 +24,9 @@ class Bike : public IslePathActor {
}
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
MxU32 HandleClick() override; // vtable+0xcc
MxU32 HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
void VTable0xe4() override; // vtable+0xe4
MxLong HandleClick() override; // vtable+0xcc
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
void Exit() override; // vtable+0xe4
void FUN_10076b60();

View File

@ -0,0 +1,166 @@
#ifndef BUILDINGS_H
#define BUILDINGS_H
#include "buildingentity.h"
// VTABLE: LEGO1 0x100d48a8
// SIZE 0x68
class RaceStandsEntity : public BuildingEntity {
// FUNCTION: LEGO1 0x1000efa0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0300
return "RaceStandsEntity";
}
// FUNCTION: LEGO1 0x1000efb0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, RaceStandsEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override;
// SYNTHETIC: LEGO1 0x1000f9e0
// RaceStandsEntity::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d4a18
// SIZE 0x68
class BeachHouseEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000ee80
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0314
return "BeachHouseEntity";
}
// FUNCTION: LEGO1 0x1000ee90
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, BeachHouseEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override;
// SYNTHETIC: LEGO1 0x1000f970
// BeachHouseEntity::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d4ab0
// SIZE 0x68
class PoliceEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000ed60
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0328
return "PoliceEntity";
}
// FUNCTION: LEGO1 0x1000ed70
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, PoliceEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override; // vtable+0x50
// SYNTHETIC: LEGO1 0x1000f900
// PoliceEntity::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d4b90
// SIZE 0x68
class InfoCenterEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000ea00
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f035c
return "InfoCenterEntity";
}
// FUNCTION: LEGO1 0x1000ea10
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, InfoCenterEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override; // vtable+0x50
// SYNTHETIC: LEGO1 0x1000f7b0
// InfoCenterEntity::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d5068
// SIZE 0x68
class HospitalEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000ec40
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0338
return "HospitalEntity";
}
// FUNCTION: LEGO1 0x1000ec50
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, HospitalEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override; // vtable+0x50
// SYNTHETIC: LEGO1 0x1000f820
// HospitalEntity::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d5200
// SIZE 0x68
class JailEntity : public BuildingEntity {
// FUNCTION: LEGO1 0x1000f0c0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0300
return "RaceStandsEntity";
}
// FUNCTION: LEGO1 0x1000f0d0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, JailEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
// STUB: LEGO1 0x100154f0
MxLong VTable0x50(MxParam& p_param) override { return 0; }
// SYNTHETIC: LEGO1 0x1000fac0
// JailEntity::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d5258
// SIZE 0x68
class GasStationEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000eb20
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0348
return "GasStationEntity";
}
// FUNCTION: LEGO1 0x1000eb30
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, GasStationEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override;
// SYNTHETIC: LEGO1 0x1000f890
// GasStationEntity::`scalar deleting destructor'
};
#endif // BUILDINGS_H

View File

@ -4,6 +4,27 @@
#include "decomp.h"
#include "legorace.h"
// VTABLE: LEGO1 0x100d4b70
// SIZE 0x2c
class CarRaceState : public RaceState {
public:
// FUNCTION: LEGO1 0x1000dd30
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f009c
return "CarRaceState";
}
// FUNCTION: LEGO1 0x1000dd40
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, CarRaceState::ClassName()) || RaceState::IsA(p_name);
}
// SYNTHETIC: LEGO1 0x1000f740
// CarRaceState::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d5e50
// SIZE 0x154
class CarRace : public LegoRace {

View File

@ -1,27 +0,0 @@
#ifndef CARRACESTATE_H
#define CARRACESTATE_H
#include "racestate.h"
// VTABLE: LEGO1 0x100d4b70
// SIZE 0x2c
class CarRaceState : public RaceState {
public:
// FUNCTION: LEGO1 0x1000dd30
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f009c
return "CarRaceState";
}
// FUNCTION: LEGO1 0x1000dd40
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, CarRaceState::ClassName()) || RaceState::IsA(p_name);
}
// SYNTHETIC: LEGO1 0x1000f740
// CarRaceState::`scalar deleting destructor'
};
#endif // CARRACESTATE_H

View File

@ -1,7 +1,7 @@
#ifndef CAVEENTITY_H
#define CAVEENTITY_H
#include "racestandsentity.h"
#include "buildings.h"
// No overrides, uses vtable from RaceStandsEntity
// SIZE 0x68

View File

@ -25,10 +25,10 @@ class DuneBuggy : public IslePathActor {
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void VTable0x70(float p_float) override; // vtable+0x70
MxU32 HandleClick() override; // vtable+0xcc
MxU32 HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc
void VTable0xe4() override; // vtable+0xe4
MxLong HandleClick() override; // vtable+0xcc
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxLong HandleNotification19(MxType19NotificationParam& p_param) override; // vtable+0xdc
void Exit() override; // vtable+0xe4
void FUN_10068350();

View File

@ -3,12 +3,55 @@
#include "decomp.h"
#include "legogamestate.h"
#include "legostate.h"
#include "legoworld.h"
#include "radio.h"
class GasStationState;
class MxStillPresenter;
// VTABLE: LEGO1 0x100d46e0
// SIZE 0x24
class GasStationState : public LegoState {
public:
// SIZE 0x04
struct Unknown0x14 {
undefined4 m_unk0x00; // 0x00
};
GasStationState();
// FUNCTION: LEGO1 0x100061d0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0174
return "GasStationState";
}
// FUNCTION: LEGO1 0x100061e0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, GasStationState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x10006290
// GasStationState::`scalar deleting destructor'
void FUN_10006430(undefined4);
void FUN_10006490();
// TODO: Most likely getters/setters are not used according to BETA.
undefined4 m_unk0x08[3]; // 0x08
Unknown0x14 m_unk0x14; // 0x14
MxS16 m_unk0x18; // 0x18
MxS16 m_unk0x1a; // 0x1a
MxS16 m_unk0x1c; // 0x1c
MxS16 m_unk0x1e; // 0x1e
MxS16 m_unk0x20; // 0x20
};
// VTABLE: LEGO1 0x100d4650
// SIZE 0x128
class GasStation : public LegoWorld {

View File

@ -1,29 +0,0 @@
#ifndef GASSTATIONENTITY_H
#define GASSTATIONENTITY_H
#include "buildingentity.h"
// VTABLE: LEGO1 0x100d5258
// SIZE 0x68
class GasStationEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000eb20
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0348
return "GasStationEntity";
}
// FUNCTION: LEGO1 0x1000eb30
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, GasStationEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override;
// SYNTHETIC: LEGO1 0x1000f890
// GasStationEntity::`scalar deleting destructor'
};
#endif // GASSTATIONENTITY_H

View File

@ -1,50 +0,0 @@
#ifndef GASSTATIONSTATE_H
#define GASSTATIONSTATE_H
#include "legostate.h"
// VTABLE: LEGO1 0x100d46e0
// SIZE 0x24
class GasStationState : public LegoState {
public:
// SIZE 0x04
struct Unknown0x14 {
undefined4 m_unk0x00; // 0x00
};
GasStationState();
// FUNCTION: LEGO1 0x100061d0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0174
return "GasStationState";
}
// FUNCTION: LEGO1 0x100061e0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, GasStationState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x10006290
// GasStationState::`scalar deleting destructor'
void FUN_10006430(undefined4);
void FUN_10006490();
friend class GasStation;
private:
undefined4 m_unk0x08[3]; // 0x08
Unknown0x14 m_unk0x14; // 0x14
MxS16 m_unk0x18; // 0x18
MxS16 m_unk0x1a; // 0x1a
MxS16 m_unk0x1c; // 0x1c
MxS16 m_unk0x1e; // 0x1e
MxS16 m_unk0x20; // 0x20
};
#endif // GASSTATIONSTATE_H

View File

@ -2,9 +2,46 @@
#define HELICOPTER_H
#include "islepathactor.h"
#include "legostate.h"
#include "realtime/matrix.h"
class HelicopterState;
// VTABLE: LEGO1 0x100d5418
// SIZE 0x0c
class HelicopterState : public LegoState {
public:
// FUNCTION: LEGO1 0x1000e0d0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0144
return "HelicopterState";
}
// FUNCTION: LEGO1 0x1000e0e0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, HelicopterState::ClassName()) || LegoState::IsA(p_name);
}
// FUNCTION: LEGO1 0x1000e0b0
MxBool IsSerializable() override { return FALSE; } // vtable+0x14
// FUNCTION: LEGO1 0x1000e0c0
MxBool SetFlag() override
{
m_unk0x08 = 0;
return TRUE;
} // vtable+0x18
inline void SetUnknown8(MxU32 p_unk0x08) { m_unk0x08 = p_unk0x08; }
inline MxU32 GetUnkown8() { return m_unk0x08; }
// SYNTHETIC: LEGO1 0x1000e190
// HelicopterState::`scalar deleting destructor'
// TODO: Most likely getters/setters are not used according to BETA.
MxU32 m_unk0x08; // 0x08
};
// VTABLE: LEGO1 0x100d40f8
// SIZE 0x230
@ -29,10 +66,10 @@ class Helicopter : public IslePathActor {
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void VTable0x70(float p_float) override; // vtable+0x70
void VTable0x74(Matrix4& p_transform) override; // vtable+0x74
MxU32 HandleClick() override; // vtable+0xcc
MxU32 HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxU32 VTable0xd8(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8
void VTable0xe4() override; // vtable+0xe4
MxLong HandleClick() override; // vtable+0xcc
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxLong HandleEndAnim(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8
void Exit() override; // vtable+0xe4
// SYNTHETIC: LEGO1 0x10003210
// Helicopter::`scalar deleting destructor'

View File

@ -1,44 +0,0 @@
#ifndef HELICOPTERSTATE_H
#define HELICOPTERSTATE_H
#include "decomp.h"
#include "legostate.h"
// VTABLE: LEGO1 0x100d5418
// SIZE 0x0c
class HelicopterState : public LegoState {
public:
// FUNCTION: LEGO1 0x1000e0d0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0144
return "HelicopterState";
}
// FUNCTION: LEGO1 0x1000e0e0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, HelicopterState::ClassName()) || LegoState::IsA(p_name);
}
// FUNCTION: LEGO1 0x1000e0b0
MxBool IsSerializable() override { return FALSE; } // vtable+0x14
// FUNCTION: LEGO1 0x1000e0c0
MxBool SetFlag() override
{
m_unk0x08 = 0;
return TRUE;
} // vtable+0x18
inline void SetUnknown8(MxU32 p_unk0x08) { m_unk0x08 = p_unk0x08; }
inline MxU32 GetUnkown8() { return m_unk0x08; }
// SYNTHETIC: LEGO1 0x1000e190
// HelicopterState::`scalar deleting destructor'
protected:
MxU32 m_unk0x08; // 0x08
};
#endif // HELICOPTERSTATE_H

View File

@ -4,13 +4,54 @@
#include "actionsfwd.h"
#include "decomp.h"
#include "legogamestate.h"
#include "legostate.h"
#include "legoworld.h"
class HospitalState;
class LegoControlManagerEvent;
class MxEndActionNotificationParam;
class MxStillPresenter;
// VTABLE: LEGO1 0x100d97a0
// SIZE 0x18
class HospitalState : public LegoState {
public:
// SIZE 0x04
struct Unknown0x08 {
undefined4 m_unk0x00; // 0x00
};
HospitalState();
~HospitalState() override {}
// FUNCTION: LEGO1 0x10076400
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0480
return "HospitalState";
}
// FUNCTION: LEGO1 0x10076410
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, HospitalState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x100764c0
// HospitalState::`scalar deleting destructor'
// TODO: Most likely getters/setters are not used according to BETA.
Unknown0x08 m_unk0x08; // 0x08
MxS16 m_unk0x0c; // 0x0c
MxS16 m_unk0x0e; // 0x0e
MxS16 m_unk0x10; // 0x10
MxS16 m_unk0x12; // 0x12
MxS16 m_unk0x14; // 0x14
MxS16 m_unk0x16; // 0x16
};
// VTABLE: LEGO1 0x100d9730
// SIZE 0x12c
class Hospital : public LegoWorld {

View File

@ -1,29 +0,0 @@
#ifndef HOSPITALENTITY_H
#define HOSPITALENTITY_H
#include "buildingentity.h"
// VTABLE: LEGO1 0x100d5068
// SIZE 0x68
class HospitalEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000ec40
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0338
return "HospitalEntity";
}
// FUNCTION: LEGO1 0x1000ec50
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, HospitalEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override; // vtable+0x50
// SYNTHETIC: LEGO1 0x1000f820
// HospitalEntity::`scalar deleting destructor'
};
#endif // HOSPITALENTITY_H

View File

@ -1,49 +0,0 @@
#ifndef HOSPITALSTATE_H
#define HOSPITALSTATE_H
#include "decomp.h"
#include "legostate.h"
// VTABLE: LEGO1 0x100d97a0
// SIZE 0x18
class HospitalState : public LegoState {
public:
// SIZE 0x04
struct Unknown0x08 {
undefined4 m_unk0x00; // 0x00
};
HospitalState();
~HospitalState() override {}
// FUNCTION: LEGO1 0x10076400
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0480
return "HospitalState";
}
// FUNCTION: LEGO1 0x10076410
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, HospitalState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x100764c0
// HospitalState::`scalar deleting destructor'
friend class Hospital;
private:
Unknown0x08 m_unk0x08; // 0x08
MxS16 m_unk0x0c; // 0x0c
MxS16 m_unk0x0e; // 0x0e
MxS16 m_unk0x10; // 0x10
MxS16 m_unk0x12; // 0x12
MxS16 m_unk0x14; // 0x14
MxS16 m_unk0x16; // 0x16
};
#endif // HOSPITALSTATE_H

View File

@ -3,15 +3,65 @@
#include "actionsfwd.h"
#include "legogamestate.h"
#include "legostate.h"
#include "legoworld.h"
#include "mxrect32.h"
#include "radio.h"
class InfocenterState;
class MxNotificationParam;
class MxStillPresenter;
class LegoControlManagerEvent;
// VTABLE: LEGO1 0x100d93a8
// SIZE 0x94
class InfocenterState : public LegoState {
public:
InfocenterState();
~InfocenterState() override;
// FUNCTION: LEGO1 0x10071840
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f04dc
return "InfocenterState";
}
// FUNCTION: LEGO1 0x10071850
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, InfocenterState::ClassName()) || LegoState::IsA(p_name);
}
// FUNCTION: LEGO1 0x10071830
MxBool IsSerializable() override { return FALSE; } // vtable+0x14
inline MxS16 GetMaxNameLength() { return sizeOfArray(m_letters); }
inline MxStillPresenter* GetNameLetter(MxS32 p_index) { return m_letters[p_index]; }
inline void SetNameLetter(MxS32 p_index, MxStillPresenter* p_letter) { m_letters[p_index] = p_letter; }
inline MxBool HasRegistered() { return m_letters[0] != NULL; }
inline Playlist& GetExitDialogueAct1() { return m_exitDialogueAct1; }
inline Playlist& GetExitDialogueAct23() { return m_exitDialogueAct23; }
inline Playlist& GetReturnDialogue(LegoGameState::Act p_act) { return m_returnDialogue[p_act]; }
inline Playlist& GetLeaveDialogue(LegoGameState::Act p_act) { return m_leaveDialogue[p_act]; }
inline Playlist& GetBricksterDialogue() { return m_bricksterDialogue; }
inline MxU32 GetUnknown0x74() { return m_unk0x74; }
inline void SetUnknown0x74(MxU32 p_unk0x74) { m_unk0x74 = p_unk0x74; }
// SYNTHETIC: LEGO1 0x10071900
// InfocenterState::`scalar deleting destructor'
// TODO: Most likely getters/setters are not used according to BETA.
Playlist m_exitDialogueAct1; // 0x08
Playlist m_exitDialogueAct23; // 0x14
Playlist m_returnDialogue[3]; // 0x20
Playlist m_leaveDialogue[3]; // 0x44
Playlist m_bricksterDialogue; // 0x68
MxU32 m_unk0x74; // 0x74
MxStillPresenter* m_letters[7]; // 0x78
};
// SIZE 0x18
struct InfocenterMapEntry {
// FUNCTION: LEGO1 0x1006ec80

View File

@ -1,29 +0,0 @@
#ifndef INFOCENTERENTITY_H
#define INFOCENTERENTITY_H
#include "buildingentity.h"
// VTABLE: LEGO1 0x100d4b90
// SIZE 0x68
class InfoCenterEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000ea00
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f035c
return "InfoCenterEntity";
}
// FUNCTION: LEGO1 0x1000ea10
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, InfoCenterEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override; // vtable+0x50
// SYNTHETIC: LEGO1 0x1000f7b0
// InfoCenterEntity::`scalar deleting destructor'
};
#endif // INFOCENTERENTITY_H

View File

@ -1,59 +0,0 @@
#ifndef INFOCENTERSTATE_H
#define INFOCENTERSTATE_H
#include "decomp.h"
#include "legogamestate.h"
#include "legostate.h"
class MxStillPresenter;
// VTABLE: LEGO1 0x100d93a8
// SIZE 0x94
class InfocenterState : public LegoState {
public:
InfocenterState();
~InfocenterState() override;
// FUNCTION: LEGO1 0x10071840
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f04dc
return "InfocenterState";
}
// FUNCTION: LEGO1 0x10071850
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, InfocenterState::ClassName()) || LegoState::IsA(p_name);
}
// FUNCTION: LEGO1 0x10071830
MxBool IsSerializable() override { return FALSE; } // vtable+0x14
inline MxS16 GetMaxNameLength() { return sizeOfArray(m_letters); }
inline MxStillPresenter* GetNameLetter(MxS32 p_index) { return m_letters[p_index]; }
inline void SetNameLetter(MxS32 p_index, MxStillPresenter* p_letter) { m_letters[p_index] = p_letter; }
inline MxBool HasRegistered() { return m_letters[0] != NULL; }
inline Playlist& GetExitDialogueAct1() { return m_exitDialogueAct1; }
inline Playlist& GetExitDialogueAct23() { return m_exitDialogueAct23; }
inline Playlist& GetReturnDialogue(LegoGameState::Act p_act) { return m_returnDialogue[p_act]; }
inline Playlist& GetLeaveDialogue(LegoGameState::Act p_act) { return m_leaveDialogue[p_act]; }
inline Playlist& GetBricksterDialogue() { return m_bricksterDialogue; }
inline MxU32 GetUnknown0x74() { return m_unk0x74; }
inline void SetUnknown0x74(MxU32 p_unk0x74) { m_unk0x74 = p_unk0x74; }
// SYNTHETIC: LEGO1 0x10071900
// InfocenterState::`scalar deleting destructor'
private:
Playlist m_exitDialogueAct1; // 0x08
Playlist m_exitDialogueAct23; // 0x14
Playlist m_returnDialogue[3]; // 0x20
Playlist m_leaveDialogue[3]; // 0x44
Playlist m_bricksterDialogue; // 0x68
MxU32 m_unk0x74; // 0x74
MxStillPresenter* m_letters[7]; // 0x78
};
#endif // INFOCENTERSTATE_H

View File

@ -3,16 +3,17 @@
#include "actionsfwd.h"
#include "legogamestate.h"
#include "legostate.h"
#include "legoworld.h"
#include "radio.h"
class Act1State;
class Ambulance;
class Bike;
class DuneBuggy;
class Helicopter;
class Jetski;
class JukeBoxEntity;
class LegoNamedTexture;
class Motocycle;
class MxType19NotificationParam;
class Pizza;
@ -21,6 +22,132 @@ class RaceCar;
class SkateBoard;
class TowTrack;
// VTABLE: LEGO1 0x100d7028
// SIZE 0x26c
class Act1State : public LegoState {
public:
enum ElevatorFloor {
c_floor1 = 1,
c_floor2,
c_floor3
};
enum {
e_unk953 = 953,
e_unk954 = 954,
e_unk955 = 955,
};
// SIZE 0x4c
class NamedPlane {
public:
// FUNCTION: LEGO1 0x10033800
NamedPlane() {}
inline void SetName(const char* p_name) { m_name = p_name; }
inline const MxString* GetName() const { return &m_name; }
// FUNCTION: LEGO1 0x100344d0
MxResult Serialize(LegoFile* p_file)
{
if (p_file->IsWriteMode()) {
p_file->WriteString(m_name);
p_file->WriteVector3(m_point1);
p_file->WriteVector3(m_point2);
p_file->WriteVector3(m_point3);
}
else if (p_file->IsReadMode()) {
p_file->ReadString(m_name);
p_file->ReadVector3(m_point1);
p_file->ReadVector3(m_point2);
p_file->ReadVector3(m_point3);
}
return SUCCESS;
}
private:
MxString m_name; // 0x00
Mx3DPointFloat m_point1; // 0x10
Mx3DPointFloat m_point2; // 0x24
Mx3DPointFloat m_point3; // 0x38
};
Act1State();
// FUNCTION: LEGO1 0x100338a0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0154
return "Act1State";
}
// FUNCTION: LEGO1 0x100338b0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, Act1State::ClassName()) || LegoState::IsA(p_name);
}
MxBool SetFlag() override; // vtable+0x18
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
void FUN_10034660();
void FUN_100346a0();
void FUN_10034b60();
void FUN_10034d00();
inline MxU32 GetUnknown18() { return m_unk0x018; }
inline ElevatorFloor GetElevatorFloor() { return (ElevatorFloor) m_elevFloor; }
inline MxU8 GetUnknown21() { return m_unk0x021; }
inline void SetUnknown18(MxU32 p_unk0x18) { m_unk0x018 = p_unk0x18; }
inline void SetElevatorFloor(ElevatorFloor p_elevFloor) { m_elevFloor = p_elevFloor; }
inline void SetUnknown21(MxU8 p_unk0x21) { m_unk0x021 = p_unk0x21; }
// SYNTHETIC: LEGO1 0x10033960
// Act1State::`scalar deleting destructor'
// TODO: Most likely getters/setters are not used according to BETA.
MxS32* m_unk0x008; // 0x008 FIXME: count for m_unk0x008
MxS16 m_unk0x00c; // 0x00c
undefined2 m_unk0x00e; // 0x00e
undefined2 m_unk0x010; // 0x010
undefined m_unk0x012; // 0x012
MxS32 m_unk0x014; // 0x014
MxU32 m_unk0x018; // 0x018
MxS16 m_elevFloor; // 0x01c
MxBool m_unk0x01e; // 0x01e
MxBool m_unk0x01f; // 0x01f
MxBool m_planeActive; // 0x020
undefined m_unk0x021; // 0x021
MxBool m_unk0x022; // 0x022
undefined m_unk0x023; // 0x023
NamedPlane m_unk0x024; // 0x024
NamedPlane m_unk0x070; // 0x070
NamedPlane m_unk0x0bc; // 0x0bc
NamedPlane m_unk0x108; // 0x108
LegoNamedTexture* m_unk0x154; // 0x154
LegoNamedTexture* m_unk0x158; // 0x158
LegoNamedTexture* m_unk0x15c; // 0x15c
MxCore* m_unk0x160; // 0x160
NamedPlane m_unk0x164; // 0x164
LegoNamedTexture* m_unk0x1b0; // 0x1b0
LegoNamedTexture* m_unk0x1b4; // 0x1b4
MxCore* m_unk0x1b8; // 0x1b8
NamedPlane m_unk0x1bc; // 0x1bc
LegoNamedTexture* m_unk0x208; // 0x208
MxCore* m_unk0x20c; // 0x20c
NamedPlane m_unk0x210; // 0x210
LegoNamedTexture* m_unk0x25c; // 0x25c
LegoNamedTexture* m_unk0x260; // 0x260
LegoNamedTexture* m_unk0x264; // 0x264
MxCore* m_unk0x268; // 0x268
};
// FUNCTION: LEGO1 0x10033a70
// Act1State::NamedPlane::~NamedPlane
// VTABLE: LEGO1 0x100d6fb8
// SIZE 0x140
class Isle : public LegoWorld {

View File

@ -4,6 +4,7 @@
#include "legogamestate.h"
#include "legopathactor.h"
#include "mxtypes.h"
#include "roi/legoroi.h"
class LegoControlManagerEvent;
class LegoEndAnimNotificationParam;
@ -106,22 +107,22 @@ class IslePathActor : public LegoPathActor {
void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c
// FUNCTION: LEGO1 0x10002e70
virtual MxU32 HandleClick() { return 0; } // vtable+0xcc
virtual MxLong HandleClick() { return 0; } // vtable+0xcc
// FUNCTION: LEGO1 0x10002df0
virtual MxU32 VTable0xd0() { return 0; } // vtable+0xd0
virtual MxLong HandleNotification0() { return 0; } // vtable+0xd0
// FUNCTION: LEGO1 0x10002e80
virtual MxU32 HandleControl(LegoControlManagerEvent&) { return 0; } // vtable+0xd4
virtual MxLong HandleControl(LegoControlManagerEvent&) { return 0; } // vtable+0xd4
// FUNCTION: LEGO1 0x10002e90
virtual MxU32 VTable0xd8(LegoEndAnimNotificationParam&) { return 0; } // vtable+0xd8
virtual MxLong HandleEndAnim(LegoEndAnimNotificationParam&) { return 0; } // vtable+0xd8
// FUNCTION: LEGO1 0x10002e00
virtual MxU32 VTable0xdc(MxType19NotificationParam&) { return 0; } // vtable+0xdc
virtual MxLong HandleNotification19(MxType19NotificationParam&) { return 0; } // vtable+0xdc
virtual void VTable0xe0(); // vtable+0xe0
virtual void VTable0xe4(); // vtable+0xe4
virtual void Enter(); // vtable+0xe0
virtual void Exit(); // vtable+0xe4
virtual void SpawnPlayer(LegoGameState::Area p_area, MxBool p_und, MxU8 p_flags); // vtable+0xe8
virtual void VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundary, MxBool p_reset); // vtable+0xec
@ -130,12 +131,18 @@ class IslePathActor : public LegoPathActor {
void FUN_1001b660();
void Reset()
{
m_roi->SetVisibility(TRUE);
SetState(0);
}
static void RegisterSpawnLocations();
protected:
LegoWorld* m_world; // 0x154
LegoPathActor* m_unk0x158; // 0x158
MxFloat m_unk0x15c; // 0x15c
LegoPathActor* m_previousActor; // 0x158
MxFloat m_previousVel; // 0x15c
};
#endif // ISLEPATHACTOR_H

View File

@ -1,29 +0,0 @@
#ifndef JAILENTITY_H
#define JAILENTITY_H
#include "buildingentity.h"
// VTABLE: LEGO1 0x100d5200
// SIZE 0x68
class JailEntity : public BuildingEntity {
// FUNCTION: LEGO1 0x1000f0c0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0300
return "RaceStandsEntity";
}
// FUNCTION: LEGO1 0x1000f0d0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, JailEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
// STUB: LEGO1 0x100154f0
MxLong VTable0x50(MxParam& p_param) override { return 0; }
// SYNTHETIC: LEGO1 0x1000fac0
// JailEntity::`scalar deleting destructor'
};
#endif // JAILENTITY_H

View File

@ -27,9 +27,9 @@ class Jetski : public IslePathActor {
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void VTable0x70(float p_float) override; // vtable+0x70
MxU32 HandleClick() override; // vtable+0xcc
MxU32 HandleControl(LegoControlManagerEvent&) override; // vtable+0xd4
void VTable0xe4() override; // vtable+0xe4
MxLong HandleClick() override; // vtable+0xcc
MxLong HandleControl(LegoControlManagerEvent&) override; // vtable+0xd4
void Exit() override; // vtable+0xe4
void FUN_1007e990();

View File

@ -3,6 +3,27 @@
#include "legorace.h"
// VTABLE: LEGO1 0x100d4fa8
// SIZE 0x2c
class JetskiRaceState : public RaceState {
public:
// FUNCTION: LEGO1 0x1000dc40
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f00ac
return "JetskiRaceState";
}
// FUNCTION: LEGO1 0x1000dc50
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, JetskiRaceState::ClassName()) || RaceState::IsA(p_name);
}
// SYNTHETIC: LEGO1 0x1000f680
// JetskiRaceState::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d4fe8
// SIZE 0x144
class JetskiRace : public LegoRace {

View File

@ -1,27 +0,0 @@
#ifndef JETSKIRACESTATE_H
#define JETSKIRACESTATE_H
#include "racestate.h"
// VTABLE: LEGO1 0x100d4fa8
// SIZE 0x2c
class JetskiRaceState : public RaceState {
public:
// FUNCTION: LEGO1 0x1000dc40
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f00ac
return "JetskiRaceState";
}
// FUNCTION: LEGO1 0x1000dc50
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, JetskiRaceState::ClassName()) || RaceState::IsA(p_name);
}
// SYNTHETIC: LEGO1 0x1000f680
// JetskiRaceState::`scalar deleting destructor'
};
#endif // JETSKIRACESTATE_H

View File

@ -3,10 +3,46 @@
#include "decomp.h"
#include "legogamestate.h"
#include "legostate.h"
#include "legoworld.h"
class LegoControlManagerEvent;
class JukeBoxState;
// VTABLE: LEGO1 0x100d4a90
// SIZE 0x10
class JukeBoxState : public LegoState {
public:
enum Music {
e_pasquell = 0,
e_right,
e_decal,
e_wallis,
e_nelson,
e_torpedos
};
// FUNCTION: LEGO1 0x1000f310
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f02bc
return "JukeBoxState";
}
// FUNCTION: LEGO1 0x1000f320
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, JukeBoxState::ClassName()) || LegoState::IsA(p_name);
}
// FUNCTION: LEGO1 0x1000f300
MxBool IsSerializable() override { return FALSE; } // vtable+0x14
// SYNTHETIC: LEGO1 0x1000f3d0
// JukeBoxState::`scalar deleting destructor'
Music m_music; // 0x08
MxU32 m_active; // 0x0c
};
// VTABLE: LEGO1 0x100d8958
// SIZE 0x104

View File

@ -1,38 +0,0 @@
#ifndef JUKEBOXSTATE_H
#define JUKEBOXSTATE_H
#include "legostate.h"
// VTABLE: LEGO1 0x100d4a90
// SIZE 0x10
class JukeBoxState : public LegoState {
public:
// FUNCTION: LEGO1 0x1000f310
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f02bc
return "JukeBoxState";
}
// FUNCTION: LEGO1 0x1000f320
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, JukeBoxState::ClassName()) || LegoState::IsA(p_name);
}
MxBool IsSerializable() override; // vtable+0x14
inline MxU32 IsActive() { return m_active; }
inline void SetActive(MxU32 p_active) { m_active = p_active; }
inline MxU32 GetState() { return m_state; }
inline void SetState(MxU32 p_state) { m_state = p_state; }
// SYNTHETIC: LEGO1 0x1000f3d0
// JukeBoxState::`scalar deleting destructor'
// protected:
MxU32 m_state; // 0x08
MxU32 m_active; // 0x0c
};
#endif // JUKEBOXSTATE_H

View File

@ -2,8 +2,43 @@
#define LEGOACT2_H
#include "act2brick.h"
#include "legostate.h"
#include "legoworld.h"
// VTABLE: LEGO1 0x100d4a70
// SIZE 0x10
class LegoAct2State : public LegoState {
public:
~LegoAct2State() override {}
// FUNCTION: LEGO1 0x1000df80
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0428
return "LegoAct2State";
}
// FUNCTION: LEGO1 0x1000df90
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, LegoAct2State::ClassName()) || LegoState::IsA(p_name);
}
// FUNCTION: LEGO1 0x1000df70
MxBool IsSerializable() override { return FALSE; } // vtable+0x14
// SYNTHETIC: LEGO1 0x1000e040
// LegoAct2State::`scalar deleting destructor'
inline undefined4 GetUnknown0x08() { return m_unk0x08; }
inline void SetUnknown0x0c(undefined p_unk0x0c) { m_unk0x0c = p_unk0x0c; }
// TODO: Most likely getters/setters are not used according to BETA.
undefined4 m_unk0x08; // 0x08
undefined m_unk0x0c; // 0x0c
};
// VTABLE: LEGO1 0x100d82e0
// SIZE 0x1154
class LegoAct2 : public LegoWorld {

View File

@ -1,38 +0,0 @@
#ifndef LEGOACT2STATE_H
#define LEGOACT2STATE_H
#include "legostate.h"
// VTABLE: LEGO1 0x100d4a70
// SIZE 0x10
class LegoAct2State : public LegoState {
public:
~LegoAct2State() override {}
// FUNCTION: LEGO1 0x1000df80
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0428
return "LegoAct2State";
}
// FUNCTION: LEGO1 0x1000df90
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, LegoAct2State::ClassName()) || LegoState::IsA(p_name);
}
MxBool IsSerializable() override; // vtable+0x14
// SYNTHETIC: LEGO1 0x1000e040
// LegoAct2State::`scalar deleting destructor'
inline undefined4 GetUnknown0x08() { return m_unk0x08; }
inline void SetUnknown0x0c(undefined p_unk0x0c) { m_unk0x0c = p_unk0x0c; }
private:
undefined4 m_unk0x08; // 0x08
undefined m_unk0x0c; // 0x0c
};
#endif // LEGOACT2STATE_H

View File

@ -10,6 +10,16 @@ class LegoCacheSound;
// SIZE 0x78
class LegoActor : public LegoEntity {
public:
enum {
c_none = 0,
c_pepper,
c_mama,
c_papa,
c_nick,
c_laura,
c_brickster
};
LegoActor();
~LegoActor() override;
@ -53,7 +63,7 @@ class LegoActor : public LegoEntity {
static const char* GetActorName(MxU8 p_id);
protected:
void FUN_1002d6e0(MxBool);
void Mute(MxBool p_muted);
MxFloat m_frequencyFactor; // 0x68
LegoCacheSound* m_sound; // 0x6c

View File

@ -22,8 +22,8 @@ struct LegoActorInfo {
const char* m_name; // 0x00
LegoROI* m_roi; // 0x04
LegoExtraActor* m_actor; // 0x08
MxS32 m_unk0x0c; // 0x0c
MxS32 m_unk0x10; // 0x10
MxS32 m_sound; // 0x0c
MxS32 m_move; // 0x10
MxU8 m_mood; // 0x14
Part m_parts[10]; // 0x18
};

View File

@ -4,11 +4,11 @@
#include "actionsfwd.h"
#include "decomp.h"
#include "legolocations.h"
#include "legostate.h"
#include "legotraninfolist.h"
#include "mxcore.h"
#include "mxgeometry/mxgeometry3d.h"
class AnimState;
class LegoAnimPresenter;
class LegoEntity;
class LegoExtraActor;
@ -18,9 +18,73 @@ class LegoPathBoundary;
class LegoROIList;
struct LegoUnknown100db7f4;
class LegoWorld;
struct ModelInfo;
class MxDSAction;
// SIZE 0x30
struct ModelInfo {
char* m_name; // 0x00
MxU8 m_unk0x04; // 0x04
float m_location[3]; // 0x08
float m_direction[3]; // 0x14
float m_up[3]; // 0x20
MxU8 m_unk0x2c; // 0x2c
};
// SIZE 0x30
struct AnimInfo {
char* m_name; // 0x00
MxU32 m_objectId; // 0x04
MxS16 m_location; // 0x08
MxBool m_unk0x0a; // 0x0a
MxU8 m_unk0x0b; // 0x0b
MxU8 m_unk0x0c; // 0x0c
MxU8 m_unk0x0d; // 0x0d
float m_unk0x10[4]; // 0x10
MxU8 m_modelCount; // 0x20
MxU16 m_unk0x22; // 0x22
ModelInfo* m_models; // 0x24
MxS8 m_unk0x28; // 0x28
MxBool m_unk0x29; // 0x29
MxS8 m_unk0x2a[3]; // 0x2a
};
// VTABLE: LEGO1 0x100d8d80
// SIZE 0x1c
class AnimState : public LegoState {
public:
AnimState();
~AnimState() override; // vtable+0x00
// FUNCTION: LEGO1 0x10065070
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0460
return "AnimState";
}
// FUNCTION: LEGO1 0x10065080
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, AnimState::ClassName()) || LegoState::IsA(p_name);
}
MxBool SetFlag() override; // vtable+0x18
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
void FUN_100651d0(MxU32, AnimInfo*, MxU32&);
void FUN_10065240(MxU32, AnimInfo*, MxU32);
// SYNTHETIC: LEGO1 0x10065130
// AnimState::`scalar deleting destructor'
private:
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
void* m_unk0x10; // 0x10
undefined4 m_unk0x14; // 0x14
void* m_unk0x18; // 0x18
};
// VTABLE: LEGO1 0x100d8c18
// SIZE 0x500
class LegoAnimationManager : public MxCore {

View File

@ -15,17 +15,17 @@ class LegoPathBoundary;
// SIZE 0x2c
struct LegoBuildingInfo {
enum {
c_bit1 = 0x01,
c_bit2 = 0x02,
c_bit3 = 0x04,
c_bit4 = 0x08
c_hasVariants = 0x01,
c_hasSounds = 0x02,
c_hasMoves = 0x04,
c_hasMoods = 0x08
};
LegoEntity* m_entity; // 0x00
const char* m_hausName; // 0x04
MxU32 m_cycle1; // 0x08
MxU32 m_cycle2; // 0x0c
MxU8 m_cycle3; // 0x10
MxU32 m_sound; // 0x08
MxU32 m_move; // 0x0c
MxU8 m_mood; // 0x10
MxS8 m_unk0x11; // 0x11
MxS8 m_initialUnk0x11; // 0x12 = initial value loaded to m_unk0x11
MxU8 m_flags; // 0x13
@ -72,12 +72,12 @@ class LegoBuildingManager : public MxCore {
MxResult Write(LegoStorage* p_storage);
MxResult Read(LegoStorage* p_storage);
LegoBuildingInfo* GetInfo(LegoEntity* p_entity);
MxBool IncrementVariant(LegoEntity* p_entity);
MxBool FUN_1002fe40(LegoEntity* p_entity);
MxBool FUN_1002fe80(LegoEntity* p_entity);
MxBool FUN_1002fed0(LegoEntity* p_entity);
MxBool SwitchVariant(LegoEntity* p_entity);
MxBool SwitchSound(LegoEntity* p_entity);
MxBool SwitchMove(LegoEntity* p_entity);
MxBool SwitchMood(LegoEntity* p_entity);
MxU32 GetBuildingEntityId(LegoEntity* p_entity);
MxU32 FUN_1002ff40(LegoEntity*, MxBool);
MxU32 FUN_1002ff40(LegoEntity* p_entity, MxBool);
MxBool FUN_10030000(LegoEntity* p_entity);
MxBool FUN_10030030(MxS32 p_index);
MxBool FUN_10030110(LegoBuildingInfo* p_data);
@ -89,12 +89,15 @@ class LegoBuildingManager : public MxCore {
void FUN_100307b0(LegoEntity* p_entity, MxS32 p_adjust);
static void FUN_10030800();
static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; }
// SYNTHETIC: LEGO1 0x1002f940
// LegoBuildingManager::`scalar deleting destructor'
private:
static char* g_customizeAnimFile;
static MxS32 g_maxMove[16];
static MxU32 g_maxSound;
MxU8 m_nextVariant; // 0x08
MxU8 m_unk0x09; // 0x09

View File

@ -44,6 +44,7 @@ class LegoCacheSound : public MxCore {
void FUN_10006b80();
void FUN_10006be0();
void SetDistance(MxS32 p_min, MxS32 p_max);
void Mute(MxBool p_mute);
// SYNTHETIC: LEGO1 0x10006610
// LegoCacheSound::`scalar deleting destructor'
@ -66,7 +67,7 @@ class LegoCacheSound : public MxCore {
MxS32 m_volume; // 0x6c
MxBool m_unk0x70; // 0x70
MxString m_unk0x74; // 0x74
undefined m_unk0x84; // 0x84
MxBool m_muted; // 0x84
};
#endif // LEGOCACHSOUND_H

View File

@ -1,8 +1,54 @@
#ifndef LEGOCARBUILD_H
#define LEGOCARBUILD_H
#include "legostate.h"
#include "legoworld.h"
// VTABLE: LEGO1 0x100d66e0
// SIZE 0x50
class LegoVehicleBuildState : public LegoState {
public:
LegoVehicleBuildState(char* p_classType);
// FUNCTION: LEGO1 0x10025ff0
inline const char* ClassName() const override // vtable+0x0c
{
return this->m_className.GetData();
}
// FUNCTION: LEGO1 0x10026000
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, this->m_className.GetData()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x100260a0
// LegoVehicleBuildState::`scalar deleting destructor'
// TODO: Most likely getters/setters are not used according to BETA.
Playlist m_unk0x08[4]; // 0x08
// This can be one of the following:
// * LegoRaceCarBuildState
// * LegoCopterBuildState
// * LegoDuneCarBuildState
// * LegoJetskiBuildState
MxString m_className; // 0x38
// Known States:
// * 1 == enter(ing) build screen
// * 3 == cutscene/dialogue
// * 6 == exit(ing) build screen
MxU32 m_animationState; // 0x48
undefined m_unk0x4c; // 0x4c
MxBool m_unk0x4d; // 0x4d
MxBool m_unk0x4e; // 0x4e
MxU8 m_placedPartCount; // 0x4f
};
// VTABLE: LEGO1 0x100d6658
// SIZE 0x34c
class LegoCarBuild : public LegoWorld {

View File

@ -1,5 +1,5 @@
#ifndef LEGOCARBUILDANIMPRESENTER_H
#define LEGOCARBUILDANIMPRESENTER_H
#ifndef LEGOCARBUILDPRESENTER_H
#define LEGOCARBUILDPRESENTER_H
#include "anim/legoanim.h"
#include "legoanimpresenter.h"
@ -59,4 +59,4 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
undefined4 m_unk0x14c; // 0x14c
};
#endif // LEGOCARBUILDANIMPRESENTER_H
#endif // LEGOCARBUILDPRESENTER_H

View File

@ -69,7 +69,12 @@ class LegoCharacterManager {
LegoExtraActor* GetExtraActor(const char* p_name);
LegoActorInfo* GetActorInfo(const char* p_name);
LegoActorInfo* GetActorInfo(LegoROI* p_roi);
MxBool SwitchHat(LegoROI* p_roi);
MxBool SwitchColor(LegoROI* p_roi, LegoROI* p_targetROI);
MxBool SwitchVariant(LegoROI* p_roi);
MxBool SwitchSound(LegoROI* p_roi);
MxBool SwitchMove(LegoROI* p_roi);
MxBool SwitchMood(LegoROI* p_roi);
MxU32 FUN_10085120(LegoROI* p_roi);
MxU32 FUN_10085140(LegoROI* p_roi, MxBool p_und);
MxU8 GetMood(LegoROI* p_roi);
LegoROI* CreateAutoROI(const char* p_name, const char* p_lodName, MxBool p_createEntity);
@ -84,6 +89,8 @@ class LegoCharacterManager {
MxResult FUN_10085870(LegoROI* p_roi);
static char* g_customizeAnimFile;
static MxU32 g_maxMove;
static MxU32 g_maxSound;
LegoCharacterMap* m_characters; // 0x00
CustomizeAnimFileVariable* m_customizeAnimFile; // 0x04

View File

@ -18,6 +18,8 @@ class LegoControlManagerEvent : public LegoEventNotificationParam {
m_clickedAtom = NULL;
}
// TODO: Most likely getters/setters are not used according to BETA.
inline MxS32 GetClickedObjectId() const { return m_clickedObjectId; }
inline const char* GetClickedAtom() const { return m_clickedAtom; }
inline MxS16 GetUnknown0x28() const { return m_unk0x28; }
@ -26,7 +28,6 @@ class LegoControlManagerEvent : public LegoEventNotificationParam {
inline void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; }
inline void SetUnknown0x28(MxS16 p_unk0x28) { m_unk0x28 = p_unk0x28; }
private:
MxS32 m_clickedObjectId; // 0x20
const char* m_clickedAtom; // 0x24
MxS16 m_unk0x28; // 0x28

View File

@ -64,13 +64,13 @@ class LegoEntity : public MxEntity {
// FUNCTION: LEGO1 0x10001090
virtual void SetWorldSpeed(MxFloat p_worldSpeed) { m_worldSpeed = p_worldSpeed; } // vtable+0x30
virtual void VTable0x34(MxBool p_und); // vtable+0x34
virtual void VTable0x38(); // vtable+0x38
virtual void VTable0x3c(); // vtable+0x3c
virtual void VTable0x40(); // vtable+0x40
virtual void VTable0x44(); // vtable+0x44
virtual void VTable0x48(LegoROI* p_roi); // vtable+0x48
virtual void VTable0x4c(); // vtable+0x4c
virtual void ClickSound(MxBool p_und); // vtable+0x34
virtual void ClickAnimation(); // vtable+0x38
virtual void SwitchVariant(); // vtable+0x3c
virtual void SwitchSound(); // vtable+0x40
virtual void SwitchMove(); // vtable+0x44
virtual void SwitchColor(LegoROI* p_roi); // vtable+0x48
virtual void SwitchMood(); // vtable+0x4c
void FUN_10010c30();
void SetType(MxU8 p_type);

View File

@ -90,7 +90,7 @@ class LegoGameState {
e_unk51,
e_unk52,
e_jukeboxw,
e_unk54,
e_jukeboxExterior,
e_unk55,
e_histbook,
e_bike,
@ -174,7 +174,6 @@ class LegoGameState {
inline Act GetLoadedAct() { return m_loadedAct; }
inline Area GetCurrentArea() { return m_currentArea; }
inline Area GetPreviousArea() { return m_previousArea; }
inline JukeboxScript::Script GetUnknown0x41c() { return m_unk0x41c; }
inline Area GetUnknown0x42c() { return m_unk0x42c; }
inline History* GetHistory() { return &m_history; }
@ -182,7 +181,6 @@ class LegoGameState {
inline void SetCurrentArea(Area p_currentArea) { m_currentArea = p_currentArea; }
inline void SetPreviousArea(Area p_previousArea) { m_previousArea = p_previousArea; }
inline void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; }
inline void SetUnknown0x41c(JukeboxScript::Script p_unk0x41c) { m_unk0x41c = p_unk0x41c; }
inline void SetUnknown0x42c(Area p_unk0x42c) { m_unk0x42c = p_unk0x42c; }
inline Username* GetPlayersIndex(MxS32 p_index) { return &m_players[p_index]; }
inline MxS16 GetPlayerCount() { return m_playerCount; }
@ -210,23 +208,17 @@ class LegoGameState {
LegoFullScreenMovie* m_fullScreenMovie; // 0x20
MxU16 m_unk0x24; // 0x24
// Member visibility needs to be refactored, since most members are accessed directly.
// TODO: Most likely getters/setters are not used according to BETA for the following members:
public:
MxS16 m_playerCount; // 0x26
Username m_players[9]; // 0x28
private:
History m_history; // 0xa6
undefined2 m_unk0x41a; // 0x41a
JukeboxScript::Script m_unk0x41c; // 0x41c
JukeboxScript::Script m_jukeboxMusic; // 0x41c
MxBool m_isDirty; // 0x420
public:
Area m_currentArea; // 0x424
Area m_previousArea; // 0x428
private:
Area m_unk0x42c; // 0x42c
};

View File

@ -128,9 +128,9 @@ class LegoOmni : public MxOmni {
LegoWorld* GetCurrentWorld() { return m_currentWorld; }
LegoNavController* GetNavController() { return m_navController; }
LegoPathActor* GetCurrentActor() { return m_currentActor; }
LegoPlantManager* GetLegoPlantManager() { return m_plantManager; }
LegoPlantManager* GetPlantManager() { return m_plantManager; }
LegoAnimationManager* GetAnimationManager() { return m_animationManager; }
LegoBuildingManager* GetLegoBuildingManager() { return m_buildingManager; }
LegoBuildingManager* GetBuildingManager() { return m_buildingManager; }
LegoGameState* GetGameState() { return m_gameState; }
MxBackgroundAudioManager* GetBackgroundAudioManager() { return m_bkgAudioManager; }
MxTransitionManager* GetTransitionManager() { return m_transitionManager; }

View File

@ -80,7 +80,7 @@ class LegoNavController : public MxCore {
inline MxFloat GetLinearVel() { return m_linearVel; }
inline MxFloat GetRotationalVel() { return m_rotationalVel; }
inline MxFloat GetMaxLinearVel() { return m_maxLinearVel; }
inline void ResetLinearVel(MxFloat p_maxLinearVel)
inline void ResetMaxLinearVel(MxFloat p_maxLinearVel)
{
m_maxLinearVel = p_maxLinearVel;
m_trackDefault = 0;

View File

@ -100,10 +100,10 @@ class LegoPathActor : public LegoActor {
virtual void VTable0xa8(); // vtable+0xa8
// FUNCTION: LEGO1 0x10002d70
virtual void VTable0xac(MxFloat p_unk0x13c) { m_unk0x13c = p_unk0x13c; } // vtable+0xac
virtual void SetMaxLinearVel(MxFloat p_maxLinearVel) { m_maxLinearVel = p_maxLinearVel; } // vtable+0xac
// FUNCTION: LEGO1 0x10002d80
virtual MxFloat VTable0xb0() { return m_unk0x13c; } // vtable+0xb0
virtual MxFloat GetMaxLinearVel() { return m_maxLinearVel; } // vtable+0xb0
// FUNCTION: LEGO1 0x10002d90
virtual MxFloat VTable0xb4() { return m_unk0x140; } // vtable+0xb4
@ -162,7 +162,7 @@ class LegoPathActor : public LegoActor {
MxMatrix m_unk0xec; // 0xec
LegoPathEdgeContainer* m_grec; // 0x134
LegoPathController* m_controller; // 0x138
MxFloat m_unk0x13c; // 0x13c
MxFloat m_maxLinearVel; // 0x13c
MxFloat m_unk0x140; // 0x140
MxFloat m_unk0x144; // 0x144
MxU8 m_unk0x148; // 0x148

View File

@ -29,12 +29,18 @@ class LegoPlantManager : public MxCore {
void FUN_100263a0(undefined4 p_und);
void Write(LegoStorage* p_storage);
MxResult Read(LegoStorage* p_storage);
MxBool FUN_100269e0(LegoEntity* p_entity);
MxU32 FUN_10026ba0(LegoEntity*, MxBool);
MxBool SwitchColor(LegoEntity* p_entity);
MxBool SwitchVariant(LegoEntity* p_entity);
MxBool SwitchSound(LegoEntity* p_entity);
MxBool SwitchMove(LegoEntity* p_entity);
MxBool SwitchMood(LegoEntity* p_entity);
MxU32 FUN_10026b70(LegoEntity* p_entity);
MxU32 FUN_10026ba0(LegoEntity* p_entity, MxBool);
void FUN_10026c50(LegoEntity* p_entity);
void FUN_10027120();
static void SetCustomizeAnimFile(const char* p_value);
static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; }
// SYNTHETIC: LEGO1 0x100262a0
// LegoPlantManager::`scalar deleting destructor'

View File

@ -2,10 +2,60 @@
#define LEGORACE_H
#include "decomp.h"
#include "legostate.h"
#include "legoworld.h"
#include "mxrect32.h"
#include "mxtypes.h"
// VTABLE: LEGO1 0x100d5e30
// SIZE 0x2c
class RaceState : public LegoState {
public:
// SIZE 0x06
struct Entry {
public:
inline MxS16 GetUnknown0x02() { return m_unk0x02; }
inline MxU16 GetScore() { return m_score; }
// TODO: Possibly private
MxU8 m_id; // 0x00
MxS16 m_unk0x02; // 0x02
MxU16 m_score; // 0x04
};
RaceState();
// FUNCTION: LEGO1 0x10016010
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f07d0
return "RaceState";
}
// FUNCTION: LEGO1 0x10016020
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, RaceState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
Entry* GetState(MxU8 p_id);
inline undefined4 GetUnknown0x28() { return m_unk0x28; }
// SYNTHETIC: LEGO1 0x1000f6f0
// RaceState::~RaceState
// SYNTHETIC: LEGO1 0x100160d0
// RaceState::`scalar deleting destructor'
// TODO: Most likely getters/setters are not used according to BETA.
Entry m_state[5]; // 0x08
undefined4 m_unk0x28; // 0x28
};
// VTABLE: LEGO1 0x100d5db0
// SIZE 0x144
class LegoRace : public LegoWorld {

View File

@ -44,7 +44,7 @@ void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bO
void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool);
void FUN_1003eda0();
MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id);
void FUN_1003ef00(MxBool p_enable);
void EnableAnimations(MxBool p_enable);
void SetAppCursor(Cursor p_cursor);
MxBool FUN_1003ef60();
MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_worldAtom, MxS32 p_worldEntityId);

View File

@ -1,52 +0,0 @@
#ifndef LEGOVEHICLEBUILDSTATE_H
#define LEGOVEHICLEBUILDSTATE_H
#include "decomp.h"
#include "legostate.h"
#include "mxstring.h"
// VTABLE: LEGO1 0x100d66e0
// SIZE 0x50
class LegoVehicleBuildState : public LegoState {
public:
LegoVehicleBuildState(char* p_classType);
// FUNCTION: LEGO1 0x10025ff0
inline const char* ClassName() const override // vtable+0x0c
{
return this->m_className.GetData();
}
// FUNCTION: LEGO1 0x10026000
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, this->m_className.GetData()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x100260a0
// LegoVehicleBuildState::`scalar deleting destructor'
// private:
Playlist m_unk0x08[4]; // 0x08
// This can be one of the following:
// * LegoRaceCarBuildState
// * LegoCopterBuildState
// * LegoDuneCarBuildState
// * LegoJetskiBuildState
MxString m_className; // 0x38
// Known States:
// * 1 == enter(ing) build screen
// * 3 == cutscene/dialogue
// * 6 == exit(ing) build screen
MxU32 m_animationState; // 0x48
undefined m_unk0x4c; // 0x4c
MxBool m_unk0x4d; // 0x4d
MxBool m_unk0x4e; // 0x4e
MxU8 m_placedPartCount; // 0x4f
};
#endif // LEGOVEHICLEBUILDSTATE_H

View File

@ -25,10 +25,10 @@ class Motocycle : public IslePathActor {
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void VTable0x70(float p_float) override; // vtable+0x70
MxU32 HandleClick() override; // vtable+0xcc
MxU32 HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxU32 VTable0xdc(MxType19NotificationParam&) override; // vtable+0xdc
void VTable0xe4() override; // vtable+0xe4
MxLong HandleClick() override; // vtable+0xcc
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxLong HandleNotification19(MxType19NotificationParam&) override; // vtable+0xdc
void Exit() override; // vtable+0xe4
void FUN_10035e10();

View File

@ -3,11 +3,52 @@
#include "decomp.h"
#include "isleactor.h"
#include "legostate.h"
class Act1State;
class PizzaMissionState;
class SkateBoard;
// VTABLE: LEGO1 0x100d7408
// SIZE 0xb0
class PizzaMissionState : public LegoState {
public:
// SIZE 0x20
struct Entry {
public:
undefined2 m_unk0x00; // 0x00
MxU8 m_id; // 0x02
undefined m_unk0x03[0x15]; // 0x03
MxU16 m_score; // 0x18
undefined m_unk0x18[6]; // 0x1a
};
// FUNCTION: LEGO1 0x10039290
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f00d4
return "PizzaMissionState";
}
// FUNCTION: LEGO1 0x100392a0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, PizzaMissionState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
inline MxU16 GetScore(MxU8 p_id) { return GetState(p_id)->m_score; }
// SYNTHETIC: LEGO1 0x10039350
// PizzaMissionState::`scalar deleting destructor'
Entry* GetState(MxU8 p_id);
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
Entry m_state[5]; // 0x10
};
// VTABLE: LEGO1 0x100d7380
// SIZE 0x9c
class Pizza : public IsleActor {

View File

@ -1,47 +0,0 @@
#ifndef PIZZAMISSIONSTATE_H
#define PIZZAMISSIONSTATE_H
#include "legostate.h"
// SIZE 0x20
struct PizzaMissionStateEntry {
public:
undefined2 m_unk0x00; // 0x00
MxU8 m_id; // 0x02
undefined m_unk0x03[0x15]; // 0x03
MxU16 m_score; // 0x18
undefined m_unk0x18[6]; // 0x1a
};
// VTABLE: LEGO1 0x100d7408
// SIZE 0xb0
class PizzaMissionState : public LegoState {
public:
// FUNCTION: LEGO1 0x10039290
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f00d4
return "PizzaMissionState";
}
// FUNCTION: LEGO1 0x100392a0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, PizzaMissionState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
inline MxU16 GetScore(MxU8 p_id) { return GetState(p_id)->m_score; }
// SYNTHETIC: LEGO1 0x10039350
// PizzaMissionState::`scalar deleting destructor'
PizzaMissionStateEntry* GetState(MxU8 p_id);
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
PizzaMissionStateEntry m_state[5]; // 0x10
};
#endif // PIZZAMISSIONSTATE_H

View File

@ -3,10 +3,51 @@
#include "decomp.h"
#include "isleactor.h"
#include "legostate.h"
class PizzeriaState;
class PizzaMissionState;
// VTABLE: LEGO1 0x100d5ee8
// SIZE 0x58
class PizzeriaState : public LegoState {
public:
// SIZE 0x14
struct StateStruct {
undefined4 m_unk0x00; // 0x00
undefined4 m_unk0x04; // 0x04
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
undefined4 m_unk0x10; // 0x10
};
PizzeriaState();
// FUNCTION: LEGO1 0x10017c20
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0370
return "PizzeriaState";
}
// FUNCTION: LEGO1 0x10017c30
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, PizzeriaState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x10017ce0
// PizzeriaState::`scalar deleting destructor'
MxU32 FUN_10017d70();
// TODO: Most likely getters/setters are not used according to BETA.
Playlist m_unk0x08[5]; // 0x08
StateStruct m_unk0x44; // 0x44
};
// VTABLE: LEGO1 0x100d5520
// SIZE 0x84
class Pizzeria : public IsleActor {

View File

@ -1,46 +0,0 @@
#ifndef PIZZERIASTATE_H
#define PIZZERIASTATE_H
#include "legostate.h"
// SIZE 0x14
struct PizzeriaStateStruct {
undefined4 m_unk0x00; // 0x00
undefined4 m_unk0x04; // 0x04
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
undefined4 m_unk0x10; // 0x10
};
// VTABLE: LEGO1 0x100d5ee8
// SIZE 0x58
class PizzeriaState : public LegoState {
public:
PizzeriaState();
// FUNCTION: LEGO1 0x10017c20
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0370
return "PizzeriaState";
}
// FUNCTION: LEGO1 0x10017c30
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, PizzeriaState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x10017ce0
// PizzeriaState::`scalar deleting destructor'
MxU32 FUN_10017d70();
private:
Playlist m_unk0x08[5]; // 0x08
PizzeriaStateStruct m_unk0x44; // 0x44
};
#endif // PIZZERIASTATE_H

View File

@ -3,13 +3,49 @@
#include "decomp.h"
#include "legogamestate.h"
#include "legostate.h"
#include "legoworld.h"
#include "radio.h"
class LegoControlManagerEvent;
class LegoEventNotificationParam;
class MxDSAction;
class PoliceState;
// VTABLE: LEGO1 0x100d8af0
// SIZE 0x10
class PoliceState : public LegoState {
public:
PoliceState();
~PoliceState() override {}
// FUNCTION: LEGO1 0x1005e860
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0444
return "PoliceState";
}
// FUNCTION: LEGO1 0x1005e870
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, PoliceState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x1005e920
// PoliceState::`scalar deleting destructor'
inline undefined4 GetUnknown0x0c() { return m_unk0x0c; }
inline void SetUnknown0x0c(undefined4 p_unk0x0c) { m_unk0x0c = p_unk0x0c; }
void FUN_1005ea40();
// TODO: Most likely getters/setters are not used according to BETA.
PoliceScript::Script m_policeScript; // 0x08
undefined4 m_unk0x0c; // 0x0c
};
// VTABLE: LEGO1 0x100d8a80
// SIZE 0x110

View File

@ -1,29 +0,0 @@
#ifndef POLICEENTITY_H
#define POLICEENTITY_H
#include "buildingentity.h"
// VTABLE: LEGO1 0x100d4ab0
// SIZE 0x68
class PoliceEntity : public BuildingEntity {
public:
// FUNCTION: LEGO1 0x1000ed60
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0328
return "PoliceEntity";
}
// FUNCTION: LEGO1 0x1000ed70
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, PoliceEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override; // vtable+0x50
// SYNTHETIC: LEGO1 0x1000f900
// PoliceEntity::`scalar deleting destructor'
};
#endif // POLICEENTITY_H

View File

@ -1,43 +0,0 @@
#ifndef POLICESTATE_H
#define POLICESTATE_H
#include "actionsfwd.h"
#include "decomp.h"
#include "legostate.h"
// VTABLE: LEGO1 0x100d8af0
// SIZE 0x10
class PoliceState : public LegoState {
public:
PoliceState();
~PoliceState() override {}
// FUNCTION: LEGO1 0x1005e860
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0444
return "PoliceState";
}
// FUNCTION: LEGO1 0x1005e870
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, PoliceState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x1005e920
// PoliceState::`scalar deleting destructor'
inline undefined4 GetUnknown0x0c() { return m_unk0x0c; }
inline void SetUnknown0x0c(undefined4 p_unk0x0c) { m_unk0x0c = p_unk0x0c; }
void FUN_1005ea40();
private:
PoliceScript::Script m_policeScript; // 0x08
undefined4 m_unk0x0c; // 0x0c
};
#endif // POLICESTATE_H

View File

@ -25,7 +25,7 @@ class RaceCar : public IslePathActor {
}
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
MxU32 HandleClick() override; // vtable+0xcc
MxLong HandleClick() override; // vtable+0xcc
// SYNTHETIC: LEGO1 0x10028400
// RaceCar::`scalar deleting destructor'

View File

@ -1,28 +0,0 @@
#ifndef RACESTANDSENTITY_H
#define RACESTANDSENTITY_H
#include "buildingentity.h"
// VTABLE: LEGO1 0x100d48a8
// SIZE 0x68
class RaceStandsEntity : public BuildingEntity {
// FUNCTION: LEGO1 0x1000efa0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0300
return "RaceStandsEntity";
}
// FUNCTION: LEGO1 0x1000efb0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, RaceStandsEntity::ClassName()) || BuildingEntity::IsA(p_name);
}
MxLong VTable0x50(MxParam& p_param) override;
// SYNTHETIC: LEGO1 0x1000f9e0
// RaceStandsEntity::`scalar deleting destructor'
};
#endif // RACESTANDSENTITY_H

View File

@ -1,54 +0,0 @@
#ifndef RACESTATE_H
#define RACESTATE_H
#include "legostate.h"
// SIZE 0x06
struct RaceStateEntry {
public:
inline MxS16 GetUnknown0x02() { return m_unk0x02; }
inline MxU16 GetScore() { return m_score; }
// TODO: Possibly private
MxU8 m_id; // 0x00
MxS16 m_unk0x02; // 0x02
MxU16 m_score; // 0x04
};
// VTABLE: LEGO1 0x100d5e30
// SIZE 0x2c
class RaceState : public LegoState {
public:
RaceState();
// FUNCTION: LEGO1 0x10016010
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f07d0
return "RaceState";
}
// FUNCTION: LEGO1 0x10016020
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, RaceState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
RaceStateEntry* GetState(MxU8 p_id);
inline undefined4 GetUnknown0x28() { return m_unk0x28; }
// SYNTHETIC: LEGO1 0x1000f6f0
// RaceState::~RaceState
// SYNTHETIC: LEGO1 0x100160d0
// RaceState::`scalar deleting destructor'
protected:
RaceStateEntry m_state[5]; // 0x08
undefined4 m_unk0x28; // 0x28
};
#endif // RACESTATE_H

View File

@ -1,11 +1,50 @@
#ifndef RADIO_H
#define RADIO_H
#include "legostate.h"
#include "mxcore.h"
class LegoControlManagerEvent;
class MxAtomId;
class MxEndActionNotificationParam;
class RadioState;
// VTABLE: LEGO1 0x100d6d28
// SIZE 0x30
class RadioState : public LegoState {
public:
RadioState();
// FUNCTION: LEGO1 0x1002cf60
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f04f8
return "RadioState";
}
// FUNCTION: LEGO1 0x1002cf70
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, RadioState::ClassName()) || LegoState::IsA(p_name);
}
MxBool IsSerializable() override; // vtable+0x14
// SYNTHETIC: LEGO1 0x1002d020
// RadioState::`scalar deleting destructor'
inline MxBool IsActive() { return m_active; }
inline void SetActive(MxBool p_active) { m_active = p_active; }
undefined4 FUN_1002d090();
MxBool FUN_1002d0c0(const MxAtomId& p_atom, MxU32 p_objectId);
// TODO: Most likely getters/setters are not used according to BETA.
Playlist m_unk0x08[3]; // 0x08
MxS16 m_unk0x2c; // 0x2c
MxBool m_active; // 0x2e
};
// VTABLE: LEGO1 0x100d6d10
// SIZE 0x10

View File

@ -1,45 +0,0 @@
#ifndef RADIOSTATE_H
#define RADIOSTATE_H
#include "legostate.h"
class MxAtomId;
// VTABLE: LEGO1 0x100d6d28
// SIZE 0x30
class RadioState : public LegoState {
public:
RadioState();
// FUNCTION: LEGO1 0x1002cf60
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f04f8
return "RadioState";
}
// FUNCTION: LEGO1 0x1002cf70
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, RadioState::ClassName()) || LegoState::IsA(p_name);
}
MxBool IsSerializable() override; // vtable+0x14
// SYNTHETIC: LEGO1 0x1002d020
// RadioState::`scalar deleting destructor'
inline MxBool IsActive() { return m_active; }
inline void SetActive(MxBool p_active) { m_active = p_active; }
undefined4 FUN_1002d090();
MxBool FUN_1002d0c0(const MxAtomId& p_atom, MxU32 p_objectId);
private:
Playlist m_unk0x08[3]; // 0x08
MxS16 m_unk0x2c; // 0x2c
MxBool m_active; // 0x2e
};
#endif // RADIOSTATE_H

View File

@ -2,11 +2,49 @@
#define SCORE_H
#include "legogamestate.h"
#include "legostate.h"
#include "legoworld.h"
class LegoControlManagerEvent;
class MxEndActionNotificationParam;
class ScoreState;
// VTABLE: LEGO1 0x100d53f8
// SIZE 0x0c
class ScoreState : public LegoState {
public:
// FUNCTION: LEGO1 0x1000de40
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0084
return "ScoreState";
}
// FUNCTION: LEGO1 0x1000de50
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, ScoreState::ClassName()) || LegoState::IsA(p_name);
}
// FUNCTION: LEGO1 0x1000de20
MxBool IsSerializable() override { return FALSE; } // vtable+0x14
// FUNCTION: LEGO1 0x1000de30
MxBool SetFlag() override
{
m_playCubeTutorial = TRUE;
return TRUE;
} // vtable+0x18
inline MxBool GetTutorialFlag() { return m_playCubeTutorial; }
inline void SetTutorialFlag(MxBool p_playCubeTutorial) { m_playCubeTutorial = p_playCubeTutorial; }
// SYNTHETIC: LEGO1 0x1000df00
// ScoreState::`scalar deleting destructor'
// TODO: Most likely getters/setters are not used according to BETA.
MxBool m_playCubeTutorial; // 0x08
};
// VTABLE: LEGO1 0x100d4018
// SIZE 0x104

View File

@ -1,36 +0,0 @@
#ifndef SCORESTATE_H
#define SCORESTATE_H
#include "legostate.h"
// VTABLE: LEGO1 0x100d53f8
// SIZE 0x0c
class ScoreState : public LegoState {
public:
// FUNCTION: LEGO1 0x1000de40
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0084
return "ScoreState";
}
// FUNCTION: LEGO1 0x1000de50
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, ScoreState::ClassName()) || LegoState::IsA(p_name);
}
MxBool IsSerializable() override; // vtable+0x14
MxBool SetFlag() override; // vtable+0x18
inline MxBool GetTutorialFlag() { return m_playCubeTutorial; }
inline void SetTutorialFlag(MxBool p_playCubeTutorial) { m_playCubeTutorial = p_playCubeTutorial; }
// SYNTHETIC: LEGO1 0x1000df00
// ScoreState::`scalar deleting destructor'
private:
MxBool m_playCubeTutorial; // 0x08
};
#endif // SCORESTATE_H

View File

@ -27,10 +27,10 @@ class SkateBoard : public IslePathActor {
}
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
MxU32 HandleClick() override; // vtable+0xcc
MxU32 VTable0xd0() override; // vtable+0xd0
MxU32 HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
void VTable0xe4() override; // vtable+0xe4
MxLong HandleClick() override; // vtable+0xcc
MxLong HandleNotification0() override; // vtable+0xd0
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
void Exit() override; // vtable+0xe4
inline void SetUnknown0x160(MxBool p_unk0x160) { m_unk0x160 = p_unk0x160; }

View File

@ -3,8 +3,64 @@
#include "decomp.h"
#include "islepathactor.h"
#include "legostate.h"
class TowTrackMissionState;
// VTABLE: LEGO1 0x100d7fd8
// SIZE 0x28
class TowTrackMissionState : public LegoState {
public:
TowTrackMissionState();
// FUNCTION: LEGO1 0x1004dfa0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f00bc
return "TowTrackMissionState";
}
// FUNCTION: LEGO1 0x1004dfb0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, TowTrackMissionState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
inline MxU16 GetScore(MxU8 p_id)
{
switch (p_id) {
case 1:
return m_score1;
case 2:
return m_score2;
case 3:
return m_score3;
case 4:
return m_score4;
case 5:
return m_score5;
default:
return 0;
}
}
// SYNTHETIC: LEGO1 0x1004e060
// TowTrackMissionState::`scalar deleting destructor'
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
MxU8 m_unk0x10; // 0x10
MxU16 m_unk0x12; // 0x12
MxU16 m_unk0x14; // 0x14
MxU16 m_unk0x16; // 0x16
MxU16 m_unk0x18; // 0x18
MxU16 m_unk0x1a; // 0x1a
MxU16 m_score1; // 0x1c
MxU16 m_score2; // 0x1e
MxU16 m_score3; // 0x20
MxU16 m_score4; // 0x22
MxU16 m_score5; // 0x24
};
// VTABLE: LEGO1 0x100d7ee0
// SIZE 0x180
@ -28,11 +84,11 @@ class TowTrack : public IslePathActor {
MxLong Notify(MxParam& p_param) override; // vtable+0x04
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void VTable0x70(float p_float) override; // vtable+0x70
MxU32 HandleClick() override; // vtable+0xcc
MxU32 HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxU32 VTable0xd8(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8
MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc
void VTable0xe4() override; // vtable+0xe4
MxLong HandleClick() override; // vtable+0xcc
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxLong HandleEndAnim(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8
MxLong HandleNotification19(MxType19NotificationParam& p_param) override; // vtable+0xdc
void Exit() override; // vtable+0xe4
void CreateState();
void FUN_1004dab0();

View File

@ -1,63 +0,0 @@
#ifndef TOWTRACKMISSIONSTATE_H
#define TOWTRACKMISSIONSTATE_H
#include "legostate.h"
// VTABLE: LEGO1 0x100d7fd8
// SIZE 0x28
class TowTrackMissionState : public LegoState {
public:
TowTrackMissionState();
// FUNCTION: LEGO1 0x1004dfa0
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f00bc
return "TowTrackMissionState";
}
// FUNCTION: LEGO1 0x1004dfb0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, TowTrackMissionState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
inline MxU16 GetScore(MxU8 p_id)
{
switch (p_id) {
case 1:
return m_score1;
case 2:
return m_score2;
case 3:
return m_score3;
case 4:
return m_score4;
case 5:
return m_score5;
default:
return 0;
}
}
// SYNTHETIC: LEGO1 0x1004e060
// TowTrackMissionState::`scalar deleting destructor'
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
MxU8 m_unk0x10; // 0x10
MxU16 m_unk0x12; // 0x12
MxU16 m_unk0x14; // 0x14
MxU16 m_unk0x16; // 0x16
MxU16 m_unk0x18; // 0x18
MxU16 m_unk0x1a; // 0x1a
MxU16 m_score1; // 0x1c
MxU16 m_score2; // 0x1e
MxU16 m_score3; // 0x20
MxU16 m_score4; // 0x22
MxU16 m_score5; // 0x24
};
#endif // TOWTRACKMISSIONSTATE_H

View File

@ -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
}

View File

@ -1,9 +0,0 @@
#include "legoact2state.h"
DECOMP_SIZE_ASSERT(LegoAct2State, 0x10)
// FUNCTION: LEGO1 0x1000df70
MxBool LegoAct2State::IsSerializable()
{
return FALSE;
}

View File

@ -1,9 +0,0 @@
#include "act3state.h"
DECOMP_SIZE_ASSERT(Act3State, 0x0c)
// FUNCTION: LEGO1 0x1000e2f0
MxBool Act3State::IsSerializable()
{
return FALSE;
}

View File

@ -1,6 +1,5 @@
#include "ambulance.h"
#include "ambulancemissionstate.h"
#include "decomp.h"
#include "legocontrolmanager.h"
#include "legogamestate.h"
@ -14,20 +13,22 @@
#include "scripts.h"
DECOMP_SIZE_ASSERT(Ambulance, 0x184)
DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24)
// FUNCTION: LEGO1 0x10035ee0
// FUNCTION: BETA10 0x10022820
Ambulance::Ambulance()
{
m_maxLinearVel = 40.0;
m_state = NULL;
m_unk0x168 = 0;
m_unk0x16a = -1;
m_state = NULL;
m_unk0x16c = 0;
m_unk0x174 = -1;
m_unk0x16e = 0;
m_unk0x178 = -1;
m_unk0x170 = 0;
m_unk0x174 = -1;
m_unk0x172 = 0;
m_unk0x13c = 40.0;
m_unk0x178 = -1;
m_unk0x17c = 1.0;
}
@ -37,6 +38,7 @@ void Ambulance::Destroy(MxBool p_fromDestructor)
}
// FUNCTION: LEGO1 0x10036150
// FUNCTION: BETA10 0x100228fe
Ambulance::~Ambulance()
{
ControlManager()->Unregister(this);
@ -44,6 +46,7 @@ Ambulance::~Ambulance()
}
// FUNCTION: LEGO1 0x100361d0
// FUNCTION: BETA10 0x10022993
MxResult Ambulance::Create(MxDSAction& p_dsAction)
{
MxResult result = IslePathActor::Create(p_dsAction);
@ -76,6 +79,7 @@ void Ambulance::VTable0x70(float p_float)
}
// FUNCTION: LEGO1 0x100363f0
// FUNCTION: BETA10 0x10022b2a
void Ambulance::CreateState()
{
LegoGameState* gameState = GameState();
@ -88,22 +92,59 @@ void Ambulance::CreateState()
m_state = state;
}
// STUB: LEGO1 0x10036420
// FUNCTION: LEGO1 0x10036420
// FUNCTION: BETA10 0x10022b84
MxLong Ambulance::Notify(MxParam& p_param)
{
MxLong result = 0;
switch (((MxNotificationParam&) p_param).GetType()) {
case c_notificationType0:
result = HandleNotification0();
break;
case c_notificationEndAction:
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
break;
case c_notificationButtonDown:
result = HandleButtonDown((LegoControlManagerEvent&) p_param);
break;
case c_notificationClick:
result = HandleClick();
break;
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationType19:
result = HandleNotification19((MxType19NotificationParam&) p_param);
break;
}
return result;
}
// STUB: LEGO1 0x100364d0
MxLong Ambulance::HandleEndAction(MxEndActionNotificationParam& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x100367c0
MxLong Ambulance::HandleButtonDown(LegoControlManagerEvent& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x10036860
MxU32 Ambulance::VTable0xdc(MxType19NotificationParam& p_param)
MxLong Ambulance::HandleNotification19(MxType19NotificationParam& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x10036ce0
MxU32 Ambulance::HandleClick()
MxLong Ambulance::HandleClick()
{
// TODO
return 0;
@ -116,13 +157,13 @@ void Ambulance::FUN_10036e60()
}
// STUB: LEGO1 0x10036e90
void Ambulance::VTable0xe4()
void Ambulance::Exit()
{
// TODO
}
// STUB: LEGO1 0x10036f90
MxU32 Ambulance::HandleControl(LegoControlManagerEvent& p_param)
MxLong Ambulance::HandleControl(LegoControlManagerEvent& p_param)
{
// TODO
return 0;
@ -152,3 +193,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);
}

View File

@ -13,7 +13,7 @@ DECOMP_SIZE_ASSERT(Bike, 0x164)
// FUNCTION: LEGO1 0x10076670
Bike::Bike()
{
this->m_unk0x13c = 20.0;
this->m_maxLinearVel = 20.0;
this->m_unk0x150 = 3.0;
this->m_unk0x148 = 1;
}
@ -32,9 +32,9 @@ MxResult Bike::Create(MxDSAction& p_dsAction)
}
// FUNCTION: LEGO1 0x10076920
void Bike::VTable0xe4()
void Bike::Exit()
{
IslePathActor::VTable0xe4();
IslePathActor::Exit();
GameState()->SetCurrentArea(LegoGameState::Area::e_bike);
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_BikeDashboard_Bitmap);
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_BikeArms_Ctl);
@ -45,14 +45,14 @@ void Bike::VTable0xe4()
}
// STUB: LEGO1 0x100769a0
MxU32 Bike::HandleClick()
MxLong Bike::HandleClick()
{
// TODO
return 0;
}
// STUB: LEGO1 0x10076aa0
MxU32 Bike::HandleControl(LegoControlManagerEvent& p_param)
MxLong Bike::HandleControl(LegoControlManagerEvent& p_param)
{
// TODO
return 0;

View 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())->Exit();
}
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())->Exit();
}
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())->Exit();
}
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())->Exit();
}
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())->Exit();
}
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())->Exit();
}
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;
}

View File

@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(DuneBuggy, 0x16c)
// FUNCTION: LEGO1 0x10067bb0
DuneBuggy::DuneBuggy()
{
this->m_unk0x13c = 25.0;
this->m_maxLinearVel = 25.0;
this->m_unk0x164 = 1.0;
}
@ -25,27 +25,27 @@ void DuneBuggy::VTable0x70(float p_float)
}
// STUB: LEGO1 0x10067fa0
void DuneBuggy::VTable0xe4()
void DuneBuggy::Exit()
{
// TODO
}
// STUB: LEGO1 0x10068060
MxU32 DuneBuggy::HandleClick()
MxLong DuneBuggy::HandleClick()
{
// TODO
return 0;
}
// STUB: LEGO1 0x100681b0
MxU32 DuneBuggy::HandleControl(LegoControlManagerEvent& p_param)
MxLong DuneBuggy::HandleControl(LegoControlManagerEvent& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x10068270
MxU32 DuneBuggy::VTable0xdc(MxType19NotificationParam& p_param)
MxLong DuneBuggy::HandleNotification19(MxType19NotificationParam& p_param)
{
// TODO
return 0;

View File

@ -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)
@ -26,7 +25,7 @@ DECOMP_SIZE_ASSERT(MxMatrix, 0x48)
// FUNCTION: LEGO1 0x10001e60
Helicopter::Helicopter()
{
m_unk0x13c = 60;
m_maxLinearVel = 60;
}
// FUNCTION: LEGO1 0x10003230
@ -64,7 +63,7 @@ void Helicopter::CreateState()
}
// FUNCTION: LEGO1 0x10003360
void Helicopter::VTable0xe4()
void Helicopter::Exit()
{
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
SpawnPlayer(
@ -74,7 +73,7 @@ void Helicopter::VTable0xe4()
);
}
IslePathActor::VTable0xe4();
IslePathActor::Exit();
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
GameState()->SetCurrentArea(LegoGameState::e_copter);
@ -104,7 +103,7 @@ void Helicopter::VTable0xe4()
}
// FUNCTION: LEGO1 0x10003480
MxU32 Helicopter::HandleClick()
MxLong Helicopter::HandleClick()
{
if (!FUN_1003ef60()) {
return 1;
@ -118,7 +117,7 @@ MxU32 Helicopter::HandleClick()
if (CurrentActor()) {
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) CurrentActor())->VTable0xe4();
((IslePathActor*) CurrentActor())->Exit();
}
}
@ -145,7 +144,7 @@ MxU32 Helicopter::HandleClick()
break;
}
VTable0xe0();
Enter();
InvokeAction(Extra::ActionType::e_start, m_script, IsleScript::c_HelicopterDashboard, NULL);
GetCurrentAction().SetObjectId(-1);
ControlManager()->Register(this);
@ -153,7 +152,7 @@ MxU32 Helicopter::HandleClick()
}
// FUNCTION: LEGO1 0x100035e0
MxU32 Helicopter::HandleControl(LegoControlManagerEvent& p_param)
MxLong Helicopter::HandleControl(LegoControlManagerEvent& p_param)
{
MxU32 ret = 0;
MxAtomId script;
@ -180,7 +179,7 @@ MxU32 Helicopter::HandleControl(LegoControlManagerEvent& p_param)
else if (m_state->GetUnkown8() != 0) {
break;
}
VTable0xe4();
Exit();
GameState()->SetCurrentArea(LegoGameState::e_unk66);
ret = 1;
break;
@ -228,7 +227,7 @@ MxU32 Helicopter::HandleControl(LegoControlManagerEvent& p_param)
lookat = dir;
float scale = 3;
lookat.Mul(scale);
lookat.Add(&loc);
lookat.Add(loc);
Mx3DPointFloat v68, v7c, v90(0, 1, 0), va4;
v68 = m_world->GetCamera()->GetWorldUp();
va4.EqualsCross(&v68, &dir);
@ -249,7 +248,7 @@ MxU32 Helicopter::HandleControl(LegoControlManagerEvent& p_param)
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
VTable0xe4();
Exit();
}
ret = 1;
break;
@ -262,7 +261,7 @@ MxU32 Helicopter::HandleControl(LegoControlManagerEvent& p_param)
}
// FUNCTION: LEGO1 0x10003c20
MxU32 Helicopter::VTable0xd8(LegoEndAnimNotificationParam& p_param)
MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
{
MxU32 ret = 0;
@ -380,9 +379,9 @@ void Helicopter::VTable0x70(float p_float)
mat.SetIdentity();
m_unk0x1f4.Unknown6(mat, f2);
v2.SetVector(loc);
v2.Sub(&v);
v2.Sub(v);
v2.Mul(f2);
v2.Add(&v);
v2.Add(v);
m_world->GetCamera()->FUN_100123e0(mat, 0);
}
else {

View File

@ -4,16 +4,17 @@
#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"
#include "mxbackgroundaudiomanager.h"
#include "mxnotificationparam.h"
#include "scripts.h"
#include "viewmanager/viewmanager.h"
DECOMP_SIZE_ASSERT(IslePathActor, 0x160)
DECOMP_SIZE_ASSERT(IslePathActor::SpawnLocation, 0x38)
@ -25,9 +26,9 @@ IslePathActor::SpawnLocation g_spawnLocations[IslePathActor::c_LOCATIONS_NUM];
IslePathActor::IslePathActor()
{
m_world = NULL;
m_unk0x13c = 6.0;
m_unk0x15c = 1.0;
m_unk0x158 = NULL;
m_maxLinearVel = 6.0;
m_previousVel = 1.0;
m_previousActor = NULL;
}
// FUNCTION: LEGO1 0x1001a280
@ -51,7 +52,7 @@ MxLong IslePathActor::Notify(MxParam& p_param)
switch (((MxNotificationParam&) p_param).GetType()) {
case c_notificationType0:
ret = VTable0xd0();
ret = HandleNotification0();
break;
case c_notificationClick:
ret = HandleClick();
@ -60,10 +61,10 @@ MxLong IslePathActor::Notify(MxParam& p_param)
ret = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationEndAnim:
ret = VTable0xd8((LegoEndAnimNotificationParam&) p_param);
ret = HandleEndAnim((LegoEndAnimNotificationParam&) p_param);
break;
case c_notificationType19:
ret = VTable0xdc((MxType19NotificationParam&) p_param);
ret = HandleNotification19((MxType19NotificationParam&) p_param);
break;
}
@ -71,15 +72,15 @@ MxLong IslePathActor::Notify(MxParam& p_param)
}
// FUNCTION: LEGO1 0x1001a350
void IslePathActor::VTable0xe0()
void IslePathActor::Enter()
{
m_roi->SetVisibility(FALSE);
if (CurrentActor() != this) {
m_unk0x15c = NavController()->GetMaxLinearVel();
m_unk0x158 = CurrentActor();
if (m_unk0x158) {
m_unk0x158->ResetWorldTransform(FALSE);
m_unk0x158->SetUserNavFlag(FALSE);
m_previousVel = NavController()->GetMaxLinearVel();
m_previousActor = CurrentActor();
if (m_previousActor) {
m_previousActor->ResetWorldTransform(FALSE);
m_previousActor->SetUserNavFlag(FALSE);
}
}
@ -88,7 +89,7 @@ void IslePathActor::VTable0xe0()
ResetWorldTransform(TRUE);
SetUserNavFlag(TRUE);
NavController()->ResetLinearVel(m_unk0x13c);
NavController()->ResetMaxLinearVel(m_maxLinearVel);
SetCurrentActor(this);
FUN_1001b660();
@ -96,10 +97,62 @@ void IslePathActor::VTable0xe0()
}
}
// STUB: LEGO1 0x1001a3f0
void IslePathActor::VTable0xe4()
// FUNCTION: LEGO1 0x1001a3f0
// FUNCTION: BETA10 0x1003669f
void IslePathActor::Exit()
{
// TODO
Reset();
GetViewManager()->Remove(m_roi);
GetViewManager()->Add(m_roi);
ResetWorldTransform(FALSE);
SetUserNavFlag(FALSE);
if (m_previousActor != NULL) {
SetCurrentActor(m_previousActor);
NavController()->ResetMaxLinearVel(m_previousVel);
m_previousActor->ResetWorldTransform(TRUE);
m_previousActor->SetUserNavFlag(TRUE);
m_previousActor->SetBoundary(m_boundary);
MxS32 i;
for (i = 0; i < m_boundary->GetNumEdges(); i++) {
LegoUnknown100db7f4* e = (LegoUnknown100db7f4*) m_boundary->GetEdges()[i];
assert(e);
Mx3DPointFloat local20;
e->FUN_1002ddc0(*m_boundary, local20);
((Vector3&) local20).Mul(m_roi->GetWorldBoundingSphere().Radius());
((Vector3&) local20).Add(GetWorldPosition());
MxS32 j;
for (j = 0; j < m_boundary->GetNumEdges(); j++) {
Mx4DPointFloat& normal = *m_boundary->GetEdgeNormal(j);
if (local20.Dot(&normal, &local20) + normal[3] < -0.001) {
break;
}
}
if (m_boundary->GetNumEdges() == j) {
m_previousActor->SetLocation(local20, GetWorldDirection(), GetWorldUp(), TRUE);
break;
}
}
if (m_boundary->GetNumEdges() == i) {
m_previousActor->SetLocation(GetWorldPosition(), GetWorldDirection(), GetWorldUp(), TRUE);
}
m_previousActor->SetState(0);
GameState()->m_currentArea = LegoGameState::Area::e_unk66;
}
FUN_1001b660();
FUN_10010c30();
FUN_1003eda0();
}
// FUNCTION: LEGO1 0x1001a700
@ -430,7 +483,7 @@ void IslePathActor::RegisterSpawnLocations()
JukeboxScript::c_noneJukebox
);
g_spawnLocations[27] = SpawnLocation(
LegoGameState::e_unk54,
LegoGameState::e_jukeboxExterior,
g_isleScript,
0,
"int36",
@ -479,7 +532,7 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_und, MxU8 p
m_world = world;
if (p_und) {
VTable0xe0();
Enter();
}
m_world->PlaceActor(
@ -563,7 +616,7 @@ void IslePathActor::VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundar
m_world = CurrentWorld();
if (p_reset) {
VTable0xe0();
Enter();
}
m_world->PlaceActor(this);

View File

@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(Jetski, 0x164)
// FUNCTION: LEGO1 0x1007e3b0
Jetski::Jetski()
{
this->m_unk0x13c = 25.0;
this->m_maxLinearVel = 25.0;
this->m_unk0x150 = 2.0;
this->m_unk0x148 = 1;
}
@ -24,20 +24,20 @@ void Jetski::VTable0x70(float p_float)
}
// STUB: LEGO1 0x1007e6f0
void Jetski::VTable0xe4()
void Jetski::Exit()
{
// TODO
}
// STUB: LEGO1 0x1007e750
MxU32 Jetski::HandleClick()
MxLong Jetski::HandleClick()
{
// TODO
return 0;
}
// STUB: LEGO1 0x1007e8e0
MxU32 Jetski::HandleControl(LegoControlManagerEvent& p_param)
MxLong Jetski::HandleControl(LegoControlManagerEvent& p_param)
{
// TODO
return 0;

View File

@ -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"
@ -38,7 +38,7 @@ MxLong JukeBoxEntity::Notify(MxParam& p_param)
}
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) CurrentActor())->VTable0xe4();
((IslePathActor*) CurrentActor())->Exit();
}
((Isle*) FindWorld(*g_isleScript, 0))->SetDestLocation(LegoGameState::e_jukeboxw);
@ -55,37 +55,37 @@ void JukeBoxEntity::StartAction()
MxDSAction action;
BackgroundAudioManager()->Stop();
JukeBoxState* state = (JukeBoxState*) GameState()->GetState("JukeBoxState");
state->SetActive(TRUE);
state->m_active = TRUE;
switch (state->GetState()) {
case 0:
switch (state->m_music) {
case JukeBoxState::e_pasquell:
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_npz001bd_RunAnim, NULL);
GameState()->SetUnknown0x41c(JukeboxScript::c_JBMusic1);
GameState()->m_jukeboxMusic = JukeboxScript::c_JBMusic1;
break;
case 1:
case JukeBoxState::e_right:
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_npz006bd_RunAnim, NULL);
GameState()->SetUnknown0x41c(JukeboxScript::c_JBMusic2);
GameState()->m_jukeboxMusic = JukeboxScript::c_JBMusic2;
break;
case 2:
case JukeBoxState::e_decal:
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_npz003bd_RunAnim, NULL);
GameState()->SetUnknown0x41c(JukeboxScript::c_JBMusic3);
GameState()->m_jukeboxMusic = JukeboxScript::c_JBMusic3;
break;
case 3:
case JukeBoxState::e_wallis:
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_npz002bd_RunAnim, NULL);
GameState()->SetUnknown0x41c(JukeboxScript::c_JBMusic4);
GameState()->m_jukeboxMusic = JukeboxScript::c_JBMusic4;
break;
case 4:
case JukeBoxState::e_nelson:
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_npz007bd_RunAnim, NULL);
GameState()->SetUnknown0x41c(JukeboxScript::c_JBMusic5);
GameState()->m_jukeboxMusic = JukeboxScript::c_JBMusic5;
break;
case 5:
case JukeBoxState::e_torpedos:
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_npz004bd_RunAnim, NULL);
GameState()->SetUnknown0x41c(JukeboxScript::c_JBMusic6);
GameState()->m_jukeboxMusic = JukeboxScript::c_JBMusic6;
break;
}
action.SetAtomId(*g_jukeboxScript);
action.SetObjectId(GameState()->GetUnknown0x41c());
action.SetObjectId(GameState()->m_jukeboxMusic);
m_audioEnabled = BackgroundAudioManager()->GetEnabled();
if (!m_audioEnabled) {
@ -100,30 +100,30 @@ void JukeBoxEntity::StopAction(JukeboxScript::Script p_script)
{
JukeBoxState* state = (JukeBoxState*) GameState()->GetState("JukeBoxState");
if (state && state->IsActive()) {
if (state && state->m_active) {
switch (p_script) {
case JukeboxScript::c_JBMusic1:
state->SetActive(FALSE);
state->m_active = FALSE;
InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_npz001bd_RunAnim, NULL);
break;
case JukeboxScript::c_JBMusic2:
state->SetActive(FALSE);
state->m_active = FALSE;
InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_npz006bd_RunAnim, NULL);
break;
case JukeboxScript::c_JBMusic3:
state->SetActive(FALSE);
state->m_active = FALSE;
InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_npz003bd_RunAnim, NULL);
break;
case JukeboxScript::c_JBMusic4:
state->SetActive(FALSE);
state->m_active = FALSE;
InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_npz002bd_RunAnim, NULL);
break;
case JukeboxScript::c_JBMusic5:
state->SetActive(FALSE);
state->m_active = FALSE;
InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_npz007bd_RunAnim, NULL);
break;
case JukeboxScript::c_JBMusic6:
state->SetActive(FALSE);
state->m_active = FALSE;
InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_npz004bd_RunAnim, NULL);
break;
}

View File

@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(Motocycle, 0x16c)
// FUNCTION: LEGO1 0x100357b0
Motocycle::Motocycle()
{
this->m_unk0x13c = 40.0;
this->m_maxLinearVel = 40.0;
this->m_unk0x150 = 1.75;
this->m_unk0x148 = 1;
this->m_unk0x164 = 1.0;
@ -25,27 +25,27 @@ void Motocycle::VTable0x70(float p_float)
}
// STUB: LEGO1 0x10035bc0
void Motocycle::VTable0xe4()
void Motocycle::Exit()
{
// TODO
}
// STUB: LEGO1 0x10035c50
MxU32 Motocycle::HandleClick()
MxLong Motocycle::HandleClick()
{
// TODO
return 0;
}
// STUB: LEGO1 0x10035d70
MxU32 Motocycle::HandleControl(LegoControlManagerEvent& p_param)
MxLong Motocycle::HandleControl(LegoControlManagerEvent& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x10035df0
MxU32 Motocycle::VTable0xdc(MxType19NotificationParam& p_param)
MxLong Motocycle::HandleNotification19(MxType19NotificationParam& p_param)
{
// TODO
return 0;

View File

@ -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;
}

View File

@ -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)
@ -51,7 +51,7 @@ undefined4 Pizzeria::HandleClick()
if (FUN_1003ef60() && m_pizzaMissionState->m_unk0x0c == 0) {
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
if (!CurrentActor()->IsA("SkateBoard")) {
((IslePathActor*) CurrentActor())->VTable0xe4();
((IslePathActor*) CurrentActor())->Exit();
}
}
@ -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);
}

View File

@ -8,14 +8,14 @@ DECOMP_SIZE_ASSERT(RaceCar, 0x164)
// FUNCTION: LEGO1 0x10028200
RaceCar::RaceCar()
{
m_unk0x13c = 40.0;
m_maxLinearVel = 40.0;
}
// FUNCTION: LEGO1 0x10028420
RaceCar::~RaceCar()
{
ControlManager()->Unregister(this);
VTable0xe4();
Exit();
}
// STUB: LEGO1 0x10028490
@ -26,7 +26,7 @@ MxResult RaceCar::Create(MxDSAction& p_dsAction)
}
// STUB: LEGO1 0x100284d0
MxU32 RaceCar::HandleClick()
MxLong RaceCar::HandleClick()
{
// TODO
return 0;

View File

@ -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;
}

View File

@ -1,6 +1,5 @@
#include "skateboard.h"
#include "act1state.h"
#include "decomp.h"
#include "isle.h"
#include "isle_actions.h"
@ -22,7 +21,7 @@ DECOMP_SIZE_ASSERT(SkateBoard, 0x168)
SkateBoard::SkateBoard()
{
m_unk0x160 = FALSE;
m_unk0x13c = 15.0;
m_maxLinearVel = 15.0;
m_unk0x150 = 3.5;
m_unk0x148 = 1;
@ -55,7 +54,7 @@ MxResult SkateBoard::Create(MxDSAction& p_dsAction)
}
// FUNCTION: LEGO1 0x10010050
void SkateBoard::VTable0xe4()
void SkateBoard::Exit()
{
if (m_act1state->m_unk0x018 == 3) {
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
@ -64,7 +63,7 @@ void SkateBoard::VTable0xe4()
m_unk0x160 = FALSE;
}
IslePathActor::VTable0xe4();
IslePathActor::Exit();
GameState()->m_currentArea = LegoGameState::Area::e_skateboard;
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_SkateArms_Ctl);
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_SkatePizza_Bitmap);
@ -72,7 +71,7 @@ void SkateBoard::VTable0xe4()
}
// FUNCTION: LEGO1 0x100100e0
MxU32 SkateBoard::HandleClick()
MxLong SkateBoard::HandleClick()
{
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
@ -87,12 +86,12 @@ MxU32 SkateBoard::HandleClick()
if (GameState()->GetActorId() != CurrentActor()->GetActorId()) {
if (!CurrentActor()->IsA("SkateBoard")) {
((IslePathActor*) CurrentActor())->VTable0xe4();
((IslePathActor*) CurrentActor())->Exit();
}
}
if (!CurrentActor()->IsA("SkateBoard")) {
VTable0xe0();
Enter();
InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_SkateDashboard, NULL);
GetCurrentAction().SetObjectId(-1);
ControlManager()->Register(this);
@ -107,12 +106,12 @@ MxU32 SkateBoard::HandleClick()
}
// FUNCTION: LEGO1 0x10010230
MxU32 SkateBoard::HandleControl(LegoControlManagerEvent& p_param)
MxLong SkateBoard::HandleControl(LegoControlManagerEvent& p_param)
{
MxU32 result = 0;
if (p_param.GetUnknown0x28() == 1 && p_param.GetClickedObjectId() == IsleScript::c_SkateArms_Ctl) {
VTable0xe4();
Exit();
GameState()->m_currentArea = LegoGameState::Area::e_unk66;
result = 1;
}
@ -140,7 +139,7 @@ void SkateBoard::EnableScenePresentation(MxBool p_enable)
// FUNCTION: LEGO1 0x100104f0
// FUNCTION: BETA10 0x100f5472
MxU32 SkateBoard::VTable0xd0()
MxLong SkateBoard::HandleNotification0()
{
EnableScenePresentation(m_unk0x160);
return 1;

View File

@ -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()
@ -21,7 +21,7 @@ TowTrack::TowTrack()
m_unk0x170 = -1;
m_unk0x16e = 0;
m_unk0x174 = -1;
m_unk0x13c = 40.0;
m_maxLinearVel = 40.0;
m_unk0x178 = 1.0;
}
@ -75,34 +75,34 @@ MxLong TowTrack::Notify(MxParam& p_param)
}
// STUB: LEGO1 0x1004cd30
MxU32 TowTrack::VTable0xd8(LegoEndAnimNotificationParam& p_param)
MxLong TowTrack::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x1004d330
MxU32 TowTrack::VTable0xdc(MxType19NotificationParam& p_param)
MxLong TowTrack::HandleNotification19(MxType19NotificationParam& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x1004d690
MxU32 TowTrack::HandleClick()
MxLong TowTrack::HandleClick()
{
// TODO
return 0;
}
// STUB: LEGO1 0x1004d8f0
void TowTrack::VTable0xe4()
void TowTrack::Exit()
{
// TODO
}
// STUB: LEGO1 0x1004d9e0
MxU32 TowTrack::HandleControl(LegoControlManagerEvent& p_param)
MxLong TowTrack::HandleControl(LegoControlManagerEvent& p_param)
{
// TODO
return 0;
@ -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;
}

View File

@ -60,18 +60,15 @@ MxResult LegoCacheSoundManager::Tickle()
return SUCCESS;
}
// STUB: LEGO1 0x1003d170
// FUNCTION: LEGO1 0x1003d170
LegoCacheSound* LegoCacheSoundManager::FindSoundByKey(const char* p_key)
{
// TODO
char* x = new char[strlen(p_key) + 1];
strcpy(x, p_key);
char* key = new char[strlen(p_key) + 1];
strcpy(key, p_key);
Set100d6b4c::iterator setIter;
for (setIter = m_set.begin(); setIter != m_set.end(); setIter++) {
if (!strcmpi((*setIter).GetName(), x)) {
return (*setIter).GetSound();
}
Set100d6b4c::iterator it = m_set.find(LegoCacheSoundEntry(NULL, key));
if (it != m_set.end()) {
return (*it).GetSound();
}
return NULL;
@ -104,12 +101,14 @@ LegoCacheSound* LegoCacheSoundManager::ManageSoundEntry(LegoCacheSound* p_sound)
}
// FUNCTION: LEGO1 0x1003dae0
// FUNCTION: BETA10 0x10065502
LegoCacheSound* LegoCacheSoundManager::Play(const char* p_key, const char* p_name, MxBool p_looping)
{
return Play(FindSoundByKey(p_key), p_name, p_looping);
}
// FUNCTION: LEGO1 0x1003db10
// FUNCTION: BETA10 0x10065537
LegoCacheSound* LegoCacheSoundManager::Play(LegoCacheSound* p_sound, const char* p_name, MxBool p_looping)
{
if (!p_sound) {

View File

@ -29,7 +29,7 @@ void LegoCacheSound::Init()
m_unk0x70 = FALSE;
m_looping = TRUE;
m_volume = 79;
m_unk0x84 = 0;
m_muted = FALSE;
}
// FUNCTION: LEGO1 0x10006710
@ -226,7 +226,7 @@ void LegoCacheSound::FUN_10006be0()
}
}
if (m_unk0x74.GetLength() != 0 && !m_unk0x84) {
if (m_unk0x74.GetLength() != 0 && !m_muted) {
if (!m_sound.UpdatePosition(m_dsBuffer)) {
if (m_unk0x6a) {
return;
@ -253,6 +253,22 @@ void LegoCacheSound::FUN_10006cd0(undefined4, undefined4)
{
}
// FUNCTION: LEGO1 0x10006d40
// FUNCTION: BETA10 0x10066ec8
void LegoCacheSound::Mute(MxBool p_muted)
{
if (m_muted != p_muted) {
m_muted = p_muted;
if (m_muted) {
m_dsBuffer->Stop();
}
else {
m_dsBuffer->Play(0, 0, m_looping);
}
}
}
// FUNCTION: LEGO1 0x10006d80
// FUNCTION: BETA10 0x100670e7
MxString LegoCacheSound::FUN_10006d80(const MxString& p_str)

View File

@ -1,3 +0,0 @@
#include "helicopterstate.h"
DECOMP_SIZE_ASSERT(HelicopterState, 0x0c)

View File

@ -193,7 +193,7 @@ LegoBuildingInfo g_buildingInfoInit[16] = {
// clang-format on
// GLOBAL: LEGO1 0x100f3738
MxU32 g_buildingCycle1Length = 6;
MxU32 LegoBuildingManager::g_maxSound = 6;
// GLOBAL: LEGO1 0x100f373c
MxU32 g_cycleLengthOffset1 = 0x3c;
@ -221,7 +221,7 @@ MxS32 g_buildingManagerConfig = 1;
LegoBuildingInfo g_buildingInfo[16];
// GLOBAL: LEGO1 0x100f3748
MxS32 g_buildingCycle2Length[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0};
MxS32 LegoBuildingManager::g_maxMove[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0};
// FUNCTION: LEGO1 0x1002f8b0
void LegoBuildingManager::configureLegoBuildingManager(MxS32 p_buildingManagerConfig)
@ -330,13 +330,13 @@ MxResult LegoBuildingManager::Write(LegoStorage* p_storage)
for (MxS32 i = 0; i < sizeOfArray(g_buildingInfo); i++) {
LegoBuildingInfo* info = &g_buildingInfo[i];
if (p_storage->Write(&info->m_cycle1, sizeof(info->m_cycle1)) != SUCCESS) {
if (p_storage->Write(&info->m_sound, sizeof(info->m_sound)) != SUCCESS) {
goto done;
}
if (p_storage->Write(&info->m_cycle2, sizeof(info->m_cycle2)) != SUCCESS) {
if (p_storage->Write(&info->m_move, sizeof(info->m_move)) != SUCCESS) {
goto done;
}
if (p_storage->Write(&info->m_cycle3, sizeof(info->m_cycle3)) != SUCCESS) {
if (p_storage->Write(&info->m_mood, sizeof(info->m_mood)) != SUCCESS) {
goto done;
}
if (p_storage->Write(&info->m_initialUnk0x11, sizeof(info->m_initialUnk0x11)) != SUCCESS) {
@ -363,13 +363,13 @@ MxResult LegoBuildingManager::Read(LegoStorage* p_storage)
for (MxS32 i = 0; i < sizeOfArray(g_buildingInfo); i++) {
LegoBuildingInfo* info = &g_buildingInfo[i];
if (p_storage->Read(&info->m_cycle1, sizeof(info->m_cycle1)) != SUCCESS) {
if (p_storage->Read(&info->m_sound, sizeof(info->m_sound)) != SUCCESS) {
goto done;
}
if (p_storage->Read(&info->m_cycle2, sizeof(info->m_cycle2)) != SUCCESS) {
if (p_storage->Read(&info->m_move, sizeof(info->m_move)) != SUCCESS) {
goto done;
}
if (p_storage->Read(&info->m_cycle3, sizeof(info->m_cycle3)) != SUCCESS) {
if (p_storage->Read(&info->m_mood, sizeof(info->m_mood)) != SUCCESS) {
goto done;
}
if (p_storage->Read(&info->m_unk0x11, sizeof(info->m_unk0x11)) != SUCCESS) {
@ -441,7 +441,7 @@ LegoBuildingInfo* LegoBuildingManager::GetInfo(LegoEntity* p_entity)
// FUNCTION: LEGO1 0x1002fdb0
// FUNCTION: BETA10 0x10064101
MxBool LegoBuildingManager::IncrementVariant(LegoEntity* p_entity)
MxBool LegoBuildingManager::SwitchVariant(LegoEntity* p_entity)
{
if (g_buildingManagerConfig <= 1) {
return TRUE;
@ -449,7 +449,7 @@ MxBool LegoBuildingManager::IncrementVariant(LegoEntity* p_entity)
LegoBuildingInfo* info = GetInfo(p_entity);
if (info != NULL && info->m_flags & LegoBuildingInfo::c_bit1 && info->m_unk0x11 == -1) {
if (info != NULL && info->m_flags & LegoBuildingInfo::c_hasVariants && info->m_unk0x11 == -1) {
LegoROI* roi = p_entity->GetROI();
if (++m_nextVariant >= sizeOfArray(g_buildingInfoHausName)) {
m_nextVariant = 0;
@ -471,16 +471,16 @@ MxBool LegoBuildingManager::IncrementVariant(LegoEntity* p_entity)
// FUNCTION: LEGO1 0x1002fe40
// FUNCTION: BETA10 0x100641d3
MxBool LegoBuildingManager::FUN_1002fe40(LegoEntity* p_entity)
MxBool LegoBuildingManager::SwitchSound(LegoEntity* p_entity)
{
MxBool result = FALSE;
LegoBuildingInfo* info = GetInfo(p_entity);
if (info != NULL && info->m_flags & LegoBuildingInfo::c_bit2) {
info->m_cycle1++;
if (info != NULL && info->m_flags & LegoBuildingInfo::c_hasSounds) {
info->m_sound++;
if (info->m_cycle1 >= g_buildingCycle1Length) {
info->m_cycle1 = 0;
if (info->m_sound >= g_maxSound) {
info->m_sound = 0;
}
result = TRUE;
@ -491,16 +491,16 @@ MxBool LegoBuildingManager::FUN_1002fe40(LegoEntity* p_entity)
// FUNCTION: LEGO1 0x1002fe80
// FUNCTION: BETA10 0x10064242
MxBool LegoBuildingManager::FUN_1002fe80(LegoEntity* p_entity)
MxBool LegoBuildingManager::SwitchMove(LegoEntity* p_entity)
{
MxBool result = FALSE;
LegoBuildingInfo* info = GetInfo(p_entity);
if (info != NULL && info->m_flags & LegoBuildingInfo::c_bit3) {
info->m_cycle2++;
if (info != NULL && info->m_flags & LegoBuildingInfo::c_hasMoves) {
info->m_move++;
if (info->m_cycle2 >= g_buildingCycle2Length[info - g_buildingInfo]) {
info->m_cycle2 = 0;
if (info->m_move >= g_maxMove[info - g_buildingInfo]) {
info->m_move = 0;
}
result = TRUE;
@ -511,16 +511,16 @@ MxBool LegoBuildingManager::FUN_1002fe80(LegoEntity* p_entity)
// FUNCTION: LEGO1 0x1002fed0
// FUNCTION: BETA10 0x100642c2
MxBool LegoBuildingManager::FUN_1002fed0(LegoEntity* p_entity)
MxBool LegoBuildingManager::SwitchMood(LegoEntity* p_entity)
{
MxBool result = FALSE;
LegoBuildingInfo* info = GetInfo(p_entity);
if (info != NULL && info->m_flags & LegoBuildingInfo::c_bit4) {
info->m_cycle3++;
if (info != NULL && info->m_flags & LegoBuildingInfo::c_hasMoods) {
info->m_mood++;
if (info->m_cycle3 > 3) {
info->m_cycle3 = 0;
if (info->m_mood > 3) {
info->m_mood = 0;
}
result = TRUE;
@ -535,8 +535,8 @@ MxU32 LegoBuildingManager::GetBuildingEntityId(LegoEntity* p_entity)
{
LegoBuildingInfo* info = GetInfo(p_entity);
if (info != NULL && info->m_flags & LegoBuildingInfo::c_bit3) {
return g_buildingEntityId[info - g_buildingInfo] + info->m_cycle2;
if (info != NULL && info->m_flags & LegoBuildingInfo::c_hasMoves) {
return g_buildingEntityId[info - g_buildingInfo] + info->m_move;
}
return 0;
@ -548,16 +548,16 @@ MxU32 LegoBuildingManager::FUN_1002ff40(LegoEntity* p_entity, MxBool p_state)
{
LegoBuildingInfo* info = GetInfo(p_entity);
if (info == NULL || !(info->m_flags & LegoBuildingInfo::c_bit2)) {
if (info == NULL || !(info->m_flags & LegoBuildingInfo::c_hasSounds)) {
return 0;
}
if (p_state) {
return info->m_cycle3 + g_cycleLengthOffset3;
return info->m_mood + g_cycleLengthOffset3;
}
if (info != NULL) {
return info->m_cycle1 + g_cycleLengthOffset1;
return info->m_sound + g_cycleLengthOffset1;
}
return 0;

View File

@ -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);
}

View File

@ -1,4 +1,4 @@
#include "legocarbuildanimpresenter.h"
#include "legocarbuildpresenter.h"
DECOMP_SIZE_ASSERT(LegoCarBuildAnimPresenter, 0x150)

View File

@ -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);
}

View File

@ -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;
}

Some files were not shown because too many files have changed in this diff Show More