mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 10:41:15 +00:00
Merge branch 'isledecomp:master' into impl/infocenter
This commit is contained in:
commit
34a588631c
@ -8,9 +8,9 @@ class IsleApp;
|
||||
|
||||
extern IsleApp* g_isle;
|
||||
extern int g_closed;
|
||||
// GLOBAL: ISLE 0x4101c4
|
||||
// STRING: ISLE 0x4101c4
|
||||
#define WNDCLASS_NAME "Lego Island MainNoM App"
|
||||
// GLOBAL: ISLE 0x4101dc
|
||||
// STRING: ISLE 0x4101dc
|
||||
#define WINDOW_TITLE "LEGO\xAE"
|
||||
extern unsigned char g_mousedown;
|
||||
extern unsigned char g_mousemoved;
|
||||
|
||||
@ -12,7 +12,7 @@ class Act1State : public LegoState {
|
||||
// FUNCTION: LEGO1 0x100338a0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0154
|
||||
// STRING: LEGO1 0x100f0154
|
||||
return "Act1State";
|
||||
};
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class Act2Brick : public LegoPathActor {
|
||||
// FUNCTION: LEGO1 0x1007a360
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0438
|
||||
// STRING: LEGO1 0x100f0438
|
||||
return "Act2Brick";
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class Act2PoliceStation : public LegoEntity {
|
||||
// FUNCTION: LEGO1 0x1000e200
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f03fc
|
||||
// STRING: LEGO1 0x100f03fc
|
||||
return "Act2PoliceStation";
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class Act3 : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x10072510
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f013c
|
||||
// STRING: LEGO1 0x100f013c
|
||||
return "Act3";
|
||||
}
|
||||
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
|
||||
// FIXME: Uncertain location. There are three vtables which eventually call this
|
||||
// class' ClassName() function, but none of them call it directly.
|
||||
class Act3Actor {
|
||||
class Act3Actor : public MxCore {
|
||||
public:
|
||||
// FUNCTION: LEGO1 0x100431b0
|
||||
inline virtual const char* ClassName() override
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f03ac
|
||||
// STRING: LEGO1 0x100f03ac
|
||||
return "Act3Actor";
|
||||
}
|
||||
};
|
||||
|
||||
@ -9,7 +9,7 @@ class Act3Shark : public LegoAnimActor {
|
||||
// FUNCTION: LEGO1 0x100430c0
|
||||
inline virtual const char* ClassName() const override
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f03a0
|
||||
// STRING: LEGO1 0x100f03a0
|
||||
return "Act3Shark";
|
||||
}
|
||||
};
|
||||
|
||||
@ -12,7 +12,7 @@ class Act3State : public LegoState {
|
||||
// FUNCTION: LEGO1 0x1000e300
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f03f0
|
||||
// STRING: LEGO1 0x100f03f0
|
||||
return "Act3State";
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class Ambulance : public IslePathActor {
|
||||
// FUNCTION: LEGO1 0x10035fa0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f03c4
|
||||
// STRING: LEGO1 0x100f03c4
|
||||
return "Ambulance";
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class AmbulanceMissionState : public LegoState {
|
||||
// FUNCTION: LEGO1 0x10037600
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f00e8
|
||||
// STRING: LEGO1 0x100f00e8
|
||||
return "AmbulanceMissionState";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class AnimState : public LegoState {
|
||||
// FUNCTION: LEGO1 0x10065070
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0460
|
||||
// STRING: LEGO1 0x100f0460
|
||||
return "AnimState";
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class BeachHouseEntity : public BuildingEntity {
|
||||
// FUNCTION: LEGO1 0x1000ee80
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0314
|
||||
// STRING: LEGO1 0x100f0314
|
||||
return "BeachHouseEntity";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class Bike : public IslePathActor {
|
||||
// FUNCTION: LEGO1 0x100766f0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f03d0
|
||||
// STRING: LEGO1 0x100f03d0
|
||||
return "Bike";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class BuildingEntity : public LegoEntity {
|
||||
// FUNCTION: LEGO1 0x10014f20
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f07e8
|
||||
// STRING: LEGO1 0x100f07e8
|
||||
return "BuildingEntity";
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class BumpBouy : public LegoAnimActor {
|
||||
// FUNCTION: LEGO1 0x100274e0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0394
|
||||
// STRING: LEGO1 0x100f0394
|
||||
return "BumpBouy";
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#include "carrace.h"
|
||||
|
||||
// STUB: LEGO1 0x10016a90
|
||||
DECOMP_SIZE_ASSERT(CarRace, 0x154);
|
||||
|
||||
// FUNCTION: LEGO1 0x10016a90
|
||||
CarRace::CarRace()
|
||||
{
|
||||
// TODO
|
||||
this->m_unk0x150 = 0;
|
||||
this->m_unk0x130 = MxRect32(0x16c, 0x154, 0x1ec, 0x15e);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef CARRACE_H
|
||||
#define CARRACE_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legorace.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d5e50
|
||||
@ -12,7 +13,7 @@ class CarRace : public LegoRace {
|
||||
// FUNCTION: LEGO1 0x10016b20
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0528
|
||||
// STRING: LEGO1 0x100f0528
|
||||
return "CarRace";
|
||||
}
|
||||
|
||||
@ -21,6 +22,10 @@ class CarRace : public LegoRace {
|
||||
{
|
||||
return !strcmp(p_name, CarRace::ClassName()) || LegoRace::IsA(p_name);
|
||||
}
|
||||
|
||||
private:
|
||||
undefined m_unk0x144[12]; // 0x144
|
||||
undefined4 m_unk0x150; // 0x150
|
||||
};
|
||||
|
||||
#endif // CARRACE_H
|
||||
|
||||
@ -10,7 +10,7 @@ class CarRaceState : public RaceState {
|
||||
// FUNCTION: LEGO1 0x1000dd30
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f009c
|
||||
// STRING: LEGO1 0x100f009c
|
||||
return "CarRaceState";
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,9 @@ const char* g_strWORLD = "WORLD";
|
||||
// GLOBAL: LEGO1 0x10101f20
|
||||
const char* g_strSOUND = "SOUND";
|
||||
|
||||
// GLOBAL: LEGO1 0x10101f58
|
||||
const char* g_strOBJECT = "OBJECT";
|
||||
|
||||
// GLOBAL: LEGO1 0x10102040
|
||||
const char* g_strACTION = "ACTION";
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ extern MxU32 g_mxcoreCount[101];
|
||||
extern const char* g_parseExtraTokens;
|
||||
extern const char* g_strWORLD;
|
||||
extern const char* g_strSOUND;
|
||||
extern const char* g_strOBJECT;
|
||||
extern const char* g_strACTION;
|
||||
extern const char* g_strVISIBILITY;
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class Doors : public LegoPathActor {
|
||||
// FUNCTION: LEGO1 0x1000e430
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f03e8
|
||||
// STRING: LEGO1 0x100f03e8
|
||||
return "Doors";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class DuneBuggy : public IslePathActor {
|
||||
// FUNCTION: LEGO1 0x10067c30
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0410
|
||||
// STRING: LEGO1 0x100f0410
|
||||
return "DuneBuggy";
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class ElevatorBottom : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x10017f20
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f04ac
|
||||
// STRING: LEGO1 0x100f04ac
|
||||
return "ElevatorBottom";
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ class GasStation : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x10004780
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0168
|
||||
// STRING: LEGO1 0x100f0168
|
||||
return "GasStation";
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class GasStationEntity : public BuildingEntity {
|
||||
// FUNCTION: LEGO1 0x1000eb20
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0348
|
||||
// STRING: LEGO1 0x100f0348
|
||||
return "GasStationEntity";
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class GasStationState : public LegoState {
|
||||
// FUNCTION: LEGO1 0x100061d0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0174
|
||||
// STRING: LEGO1 0x100f0174
|
||||
return "GasStationState";
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ class Helicopter : public IslePathActor {
|
||||
// FUNCTION: LEGO1 0x10003070
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0130
|
||||
// STRING: LEGO1 0x100f0130
|
||||
return "Helicopter";
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class HelicopterState : public LegoState {
|
||||
// FUNCTION: LEGO1 0x1000e0d0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0144
|
||||
// STRING: LEGO1 0x100f0144
|
||||
return "HelicopterState";
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class HistoryBook : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x10082390
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f04bc
|
||||
// STRING: LEGO1 0x100f04bc
|
||||
return "HistoryBook";
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class Hospital : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x100746b0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0490
|
||||
// STRING: LEGO1 0x100f0490
|
||||
return "Hospital";
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class HospitalEntity : public BuildingEntity {
|
||||
// FUNCTION: LEGO1 0x1000ec40
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0338
|
||||
// STRING: LEGO1 0x100f0338
|
||||
return "HospitalEntity";
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,14 @@
|
||||
#include "hospitalstate.h"
|
||||
|
||||
// STUB: LEGO1 0x10076370
|
||||
DECOMP_SIZE_ASSERT(HospitalState, 0x18)
|
||||
|
||||
// FUNCTION: LEGO1 0x10076370
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef HOSPITALSTATE_H
|
||||
#define HOSPITALSTATE_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legostate.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d97a0
|
||||
@ -12,7 +13,7 @@ class HospitalState : public LegoState {
|
||||
// FUNCTION: LEGO1 0x10076400
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0480
|
||||
// STRING: LEGO1 0x100f0480
|
||||
return "HospitalState";
|
||||
}
|
||||
|
||||
@ -21,6 +22,15 @@ class HospitalState : public LegoState {
|
||||
{
|
||||
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
|
||||
|
||||
@ -16,7 +16,7 @@ class Infocenter : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x1006eb40
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f04ec
|
||||
// STRING: LEGO1 0x100f04ec
|
||||
return "Infocenter";
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class InfocenterDoor : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x100377b0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f049c
|
||||
// STRING: LEGO1 0x100f049c
|
||||
return "InfocenterDoor";
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class InfoCenterEntity : public BuildingEntity {
|
||||
// FUNCTION: LEGO1 0x1000ea00
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f035c
|
||||
// STRING: LEGO1 0x100f035c
|
||||
return "InfoCenterEntity";
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class InfocenterState : public LegoState {
|
||||
// FUNCTION: LEGO1 0x10071840
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f04dc
|
||||
// STRING: LEGO1 0x100f04dc
|
||||
return "InfocenterState";
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ class Isle : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x10030910
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0458
|
||||
// STRING: LEGO1 0x100f0458
|
||||
return "Isle";
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ class IsleActor : public LegoActor {
|
||||
// FUNCTION: LEGO1 0x1000e660
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f07dc
|
||||
// STRING: LEGO1 0x100f07dc
|
||||
return "IsleActor";
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ class IslePathActor : public LegoPathActor {
|
||||
// FUNCTION: LEGO1 0x10002ea0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0104
|
||||
// STRING: LEGO1 0x100f0104
|
||||
return "IslePathActor";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class Jetski : public IslePathActor {
|
||||
// FUNCTION: LEGO1 0x1007e430
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f03d8
|
||||
// STRING: LEGO1 0x100f03d8
|
||||
return "Jetski";
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class JetskiRace : public LegoRace {
|
||||
// FUNCTION: LEGO1 0x1000daf0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0530
|
||||
// STRING: LEGO1 0x100f0530
|
||||
return "JetskiRace";
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class JetskiRaceState : public RaceState {
|
||||
// FUNCTION: LEGO1 0x1000dc40
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f00ac
|
||||
// STRING: LEGO1 0x100f00ac
|
||||
return "JetskiRaceState";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class JukeBox : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x1005d6f0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f02cc
|
||||
// STRING: LEGO1 0x100f02cc
|
||||
return "JukeBox";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class JukeBoxEntity : public LegoEntity {
|
||||
// FUNCTION: LEGO1 0x10085cc0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f02f0
|
||||
// STRING: LEGO1 0x100f02f0
|
||||
return "JukeBoxEntity";
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class JukeBoxState : public LegoState {
|
||||
// FUNCTION: LEGO1 0x1000f310
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f02bc
|
||||
// STRING: LEGO1 0x100f02bc
|
||||
return "JukeBoxState";
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGO3DVIEW_H
|
||||
|
||||
#include "mxtypes.h"
|
||||
#include "tgl/d3drm/impl.h"
|
||||
#include "viewmanager/viewmanager.h"
|
||||
|
||||
class LegoROI;
|
||||
@ -9,11 +10,18 @@ class LegoROI;
|
||||
class Lego3DView {
|
||||
public:
|
||||
inline ViewManager* GetViewManager() { return this->m_viewManager; }
|
||||
inline TglImpl::ViewImpl* GetViewPort() { return this->m_viewPort; }
|
||||
LegoROI* PickROI(MxLong p_a, MxLong p_b);
|
||||
|
||||
private:
|
||||
char m_pad[0x88];
|
||||
ViewManager* m_viewManager;
|
||||
// TODO: all of these fields are in various base classes
|
||||
undefined4 m_vtable; // 0x0 (TODO: remove once virtual function added)
|
||||
undefined4 m_unk0x4; // 0x4
|
||||
TglImpl::RendererImpl* m_renderImpl; // 0x8
|
||||
TglImpl::DeviceImpl* m_deviceImpl; // 0xc
|
||||
TglImpl::ViewImpl* m_viewPort; // 0x10
|
||||
char m_pad[0x78]; // 0x14
|
||||
ViewManager* m_viewManager; // 0x88
|
||||
};
|
||||
|
||||
#endif // LEGO3DVIEW_H
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
#ifndef LEGO3DWAVEPRESENTER_H
|
||||
#define LEGO3DWAVEPRESENTER_H
|
||||
|
||||
#include "legowavepresenter.h"
|
||||
#include "mxwavepresenter.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d52b0
|
||||
// SIZE 0xa0
|
||||
class Lego3DWavePresenter : public LegoWavePresenter {
|
||||
class Lego3DWavePresenter : public MxWavePresenter {
|
||||
public:
|
||||
// FUNCTION: LEGO1 0x1000d890
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f058c
|
||||
// STRING: LEGO1 0x100f058c
|
||||
return "Lego3DWavePresenter";
|
||||
}
|
||||
|
||||
|
||||
11
LEGO1/legoact2.h
Normal file
11
LEGO1/legoact2.h
Normal 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
|
||||
@ -10,7 +10,7 @@ class LegoAct2State : public LegoState {
|
||||
// FUNCTION: LEGO1 0x1000df80
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0428
|
||||
// STRING: LEGO1 0x100f0428
|
||||
return "LegoAct2State";
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class LegoActionControlPresenter : public MxMediaPresenter {
|
||||
// FUNCTION: LEGO1 0x1000d0e0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f05bc
|
||||
// STRING: LEGO1 0x100f05bc
|
||||
return "LegoActionControlPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class LegoActor : public LegoEntity {
|
||||
// FUNCTION: LEGO1 0x1002d210
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0124
|
||||
// STRING: LEGO1 0x100f0124
|
||||
return "LegoActor";
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class LegoActorPresenter : public LegoEntityPresenter {
|
||||
// FUNCTION: LEGO1 0x1000cb10
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f06a4
|
||||
// STRING: LEGO1 0x100f06a4
|
||||
return "LegoActorPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class LegoAnimationManager : public MxCore {
|
||||
// FUNCTION: LEGO1 0x1005ec80
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f7508
|
||||
// STRING: LEGO1 0x100f7508
|
||||
return "LegoAnimationManager";
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class LegoAnimMMPresenter : public MxCompositePresenter {
|
||||
// FUNCTION: LEGO1 0x1004a950
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f046c
|
||||
// STRING: LEGO1 0x100f046c
|
||||
return "LegoAnimMMPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
||||
// FUNCTION: LEGO1 0x10068530
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f071c
|
||||
// STRING: LEGO1 0x100f071c
|
||||
return "LegoAnimPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class LegoBuildingManager : public MxCore {
|
||||
// FUNCTION: LEGO1 0x1002f930
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f37d0
|
||||
// STRING: LEGO1 0x100f37d0
|
||||
return "LegoBuildingManager";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class LegoCacheSound : public MxCore {
|
||||
// FUNCTION: LEGO1 0x10006580
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f01c4
|
||||
// STRING: LEGO1 0x100f01c4
|
||||
return "LegoCacheSound";
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class LegoCameraController : public MxCore {
|
||||
// FUNCTION: LEGO1 0x10011ec0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0850
|
||||
// STRING: LEGO1 0x100f0850
|
||||
return "LegoCameraController";
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class LegoCarBuild : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x10022940
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0504
|
||||
// STRING: LEGO1 0x100f0504
|
||||
return "LegoCarBuild";
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
|
||||
// FUNCTION: LEGO1 0x10078510
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f05ec
|
||||
// STRING: LEGO1 0x100f05ec
|
||||
return "LegoCarBuildAnimPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ class LegoCarRaceActor : public LegoRaceActor {
|
||||
// FUNCTION: LEGO1 0x10081650
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0568
|
||||
// STRING: LEGO1 0x100f0568
|
||||
return "LegoCarRaceActor";
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class LegoControlManager : public MxCore {
|
||||
// FUNCTION: LEGO1 0x10028cb0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f31b8
|
||||
// STRING: LEGO1 0x100f31b8
|
||||
return "LegoControlManager";
|
||||
}
|
||||
|
||||
|
||||
@ -76,6 +76,12 @@ void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100109b0
|
||||
void LegoEntity::SetLocation(Vector3Data& p_location, Vector3Data& p_direction, Vector3Data& p_up, MxBool)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10010c30
|
||||
void LegoEntity::FUN_10010c30()
|
||||
{
|
||||
|
||||
@ -22,7 +22,7 @@ class LegoEntity : public MxEntity {
|
||||
// FUNCTION: LEGO1 0x1000c2f0
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0064
|
||||
// STRING: LEGO1 0x100f0064
|
||||
return "LegoEntity";
|
||||
}
|
||||
|
||||
@ -49,6 +49,7 @@ class LegoEntity : public MxEntity {
|
||||
virtual void VTable0x4c(); // vtable+0x4c
|
||||
|
||||
void FUN_10010c30();
|
||||
void SetLocation(Vector3Data& p_location, Vector3Data& p_direction, Vector3Data& p_up, MxBool);
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include "legoentitypresenter.h"
|
||||
|
||||
#include "islepathactor.h"
|
||||
#include "legoomni.h"
|
||||
#include "legovideomanager.h"
|
||||
|
||||
@ -14,7 +15,7 @@ LegoEntityPresenter::LegoEntityPresenter()
|
||||
// FUNCTION: LEGO1 0x100535c0
|
||||
void LegoEntityPresenter::Init()
|
||||
{
|
||||
m_unk0x4c = 0;
|
||||
m_objectBackend = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100535d0
|
||||
@ -24,9 +25,9 @@ LegoEntityPresenter::~LegoEntityPresenter()
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -45,3 +46,60 @@ void LegoEntityPresenter::Destroy()
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
|
||||
#include "mxcompositepresenter.h"
|
||||
|
||||
class LegoEntity;
|
||||
|
||||
// VTABLE: LEGO1 0x100d8398
|
||||
// SIZE 0x50
|
||||
class LegoEntityPresenter : public MxCompositePresenter {
|
||||
@ -13,7 +15,7 @@ class LegoEntityPresenter : public MxCompositePresenter {
|
||||
// FUNCTION: LEGO1 0x100534b0
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f06b8
|
||||
// STRING: LEGO1 0x100f06b8
|
||||
return "LegoEntityPresenter";
|
||||
}
|
||||
|
||||
@ -23,14 +25,21 @@ class LegoEntityPresenter : public MxCompositePresenter {
|
||||
return !strcmp(p_name, LegoEntityPresenter::ClassName()) || MxCompositePresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void Init(); // vtable+0x68
|
||||
virtual undefined4 VTable0x6c(undefined4 p_unk0x4c); // vtable+0x6c
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void RepeatingTickle(); // vtable+0x24
|
||||
virtual void ParseExtra(); // vtable+0x30
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
|
||||
virtual void Init(); // vtable+0x68
|
||||
virtual undefined4 SetBackend(LegoEntity* p_unk0x4c); // vtable+0x6c
|
||||
|
||||
void SetBackendLocation(Vector3Data& p_location, Vector3Data& p_direction, Vector3Data& p_up);
|
||||
|
||||
private:
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
||||
undefined4 m_unk0x4c;
|
||||
protected:
|
||||
LegoEntity* m_objectBackend; // 0x4c
|
||||
};
|
||||
|
||||
#endif // LEGOENTITYPRESENTER_H
|
||||
|
||||
@ -9,7 +9,7 @@ class LegoExtraActor : public LegoAnimActor {
|
||||
// FUNCTION: LEGO1 0x1002b7a0
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f3204
|
||||
// STRING: LEGO1 0x100f3204
|
||||
return "LegoExtraActor";
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,16 @@
|
||||
#include "legoflctexturepresenter.h"
|
||||
|
||||
// STUB: LEGO1 0x1005de80
|
||||
DECOMP_SIZE_ASSERT(LegoFlcTexturePresenter, 0x70)
|
||||
|
||||
// FUNCTION: LEGO1 0x1005de80
|
||||
LegoFlcTexturePresenter::LegoFlcTexturePresenter()
|
||||
{
|
||||
// TODO
|
||||
Init();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005df70
|
||||
void LegoFlcTexturePresenter::Init()
|
||||
{
|
||||
this->m_unk0x68 = 0;
|
||||
this->m_unk0x6c = 0;
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef LEGOFLCTEXTUREPRESENTER_H
|
||||
#define LEGOFLCTEXTUREPRESENTER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "mxflcpresenter.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d89e0
|
||||
@ -12,9 +13,15 @@ class LegoFlcTexturePresenter : public MxFlcPresenter {
|
||||
// FUNCTION: LEGO1 0x1005def0
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0634
|
||||
// STRING: LEGO1 0x100f0634
|
||||
return "LegoFlcTexturePresenter";
|
||||
}
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
undefined4 m_unk0x68; // 0x68
|
||||
undefined4 m_unk0x6c; // 0x6c
|
||||
};
|
||||
|
||||
#endif // LEGOFLCTEXTUREPRESENTER_H
|
||||
|
||||
@ -12,7 +12,7 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
|
||||
// FUNCTION: LEGO1 0x1006d880
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f06cc
|
||||
// STRING: LEGO1 0x100f06cc
|
||||
return "LegoHideAnimPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ class LegoJetski : public LegoJetskiRaceActor {
|
||||
// FUNCTION: LEGO1 0x10013e80
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f053c
|
||||
// STRING: LEGO1 0x100f053c
|
||||
return "LegoJetski";
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ class LegoJetskiRaceActor : public LegoCarRaceActor {
|
||||
// FUNCTION: LEGO1 0x10081d80
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0554
|
||||
// STRING: LEGO1 0x100f0554
|
||||
return "LegoJetskiRaceActor";
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class LegoLoadCacheSoundPresenter : public MxWavePresenter {
|
||||
// FUNCTION: LEGO1 0x10018450
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f05a0
|
||||
// STRING: LEGO1 0x100f05a0
|
||||
return "LegoLoadCacheSoundPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
|
||||
// FUNCTION: LEGO1 0x1006ce50
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f06e4
|
||||
// STRING: LEGO1 0x100f06e4
|
||||
return "LegoLocomotionAnimPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class LegoLoopingAnimPresenter : public LegoAnimPresenter {
|
||||
// FUNCTION: LEGO1 0x1000c9a0
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0700
|
||||
// STRING: LEGO1 0x100f0700
|
||||
return "LegoLoopingAnimPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -12,14 +12,14 @@ class LegoModelPresenter : public MxVideoPresenter {
|
||||
// FUNCTION: LEGO1 0x1000ccb0
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f067c
|
||||
// STRING: LEGO1 0x100f067c
|
||||
return "LegoModelPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000ccc0
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ class LegoNavController : public MxCore {
|
||||
// FUNCTION: LEGO1 0x10054b80
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f66d8
|
||||
// STRING: LEGO1 0x100f66d8
|
||||
return "LegoNavController";
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,104 @@
|
||||
#include "legoobjectfactory.h"
|
||||
|
||||
#include "carrace.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 "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
|
||||
// DECOMP_SIZE_ASSERT(LegoObjectFactory, 0x1c8);
|
||||
|
||||
@ -3,7 +3,103 @@
|
||||
|
||||
#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
|
||||
class LegoObjectFactory : public MxObjectFactory {
|
||||
|
||||
@ -568,6 +568,12 @@ LegoOmni* LegoOmni::GetInstance()
|
||||
return (LegoOmni*) MxOmni::GetInstance();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005ad20
|
||||
void LegoOmni::AddWorld(LegoWorld* p_world)
|
||||
{
|
||||
m_worldList->Append(p_world);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005af10
|
||||
void LegoOmni::RemoveWorld(const MxAtomId&, MxLong)
|
||||
{
|
||||
|
||||
@ -76,7 +76,7 @@ class LegoOmni : public MxOmni {
|
||||
// FUNCTION: LEGO1 0x10058aa0
|
||||
inline virtual const char* ClassName() const override // vtable+0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f671c
|
||||
// STRING: LEGO1 0x100f671c
|
||||
return "LegoOmni";
|
||||
}
|
||||
|
||||
@ -98,6 +98,7 @@ class LegoOmni : public MxOmni {
|
||||
virtual void StopTimer() override; // vtable+3c
|
||||
|
||||
LegoEntity* FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||
void AddWorld(LegoWorld* p_world);
|
||||
|
||||
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
|
||||
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
#include "legopalettepresenter.h"
|
||||
|
||||
#include "legoomni.h"
|
||||
#include "legostream.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "mxstreamchunk.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoPalettePresenter, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x10079e50
|
||||
@ -39,3 +44,48 @@ void LegoPalettePresenter::Destroy()
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ class LegoPalettePresenter : public MxVideoPresenter {
|
||||
// FUNCTION: LEGO1 0x10079f30
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f061c
|
||||
// STRING: LEGO1 0x100f061c
|
||||
return "LegoPalettePresenter";
|
||||
}
|
||||
|
||||
@ -25,13 +25,16 @@ class LegoPalettePresenter : public MxVideoPresenter {
|
||||
return !strcmp(p_name, ClassName()) || MxVideoPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
|
||||
MxResult ParsePallete(MxStreamChunk* p_chunk);
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
||||
MxPalette* m_palette;
|
||||
MxPalette* m_palette; // 0x64
|
||||
};
|
||||
|
||||
#endif // LEGOPALETTEPRESENTER_H
|
||||
|
||||
@ -10,7 +10,7 @@ class LegoPartPresenter : public MxMediaPresenter {
|
||||
// FUNCTION: LEGO1 0x1000cf70
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f05d8
|
||||
// STRING: LEGO1 0x100f05d8
|
||||
return "LegoPartPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class LegoPathActor : public LegoActor {
|
||||
// FUNCTION: LEGO1 0x1000c430
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0114
|
||||
// STRING: LEGO1 0x100f0114
|
||||
return "LegoPathActor";
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class LegoPathController : public MxCore {
|
||||
// FUNCTION: LEGO1 0x10045110
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f11b8
|
||||
// STRING: LEGO1 0x100f11b8
|
||||
return "LegoPathController";
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class LegoPathPresenter : public MxMediaPresenter {
|
||||
// FUNCTION: LEGO1 0x100449a0
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0690
|
||||
// STRING: LEGO1 0x100f0690
|
||||
return "LegoPathPresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class LegoPhonemePresenter : public MxFlcPresenter {
|
||||
// FUNCTION: LEGO1 0x1004e310
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f064c
|
||||
// STRING: LEGO1 0x100f064c
|
||||
return "LegoPhonemePresenter";
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class LegoPlantManager : public MxCore {
|
||||
// FUNCTION: LEGO1 0x10026290
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f318c
|
||||
// STRING: LEGO1 0x100f318c
|
||||
return "LegoPlantManager";
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legoworld.h"
|
||||
#include "mxrect32.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d5db0
|
||||
@ -17,7 +18,7 @@ class LegoRace : public LegoWorld {
|
||||
// FUNCTION: LEGO1 0x10015ba0
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f07c4
|
||||
// STRING: LEGO1 0x100f07c4
|
||||
return "LegoRace";
|
||||
}
|
||||
|
||||
@ -38,22 +39,26 @@ class LegoRace : public LegoWorld {
|
||||
virtual void VTable0x7c(undefined4, undefined4); // vtable+0x7c
|
||||
|
||||
private:
|
||||
undefined4 m_unk0xf8; // 0xf8
|
||||
undefined4 m_unk0xfc; // 0xfc
|
||||
undefined4 m_unk0x100; // 0x100
|
||||
undefined4 m_unk0x104; // 0x104
|
||||
undefined4 m_unk0x108; // 0x108
|
||||
undefined4 m_unk0x10c; // 0x10c
|
||||
undefined4 m_unk0x110; // 0x110
|
||||
undefined4 m_unk0x114; // 0x114
|
||||
undefined4 m_unk0x118; // 0x118
|
||||
undefined4 m_unk0x11c; // 0x11c
|
||||
undefined4 m_unk0x120; // 0x120 - this may be the current vehcle (function at 0x10015880)
|
||||
undefined4 m_unk0x124; // 0x124 - something game state
|
||||
undefined4 m_unk0x128; // 0x128
|
||||
undefined4 m_unk0x12c; // 0x12c
|
||||
undefined4 m_unk0x130[4]; // unconfirmed bytes, ghidra claims these are integers
|
||||
undefined4 m_unk0x140;
|
||||
undefined4 m_unk0xf8; // 0xf8
|
||||
undefined4 m_unk0xfc; // 0xfc
|
||||
undefined4 m_unk0x100; // 0x100
|
||||
undefined4 m_unk0x104; // 0x104
|
||||
undefined4 m_unk0x108; // 0x108
|
||||
undefined4 m_unk0x10c; // 0x10c
|
||||
undefined4 m_unk0x110; // 0x110
|
||||
undefined4 m_unk0x114; // 0x114
|
||||
undefined4 m_unk0x118; // 0x118
|
||||
undefined4 m_unk0x11c; // 0x11c
|
||||
undefined4 m_unk0x120; // 0x120
|
||||
undefined4 m_unk0x124; // 0x124
|
||||
undefined4 m_unk0x128; // 0x128
|
||||
undefined4 m_unk0x12c; // 0x12c
|
||||
|
||||
protected:
|
||||
MxRect32 m_unk0x130; // 0x130
|
||||
|
||||
private:
|
||||
undefined4 m_unk0x140; // 0x140
|
||||
};
|
||||
|
||||
#endif // LEGORACE_H
|
||||
|
||||
@ -9,7 +9,7 @@ class LegoRaceActor : public LegoAnimActor {
|
||||
// FUNCTION: LEGO1 0x10014af0
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0bf4
|
||||
// STRING: LEGO1 0x100f0bf4
|
||||
return "LegoRaceActor";
|
||||
}
|
||||
|
||||
|
||||
25
LEGO1/legoracecar.h
Normal file
25
LEGO1/legoracecar.h
Normal 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
|
||||
@ -14,7 +14,7 @@ class LegoState : public MxCore {
|
||||
// FUNCTION: LEGO1 0x100060d0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f01b8
|
||||
// STRING: LEGO1 0x100f01b8
|
||||
return "LegoState";
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
#include "legoomni.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "mxcompositepresenter.h"
|
||||
|
||||
// FUNCTION: LEGO1 0x1004eb40
|
||||
LegoTexturePresenter::~LegoTexturePresenter()
|
||||
@ -15,3 +16,21 @@ MxResult LegoTexturePresenter::AddToManager()
|
||||
VideoManager()->AddPresenter(*this);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1004fc60
|
||||
MxResult LegoTexturePresenter::PutData()
|
||||
{
|
||||
// TODO
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004fcb0
|
||||
void LegoTexturePresenter::DoneTickle()
|
||||
{
|
||||
if (this->m_compositePresenter && !this->m_compositePresenter->VTable0x64(2)) {
|
||||
SetTickleState(TickleState_Idle);
|
||||
return;
|
||||
}
|
||||
|
||||
MxMediaPresenter::DoneTickle();
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ class LegoTexturePresenter : public MxMediaPresenter {
|
||||
// FUNCTION: LEGO1 0x1000ce50
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0664
|
||||
// STRING: LEGO1 0x100f0664
|
||||
return "LegoTexturePresenter";
|
||||
}
|
||||
|
||||
@ -22,7 +22,9 @@ class LegoTexturePresenter : public MxMediaPresenter {
|
||||
return !strcmp(p_name, LegoTexturePresenter::ClassName()) || MxMediaPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
};
|
||||
|
||||
#endif // LEGOTEXTUREPRESENTER_H
|
||||
|
||||
@ -37,6 +37,13 @@ LegoVideoManager::~LegoVideoManager()
|
||||
delete m_palette;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1007ac40
|
||||
MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
{
|
||||
// TODO
|
||||
return MxVideoManager::Create(p_videoParam, p_frequencyMS, p_createThread);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007b5e0
|
||||
void LegoVideoManager::Destroy()
|
||||
{
|
||||
@ -69,6 +76,31 @@ void LegoVideoManager::MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY)
|
||||
m_cursorY = 463;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1007b770
|
||||
MxResult LegoVideoManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
return MxVideoManager::Tickle();
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1007c080
|
||||
void LegoVideoManager::VTable0x38(undefined4, undefined4)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007c290
|
||||
MxResult LegoVideoManager::RealizePalette(MxPalette* p_pallete)
|
||||
{
|
||||
if (p_pallete && m_videoParam.GetPalette()) {
|
||||
p_pallete->GetEntries(m_paletteEntries);
|
||||
m_videoParam.GetPalette()->SetEntries(m_paletteEntries);
|
||||
m_displaySurface->SetPalette(m_videoParam.GetPalette());
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007c300
|
||||
void LegoVideoManager::EnableFullScreenMovie(MxBool p_enable)
|
||||
{
|
||||
@ -135,9 +167,7 @@ void LegoVideoManager::SetSkyColor(float p_red, float p_green, float p_blue)
|
||||
colorStrucure.peFlags = -124;
|
||||
m_videoParam.GetPalette()->SetSkyColor(&colorStrucure);
|
||||
m_videoParam.GetPalette()->SetOverrideSkyColor(TRUE);
|
||||
|
||||
// TODO 3d manager
|
||||
// m_3dManager->m_pViewport->VTable0x1c(red, green, blue)
|
||||
m_3dManager->GetLego3DView()->GetViewPort()->SetBackgroundColor(p_red, p_green, p_blue);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007c4c0
|
||||
@ -146,6 +176,21 @@ void LegoVideoManager::OverrideSkyColor(MxBool p_shouldOverride)
|
||||
this->m_videoParam.GetPalette()->SetOverrideSkyColor(p_shouldOverride);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007c4d0
|
||||
void LegoVideoManager::VTable0x34(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height)
|
||||
{
|
||||
if (p_width == 0) {
|
||||
p_width = m_videoParam.GetRect().GetWidth();
|
||||
}
|
||||
if (p_height == 0) {
|
||||
p_height = m_videoParam.GetRect().GetHeight();
|
||||
}
|
||||
|
||||
if (!m_initialized) {
|
||||
m_3dManager->GetLego3DView()->GetViewPort()->ForceUpdate(p_x, p_y, p_width, p_height);
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1007c560
|
||||
int LegoVideoManager::EnableRMDevice()
|
||||
{
|
||||
|
||||
@ -21,7 +21,15 @@ class LegoVideoManager : public MxVideoManager {
|
||||
__declspec(dllexport) void EnableFullScreenMovie(MxBool p_enable, MxBool p_scale);
|
||||
__declspec(dllexport) void MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY);
|
||||
|
||||
virtual void Destroy() override; // vtable+0x18
|
||||
virtual MxResult Tickle() override; // vtable+0x8
|
||||
virtual void Destroy() override; // vtable+0x18
|
||||
virtual MxResult Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
override; // vtable+0x2c
|
||||
virtual MxResult RealizePalette(MxPalette*) override; // vtable+0x30
|
||||
virtual void VTable0x34(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height) override; // vtable+0x34
|
||||
virtual void VTable0x38(undefined4, undefined4); // vtable+0x38
|
||||
// FUNCTION: LGEO1 0x1007ab10
|
||||
virtual undefined4 VTable0x3c() { return m_unk0x4e8; } // vtable+0x3c
|
||||
|
||||
void SetSkyColor(float p_red, float p_green, float p_blue);
|
||||
void OverrideSkyColor(MxBool p_shouldOverride);
|
||||
|
||||
@ -23,7 +23,7 @@ class LegoWorld : public LegoEntity {
|
||||
// FUNCTION: LEGO1 0x1001d690
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// GLOBAL: LEGO1 0x100f0058
|
||||
// STRING: LEGO1 0x100f0058
|
||||
return "LegoWorld";
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,16 @@
|
||||
#include "legoworldpresenter.h"
|
||||
|
||||
#include "legoentity.h"
|
||||
#include "legoomni.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "mxactionnotificationparam.h"
|
||||
#include "mxautolocker.h"
|
||||
#include "mxdsactionlist.h"
|
||||
#include "mxdsmultiaction.h"
|
||||
#include "mxobjectfactory.h"
|
||||
#include "mxpresenter.h"
|
||||
#include "mxstl/stlcompat.h"
|
||||
|
||||
// GLOBAL: LEGO1 0x100f75d4
|
||||
undefined4 g_legoWorldPresenterQuality = 1;
|
||||
|
||||
@ -20,3 +31,101 @@ LegoWorldPresenter::~LegoWorldPresenter()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10066870
|
||||
MxResult LegoWorldPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action)
|
||||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
MxResult result = FAILURE;
|
||||
MxDSActionList* actions = ((MxDSMultiAction*) p_action)->GetActionList();
|
||||
MxObjectFactory* factory = ObjectFactory();
|
||||
MxDSActionListCursor cursor(actions);
|
||||
MxDSAction* action;
|
||||
|
||||
if (MxPresenter::StartAction(p_controller, p_action) == SUCCESS) {
|
||||
// The usual cursor.Next() loop doesn't match here, even though
|
||||
// the logic is the same. It does match when "deconstructed" into
|
||||
// the following Head(), Current() and NextFragment() calls,
|
||||
// but this seems unlikely to be the original code.
|
||||
// The alpha debug build also uses Next().
|
||||
cursor.Head();
|
||||
while (cursor.Current(action)) {
|
||||
cursor.NextFragment();
|
||||
|
||||
MxBool success = FALSE;
|
||||
|
||||
action->CopyFlags(m_action->GetFlags());
|
||||
|
||||
const char* presenterName = PresenterNameDispatch(*action);
|
||||
MxPresenter* presenter = (MxPresenter*) factory->Create(presenterName);
|
||||
|
||||
if (presenter && presenter->AddToManager() == SUCCESS) {
|
||||
presenter->SetCompositePresenter(this);
|
||||
if (presenter->StartAction(p_controller, action) == SUCCESS) {
|
||||
presenter->SetTickleState(TickleState_Idle);
|
||||
success = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (success) {
|
||||
action->SetOrigin(this);
|
||||
m_list.push_back(presenter);
|
||||
}
|
||||
else if (presenter)
|
||||
delete presenter;
|
||||
}
|
||||
|
||||
VideoManager()->AddPresenter(*this);
|
||||
|
||||
result = SUCCESS;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10066a50
|
||||
void LegoWorldPresenter::ReadyTickle()
|
||||
{
|
||||
m_objectBackend = (LegoEntity*) MxPresenter::CreateEntityBackend("LegoWorld");
|
||||
if (m_objectBackend) {
|
||||
m_objectBackend->Create(*m_action);
|
||||
Lego()->AddWorld((LegoWorld*) m_objectBackend);
|
||||
SetBackendLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());
|
||||
}
|
||||
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10066ac0
|
||||
void LegoWorldPresenter::StartingTickle()
|
||||
{
|
||||
if (m_action->IsA("MxDSSerialAction")) {
|
||||
MxPresenter* presenter = *m_list.begin();
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle) {
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
if ((*it)->GetCurrentTickleState() == TickleState_Idle) {
|
||||
(*it)->SetTickleState(TickleState_Ready);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10067a70
|
||||
void LegoWorldPresenter::VTable0x60(MxPresenter* p_presenter)
|
||||
{
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10067b00
|
||||
void LegoWorldPresenter::ParseExtra()
|
||||
{
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user