Add remaining classes, implement/match LegoObjectFactory (#1026)

* Add missing classes

* Match LegoObjectFactory

* Remove semicolon

* Add symbol

* Fix
This commit is contained in:
Christian Semmler 2024-06-12 20:02:47 -04:00 committed by GitHub
parent abb4483e18
commit cf576ca78f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 657 additions and 51 deletions

View file

@ -285,7 +285,10 @@ target_link_libraries(omni PRIVATE dsound winmm Smacker::Smacker)
add_library(lego1 SHARED add_library(lego1 SHARED
LEGO1/define.cpp LEGO1/define.cpp
LEGO1/lego/legoomni/src/actors/act2actor.cpp LEGO1/lego/legoomni/src/actors/act2actor.cpp
LEGO1/lego/legoomni/src/actors/act2genactor.cpp
LEGO1/lego/legoomni/src/actors/act3actor.cpp LEGO1/lego/legoomni/src/actors/act3actor.cpp
LEGO1/lego/legoomni/src/actors/act3brickster.cpp
LEGO1/lego/legoomni/src/actors/act3cop.cpp
LEGO1/lego/legoomni/src/actors/act3shark.cpp LEGO1/lego/legoomni/src/actors/act3shark.cpp
LEGO1/lego/legoomni/src/actors/ambulance.cpp LEGO1/lego/legoomni/src/actors/ambulance.cpp
LEGO1/lego/legoomni/src/actors/bike.cpp LEGO1/lego/legoomni/src/actors/bike.cpp

View file

@ -0,0 +1,15 @@
#ifndef ACT2GENACTOR_H
#define ACT2GENACTOR_H
#include "legopathactor.h"
// VTABLE: LEGO1 0x100d4ed8
// SIZE 0x154
class Act2GenActor : public LegoPathActor {
MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94
// SYNTHETIC: LEGO1 0x1000f5a0
// Act2GenActor::`scalar deleting destructor'
};
#endif // ACT2GENACTOR_H

View file

@ -23,6 +23,9 @@ class Act3Actor : public LegoAnimActor {
// SYNTHETIC: LEGO1 0x10043330 // SYNTHETIC: LEGO1 0x10043330
// Act3Actor::`scalar deleting destructor' // Act3Actor::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10040fa0
// Act3Actor::~Act3Actor
private: private:
undefined4 m_unk0x1c; // 0x1c undefined4 m_unk0x1c; // 0x1c
}; };

View file

@ -0,0 +1,31 @@
#ifndef ACT3BRICKSTER_H
#define ACT3BRICKSTER_H
#include "act3actor.h"
// VTABLE: LEGO1 0x100d7838 LegoPathActor
// VTABLE: LEGO1 0x100d7908 LegoAnimActor
// SIZE 0x1b4
class Act3Brickster : public Act3Actor {
public:
Act3Brickster();
~Act3Brickster() override;
void ParseAction(char* p_extra) override; // vtable+0x20
void VTable0x70(float p_und) override; // vtable+0x70
MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94
void SwitchBoundary(
LegoPathBoundary*& p_boundary,
LegoUnknown100db7f4*& p_edge,
float& p_unk0xe4
) override; // vtable+0x98
MxResult VTable0x9c() override; // vtable+0x9c
// SYNTHETIC: LEGO1 0x10043250
// Act3Brickster::`scalar deleting destructor'
private:
undefined4 m_unk0x20[15]; // 0x20
};
#endif // ACT3BRICKSTER_H

View file

@ -0,0 +1,25 @@
#ifndef ACT3COP_H
#define ACT3COP_H
#include "act3actor.h"
// VTABLE: LEGO1 0x100d7750 LegoPathActor
// VTABLE: LEGO1 0x100d7820 LegoAnimActor
// SIZE 0x188
class Act3Cop : public Act3Actor {
public:
Act3Cop();
void ParseAction(char* p_extra) override; // vtable+0x20
void VTable0x70(float p_und) override; // vtable+0x70
MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94
MxResult VTable0x9c() override; // vtable+0x9c
// SYNTHETIC: LEGO1 0x10043120
// Act3Cop::`scalar deleting destructor'
private:
undefined4 m_unk0x20[4]; // 0x20
};
#endif // ACT3COP_H

View file

@ -7,6 +7,8 @@
// SIZE 0x1f8 // SIZE 0x1f8
class Doors : public LegoPathActor { class Doors : public LegoPathActor {
public: public:
Doors() : m_unk0x154(0), m_unk0x15c(0), m_unk0x160(0), m_unk0x1f4(0) {}
// FUNCTION: LEGO1 0x1000e430 // FUNCTION: LEGO1 0x1000e430
inline const char* ClassName() const override // vtable+0x0c inline const char* ClassName() const override // vtable+0x0c
{ {

View file

@ -9,6 +9,8 @@
// SIZE 0x0c // SIZE 0x0c
class HelicopterState : public LegoState { class HelicopterState : public LegoState {
public: public:
HelicopterState() : m_unk0x08(0) {}
// FUNCTION: LEGO1 0x1000e0d0 // FUNCTION: LEGO1 0x1000e0d0
inline const char* ClassName() const override // vtable+0x0c inline const char* ClassName() const override // vtable+0x0c
{ {

View file

@ -21,6 +21,8 @@ class JukeBoxState : public LegoState {
e_torpedos e_torpedos
}; };
JukeBoxState() : m_music(e_pasquell), m_active(FALSE) {}
// FUNCTION: LEGO1 0x1000f310 // FUNCTION: LEGO1 0x1000f310
inline const char* ClassName() const override // vtable+0x0c inline const char* ClassName() const override // vtable+0x0c
{ {

View file

@ -5,10 +5,17 @@
#include "legostate.h" #include "legostate.h"
#include "legoworld.h" #include "legoworld.h"
class Act2Actor;
// VTABLE: LEGO1 0x100d4a70 // VTABLE: LEGO1 0x100d4a70
// SIZE 0x10 // SIZE 0x10
class LegoAct2State : public LegoState { class LegoAct2State : public LegoState {
public: public:
LegoAct2State()
{
m_unk0x08 = 0;
m_unk0x0c = 0;
}
~LegoAct2State() override {} ~LegoAct2State() override {}
// FUNCTION: LEGO1 0x1000df80 // FUNCTION: LEGO1 0x1000df80
@ -43,6 +50,7 @@ class LegoAct2State : public LegoState {
// SIZE 0x1154 // SIZE 0x1154
class LegoAct2 : public LegoWorld { class LegoAct2 : public LegoWorld {
public: public:
LegoAct2();
~LegoAct2() override; ~LegoAct2() override;
MxLong Notify(MxParam& p_param) override; // vtable+0x04 MxLong Notify(MxParam& p_param) override; // vtable+0x04
@ -54,6 +62,7 @@ class LegoAct2 : public LegoWorld {
MxBool Escape() override; // vtable+0x64 MxBool Escape() override; // vtable+0x64
void Enable(MxBool p_enable) override; // vtable+0x68 void Enable(MxBool p_enable) override; // vtable+0x68
inline void SetUnknown0x1138(Act2Actor* p_unk0x1138) { m_unk0x1138 = p_unk0x1138; }
inline void SetUnknown0x1150(undefined4 p_unk0x1150) { m_unk0x1150 = p_unk0x1150; } inline void SetUnknown0x1150(undefined4 p_unk0x1150) { m_unk0x1150 = p_unk0x1150; }
// SYNTHETIC: LEGO1 0x1004fe20 // SYNTHETIC: LEGO1 0x1004fe20
@ -78,7 +87,7 @@ class LegoAct2 : public LegoWorld {
undefined4 m_unk0x112c; // 0x112c undefined4 m_unk0x112c; // 0x112c
undefined4 m_unk0x1130; // 0x1130 undefined4 m_unk0x1130; // 0x1130
undefined4 m_unk0x1134; // 0x1134 undefined4 m_unk0x1134; // 0x1134
undefined4 m_unk0x1138; // 0x1138 Act2Actor* m_unk0x1138; // 0x1138
undefined m_unk0x113c; // 0x113c undefined m_unk0x113c; // 0x113c
undefined4 m_unk0x1140; // 0x1140 undefined4 m_unk0x1140; // 0x1140
undefined4 m_unk0x1144; // 0x1144 undefined4 m_unk0x1144; // 0x1144

View file

@ -10,7 +10,7 @@
// SIZE 0x68 // SIZE 0x68
class LegoActionControlPresenter : public MxMediaPresenter { class LegoActionControlPresenter : public MxMediaPresenter {
public: public:
LegoActionControlPresenter() { m_unk0x50 = Extra::ActionType::e_none; } LegoActionControlPresenter() : m_unk0x50(Extra::ActionType::e_none) {}
~LegoActionControlPresenter() override { Destroy(TRUE); } // vtable+0x00 ~LegoActionControlPresenter() override { Destroy(TRUE); } // vtable+0x00
// FUNCTION: BETA10 0x100a7840 // FUNCTION: BETA10 0x100a7840

View file

@ -62,6 +62,9 @@ class LegoAnimActor : public virtual LegoPathActor {
}; };
// clang-format off // clang-format off
// GLOBAL: LEGO1 0x100d5438
// LegoAnimActor::`vbtable'
// TEMPLATE: LEGO1 0x1000da20 // TEMPLATE: LEGO1 0x1000da20
// vector<LegoAnimActorStruct *,allocator<LegoAnimActorStruct *> >::~vector<LegoAnimActorStruct *,allocator<LegoAnimActorStruct *> > // vector<LegoAnimActorStruct *,allocator<LegoAnimActorStruct *> >::~vector<LegoAnimActorStruct *,allocator<LegoAnimActorStruct *> >

View file

@ -8,7 +8,7 @@
// SIZE 0x50 // SIZE 0x50
class LegoVehicleBuildState : public LegoState { class LegoVehicleBuildState : public LegoState {
public: public:
LegoVehicleBuildState(char* p_classType); LegoVehicleBuildState(const char* p_classType);
// FUNCTION: LEGO1 0x10025ff0 // FUNCTION: LEGO1 0x10025ff0
inline const char* ClassName() const override // vtable+0x0c inline const char* ClassName() const override // vtable+0x0c
@ -49,6 +49,11 @@ class LegoVehicleBuildState : public LegoState {
MxU8 m_placedPartCount; // 0x4f MxU8 m_placedPartCount; // 0x4f
}; };
typedef LegoVehicleBuildState LegoRaceCarBuildState;
typedef LegoVehicleBuildState LegoCopterBuildState;
typedef LegoVehicleBuildState LegoDuneCarBuildState;
typedef LegoVehicleBuildState LegoJetskiBuildState;
// VTABLE: LEGO1 0x100d6658 // VTABLE: LEGO1 0x100d6658
// SIZE 0x34c // SIZE 0x34c
class LegoCarBuild : public LegoWorld { class LegoCarBuild : public LegoWorld {

View file

@ -8,13 +8,13 @@
X(LegoActorPresenter) \ X(LegoActorPresenter) \
X(LegoWorldPresenter) \ X(LegoWorldPresenter) \
X(LegoWorld) \ X(LegoWorld) \
X(LegoAnimPresenter) \
X(LegoModelPresenter) \ X(LegoModelPresenter) \
X(LegoTexturePresenter) \ X(LegoTexturePresenter) \
X(LegoPhonemePresenter) \ X(LegoPhonemePresenter) \
X(LegoFlcTexturePresenter) \ X(LegoFlcTexturePresenter) \
X(LegoPalettePresenter) \ X(LegoPalettePresenter) \
X(LegoPathPresenter) \ X(LegoPathPresenter) \
X(LegoAnimPresenter) \
X(LegoLoopingAnimPresenter) \ X(LegoLoopingAnimPresenter) \
X(LegoLocomotionAnimPresenter) \ X(LegoLocomotionAnimPresenter) \
X(LegoHideAnimPresenter) \ X(LegoHideAnimPresenter) \
@ -49,6 +49,10 @@
X(LegoAct2) \ X(LegoAct2) \
X(LegoAct2State) \ X(LegoAct2State) \
X(CarRace) \ X(CarRace) \
X(LegoRaceCarBuildState) \
X(LegoCopterBuildState) \
X(LegoDuneCarBuildState) \
X(LegoJetskiBuildState) \
X(HospitalState) \ X(HospitalState) \
X(InfocenterState) \ X(InfocenterState) \
X(PoliceState) \ X(PoliceState) \
@ -61,7 +65,7 @@
X(PizzaMissionState) \ X(PizzaMissionState) \
X(Act2Actor) \ X(Act2Actor) \
X(Act2Brick) \ X(Act2Brick) \
/*X(Act2GenActor)*/ \ X(Act2GenActor) \
X(Act2PoliceStation) \ X(Act2PoliceStation) \
X(Act3) \ X(Act3) \
X(Act3State) \ X(Act3State) \
@ -75,8 +79,8 @@
X(AmbulanceMissionState) \ X(AmbulanceMissionState) \
X(TowTrack) \ X(TowTrack) \
X(TowTrackMissionState) \ X(TowTrackMissionState) \
/*X(Act3Cop)*/ \ X(Act3Cop) \
/*X(Act3Brickster)*/ \ X(Act3Brickster) \
X(Act3Shark) \ X(Act3Shark) \
X(BumpBouy) \ X(BumpBouy) \
X(Act3Actor) \ X(Act3Actor) \

View file

@ -9,7 +9,7 @@ class Act1State;
class SkateBoard; class SkateBoard;
// VTABLE: LEGO1 0x100d7408 // VTABLE: LEGO1 0x100d7408
// SIZE 0xb0 // SIZE 0xb4
class PizzaMissionState : public LegoState { class PizzaMissionState : public LegoState {
public: public:
// SIZE 0x20 // SIZE 0x20
@ -22,6 +22,8 @@ class PizzaMissionState : public LegoState {
undefined m_unk0x18[6]; // 0x1a undefined m_unk0x18[6]; // 0x1a
}; };
PizzaMissionState();
// FUNCTION: LEGO1 0x10039290 // FUNCTION: LEGO1 0x10039290
inline const char* ClassName() const override // vtable+0x0c inline const char* ClassName() const override // vtable+0x0c
{ {
@ -47,6 +49,7 @@ class PizzaMissionState : public LegoState {
undefined4 m_unk0x08; // 0x08 undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c undefined4 m_unk0x0c; // 0x0c
Entry m_state[5]; // 0x10 Entry m_state[5]; // 0x10
undefined4 m_unk0xb0; // 0xb0
}; };
// VTABLE: LEGO1 0x100d7380 // VTABLE: LEGO1 0x100d7380

View file

@ -12,6 +12,8 @@ class MxEndActionNotificationParam;
// SIZE 0x0c // SIZE 0x0c
class ScoreState : public LegoState { class ScoreState : public LegoState {
public: public:
ScoreState() : m_playCubeTutorial(TRUE) {}
// FUNCTION: LEGO1 0x1000de40 // FUNCTION: LEGO1 0x1000de40
inline const char* ClassName() const override // vtable+0x0c inline const char* ClassName() const override // vtable+0x0c
{ {

View file

@ -0,0 +1,10 @@
#include "act2genactor.h"
DECOMP_SIZE_ASSERT(Act2GenActor, 0x154)
// STUB: LEGO1 0x10018740
MxResult Act2GenActor::VTable0x94(LegoPathActor*, MxBool)
{
// TODO
return SUCCESS;
}

View file

@ -0,0 +1,47 @@
#include "act3brickster.h"
DECOMP_SIZE_ASSERT(Act3Brickster, 0x1b4)
// STUB: LEGO1 0x10040e10
Act3Brickster::Act3Brickster()
{
// TODO
}
// FUNCTION: LEGO1 0x10040f20
Act3Brickster::~Act3Brickster()
{
// TODO
}
// STUB: LEGO1 0x10040ff0
void Act3Brickster::ParseAction(char* p_extra)
{
// TODO
}
// STUB: LEGO1 0x10041050
void Act3Brickster::VTable0x70(float p_und)
{
// TODO
}
// STUB: LEGO1 0x100416b0
MxResult Act3Brickster::VTable0x94(LegoPathActor*, MxBool)
{
// TODO
return SUCCESS;
}
// STUB: LEGO1 0x10042990
void Act3Brickster::SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
{
// TODO
}
// STUB: LEGO1 0x100429d0
MxResult Act3Brickster::VTable0x9c()
{
// TODO
return SUCCESS;
}

View file

@ -0,0 +1,35 @@
#include "act3cop.h"
DECOMP_SIZE_ASSERT(Act3Cop, 0x188)
// STUB: LEGO1 0x1003fe30
Act3Cop::Act3Cop()
{
// TODO
}
// STUB: LEGO1 0x1003ff70
MxResult Act3Cop::VTable0x94(LegoPathActor*, MxBool)
{
// TODO
return SUCCESS;
}
// STUB: LEGO1 0x10040060
void Act3Cop::ParseAction(char* p_extra)
{
// TODO
}
// STUB: LEGO1 0x100401f0
void Act3Cop::VTable0x70(float p_und)
{
// TODO
}
// STUB: LEGO1 0x10040d20
MxResult Act3Cop::VTable0x9c()
{
// TODO
return SUCCESS;
}

View file

@ -8,7 +8,7 @@
#include "mxticklemanager.h" #include "mxticklemanager.h"
DECOMP_SIZE_ASSERT(Pizza, 0x9c) DECOMP_SIZE_ASSERT(Pizza, 0x9c)
DECOMP_SIZE_ASSERT(PizzaMissionState, 0xb0) DECOMP_SIZE_ASSERT(PizzaMissionState, 0xb4)
DECOMP_SIZE_ASSERT(PizzaMissionState::Entry, 0x20) DECOMP_SIZE_ASSERT(PizzaMissionState::Entry, 0x20)
// FUNCTION: LEGO1 0x10037ef0 // FUNCTION: LEGO1 0x10037ef0
@ -99,6 +99,12 @@ undefined4 Pizza::HandleEndAction(MxEndActionNotificationParam&)
return 0; return 0;
} }
// STUB: LEGO1 0x10039030
PizzaMissionState::PizzaMissionState()
{
// TODO
}
// STUB: LEGO1 0x100393c0 // STUB: LEGO1 0x100393c0
MxResult PizzaMissionState::Serialize(LegoFile* p_legoFile) MxResult PizzaMissionState::Serialize(LegoFile* p_legoFile)
{ {

View file

@ -64,7 +64,7 @@ MxBool LegoCarBuild::Escape()
} }
// FUNCTION: LEGO1 0x10025f30 // FUNCTION: LEGO1 0x10025f30
LegoVehicleBuildState::LegoVehicleBuildState(char* p_classType) LegoVehicleBuildState::LegoVehicleBuildState(const char* p_classType)
{ {
m_className = p_classType; m_className = p_classType;
m_unk0x4c = 0; m_unk0x4c = 0;

View file

@ -2,8 +2,20 @@
#include "act2actor.h" #include "act2actor.h"
#include "act2brick.h" #include "act2brick.h"
#include "act2genactor.h"
#include "act2policestation.h"
#include "act3.h"
#include "act3actor.h"
#include "act3brickster.h"
#include "act3cop.h"
#include "act3shark.h"
#include "ambulance.h"
#include "bike.h"
#include "buildings.h"
#include "bumpbouy.h"
#include "carrace.h" #include "carrace.h"
#include "decomp.h" #include "decomp.h"
#include "doors.h"
#include "dunebuggy.h" #include "dunebuggy.h"
#include "elevatorbottom.h" #include "elevatorbottom.h"
#include "gasstation.h" #include "gasstation.h"
@ -13,13 +25,18 @@
#include "infocenter.h" #include "infocenter.h"
#include "infocenterdoor.h" #include "infocenterdoor.h"
#include "isle.h" #include "isle.h"
#include "jetski.h"
#include "jetskirace.h" #include "jetskirace.h"
#include "jukebox.h"
#include "jukeboxentity.h"
#include "lego3dwavepresenter.h" #include "lego3dwavepresenter.h"
#include "legoact2.h" #include "legoact2.h"
#include "legoactioncontrolpresenter.h" #include "legoactioncontrolpresenter.h"
#include "legoactor.h" #include "legoactor.h"
#include "legoactorpresenter.h" #include "legoactorpresenter.h"
#include "legoanimactor.h" #include "legoanimactor.h"
#include "legoanimationmanager.h"
#include "legoanimmmpresenter.h"
#include "legoanimpresenter.h" #include "legoanimpresenter.h"
#include "legocarbuild.h" #include "legocarbuild.h"
#include "legocarbuildpresenter.h" #include "legocarbuildpresenter.h"
@ -33,6 +50,7 @@
#include "legoloadcachesoundpresenter.h" #include "legoloadcachesoundpresenter.h"
#include "legolocomotionanimpresenter.h" #include "legolocomotionanimpresenter.h"
#include "legoloopinganimpresenter.h" #include "legoloopinganimpresenter.h"
#include "legometerpresenter.h"
#include "legomodelpresenter.h" #include "legomodelpresenter.h"
#include "legopalettepresenter.h" #include "legopalettepresenter.h"
#include "legopartpresenter.h" #include "legopartpresenter.h"
@ -43,65 +61,437 @@
#include "legotexturepresenter.h" #include "legotexturepresenter.h"
#include "legoworld.h" #include "legoworld.h"
#include "legoworldpresenter.h" #include "legoworldpresenter.h"
#include "misc.h"
#include "motocycle.h"
#include "mxcompositemediapresenter.h"
#include "mxcontrolpresenter.h" #include "mxcontrolpresenter.h"
#include "pizza.h" #include "pizza.h"
#include "pizzeria.h"
#include "police.h" #include "police.h"
#include "racecar.h"
#include "raceskel.h"
#include "registrationbook.h" #include "registrationbook.h"
#include "score.h" #include "score.h"
#include "skateboard.h" #include "skateboard.h"
// #include "act2genactor.h"
#include "act2policestation.h"
#include "act3.h"
#include "ambulance.h"
#include "bike.h"
#include "doors.h"
#include "jetski.h"
#include "legoanimationmanager.h"
#include "legoanimmmpresenter.h"
#include "motocycle.h"
#include "racecar.h"
#include "towtrack.h" #include "towtrack.h"
// #include "act3cop.h"
// #include "act3brickster.h"
#include "act3actor.h"
#include "act3shark.h"
#include "buildings.h"
#include "bumpbouy.h"
#include "jukebox.h"
#include "jukeboxentity.h"
#include "legometerpresenter.h"
#include "mxcompositemediapresenter.h"
#include "pizzeria.h"
#include "raceskel.h"
// TODO: Before HospitalState, add all of the different LegoVehicleBuildState's DECOMP_SIZE_ASSERT(LegoObjectFactory, 0x1c8)
// TODO: Uncomment once we have all the relevant types ready
// DECOMP_SIZE_ASSERT(LegoObjectFactory, 0x1c8);
// FUNCTION: LEGO1 0x10006e40 // FUNCTION: LEGO1 0x10006e40
LegoObjectFactory::LegoObjectFactory() LegoObjectFactory::LegoObjectFactory()
{ {
#define X(V) this->m_id##V = MxAtomId(#V, e_exact); m_idLegoEntityPresenter = MxAtomId("LegoEntityPresenter", e_exact);
FOR_LEGOOBJECTFACTORY_OBJECTS(X) m_idLegoActorPresenter = MxAtomId("LegoActorPresenter", e_exact);
#undef X m_idLegoWorldPresenter = MxAtomId("LegoWorldPresenter", e_exact);
m_idLegoWorld = MxAtomId("LegoWorld", e_exact);
m_idLegoAnimPresenter = MxAtomId("LegoAnimPresenter", e_exact); // duplicate
m_idLegoModelPresenter = MxAtomId("LegoModelPresenter", e_exact);
m_idLegoTexturePresenter = MxAtomId("LegoTexturePresenter", e_exact);
m_idLegoPhonemePresenter = MxAtomId("LegoPhonemePresenter", e_exact);
m_idLegoFlcTexturePresenter = MxAtomId("LegoFlcTexturePresenter", e_exact);
m_idLegoPalettePresenter = MxAtomId("LegoPalettePresenter", e_exact);
m_idLegoPathPresenter = MxAtomId("LegoPathPresenter", e_exact);
m_idLegoAnimPresenter = MxAtomId("LegoAnimPresenter", e_exact);
m_idLegoLoopingAnimPresenter = MxAtomId("LegoLoopingAnimPresenter", e_exact);
m_idLegoLocomotionAnimPresenter = MxAtomId("LegoLocomotionAnimPresenter", e_exact);
m_idLegoHideAnimPresenter = MxAtomId("LegoHideAnimPresenter", e_exact);
m_idLegoPartPresenter = MxAtomId("LegoPartPresenter", e_exact);
m_idLegoCarBuildAnimPresenter = MxAtomId("LegoCarBuildAnimPresenter", e_exact);
m_idLegoActionControlPresenter = MxAtomId("LegoActionControlPresenter", e_exact);
m_idLegoMeterPresenter = MxAtomId("LegoMeterPresenter", e_exact);
m_idLegoLoadCacheSoundPresenter = MxAtomId("LegoLoadCacheSoundPresenter", e_exact);
m_idLego3DWavePresenter = MxAtomId("Lego3DWavePresenter", e_exact);
m_idLegoActor = MxAtomId("LegoActor", e_exact);
m_idLegoPathActor = MxAtomId("LegoPathActor", e_exact);
m_idLegoRaceCar = MxAtomId("LegoRaceCar", e_exact);
m_idLegoJetski = MxAtomId("LegoJetski", e_exact);
m_idJetskiRace = MxAtomId("JetskiRace", e_exact);
m_idLegoEntity = MxAtomId("LegoEntity", e_exact);
m_idLegoCarRaceActor = MxAtomId("LegoCarRaceActor", e_exact);
m_idLegoJetskiRaceActor = MxAtomId("LegoJetskiRaceActor", e_exact);
m_idLegoCarBuild = MxAtomId("LegoCarBuild", e_exact);
m_idInfocenter = MxAtomId("Infocenter", e_exact);
m_idLegoAnimActor = MxAtomId("LegoAnimActor", e_exact);
m_idMxControlPresenter = MxAtomId("MxControlPresenter", e_exact);
m_idRegistrationBook = MxAtomId("RegistrationBook", e_exact);
m_idHistoryBook = MxAtomId("HistoryBook", e_exact);
m_idElevatorBottom = MxAtomId("ElevatorBottom", e_exact);
m_idInfocenterDoor = MxAtomId("InfocenterDoor", e_exact);
m_idScore = MxAtomId("Score", e_exact);
m_idScoreState = MxAtomId("ScoreState", e_exact);
m_idHospital = MxAtomId("Hospital", e_exact);
m_idIsle = MxAtomId("Isle", e_exact);
m_idPolice = MxAtomId("Police", e_exact);
m_idGasStation = MxAtomId("GasStation", e_exact);
m_idLegoAct2 = MxAtomId("LegoAct2", e_exact);
m_idLegoAct2State = MxAtomId("LegoAct2State", e_exact);
m_idCarRace = MxAtomId("CarRace", e_exact);
m_idLegoRaceCarBuildState = MxAtomId("LegoRaceCarBuildState", e_exact);
m_idLegoCopterBuildState = MxAtomId("LegoCopterBuildState", e_exact);
m_idLegoDuneCarBuildState = MxAtomId("LegoDuneCarBuildState", e_exact);
m_idLegoJetskiBuildState = MxAtomId("LegoJetskiBuildState", e_exact);
m_idHospitalState = MxAtomId("HospitalState", e_exact);
m_idInfocenterState = MxAtomId("InfocenterState", e_exact);
m_idPoliceState = MxAtomId("PoliceState", e_exact);
m_idGasStationState = MxAtomId("GasStationState", e_exact);
m_idSkateBoard = MxAtomId("SkateBoard", e_exact);
m_idHelicopter = MxAtomId("Helicopter", e_exact);
m_idHelicopterState = MxAtomId("HelicopterState", e_exact);
m_idDuneBuggy = MxAtomId("DuneBuggy", e_exact);
m_idPizza = MxAtomId("Pizza", e_exact);
m_idPizzaMissionState = MxAtomId("PizzaMissionState", e_exact);
m_idAct2Actor = MxAtomId("Act2Actor", e_exact);
m_idAct2Brick = MxAtomId("Act2Brick", e_exact);
m_idAct2GenActor = MxAtomId("Act2GenActor", e_exact);
m_idAct2PoliceStation = MxAtomId("Act2PoliceStation", e_exact);
m_idAct3 = MxAtomId("Act3", e_exact);
m_idAct3State = MxAtomId("Act3State", e_exact);
m_idDoors = MxAtomId("Doors", e_exact);
m_idLegoAnimMMPresenter = MxAtomId("LegoAnimMMPresenter", e_exact);
m_idRaceCar = MxAtomId("RaceCar", e_exact);
m_idJetski = MxAtomId("Jetski", e_exact);
m_idBike = MxAtomId("Bike", e_exact);
m_idMotocycle = MxAtomId("Motocycle", e_exact);
m_idAmbulance = MxAtomId("Ambulance", e_exact);
m_idAmbulanceMissionState = MxAtomId("AmbulanceMissionState", e_exact);
m_idTowTrack = MxAtomId("TowTrack", e_exact);
m_idTowTrackMissionState = MxAtomId("TowTrackMissionState", e_exact);
m_idAct3Cop = MxAtomId("Act3Cop", e_exact);
m_idAct3Brickster = MxAtomId("Act3Brickster", e_exact);
m_idAct3Shark = MxAtomId("Act3Shark", e_exact);
m_idBumpBouy = MxAtomId("BumpBouy", e_exact);
m_idAct3Actor = MxAtomId("Act3Actor", e_exact);
m_idJetskiRaceState = MxAtomId("JetskiRaceState", e_exact);
m_idCarRaceState = MxAtomId("CarRaceState", e_exact);
m_idAct1State = MxAtomId("Act1State", e_exact);
m_idPizzeria = MxAtomId("Pizzeria", e_exact);
m_idPizzeriaState = MxAtomId("PizzeriaState", e_exact);
m_idInfoCenterEntity = MxAtomId("InfoCenterEntity", e_exact);
m_idHospitalEntity = MxAtomId("HospitalEntity", e_exact);
m_idGasStationEntity = MxAtomId("GasStationEntity", e_exact);
m_idPoliceEntity = MxAtomId("PoliceEntity", e_exact);
m_idBeachHouseEntity = MxAtomId("BeachHouseEntity", e_exact);
m_idRaceStandsEntity = MxAtomId("RaceStandsEntity", e_exact);
m_idJukeBoxEntity = MxAtomId("JukeBoxEntity", e_exact);
m_idRadioState = MxAtomId("RadioState", e_exact);
m_idCaveEntity = MxAtomId("CaveEntity", e_exact);
m_idJailEntity = MxAtomId("JailEntity", e_exact);
m_idMxCompositeMediaPresenter = MxAtomId("MxCompositeMediaPresenter", e_exact);
m_idJukeBox = MxAtomId("JukeBox", e_exact);
m_idJukeBoxState = MxAtomId("JukeBoxState", e_exact);
m_idRaceSkel = MxAtomId("RaceSkel", e_exact);
m_idAnimState = MxAtomId("AnimState", e_exact);
} }
// FUNCTION: LEGO1 0x10009a90 // FUNCTION: LEGO1 0x10009a90
MxCore* LegoObjectFactory::Create(const char* p_name) MxCore* LegoObjectFactory::Create(const char* p_name)
{ {
MxCore* object = NULL;
MxAtomId atom(p_name, e_exact); MxAtomId atom(p_name, e_exact);
#define X(V) \ if (m_idLegoModelPresenter == atom) {
if (this->m_id##V == atom) { \ object = new LegoModelPresenter();
return new V; \
} \
else
FOR_LEGOOBJECTFACTORY_OBJECTS(X)
#undef X
{
return MxObjectFactory::Create(p_name);
} }
else if (m_idLegoTexturePresenter == atom) {
object = new LegoTexturePresenter();
}
else if (m_idLegoPhonemePresenter == atom) {
object = new LegoPhonemePresenter();
}
else if (m_idLegoFlcTexturePresenter == atom) {
object = new LegoFlcTexturePresenter();
}
else if (m_idLegoEntityPresenter == atom) {
object = new LegoEntityPresenter();
}
else if (m_idLegoActorPresenter == atom) {
object = new LegoActorPresenter();
}
else if (m_idLegoWorldPresenter == atom) {
object = new LegoWorldPresenter();
}
else if (m_idLegoWorld == atom) {
object = new LegoWorld();
}
else if (m_idLegoPalettePresenter == atom) {
object = new LegoPalettePresenter();
}
else if (m_idLegoPathPresenter == atom) {
object = new LegoPathPresenter();
}
else if (m_idLegoAnimPresenter == atom) {
object = new LegoAnimPresenter();
}
else if (m_idLegoLoopingAnimPresenter == atom) {
object = new LegoLoopingAnimPresenter();
}
else if (m_idLegoLocomotionAnimPresenter == atom) {
object = new LegoLocomotionAnimPresenter();
}
else if (m_idLegoHideAnimPresenter == atom) {
object = new LegoHideAnimPresenter();
}
else if (m_idLegoPartPresenter == atom) {
object = new LegoPartPresenter();
}
else if (m_idLegoCarBuildAnimPresenter == atom) {
object = new LegoCarBuildAnimPresenter();
}
else if (m_idLegoActionControlPresenter == atom) {
object = new LegoActionControlPresenter();
}
else if (m_idLegoMeterPresenter == atom) {
object = new LegoMeterPresenter();
}
else if (m_idLegoLoadCacheSoundPresenter == atom) {
object = new LegoLoadCacheSoundPresenter();
}
else if (m_idLego3DWavePresenter == atom) {
object = new Lego3DWavePresenter();
}
else if (m_idLegoActor == atom) {
object = new LegoActor();
}
else if (m_idLegoPathActor == atom) {
object = new LegoPathActor();
}
else if (m_idJetskiRace == atom) {
object = new JetskiRace();
}
else if (m_idLegoEntity == atom) {
object = new LegoEntity();
}
else if (m_idLegoRaceCar == atom) {
object = new LegoRaceCar();
}
else if (m_idLegoJetski == atom) {
object = new LegoJetski();
}
else if (m_idLegoCarRaceActor == atom) {
object = new LegoCarRaceActor();
}
else if (m_idLegoJetskiRaceActor == atom) {
object = new LegoJetskiRaceActor();
}
else if (m_idLegoCarBuild == atom) {
object = new LegoCarBuild();
}
else if (m_idInfocenter == atom) {
object = new Infocenter();
}
else if (m_idLegoAnimActor == atom) {
object = new LegoAnimActor();
}
else if (m_idMxControlPresenter == atom) {
object = new MxControlPresenter();
}
else if (m_idRegistrationBook == atom) {
object = new RegistrationBook();
}
else if (m_idHistoryBook == atom) {
object = new HistoryBook();
}
else if (m_idElevatorBottom == atom) {
object = new ElevatorBottom();
}
else if (m_idInfocenterDoor == atom) {
object = new InfocenterDoor();
}
else if (m_idScore == atom) {
object = new Score();
}
else if (m_idScoreState == atom) {
object = new ScoreState();
}
else if (m_idHospital == atom) {
object = new Hospital();
}
else if (m_idIsle == atom) {
object = new Isle();
}
else if (m_idPolice == atom) {
object = new Police();
}
else if (m_idGasStation == atom) {
object = new GasStation();
}
else if (m_idLegoAct2 == atom) {
object = new LegoAct2();
}
else if (m_idLegoAct2State == atom) {
object = new LegoAct2State();
}
else if (m_idCarRace == atom) {
object = new CarRace();
}
else if (m_idLegoRaceCarBuildState == atom || m_idLegoCopterBuildState == atom || m_idLegoDuneCarBuildState == atom || m_idLegoJetskiBuildState == atom) {
object = new LegoVehicleBuildState(p_name);
}
else if (m_idHospitalState == atom) {
object = new HospitalState();
}
else if (m_idInfocenterState == atom) {
object = new InfocenterState();
}
else if (m_idPoliceState == atom) {
object = new PoliceState();
}
if (object != NULL) {
return object;
}
if (m_idGasStationState == atom) {
object = new GasStationState();
}
else if (m_idSkateBoard == atom) {
object = new SkateBoard();
}
else if (m_idHelicopter == atom) {
object = new Helicopter();
}
else if (m_idHelicopterState == atom) {
object = new HelicopterState();
}
else if (m_idDuneBuggy == atom) {
object = new DuneBuggy();
}
else if (m_idPizza == atom) {
object = new Pizza();
}
else if (m_idPizzaMissionState == atom) {
object = new PizzaMissionState();
}
else if (m_idAct2Actor == atom) {
Act2Actor* actor = new Act2Actor();
((LegoAct2*) CurrentWorld())->SetUnknown0x1138(actor);
object = actor;
}
else if (m_idAct2Brick == atom) {
object = new Act2Brick();
}
else if (m_idAct2GenActor == atom) {
object = new Act2GenActor();
}
else if (m_idAct2PoliceStation == atom) {
object = new Act2PoliceStation();
}
else if (m_idAct3 == atom) {
object = new Act3();
}
else if (m_idAct3State == atom) {
object = new Act3State();
}
else if (m_idDoors == atom) {
object = new Doors();
}
else if (m_idLegoAnimMMPresenter == atom) {
object = new LegoAnimMMPresenter();
}
else if (m_idRaceCar == atom) {
object = new RaceCar();
}
else if (m_idJetski == atom) {
object = new Jetski();
}
else if (m_idBike == atom) {
object = new Bike();
}
else if (m_idMotocycle == atom) {
object = new Motocycle();
}
else if (m_idAmbulance == atom) {
object = new Ambulance();
}
else if (m_idAmbulanceMissionState == atom) {
object = new AmbulanceMissionState();
}
else if (m_idTowTrack == atom) {
object = new TowTrack();
}
else if (m_idTowTrackMissionState == atom) {
object = new TowTrackMissionState();
}
else if (m_idAct3Cop == atom) {
object = new Act3Cop();
}
else if (m_idAct3Brickster == atom) {
object = new Act3Brickster();
}
else if (m_idAct3Shark == atom) {
object = new Act3Shark();
}
else if (m_idAct3Actor == atom) {
object = new Act3Actor();
}
else if (m_idBumpBouy == atom) {
object = new BumpBouy();
}
else if (m_idJetskiRaceState == atom) {
object = new JetskiRaceState();
}
else if (m_idCarRaceState == atom) {
object = new CarRaceState();
}
else if (m_idAct1State == atom) {
object = new Act1State();
}
else if (m_idPizzeria == atom) {
object = new Pizzeria();
}
else if (m_idPizzeriaState == atom) {
object = new PizzeriaState();
}
else if (m_idInfoCenterEntity == atom) {
object = new InfoCenterEntity();
}
else if (m_idHospitalEntity == atom) {
object = new HospitalEntity();
}
else if (m_idGasStationEntity == atom) {
object = new GasStationEntity();
}
else if (m_idPoliceEntity == atom) {
object = new PoliceEntity();
}
else if (m_idBeachHouseEntity == atom) {
object = new BeachHouseEntity();
}
else if (m_idJukeBoxEntity == atom) {
object = new JukeBoxEntity();
}
else if (m_idRaceStandsEntity == atom) {
object = new RaceStandsEntity();
}
else if (m_idRadioState == atom) {
object = new RadioState();
}
else if (m_idCaveEntity == atom) {
object = new CaveEntity();
}
else if (m_idJailEntity == atom) {
object = new JailEntity();
}
else if (m_idMxCompositeMediaPresenter == atom) {
object = new MxCompositeMediaPresenter();
}
else if (m_idJukeBox == atom) {
object = new JukeBox();
}
else if (m_idJukeBoxState == atom) {
object = new JukeBoxState();
}
else if (m_idRaceSkel == atom) {
object = new RaceSkel();
}
else if (m_idAnimState == atom) {
object = new AnimState();
}
else {
object = MxObjectFactory::Create(p_name);
}
return object;
} }
// FUNCTION: LEGO1 0x1000fb30 // FUNCTION: LEGO1 0x1000fb30

View file

@ -10,6 +10,12 @@
DECOMP_SIZE_ASSERT(LegoAct2, 0x1154) DECOMP_SIZE_ASSERT(LegoAct2, 0x1154)
DECOMP_SIZE_ASSERT(LegoAct2State, 0x10) DECOMP_SIZE_ASSERT(LegoAct2State, 0x10)
// STUB: LEGO1 0x1004fce0
LegoAct2::LegoAct2()
{
// TODO
}
// FUNCTION: LEGO1 0x1004fe10 // FUNCTION: LEGO1 0x1004fe10
MxBool LegoAct2::VTable0x5c() MxBool LegoAct2::VTable0x5c()
{ {

View file

@ -42,6 +42,9 @@ class MxObjectFactory : public MxCore {
// SYNTHETIC: LEGO1 0x100b1160 // SYNTHETIC: LEGO1 0x100b1160
// MxObjectFactory::`scalar deleting destructor' // MxObjectFactory::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10009020
// MxObjectFactory::~MxObjectFactory
private: private:
#define X(V) MxAtomId m_id##V; #define X(V) MxAtomId m_id##V;
FOR_MXOBJECTFACTORY_OBJECTS(X) FOR_MXOBJECTFACTORY_OBJECTS(X)

View file

@ -19,7 +19,7 @@ DECOMP_SIZE_ASSERT(MxObjectFactory, 0x38); // 100af1db
// FUNCTION: LEGO1 0x100b0d80 // FUNCTION: LEGO1 0x100b0d80
MxObjectFactory::MxObjectFactory() MxObjectFactory::MxObjectFactory()
{ {
#define X(V) this->m_id##V = MxAtomId(#V, e_exact); #define X(V) m_id##V = MxAtomId(#V, e_exact);
FOR_MXOBJECTFACTORY_OBJECTS(X) FOR_MXOBJECTFACTORY_OBJECTS(X)
#undef X #undef X
} }
@ -33,7 +33,7 @@ MxCore* MxObjectFactory::Create(const char* p_name)
if (0) { if (0) {
} }
#define X(V) \ #define X(V) \
else if (this->m_id##V == atom) \ else if (m_id##V == atom) \
{ \ { \
object = new V; \ object = new V; \
} }