Merge branch 'master' into mxdisplaysurface-setpalette

This commit is contained in:
Christian Semmler 2023-12-30 16:38:23 -05:00 committed by GitHub
commit 7bbc33e54c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
239 changed files with 3764 additions and 877 deletions

View File

@ -47,6 +47,7 @@ add_library(lego1 SHARED
LEGO1/jukebox.cpp LEGO1/jukebox.cpp
LEGO1/jukeboxentity.cpp LEGO1/jukeboxentity.cpp
LEGO1/jukeboxstate.cpp LEGO1/jukeboxstate.cpp
LEGO1/lego3dmanager.cpp
LEGO1/lego3dview.cpp LEGO1/lego3dview.cpp
LEGO1/legoact2state.cpp LEGO1/legoact2state.cpp
LEGO1/legoactioncontrolpresenter.cpp LEGO1/legoactioncontrolpresenter.cpp
@ -161,6 +162,8 @@ add_library(lego1 SHARED
LEGO1/mxramstreamcontroller.cpp LEGO1/mxramstreamcontroller.cpp
LEGO1/mxramstreamprovider.cpp LEGO1/mxramstreamprovider.cpp
LEGO1/mxregion.cpp LEGO1/mxregion.cpp
LEGO1/mxregioncursor.cpp
LEGO1/mxrendersettings.cpp
LEGO1/mxscheduler.cpp LEGO1/mxscheduler.cpp
LEGO1/mxsemaphore.cpp LEGO1/mxsemaphore.cpp
LEGO1/mxsmack.cpp LEGO1/mxsmack.cpp
@ -292,7 +295,7 @@ if (MSVC)
# game was originally built with) and tweaked slightly to produce more debugging info for reccmp. # game was originally built with) and tweaked slightly to produce more debugging info for reccmp.
# They ensure a recompilation that can be byte/instruction accurate to the original binaries. # They ensure a recompilation that can be byte/instruction accurate to the original binaries.
if (ISLE_BUILD_APP) if (ISLE_BUILD_APP)
target_compile_options(isle PRIVATE "/ML$<$<CONFIG:Debug>:d>") target_compile_options(isle PRIVATE "/MT$<$<CONFIG:Debug>:d>")
endif() endif()
target_compile_options(lego1 PRIVATE "/MT$<$<CONFIG:Debug>:d>") target_compile_options(lego1 PRIVATE "/MT$<$<CONFIG:Debug>:d>")

View File

@ -8,9 +8,9 @@ class IsleApp;
extern IsleApp* g_isle; extern IsleApp* g_isle;
extern int g_closed; extern int g_closed;
// GLOBAL: ISLE 0x4101c4 // STRING: ISLE 0x4101c4
#define WNDCLASS_NAME "Lego Island MainNoM App" #define WNDCLASS_NAME "Lego Island MainNoM App"
// GLOBAL: ISLE 0x4101dc // STRING: ISLE 0x4101dc
#define WINDOW_TITLE "LEGO\xAE" #define WINDOW_TITLE "LEGO\xAE"
extern unsigned char g_mousedown; extern unsigned char g_mousedown;
extern unsigned char g_mousemoved; extern unsigned char g_mousemoved;

View File

@ -12,7 +12,7 @@ class Act1State : public LegoState {
// FUNCTION: LEGO1 0x100338a0 // FUNCTION: LEGO1 0x100338a0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0154 // STRING: LEGO1 0x100f0154
return "Act1State"; return "Act1State";
}; };

View File

@ -16,7 +16,7 @@ class Act2Brick : public LegoPathActor {
// FUNCTION: LEGO1 0x1007a360 // FUNCTION: LEGO1 0x1007a360
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0438 // STRING: LEGO1 0x100f0438
return "Act2Brick"; return "Act2Brick";
} }

View File

@ -12,7 +12,7 @@ class Act2PoliceStation : public LegoEntity {
// FUNCTION: LEGO1 0x1000e200 // FUNCTION: LEGO1 0x1000e200
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f03fc // STRING: LEGO1 0x100f03fc
return "Act2PoliceStation"; return "Act2PoliceStation";
} }

View File

@ -14,7 +14,7 @@ class Act3 : public LegoWorld {
// FUNCTION: LEGO1 0x10072510 // FUNCTION: LEGO1 0x10072510
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f013c // STRING: LEGO1 0x100f013c
return "Act3"; return "Act3";
} }

View File

@ -3,12 +3,12 @@
// FIXME: Uncertain location. There are three vtables which eventually call this // FIXME: Uncertain location. There are three vtables which eventually call this
// class' ClassName() function, but none of them call it directly. // class' ClassName() function, but none of them call it directly.
class Act3Actor { class Act3Actor : public MxCore {
public: public:
// FUNCTION: LEGO1 0x100431b0 // FUNCTION: LEGO1 0x100431b0
inline virtual const char* ClassName() override inline virtual const char* ClassName() override
{ {
// GLOBAL: LEGO1 0x100f03ac // STRING: LEGO1 0x100f03ac
return "Act3Actor"; return "Act3Actor";
} }
}; };

View File

@ -9,7 +9,7 @@ class Act3Shark : public LegoAnimActor {
// FUNCTION: LEGO1 0x100430c0 // FUNCTION: LEGO1 0x100430c0
inline virtual const char* ClassName() const override inline virtual const char* ClassName() const override
{ {
// GLOBAL: LEGO1 0x100f03a0 // STRING: LEGO1 0x100f03a0
return "Act3Shark"; return "Act3Shark";
} }
}; };

View File

@ -12,7 +12,7 @@ class Act3State : public LegoState {
// FUNCTION: LEGO1 0x1000e300 // FUNCTION: LEGO1 0x1000e300
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f03f0 // STRING: LEGO1 0x100f03f0
return "Act3State"; return "Act3State";
} }

View File

@ -12,7 +12,7 @@ class Ambulance : public IslePathActor {
// FUNCTION: LEGO1 0x10035fa0 // FUNCTION: LEGO1 0x10035fa0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f03c4 // STRING: LEGO1 0x100f03c4
return "Ambulance"; return "Ambulance";
} }

View File

@ -12,7 +12,7 @@ class AmbulanceMissionState : public LegoState {
// FUNCTION: LEGO1 0x10037600 // FUNCTION: LEGO1 0x10037600
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f00e8 // STRING: LEGO1 0x100f00e8
return "AmbulanceMissionState"; return "AmbulanceMissionState";
} }

View File

@ -13,7 +13,7 @@ class AnimState : public LegoState {
// FUNCTION: LEGO1 0x10065070 // FUNCTION: LEGO1 0x10065070
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0460 // STRING: LEGO1 0x100f0460
return "AnimState"; return "AnimState";
} }

View File

@ -12,7 +12,7 @@ class BeachHouseEntity : public BuildingEntity {
// FUNCTION: LEGO1 0x1000ee80 // FUNCTION: LEGO1 0x1000ee80
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0314 // STRING: LEGO1 0x100f0314
return "BeachHouseEntity"; return "BeachHouseEntity";
} }

View File

@ -13,7 +13,7 @@ class Bike : public IslePathActor {
// FUNCTION: LEGO1 0x100766f0 // FUNCTION: LEGO1 0x100766f0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f03d0 // STRING: LEGO1 0x100f03d0
return "Bike"; return "Bike";
} }

View File

@ -13,7 +13,7 @@ class BuildingEntity : public LegoEntity {
// FUNCTION: LEGO1 0x10014f20 // FUNCTION: LEGO1 0x10014f20
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f07e8 // STRING: LEGO1 0x100f07e8
return "BuildingEntity"; return "BuildingEntity";
} }

View File

@ -10,7 +10,7 @@ class BumpBouy : public LegoAnimActor {
// FUNCTION: LEGO1 0x100274e0 // FUNCTION: LEGO1 0x100274e0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0394 // STRING: LEGO1 0x100f0394
return "BumpBouy"; return "BumpBouy";
} }

View File

@ -1,7 +1,10 @@
#include "carrace.h" #include "carrace.h"
// STUB: LEGO1 0x10016a90 DECOMP_SIZE_ASSERT(CarRace, 0x154);
// FUNCTION: LEGO1 0x10016a90
CarRace::CarRace() CarRace::CarRace()
{ {
// TODO this->m_unk0x150 = 0;
this->m_unk0x130 = MxRect32(0x16c, 0x154, 0x1ec, 0x15e);
} }

View File

@ -1,6 +1,7 @@
#ifndef CARRACE_H #ifndef CARRACE_H
#define CARRACE_H #define CARRACE_H
#include "decomp.h"
#include "legorace.h" #include "legorace.h"
// VTABLE: LEGO1 0x100d5e50 // VTABLE: LEGO1 0x100d5e50
@ -12,7 +13,7 @@ class CarRace : public LegoRace {
// FUNCTION: LEGO1 0x10016b20 // FUNCTION: LEGO1 0x10016b20
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0528 // STRING: LEGO1 0x100f0528
return "CarRace"; return "CarRace";
} }
@ -21,6 +22,10 @@ class CarRace : public LegoRace {
{ {
return !strcmp(p_name, CarRace::ClassName()) || LegoRace::IsA(p_name); return !strcmp(p_name, CarRace::ClassName()) || LegoRace::IsA(p_name);
} }
private:
undefined m_unk0x144[12]; // 0x144
undefined4 m_unk0x150; // 0x150
}; };
#endif // CARRACE_H #endif // CARRACE_H

View File

@ -10,7 +10,7 @@ class CarRaceState : public RaceState {
// FUNCTION: LEGO1 0x1000dd30 // FUNCTION: LEGO1 0x1000dd30
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f009c // STRING: LEGO1 0x100f009c
return "CarRaceState"; return "CarRaceState";
} }

View File

@ -19,6 +19,9 @@ const char* g_strWORLD = "WORLD";
// GLOBAL: LEGO1 0x10101f20 // GLOBAL: LEGO1 0x10101f20
const char* g_strSOUND = "SOUND"; const char* g_strSOUND = "SOUND";
// GLOBAL: LEGO1 0x10101f58
const char* g_strOBJECT = "OBJECT";
// GLOBAL: LEGO1 0x10102040 // GLOBAL: LEGO1 0x10102040
const char* g_strACTION = "ACTION"; const char* g_strACTION = "ACTION";

View File

@ -7,6 +7,7 @@ extern MxU32 g_mxcoreCount[101];
extern const char* g_parseExtraTokens; extern const char* g_parseExtraTokens;
extern const char* g_strWORLD; extern const char* g_strWORLD;
extern const char* g_strSOUND; extern const char* g_strSOUND;
extern const char* g_strOBJECT;
extern const char* g_strACTION; extern const char* g_strACTION;
extern const char* g_strVISIBILITY; extern const char* g_strVISIBILITY;

View File

@ -10,7 +10,7 @@ class Doors : public LegoPathActor {
// FUNCTION: LEGO1 0x1000e430 // FUNCTION: LEGO1 0x1000e430
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f03e8 // STRING: LEGO1 0x100f03e8
return "Doors"; return "Doors";
} }

View File

@ -13,7 +13,7 @@ class DuneBuggy : public IslePathActor {
// FUNCTION: LEGO1 0x10067c30 // FUNCTION: LEGO1 0x10067c30
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0410 // STRING: LEGO1 0x100f0410
return "DuneBuggy"; return "DuneBuggy";
} }

View File

@ -14,7 +14,7 @@ class ElevatorBottom : public LegoWorld {
// FUNCTION: LEGO1 0x10017f20 // FUNCTION: LEGO1 0x10017f20
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f04ac // STRING: LEGO1 0x100f04ac
return "ElevatorBottom"; return "ElevatorBottom";
} }

View File

@ -17,7 +17,7 @@ class GasStation : public LegoWorld {
// FUNCTION: LEGO1 0x10004780 // FUNCTION: LEGO1 0x10004780
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0168 // STRING: LEGO1 0x100f0168
return "GasStation"; return "GasStation";
} }

View File

@ -10,7 +10,7 @@ class GasStationEntity : public BuildingEntity {
// FUNCTION: LEGO1 0x1000eb20 // FUNCTION: LEGO1 0x1000eb20
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0348 // STRING: LEGO1 0x100f0348
return "GasStationEntity"; return "GasStationEntity";
} }

View File

@ -12,7 +12,7 @@ class GasStationState : public LegoState {
// FUNCTION: LEGO1 0x100061d0 // FUNCTION: LEGO1 0x100061d0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0174 // STRING: LEGO1 0x100f0174
return "GasStationState"; return "GasStationState";
} }

View File

@ -27,7 +27,7 @@ class Helicopter : public IslePathActor {
// FUNCTION: LEGO1 0x10003070 // FUNCTION: LEGO1 0x10003070
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0130 // STRING: LEGO1 0x100f0130
return "Helicopter"; return "Helicopter";
} }

View File

@ -11,7 +11,7 @@ class HelicopterState : public LegoState {
// FUNCTION: LEGO1 0x1000e0d0 // FUNCTION: LEGO1 0x1000e0d0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0144 // STRING: LEGO1 0x100f0144
return "HelicopterState"; return "HelicopterState";
} }

View File

@ -15,7 +15,7 @@ class HistoryBook : public LegoWorld {
// FUNCTION: LEGO1 0x10082390 // FUNCTION: LEGO1 0x10082390
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f04bc // STRING: LEGO1 0x100f04bc
return "HistoryBook"; return "HistoryBook";
} }

View File

@ -15,7 +15,7 @@ class Hospital : public LegoWorld {
// FUNCTION: LEGO1 0x100746b0 // FUNCTION: LEGO1 0x100746b0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0490 // STRING: LEGO1 0x100f0490
return "Hospital"; return "Hospital";
} }

View File

@ -10,7 +10,7 @@ class HospitalEntity : public BuildingEntity {
// FUNCTION: LEGO1 0x1000ec40 // FUNCTION: LEGO1 0x1000ec40
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0338 // STRING: LEGO1 0x100f0338
return "HospitalEntity"; return "HospitalEntity";
} }

View File

@ -1,7 +1,14 @@
#include "hospitalstate.h" #include "hospitalstate.h"
// STUB: LEGO1 0x10076370 DECOMP_SIZE_ASSERT(HospitalState, 0x18)
// FUNCTION: LEGO1 0x10076370
HospitalState::HospitalState() HospitalState::HospitalState()
{ {
// TODO this->m_unk0xc = 0;
this->m_unk0xe = 0;
this->m_unk0x10 = 0;
this->m_unk0x12 = 0;
this->m_unk0x14 = 0;
this->m_unk0x16 = 0;
} }

View File

@ -1,6 +1,7 @@
#ifndef HOSPITALSTATE_H #ifndef HOSPITALSTATE_H
#define HOSPITALSTATE_H #define HOSPITALSTATE_H
#include "decomp.h"
#include "legostate.h" #include "legostate.h"
// VTABLE: LEGO1 0x100d97a0 // VTABLE: LEGO1 0x100d97a0
@ -12,7 +13,7 @@ class HospitalState : public LegoState {
// FUNCTION: LEGO1 0x10076400 // FUNCTION: LEGO1 0x10076400
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0480 // STRING: LEGO1 0x100f0480
return "HospitalState"; return "HospitalState";
} }
@ -21,6 +22,15 @@ class HospitalState : public LegoState {
{ {
return !strcmp(p_name, HospitalState::ClassName()) || LegoState::IsA(p_name); return !strcmp(p_name, HospitalState::ClassName()) || LegoState::IsA(p_name);
} }
private:
undefined m_unk0x8[4]; // 0x8
undefined2 m_unk0xc; // 0xc
undefined2 m_unk0xe; // 0xe
undefined2 m_unk0x10; // 0x10
undefined2 m_unk0x12; // 0x12
undefined2 m_unk0x14; // 0x14
undefined2 m_unk0x16; // 0x16
}; };
#endif // HOSPITALSTATE_H #endif // HOSPITALSTATE_H

View File

@ -12,18 +12,46 @@ Infocenter::~Infocenter()
// TODO // TODO
} }
// STUB: LEGO1 0x1006ed90
MxResult Infocenter::Create(MxDSObject& p_dsObject)
{
return FAILURE;
}
// STUB: LEGO1 0x1006ef10 // STUB: LEGO1 0x1006ef10
MxLong Infocenter::Notify(MxParam& p_param) MxLong Infocenter::Notify(MxParam& p_param)
{ {
// TODO // TODO
return 0; return 0;
} }
// STUB: LEGO1 0x1006f4e0
void Infocenter::Stop()
{
// TODO
}
// STUB: LEGO1 0x10070aa0
void Infocenter::VTable0x68(MxBool p_add)
{
// TODO
}
// STUB: LEGO1 0x10070af0 // STUB: LEGO1 0x10070af0
MxResult Infocenter::Tickle() MxResult Infocenter::Tickle()
{ {
// TODO // TODO
return 0; return 0;
} }
// FUNCTION: LEGO1 0x10070d00
MxBool Infocenter::VTable0x5c()
{
return TRUE;
}
// STUB: LEGO1 0x10070f60
MxBool Infocenter::VTable0x64()
{
return FALSE;
}

View File

@ -16,7 +16,7 @@ class Infocenter : public LegoWorld {
// FUNCTION: LEGO1 0x1006eb40 // FUNCTION: LEGO1 0x1006eb40
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f04ec // STRING: LEGO1 0x100f04ec
return "Infocenter"; return "Infocenter";
} }
@ -25,6 +25,12 @@ class Infocenter : public LegoWorld {
{ {
return !strcmp(p_name, Infocenter::ClassName()) || LegoWorld::IsA(p_name); return !strcmp(p_name, Infocenter::ClassName()) || LegoWorld::IsA(p_name);
} }
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18
virtual void Stop() override; // vtable+0x50
virtual MxBool VTable0x5c() override; // vtable+0x5c
virtual MxBool VTable0x64() override; // vtable+0x64
virtual void VTable0x68(MxBool p_add) override; // vtable+0x68
}; };
#endif // INFOCENTER_H #endif // INFOCENTER_H

View File

@ -15,7 +15,7 @@ class InfocenterDoor : public LegoWorld {
// FUNCTION: LEGO1 0x100377b0 // FUNCTION: LEGO1 0x100377b0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f049c // STRING: LEGO1 0x100f049c
return "InfocenterDoor"; return "InfocenterDoor";
} }

View File

@ -10,7 +10,7 @@ class InfoCenterEntity : public BuildingEntity {
// FUNCTION: LEGO1 0x1000ea00 // FUNCTION: LEGO1 0x1000ea00
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f035c // STRING: LEGO1 0x100f035c
return "InfoCenterEntity"; return "InfoCenterEntity";
} }

View File

@ -14,7 +14,7 @@ class InfocenterState : public LegoState {
// FUNCTION: LEGO1 0x10071840 // FUNCTION: LEGO1 0x10071840
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f04dc // STRING: LEGO1 0x100f04dc
return "InfocenterState"; return "InfocenterState";
} }

View File

@ -30,7 +30,7 @@ class Isle : public LegoWorld {
// FUNCTION: LEGO1 0x10030910 // FUNCTION: LEGO1 0x10030910
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0458 // STRING: LEGO1 0x100f0458
return "Isle"; return "Isle";
} }

View File

@ -9,7 +9,7 @@ class IsleActor : public LegoActor {
// FUNCTION: LEGO1 0x1000e660 // FUNCTION: LEGO1 0x1000e660
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f07dc // STRING: LEGO1 0x100f07dc
return "IsleActor"; return "IsleActor";
} }

View File

@ -18,7 +18,7 @@ class IslePathActor : public LegoPathActor {
// FUNCTION: LEGO1 0x10002ea0 // FUNCTION: LEGO1 0x10002ea0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0104 // STRING: LEGO1 0x100f0104
return "IslePathActor"; return "IslePathActor";
} }

View File

@ -13,7 +13,7 @@ class Jetski : public IslePathActor {
// FUNCTION: LEGO1 0x1007e430 // FUNCTION: LEGO1 0x1007e430
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f03d8 // STRING: LEGO1 0x100f03d8
return "Jetski"; return "Jetski";
} }

View File

@ -10,7 +10,7 @@ class JetskiRace : public LegoRace {
// FUNCTION: LEGO1 0x1000daf0 // FUNCTION: LEGO1 0x1000daf0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0530 // STRING: LEGO1 0x100f0530
return "JetskiRace"; return "JetskiRace";
} }

View File

@ -10,7 +10,7 @@ class JetskiRaceState : public RaceState {
// FUNCTION: LEGO1 0x1000dc40 // FUNCTION: LEGO1 0x1000dc40
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f00ac // STRING: LEGO1 0x100f00ac
return "JetskiRaceState"; return "JetskiRaceState";
} }

View File

@ -13,7 +13,7 @@ class JukeBox : public LegoWorld {
// FUNCTION: LEGO1 0x1005d6f0 // FUNCTION: LEGO1 0x1005d6f0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f02cc // STRING: LEGO1 0x100f02cc
return "JukeBox"; return "JukeBox";
} }

View File

@ -13,7 +13,7 @@ class JukeBoxEntity : public LegoEntity {
// FUNCTION: LEGO1 0x10085cc0 // FUNCTION: LEGO1 0x10085cc0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f02f0 // STRING: LEGO1 0x100f02f0
return "JukeBoxEntity"; return "JukeBoxEntity";
} }

View File

@ -10,7 +10,7 @@ class JukeBoxState : public LegoState {
// FUNCTION: LEGO1 0x1000f310 // FUNCTION: LEGO1 0x1000f310
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f02bc // STRING: LEGO1 0x100f02bc
return "JukeBoxState"; return "JukeBoxState";
} }

46
LEGO1/lego3dmanager.cpp Normal file
View File

@ -0,0 +1,46 @@
#include "lego3dmanager.h"
#include "decomp.h"
#include "mxrendersettings.h"
#include "mxunknown100dbdbc.h"
#include "tgl/tgl.h"
DECOMP_SIZE_ASSERT(Lego3DManager, 0x10);
// FUNCTION: LEGO1 0x100ab320
Lego3DManager::Lego3DManager()
{
m_render = NULL;
m_3dView = NULL;
m_unk0x0c = NULL;
}
// FUNCTION: LEGO1 0x100ab360
Lego3DManager::~Lego3DManager()
{
Destroy();
}
// FUNCTION: LEGO1 0x100ab370
void Lego3DManager::Init(MxRenderSettings& p_settings)
{
m_unk0x0c = new MxUnknown100dbdbc();
m_render = Tgl::CreateRenderer();
m_3dView = new Lego3DView();
MxRenderSettings settings;
MxRenderSettings::CopyFrom(settings, p_settings);
m_3dView->Init(settings, *m_render);
}
// FUNCTION: LEGO1 0x100ab460
void Lego3DManager::Destroy()
{
delete m_3dView;
m_3dView = NULL;
delete m_render;
m_render = NULL;
delete m_unk0x0c;
m_unk0x0c = NULL;
}

View File

@ -3,14 +3,27 @@
#include "lego3dview.h" #include "lego3dview.h"
class MxUnknown100dbdbc;
// VTABLE: LEGO1 0x100dbfa4
// SIZE 0x10
class Lego3DManager { class Lego3DManager {
public: public:
Lego3DManager();
virtual ~Lego3DManager();
inline Lego3DView* GetLego3DView() { return this->m_3dView; } inline Lego3DView* GetLego3DView() { return this->m_3dView; }
private: private:
undefined4 m_unk0x00; // 0x00 Tgl::Renderer* m_render; // 0x04
undefined4 m_unk0x04; // 0x04
Lego3DView* m_3dView; // 0x08 Lego3DView* m_3dView; // 0x08
MxUnknown100dbdbc* m_unk0x0c; // 0x0c
void Init(MxRenderSettings& p_settings);
void Destroy();
}; };
// SYNTHETIC: LEGO1 0x100ab340
// Lego3DManager::`scalar deleting destructor'
#endif // LEGO3DMANAGER_H #endif // LEGO3DMANAGER_H

View File

@ -1,6 +1,25 @@
#include "lego3dview.h" #include "lego3dview.h"
#include "legoroi.h" #include "legoroi.h"
#include "tgl/tgl.h"
DECOMP_SIZE_ASSERT(Lego3DView, 0xa8)
// STUB: LEGO1 0x100aae90
Lego3DView::Lego3DView()
{
}
// STUB: LEGO1 0x100aaf30
Lego3DView::~Lego3DView()
{
}
// STUB: LEGO1 0x100aaf90
MxBool Lego3DView::Init(MxRenderSettings& p_renderSettings, Tgl::Renderer& p_render)
{
return FALSE;
}
// STUB: LEGO1 0x100ab2b0 // STUB: LEGO1 0x100ab2b0
LegoROI* Lego3DView::PickROI(MxLong p_a, MxLong p_b) LegoROI* Lego3DView::PickROI(MxLong p_a, MxLong p_b)

View File

@ -1,19 +1,38 @@
#ifndef LEGO3DVIEW_H #ifndef LEGO3DVIEW_H
#define LEGO3DVIEW_H #define LEGO3DVIEW_H
#include "mxrendersettings.h"
#include "mxtypes.h" #include "mxtypes.h"
#include "tgl/d3drm/impl.h"
#include "viewmanager/viewmanager.h" #include "viewmanager/viewmanager.h"
class LegoROI; class LegoROI;
class Tgl::Renderer;
// VTABLE: LEGO1 0x100dbf78
// SIZE 0xa8
class Lego3DView { class Lego3DView {
public: public:
Lego3DView();
virtual ~Lego3DView();
inline ViewManager* GetViewManager() { return this->m_viewManager; } inline ViewManager* GetViewManager() { return this->m_viewManager; }
inline TglImpl::ViewImpl* GetViewPort() { return this->m_viewPort; }
MxBool Init(MxRenderSettings& p_renderSettings, Tgl::Renderer& p_render);
LegoROI* PickROI(MxLong p_a, MxLong p_b); LegoROI* PickROI(MxLong p_a, MxLong p_b);
private: private:
char m_pad[0x88]; // TODO: all of these fields are in various base classes
ViewManager* m_viewManager; undefined4 m_unk0x4; // 0x04
TglImpl::RendererImpl* m_renderImpl; // 0x08
TglImpl::DeviceImpl* m_deviceImpl; // 0x0c
TglImpl::ViewImpl* m_viewPort; // 0x10
undefined m_unk0x14[0x74]; // 0x14
ViewManager* m_viewManager; // 0x88
undefined m_unk0x8c[0x1c]; // 0x8c
}; };
// SYNTHETIC: LEGO1 0x100aaf10
// Lego3DView::`scalar deleting destructor'
#endif // LEGO3DVIEW_H #endif // LEGO3DVIEW_H

View File

@ -1,16 +1,16 @@
#ifndef LEGO3DWAVEPRESENTER_H #ifndef LEGO3DWAVEPRESENTER_H
#define LEGO3DWAVEPRESENTER_H #define LEGO3DWAVEPRESENTER_H
#include "legowavepresenter.h" #include "mxwavepresenter.h"
// VTABLE: LEGO1 0x100d52b0 // VTABLE: LEGO1 0x100d52b0
// SIZE 0xa0 // SIZE 0xa0
class Lego3DWavePresenter : public LegoWavePresenter { class Lego3DWavePresenter : public MxWavePresenter {
public: public:
// FUNCTION: LEGO1 0x1000d890 // FUNCTION: LEGO1 0x1000d890
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f058c // STRING: LEGO1 0x100f058c
return "Lego3DWavePresenter"; return "Lego3DWavePresenter";
} }

11
LEGO1/legoact2.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef LEGOACT2_H
#define LEGOACT2_H
#include "legocarraceactor.h"
#include "legopathactor.h"
// VTABLE: LEGO1 0x100d82e0
// SIZE 0x1154
class LegoAct2 : public LegoWorld {};
#endif // LEGOACT2_H

View File

@ -10,7 +10,7 @@ class LegoAct2State : public LegoState {
// FUNCTION: LEGO1 0x1000df80 // FUNCTION: LEGO1 0x1000df80
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0428 // STRING: LEGO1 0x100f0428
return "LegoAct2State"; return "LegoAct2State";
} }

View File

@ -15,7 +15,7 @@ class LegoActionControlPresenter : public MxMediaPresenter {
// FUNCTION: LEGO1 0x1000d0e0 // FUNCTION: LEGO1 0x1000d0e0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f05bc // STRING: LEGO1 0x100f05bc
return "LegoActionControlPresenter"; return "LegoActionControlPresenter";
} }

View File

@ -13,7 +13,7 @@ class LegoActor : public LegoEntity {
// FUNCTION: LEGO1 0x1002d210 // FUNCTION: LEGO1 0x1002d210
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0124 // STRING: LEGO1 0x100f0124
return "LegoActor"; return "LegoActor";
} }

View File

@ -10,7 +10,7 @@ class LegoActorPresenter : public LegoEntityPresenter {
// FUNCTION: LEGO1 0x1000cb10 // FUNCTION: LEGO1 0x1000cb10
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f06a4 // STRING: LEGO1 0x100f06a4
return "LegoActorPresenter"; return "LegoActorPresenter";
} }

View File

@ -16,7 +16,7 @@ class LegoAnimationManager : public MxCore {
// FUNCTION: LEGO1 0x1005ec80 // FUNCTION: LEGO1 0x1005ec80
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f7508 // STRING: LEGO1 0x100f7508
return "LegoAnimationManager"; return "LegoAnimationManager";
} }

View File

@ -12,7 +12,7 @@ class LegoAnimMMPresenter : public MxCompositePresenter {
// FUNCTION: LEGO1 0x1004a950 // FUNCTION: LEGO1 0x1004a950
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f046c // STRING: LEGO1 0x100f046c
return "LegoAnimMMPresenter"; return "LegoAnimMMPresenter";
} }

View File

@ -11,7 +11,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
// FUNCTION: LEGO1 0x10068530 // FUNCTION: LEGO1 0x10068530
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f071c // STRING: LEGO1 0x100f071c
return "LegoAnimPresenter"; return "LegoAnimPresenter";
} }

View File

@ -13,7 +13,7 @@ class LegoBuildingManager : public MxCore {
// FUNCTION: LEGO1 0x1002f930 // FUNCTION: LEGO1 0x1002f930
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f37d0 // STRING: LEGO1 0x100f37d0
return "LegoBuildingManager"; return "LegoBuildingManager";
} }

View File

@ -13,7 +13,7 @@ class LegoCacheSound : public MxCore {
// FUNCTION: LEGO1 0x10006580 // FUNCTION: LEGO1 0x10006580
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f01c4 // STRING: LEGO1 0x100f01c4
return "LegoCacheSound"; return "LegoCacheSound";
} }

View File

@ -15,7 +15,7 @@ class LegoCameraController : public MxCore {
// FUNCTION: LEGO1 0x10011ec0 // FUNCTION: LEGO1 0x10011ec0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0850 // STRING: LEGO1 0x100f0850
return "LegoCameraController"; return "LegoCameraController";
} }

View File

@ -16,7 +16,7 @@ class LegoCarBuild : public LegoWorld {
// FUNCTION: LEGO1 0x10022940 // FUNCTION: LEGO1 0x10022940
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0504 // STRING: LEGO1 0x100f0504
return "LegoCarBuild"; return "LegoCarBuild";
} }

View File

@ -13,7 +13,7 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
// FUNCTION: LEGO1 0x10078510 // FUNCTION: LEGO1 0x10078510
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f05ec // STRING: LEGO1 0x100f05ec
return "LegoCarBuildAnimPresenter"; return "LegoCarBuildAnimPresenter";
} }

View File

@ -9,7 +9,7 @@ class LegoCarRaceActor : public LegoRaceActor {
// FUNCTION: LEGO1 0x10081650 // FUNCTION: LEGO1 0x10081650
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f0568 // STRING: LEGO1 0x100f0568
return "LegoCarRaceActor"; return "LegoCarRaceActor";
} }

View File

@ -14,7 +14,7 @@ class LegoControlManager : public MxCore {
// FUNCTION: LEGO1 0x10028cb0 // FUNCTION: LEGO1 0x10028cb0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {
// GLOBAL: LEGO1 0x100f31b8 // STRING: LEGO1 0x100f31b8
return "LegoControlManager"; return "LegoControlManager";
} }

View File

@ -76,6 +76,12 @@ void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
// TODO // TODO
} }
// STUB: LEGO1 0x100109b0
void LegoEntity::SetLocation(Vector3Data& p_location, Vector3Data& p_direction, Vector3Data& p_up, MxBool)
{
// TODO
}
// STUB: LEGO1 0x10010c30 // STUB: LEGO1 0x10010c30
void LegoEntity::FUN_10010c30() void LegoEntity::FUN_10010c30()
{ {

View File

@ -22,7 +22,7 @@ class LegoEntity : public MxEntity {
// FUNCTION: LEGO1 0x1000c2f0 // FUNCTION: LEGO1 0x1000c2f0
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f0064 // STRING: LEGO1 0x100f0064
return "LegoEntity"; return "LegoEntity";
} }
@ -49,6 +49,7 @@ class LegoEntity : public MxEntity {
virtual void VTable0x4c(); // vtable+0x4c virtual void VTable0x4c(); // vtable+0x4c
void FUN_10010c30(); void FUN_10010c30();
void SetLocation(Vector3Data& p_location, Vector3Data& p_direction, Vector3Data& p_up, MxBool);
protected: protected:
void Init(); void Init();

View File

@ -1,5 +1,6 @@
#include "legoentitypresenter.h" #include "legoentitypresenter.h"
#include "islepathactor.h"
#include "legoomni.h" #include "legoomni.h"
#include "legovideomanager.h" #include "legovideomanager.h"
@ -14,7 +15,7 @@ LegoEntityPresenter::LegoEntityPresenter()
// FUNCTION: LEGO1 0x100535c0 // FUNCTION: LEGO1 0x100535c0
void LegoEntityPresenter::Init() void LegoEntityPresenter::Init()
{ {
m_unk0x4c = 0; m_objectBackend = 0;
} }
// FUNCTION: LEGO1 0x100535d0 // FUNCTION: LEGO1 0x100535d0
@ -24,9 +25,9 @@ LegoEntityPresenter::~LegoEntityPresenter()
} }
// FUNCTION: LEGO1 0x10053630 // FUNCTION: LEGO1 0x10053630
undefined4 LegoEntityPresenter::VTable0x6c(undefined4 p_unk0x4c) undefined4 LegoEntityPresenter::SetBackend(LegoEntity* p_backend)
{ {
m_unk0x4c = p_unk0x4c; m_objectBackend = p_backend;
return 0; return 0;
} }
@ -45,3 +46,60 @@ void LegoEntityPresenter::Destroy()
{ {
Destroy(FALSE); Destroy(FALSE);
} }
// FUNCTION: LEGO1 0x10053680
MxResult LegoEntityPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action)
{
MxResult result = MxCompositePresenter::StartAction(p_controller, p_action);
if (VideoManager()) {
VideoManager()->AddPresenter(*this);
}
return result;
}
// FUNCTION: LEGO1 0x100536c0
void LegoEntityPresenter::ReadyTickle()
{
if (GetCurrentWorld()) {
m_objectBackend = (LegoEntity*) MxPresenter::CreateEntityBackend("LegoEntity");
if (m_objectBackend) {
m_objectBackend->Create(*m_action);
m_objectBackend->SetLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp(), TRUE);
ParseExtra();
}
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
m_currentTickleState = TickleState_Starting;
}
}
// FUNCTION: LEGO1 0x10053720
void LegoEntityPresenter::RepeatingTickle()
{
if (m_list.empty()) {
EndAction();
}
}
// FUNCTION: LEGO1 0x10053730
void LegoEntityPresenter::SetBackendLocation(Vector3Data& p_location, Vector3Data& p_direction, Vector3Data& p_up)
{
if (m_objectBackend) {
m_objectBackend->SetLocation(p_location, p_direction, p_up, TRUE);
}
}
// FUNCTION: LEGO1 0x10053750
void LegoEntityPresenter::ParseExtra()
{
char data[512];
MxU16 len = m_action->GetExtraLength();
if (len) {
memcpy(data, m_action->GetExtraData(), len);
data[len] = 0;
len &= MAXWORD;
m_objectBackend->ParseAction(data);
}
}

View File

@ -3,6 +3,8 @@
#include "mxcompositepresenter.h" #include "mxcompositepresenter.h"
class LegoEntity;
// VTABLE: LEGO1 0x100d8398 // VTABLE: LEGO1 0x100d8398
// SIZE 0x50 // SIZE 0x50
class LegoEntityPresenter : public MxCompositePresenter { class LegoEntityPresenter : public MxCompositePresenter {
@ -13,7 +15,7 @@ class LegoEntityPresenter : public MxCompositePresenter {
// FUNCTION: LEGO1 0x100534b0 // FUNCTION: LEGO1 0x100534b0
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f06b8 // STRING: LEGO1 0x100f06b8
return "LegoEntityPresenter"; return "LegoEntityPresenter";
} }
@ -23,14 +25,21 @@ class LegoEntityPresenter : public MxCompositePresenter {
return !strcmp(p_name, LegoEntityPresenter::ClassName()) || MxCompositePresenter::IsA(p_name); return !strcmp(p_name, LegoEntityPresenter::ClassName()) || MxCompositePresenter::IsA(p_name);
} }
virtual void ReadyTickle() override; // vtable+0x18
virtual void RepeatingTickle(); // vtable+0x24
virtual void ParseExtra(); // vtable+0x30
virtual void Destroy() override; // vtable+0x38 virtual void Destroy() override; // vtable+0x38
virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
virtual void Init(); // vtable+0x68 virtual void Init(); // vtable+0x68
virtual undefined4 VTable0x6c(undefined4 p_unk0x4c); // vtable+0x6c virtual undefined4 SetBackend(LegoEntity* p_unk0x4c); // vtable+0x6c
void SetBackendLocation(Vector3Data& p_location, Vector3Data& p_direction, Vector3Data& p_up);
private: private:
void Destroy(MxBool p_fromDestructor); void Destroy(MxBool p_fromDestructor);
undefined4 m_unk0x4c; protected:
LegoEntity* m_objectBackend; // 0x4c
}; };
#endif // LEGOENTITYPRESENTER_H #endif // LEGOENTITYPRESENTER_H

View File

@ -9,7 +9,7 @@ class LegoExtraActor : public LegoAnimActor {
// FUNCTION: LEGO1 0x1002b7a0 // FUNCTION: LEGO1 0x1002b7a0
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f3204 // STRING: LEGO1 0x100f3204
return "LegoExtraActor"; return "LegoExtraActor";
} }

View File

@ -1,7 +1,16 @@
#include "legoflctexturepresenter.h" #include "legoflctexturepresenter.h"
// STUB: LEGO1 0x1005de80 DECOMP_SIZE_ASSERT(LegoFlcTexturePresenter, 0x70)
// FUNCTION: LEGO1 0x1005de80
LegoFlcTexturePresenter::LegoFlcTexturePresenter() LegoFlcTexturePresenter::LegoFlcTexturePresenter()
{ {
// TODO Init();
}
// FUNCTION: LEGO1 0x1005df70
void LegoFlcTexturePresenter::Init()
{
this->m_unk0x68 = 0;
this->m_unk0x6c = 0;
} }

View File

@ -1,6 +1,7 @@
#ifndef LEGOFLCTEXTUREPRESENTER_H #ifndef LEGOFLCTEXTUREPRESENTER_H
#define LEGOFLCTEXTUREPRESENTER_H #define LEGOFLCTEXTUREPRESENTER_H
#include "decomp.h"
#include "mxflcpresenter.h" #include "mxflcpresenter.h"
// VTABLE: LEGO1 0x100d89e0 // VTABLE: LEGO1 0x100d89e0
@ -12,9 +13,15 @@ class LegoFlcTexturePresenter : public MxFlcPresenter {
// FUNCTION: LEGO1 0x1005def0 // FUNCTION: LEGO1 0x1005def0
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f0634 // STRING: LEGO1 0x100f0634
return "LegoFlcTexturePresenter"; return "LegoFlcTexturePresenter";
} }
private:
void Init();
undefined4 m_unk0x68; // 0x68
undefined4 m_unk0x6c; // 0x6c
}; };
#endif // LEGOFLCTEXTUREPRESENTER_H #endif // LEGOFLCTEXTUREPRESENTER_H

View File

@ -12,7 +12,7 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
// FUNCTION: LEGO1 0x1006d880 // FUNCTION: LEGO1 0x1006d880
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f06cc // STRING: LEGO1 0x100f06cc
return "LegoHideAnimPresenter"; return "LegoHideAnimPresenter";
} }

View File

@ -9,7 +9,7 @@ class LegoJetski : public LegoJetskiRaceActor {
// FUNCTION: LEGO1 0x10013e80 // FUNCTION: LEGO1 0x10013e80
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f053c // STRING: LEGO1 0x100f053c
return "LegoJetski"; return "LegoJetski";
} }

View File

@ -9,7 +9,7 @@ class LegoJetskiRaceActor : public LegoCarRaceActor {
// FUNCTION: LEGO1 0x10081d80 // FUNCTION: LEGO1 0x10081d80
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f0554 // STRING: LEGO1 0x100f0554
return "LegoJetskiRaceActor"; return "LegoJetskiRaceActor";
} }

View File

@ -1,19 +1,30 @@
#include "legoloadcachesoundpresenter.h" #include "legoloadcachesoundpresenter.h"
DECOMP_SIZE_ASSERT(LegoLoadCacheSoundPresenter, 0x90)
// FUNCTION: LEGO1 0x10018340 // FUNCTION: LEGO1 0x10018340
LegoLoadCacheSoundPresenter::LegoLoadCacheSoundPresenter() LegoLoadCacheSoundPresenter::LegoLoadCacheSoundPresenter()
{ {
Init(); Init();
} }
// STUB: LEGO1 0x10018480 // FUNCTION: LEGO1 0x10018480
LegoLoadCacheSoundPresenter::~LegoLoadCacheSoundPresenter() LegoLoadCacheSoundPresenter::~LegoLoadCacheSoundPresenter()
{ {
// TODO Destroy(TRUE);
} }
// STUB: LEGO1 0x100184e0 // FUNCTION: LEGO1 0x100184e0
void LegoLoadCacheSoundPresenter::Init() void LegoLoadCacheSoundPresenter::Init()
{ {
// TODO this->m_unk0x70 = NULL;
this->m_unk0x78 = 0;
this->m_unk0x7c = 0;
}
// FUNCTION: LEGO1 0x100184f0
void LegoLoadCacheSoundPresenter::Destroy(MxBool p_fromDestructor)
{
delete this->m_unk0x70;
MxWavePresenter::Destroy(p_fromDestructor);
} }

View File

@ -1,6 +1,7 @@
#ifndef LEGOLOADCACHESOUNDPRESENTER_H #ifndef LEGOLOADCACHESOUNDPRESENTER_H
#define LEGOLOADCACHESOUNDPRESENTER_H #define LEGOLOADCACHESOUNDPRESENTER_H
#include "decomp.h"
#include "mxwavepresenter.h" #include "mxwavepresenter.h"
// VTABLE: LEGO1 0x100d5fa8 // VTABLE: LEGO1 0x100d5fa8
@ -13,12 +14,23 @@ class LegoLoadCacheSoundPresenter : public MxWavePresenter {
// FUNCTION: LEGO1 0x10018450 // FUNCTION: LEGO1 0x10018450
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f05a0 // STRING: LEGO1 0x100f05a0
return "LegoLoadCacheSoundPresenter"; return "LegoLoadCacheSoundPresenter";
} }
private: private:
void Init(); void Init();
void Destroy(MxBool p_fromDestructor);
undefined4* m_unk0x6c; // 0x6c
undefined4* m_unk0x70; // 0x70
undefined4 m_unk0x74; // 0x74
undefined4 m_unk0x78; // 0x78
undefined m_unk0x7c; // 0x7c
undefined4 m_unk0x80[4]; // 0x80
}; };
// SYNTHETIC: LEGO1 0x10018460
// LegoLoadCacheSoundPresenter::`scalar deleting destructor'
#endif // LEGOLOADCACHESOUNDPRESENTER_H #endif // LEGOLOADCACHESOUNDPRESENTER_H

View File

@ -11,7 +11,7 @@ class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
// FUNCTION: LEGO1 0x1006ce50 // FUNCTION: LEGO1 0x1006ce50
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f06e4 // STRING: LEGO1 0x100f06e4
return "LegoLocomotionAnimPresenter"; return "LegoLocomotionAnimPresenter";
} }

View File

@ -10,7 +10,7 @@ class LegoLoopingAnimPresenter : public LegoAnimPresenter {
// FUNCTION: LEGO1 0x1000c9a0 // FUNCTION: LEGO1 0x1000c9a0
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f0700 // STRING: LEGO1 0x100f0700
return "LegoLoopingAnimPresenter"; return "LegoLoopingAnimPresenter";
} }

View File

@ -12,14 +12,14 @@ class LegoModelPresenter : public MxVideoPresenter {
// FUNCTION: LEGO1 0x1000ccb0 // FUNCTION: LEGO1 0x1000ccb0
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f067c // STRING: LEGO1 0x100f067c
return "LegoModelPresenter"; return "LegoModelPresenter";
} }
// FUNCTION: LEGO1 0x1000ccc0 // FUNCTION: LEGO1 0x1000ccc0
inline MxBool IsA(const char* p_name) const override // vtable+0x10 inline MxBool IsA(const char* p_name) const override // vtable+0x10
{ {
return !strcmp(p_name, LegoModelPresenter::ClassName()) || MxVideoPresenter::IsA(p_name); return !strcmp(p_name, ClassName()) || MxVideoPresenter::IsA(p_name);
} }
}; };

View File

@ -42,7 +42,7 @@ class LegoNavController : public MxCore {
// FUNCTION: LEGO1 0x10054b80 // FUNCTION: LEGO1 0x10054b80
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f66d8 // STRING: LEGO1 0x100f66d8
return "LegoNavController"; return "LegoNavController";
} }

View File

@ -1,7 +1,104 @@
#include "legoobjectfactory.h" #include "legoobjectfactory.h"
#include "carrace.h"
#include "decomp.h" #include "decomp.h"
#include "dunebuggy.h"
#include "elevatorbottom.h"
#include "gasstation.h"
#include "gasstationstate.h"
#include "helicopter.h"
#include "helicopterstate.h"
#include "historybook.h"
#include "hospital.h"
#include "hospitalstate.h"
#include "infocenter.h"
#include "infocenterdoor.h"
#include "infocenterstate.h" #include "infocenterstate.h"
#include "isle.h"
#include "jetskirace.h"
#include "lego3dwavepresenter.h"
#include "legoact2.h"
#include "legoact2state.h"
#include "legoactioncontrolpresenter.h"
#include "legoactor.h"
#include "legoactorpresenter.h"
#include "legoanimactor.h"
#include "legoanimpresenter.h"
#include "legocarbuild.h"
#include "legocarbuildanimpresenter.h"
#include "legocarraceactor.h"
#include "legoentity.h"
#include "legoentitypresenter.h"
#include "legoflctexturepresenter.h"
#include "legohideanimpresenter.h"
#include "legojetski.h"
#include "legojetskiraceactor.h"
#include "legoloadcachesoundpresenter.h"
#include "legolocomotionanimpresenter.h"
#include "legoloopinganimpresenter.h"
#include "legomodelpresenter.h"
#include "legopalettepresenter.h"
#include "legopartpresenter.h"
#include "legopathactor.h"
#include "legopathpresenter.h"
#include "legophonemepresenter.h"
#include "legoracecar.h"
#include "legotexturepresenter.h"
#include "legoworld.h"
#include "legoworldpresenter.h"
#include "mxcontrolpresenter.h"
#include "mxvideopresenter.h"
#include "pizza.h"
#include "pizzamissionstate.h"
#include "police.h"
#include "policestate.h"
#include "registrationbook.h"
#include "score.h"
#include "scorestate.h"
#include "skateboard.h"
// #include "act2actor.h"
#include "act2brick.h"
// #include "act2genactor.h"
#include "act2policestation.h"
#include "act3.h"
#include "act3state.h"
#include "ambulance.h"
#include "ambulancemissionstate.h"
#include "bike.h"
#include "doors.h"
#include "jetski.h"
#include "legoanimmmpresenter.h"
#include "motorcycle.h"
#include "racecar.h"
#include "towtrack.h"
#include "towtrackmissionstate.h"
// #include "act3cop.h"
// #include "act3brickster.h"
#include "act1state.h"
#include "act3actor.h"
#include "act3shark.h"
#include "beachhouseentity.h"
#include "bumpbouy.h"
#include "carracestate.h"
#include "gasstationentity.h"
#include "hospitalentity.h"
#include "infocenterentity.h"
#include "jetskiracestate.h"
#include "jukeboxentity.h"
#include "pizzeria.h"
#include "pizzeriastate.h"
#include "policeentity.h"
#include "racestandsentity.h"
#include "radiostate.h"
// #include "caveentity.h"
// #include "jailentity.h"
#include "jukebox.h"
#include "jukeboxstate.h"
#include "mxcompositemediapresenter.h"
// #include "raceskel.h"
#include "animstate.h"
// TODO: Before HospitalState, add all of the different LegoVehicleBuildState's
// TODO: Uncomment once we have all the relevant types ready // TODO: Uncomment once we have all the relevant types ready
// DECOMP_SIZE_ASSERT(LegoObjectFactory, 0x1c8); // DECOMP_SIZE_ASSERT(LegoObjectFactory, 0x1c8);

View File

@ -3,7 +3,103 @@
#include "mxobjectfactory.h" #include "mxobjectfactory.h"
#define FOR_LEGOOBJECTFACTORY_OBJECTS(X) X(InfocenterState) #define FOR_LEGOOBJECTFACTORY_OBJECTS(X) \
X(LegoModelPresenter) \
X(LegoTexturePresenter) \
X(LegoPhonemePresenter) \
X(LegoFlcTexturePresenter) \
X(LegoEntityPresenter) \
X(LegoActorPresenter) \
X(LegoWorldPresenter) \
X(LegoWorld) \
X(LegoPalettePresenter) \
X(LegoPathPresenter) \
X(LegoAnimPresenter) \
X(LegoLoopingAnimPresenter) \
X(LegoLocomotionAnimPresenter) \
X(LegoHideAnimPresenter) \
X(LegoPartPresenter) \
X(LegoCarBuildAnimPresenter) \
X(LegoActionControlPresenter) \
X(MxVideoPresenter) \
X(LegoLoadCacheSoundPresenter) \
X(Lego3DWavePresenter) \
X(LegoActor) \
X(LegoPathActor) \
X(LegoRaceCar) \
X(LegoJetski) \
/*X(JetskiRace) \*/ \
X(LegoEntity) \
X(LegoCarRaceActor) \
X(LegoJetskiRaceActor) \
X(LegoCarBuild) \
X(Infocenter) \
X(LegoAnimActor) \
X(MxControlPresenter) \
X(RegistrationBook) \
X(HistoryBook) \
X(ElevatorBottom) \
X(InfocenterDoor) \
X(Score) \
X(ScoreState) \
X(Hospital) \
X(Isle) \
X(Police) \
X(GasStation) \
X(LegoAct2) \
X(LegoAct2State) \
/*X(CarRace)*/ \
X(HospitalState) \
X(InfocenterState) \
X(PoliceState) \
X(GasStationState) \
X(SkateBoard) \
X(Helicopter) \
X(HelicopterState) \
X(DuneBuggy) \
X(Pizza) \
X(PizzaMissionState) \
/*X(Act2Actor)*/ \
/*X(Act2Brick)*/ \
/*X(Act2GenActor)*/ \
X(Act2PoliceStation) \
X(Act3) \
X(Act3State) \
X(Doors) \
X(LegoAnimMMPresenter) \
X(RaceCar) \
X(Jetski) \
X(Bike) \
X(Motorcycle) \
X(Ambulance) \
X(AmbulanceMissionState) \
X(TowTrack) \
X(TowTrackMissionState) \
/*X(Act3Cop)*/ \
/*X(Act3Brickster)*/ \
X(Act3Shark) \
X(BumpBouy) \
X(Act3Actor) \
X(JetskiRaceState) \
X(CarRaceState) \
X(Act1State) \
X(Pizzeria) \
X(PizzeriaState) \
X(InfoCenterEntity) \
X(HospitalEntity) \
X(GasStationEntity) \
X(PoliceEntity) \
X(BeachHouseEntity) \
X(RaceStandsEntity) \
X(JukeBoxEntity) \
X(RadioState) \
/*X(CaveEntity)*/ \
/*X(JailEntity)*/ \
X(MxCompositeMediaPresenter) \
X(JukeBox) \
X(JukeBoxState) \
/*X(RaceSkel)*/ \
X(AnimState)
// VTABLE: LEGO1 0x100d4768 // VTABLE: LEGO1 0x100d4768
class LegoObjectFactory : public MxObjectFactory { class LegoObjectFactory : public MxObjectFactory {

View File

@ -390,7 +390,7 @@ void LegoOmni::Init()
m_gifManager = NULL; m_gifManager = NULL;
m_worldList = NULL; m_worldList = NULL;
m_currentWorld = NULL; m_currentWorld = NULL;
m_unk0x80 = FALSE; m_exit = FALSE;
m_currentVehicle = NULL; m_currentVehicle = NULL;
m_saveDataWriter = NULL; m_saveDataWriter = NULL;
m_plantManager = NULL; m_plantManager = NULL;
@ -568,6 +568,12 @@ LegoOmni* LegoOmni::GetInstance()
return (LegoOmni*) MxOmni::GetInstance(); return (LegoOmni*) MxOmni::GetInstance();
} }
// FUNCTION: LEGO1 0x1005ad20
void LegoOmni::AddWorld(LegoWorld* p_world)
{
m_worldList->Append(p_world);
}
// STUB: LEGO1 0x1005af10 // STUB: LEGO1 0x1005af10
void LegoOmni::RemoveWorld(const MxAtomId&, MxLong) void LegoOmni::RemoveWorld(const MxAtomId&, MxLong)
{ {
@ -689,6 +695,52 @@ MxResult Start(MxDSAction* p_dsAction)
return MxOmni::GetInstance()->Start(p_dsAction); return MxOmni::GetInstance()->Start(p_dsAction);
} }
// Probably should be somewhere else
// FUNCTION: LEGO1 0x100b6e10
MxBool FUN_100b6e10(
MxS32 p_bitmapWidth,
MxS32 p_bitmapHeight,
MxS32 p_videoParamWidth,
MxS32 p_videoParamHeight,
MxS32* p_left,
MxS32* p_top,
MxS32* p_right,
MxS32* p_bottom,
MxS32* p_width,
MxS32* p_height
)
{
MxPoint32 topLeft(*p_left, *p_top);
MxRect32 bitmapRect(MxPoint32(0, 0), MxSize32(p_bitmapWidth, p_bitmapHeight));
MxPoint32 bottomRight(*p_right, *p_bottom);
MxRect32 videoParamRect(MxPoint32(0, 0), MxSize32(p_videoParamWidth, p_videoParamHeight));
MxRect32 rect(0, 0, *p_width, *p_height);
rect.AddPoint(topLeft);
if (!rect.IntersectsWith(bitmapRect))
return FALSE;
rect.Intersect(bitmapRect);
rect.SubtractPoint(topLeft);
rect.AddPoint(bottomRight);
if (!rect.IntersectsWith(videoParamRect))
return FALSE;
rect.Intersect(videoParamRect);
rect.SubtractPoint(bottomRight);
*p_left += rect.GetLeft();
*p_top += rect.GetTop();
*p_right += rect.GetLeft();
*p_bottom += rect.GetTop();
*p_width = rect.GetWidth();
*p_height = rect.GetHeight();
return TRUE;
}
// FUNCTION: LEGO1 0x100b6ff0 // FUNCTION: LEGO1 0x100b6ff0
void MakeSourceName(char* p_output, const char* p_input) void MakeSourceName(char* p_output, const char* p_input)
{ {

View File

@ -59,7 +59,7 @@ extern MxAtomId* g_creditsScript;
extern MxAtomId* g_nocdSourceName; extern MxAtomId* g_nocdSourceName;
// VTABLE: LEGO1 0x100d8638 // VTABLE: LEGO1 0x100d8638
// SIZE: 0x140 // SIZE 0x140
class LegoOmni : public MxOmni { class LegoOmni : public MxOmni {
public: public:
__declspec(dllexport) void CreateBackgroundAudio(); __declspec(dllexport) void CreateBackgroundAudio();
@ -76,7 +76,7 @@ class LegoOmni : public MxOmni {
// FUNCTION: LEGO1 0x10058aa0 // FUNCTION: LEGO1 0x10058aa0
inline virtual const char* ClassName() const override // vtable+0c inline virtual const char* ClassName() const override // vtable+0c
{ {
// GLOBAL: LEGO1 0x100f671c // STRING: LEGO1 0x100f671c
return "LegoOmni"; return "LegoOmni";
} }
@ -98,6 +98,7 @@ class LegoOmni : public MxOmni {
virtual void StopTimer() override; // vtable+3c virtual void StopTimer() override; // vtable+3c
LegoEntity* FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid); LegoEntity* FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid);
void AddWorld(LegoWorld* p_world);
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; } LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; } LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
@ -115,6 +116,8 @@ class LegoOmni : public MxOmni {
MxTransitionManager* GetTransitionManager() { return m_transitionManager; } MxTransitionManager* GetTransitionManager() { return m_transitionManager; }
MxDSAction& GetCurrentAction() { return m_action; } MxDSAction& GetCurrentAction() { return m_action; }
inline void SetExit(MxBool p_exit) { m_exit = p_exit; };
private: private:
undefined4* m_unk0x68; // 0x68 undefined4* m_unk0x68; // 0x68
MxUnknown100dbdbc* m_renderMgr; // 0x6c MxUnknown100dbdbc* m_renderMgr; // 0x6c
@ -122,7 +125,7 @@ class LegoOmni : public MxOmni {
GifManager* m_gifManager; // 0x74 GifManager* m_gifManager; // 0x74
LegoWorldList* m_worldList; // 0x78 LegoWorldList* m_worldList; // 0x78
LegoWorld* m_currentWorld; // 0x7c LegoWorld* m_currentWorld; // 0x7c
MxBool m_unk0x80; // 0x80 MxBool m_exit; // 0x80
LegoNavController* m_navController; // 0x84 LegoNavController* m_navController; // 0x84
IslePathActor* m_currentVehicle; // 0x88 IslePathActor* m_currentVehicle; // 0x88
LegoUnkSaveDataWriter* m_saveDataWriter; // 0x8c LegoUnkSaveDataWriter* m_saveDataWriter; // 0x8c
@ -163,6 +166,19 @@ void FUN_10015820(MxU32, MxU32);
LegoEntity* FindEntityByAtomIdOrEntityId(const MxAtomId& p_atom, MxS32 p_entityid); LegoEntity* FindEntityByAtomIdOrEntityId(const MxAtomId& p_atom, MxS32 p_entityid);
MxDSAction& GetCurrentAction(); MxDSAction& GetCurrentAction();
MxBool FUN_100b6e10(
MxS32 p_bitmapWidth,
MxS32 p_bitmapHeight,
MxS32 p_videoParamWidth,
MxS32 p_videoParamHeight,
MxS32* p_left,
MxS32* p_top,
MxS32* p_right,
MxS32* p_bottom,
MxS32* p_width,
MxS32* p_height
);
void PlayMusic(MxU32 p_index); void PlayMusic(MxU32 p_index);
void SetIsWorldActive(MxBool p_isWorldActive); void SetIsWorldActive(MxBool p_isWorldActive);
void RegisterScripts(); void RegisterScripts();

View File

@ -1,5 +1,10 @@
#include "legopalettepresenter.h" #include "legopalettepresenter.h"
#include "legoomni.h"
#include "legostream.h"
#include "legovideomanager.h"
#include "mxstreamchunk.h"
DECOMP_SIZE_ASSERT(LegoPalettePresenter, 0x68) DECOMP_SIZE_ASSERT(LegoPalettePresenter, 0x68)
// FUNCTION: LEGO1 0x10079e50 // FUNCTION: LEGO1 0x10079e50
@ -39,3 +44,48 @@ void LegoPalettePresenter::Destroy()
{ {
Destroy(FALSE); Destroy(FALSE);
} }
// FUNCTION: LEGO1 0x1007a130
MxResult LegoPalettePresenter::ParsePallete(MxStreamChunk* p_chunk)
{
MxU8 buffer[40];
RGBQUAD palleteData[256];
MxResult result = FAILURE;
LegoMemoryStream stream((char*) p_chunk->GetData());
if (stream.Read(buffer, 40) == SUCCESS) {
if (stream.Read(palleteData, sizeof(RGBQUAD) * 256) == SUCCESS) {
m_palette = new MxPalette(palleteData);
if (m_palette) {
result = SUCCESS;
}
}
}
if (result != SUCCESS && m_palette) {
delete m_palette;
m_palette = NULL;
}
return result;
}
// FUNCTION: LEGO1 0x1007a230
void LegoPalettePresenter::ReadyTickle()
{
MxStreamChunk* chunk = m_subscriber->FUN_100b8360();
if (chunk) {
if (chunk->GetTime() <= m_action->GetElapsedTime()) {
ParseExtra();
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
m_currentTickleState = TickleState_Starting;
chunk = m_subscriber->FUN_100b8250();
MxResult result = ParsePallete(chunk);
m_subscriber->FUN_100b8390(chunk);
if (result == SUCCESS) {
VideoManager()->RealizePalette(m_palette);
}
EndAction();
}
}
}

View File

@ -15,7 +15,7 @@ class LegoPalettePresenter : public MxVideoPresenter {
// FUNCTION: LEGO1 0x10079f30 // FUNCTION: LEGO1 0x10079f30
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f061c // STRING: LEGO1 0x100f061c
return "LegoPalettePresenter"; return "LegoPalettePresenter";
} }
@ -25,13 +25,16 @@ class LegoPalettePresenter : public MxVideoPresenter {
return !strcmp(p_name, ClassName()) || MxVideoPresenter::IsA(p_name); return !strcmp(p_name, ClassName()) || MxVideoPresenter::IsA(p_name);
} }
virtual void ReadyTickle() override; // vtable+0x18
virtual void Destroy() override; // vtable+0x38 virtual void Destroy() override; // vtable+0x38
MxResult ParsePallete(MxStreamChunk* p_chunk);
private: private:
void Init(); void Init();
void Destroy(MxBool p_fromDestructor); void Destroy(MxBool p_fromDestructor);
MxPalette* m_palette; MxPalette* m_palette; // 0x64
}; };
#endif // LEGOPALETTEPRESENTER_H #endif // LEGOPALETTEPRESENTER_H

View File

@ -10,7 +10,7 @@ class LegoPartPresenter : public MxMediaPresenter {
// FUNCTION: LEGO1 0x1000cf70 // FUNCTION: LEGO1 0x1000cf70
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f05d8 // STRING: LEGO1 0x100f05d8
return "LegoPartPresenter"; return "LegoPartPresenter";
} }

View File

@ -15,7 +15,7 @@ class LegoPathActor : public LegoActor {
// FUNCTION: LEGO1 0x1000c430 // FUNCTION: LEGO1 0x1000c430
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f0114 // STRING: LEGO1 0x100f0114
return "LegoPathActor"; return "LegoPathActor";
} }

View File

@ -15,7 +15,7 @@ class LegoPathController : public MxCore {
// FUNCTION: LEGO1 0x10045110 // FUNCTION: LEGO1 0x10045110
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f11b8 // STRING: LEGO1 0x100f11b8
return "LegoPathController"; return "LegoPathController";
} }

View File

@ -12,7 +12,7 @@ class LegoPathPresenter : public MxMediaPresenter {
// FUNCTION: LEGO1 0x100449a0 // FUNCTION: LEGO1 0x100449a0
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f0690 // STRING: LEGO1 0x100f0690
return "LegoPathPresenter"; return "LegoPathPresenter";
} }

View File

@ -16,7 +16,7 @@ class LegoPhonemePresenter : public MxFlcPresenter {
// FUNCTION: LEGO1 0x1004e310 // FUNCTION: LEGO1 0x1004e310
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f064c // STRING: LEGO1 0x100f064c
return "LegoPhonemePresenter"; return "LegoPhonemePresenter";
} }

View File

@ -15,7 +15,7 @@ class LegoPlantManager : public MxCore {
// FUNCTION: LEGO1 0x10026290 // FUNCTION: LEGO1 0x10026290
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f318c // STRING: LEGO1 0x100f318c
return "LegoPlantManager"; return "LegoPlantManager";
} }

View File

@ -3,6 +3,7 @@
#include "decomp.h" #include "decomp.h"
#include "legoworld.h" #include "legoworld.h"
#include "mxrect32.h"
#include "mxtypes.h" #include "mxtypes.h"
// VTABLE: LEGO1 0x100d5db0 // VTABLE: LEGO1 0x100d5db0
@ -17,7 +18,7 @@ class LegoRace : public LegoWorld {
// FUNCTION: LEGO1 0x10015ba0 // FUNCTION: LEGO1 0x10015ba0
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f07c4 // STRING: LEGO1 0x100f07c4
return "LegoRace"; return "LegoRace";
} }
@ -48,12 +49,16 @@ class LegoRace : public LegoWorld {
undefined4 m_unk0x114; // 0x114 undefined4 m_unk0x114; // 0x114
undefined4 m_unk0x118; // 0x118 undefined4 m_unk0x118; // 0x118
undefined4 m_unk0x11c; // 0x11c undefined4 m_unk0x11c; // 0x11c
undefined4 m_unk0x120; // 0x120 - this may be the current vehcle (function at 0x10015880) undefined4 m_unk0x120; // 0x120
undefined4 m_unk0x124; // 0x124 - something game state undefined4 m_unk0x124; // 0x124
undefined4 m_unk0x128; // 0x128 undefined4 m_unk0x128; // 0x128
undefined4 m_unk0x12c; // 0x12c undefined4 m_unk0x12c; // 0x12c
undefined4 m_unk0x130[4]; // unconfirmed bytes, ghidra claims these are integers
undefined4 m_unk0x140; protected:
MxRect32 m_unk0x130; // 0x130
private:
undefined4 m_unk0x140; // 0x140
}; };
#endif // LEGORACE_H #endif // LEGORACE_H

View File

@ -9,7 +9,7 @@ class LegoRaceActor : public LegoAnimActor {
// FUNCTION: LEGO1 0x10014af0 // FUNCTION: LEGO1 0x10014af0
inline const char* ClassName() const override // vtable+0xc inline const char* ClassName() const override // vtable+0xc
{ {
// GLOBAL: LEGO1 0x100f0bf4 // STRING: LEGO1 0x100f0bf4
return "LegoRaceActor"; return "LegoRaceActor";
} }

25
LEGO1/legoracecar.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef LEGOCARRACE_H
#define LEGOCARRACE_H
#include "legocarraceactor.h"
#include "legopathactor.h"
// VTABLE: LEGO1 0x100d58b8
// SIZE 0x200
class LegoRaceCar : public LegoCarRaceActor {
public:
// FUNCTION: LEGO1 0x10014290
inline const char* ClassName() const override // vtable+0xc
{
// STRING: LEGO1 0x100f0548
return "LegoRaceCar";
}
// FUNCTION: LEGO1 0x100142b0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, LegoCarRaceActor::ClassName()) || LegoCarRaceActor::IsA(p_name);
}
};
#endif // LEGOCARRACE_H

View File

@ -29,7 +29,7 @@ void LegoSoundManager::Destroy(MxBool p_fromDestructor)
// STUB: LEGO1 0x100299f0 // STUB: LEGO1 0x100299f0
MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
{ {
return FAILURE; return MxSoundManager::Create(p_frequencyMS, p_createThread);
} }
// FUNCTION: LEGO1 0x1002a390 // FUNCTION: LEGO1 0x1002a390

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