WIP VTable0x68

This commit is contained in:
Christian Semmler 2024-02-02 10:52:24 -05:00
parent a7acf8c607
commit 777f1b64ac
21 changed files with 257 additions and 51 deletions

View File

@ -27,9 +27,12 @@ class LegoAnimationManager : public MxCore {
return !strcmp(p_name, ClassName()) || MxCore::IsA(p_name); return !strcmp(p_name, ClassName()) || MxCore::IsA(p_name);
} }
void FUN_1005ee80(MxBool);
void FUN_1005ef10(); void FUN_1005ef10();
void FUN_1005f0b0();
void FUN_1005f6d0(MxBool); void FUN_1005f6d0(MxBool);
void FUN_1005f720(undefined4); void FUN_1005f720(undefined4);
void FUN_10061010(undefined4);
void FUN_10064670(MxBool); void FUN_10064670(MxBool);
static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig); static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig);

View File

@ -47,6 +47,7 @@ class LegoGameState {
void SetSomeEnumState(undefined4 p_state); void SetSomeEnumState(undefined4 p_state);
void FUN_1003ceb0(); void FUN_1003ceb0();
void FUN_10039780(MxU8); void FUN_10039780(MxU8);
void FUN_10039940();
struct ScoreStruct { struct ScoreStruct {
void WriteScoreHistory(); void WriteScoreHistory();

View File

@ -28,6 +28,7 @@ class MxBackgroundAudioManager;
class MxDSFile; class MxDSFile;
class MxTransitionManager; class MxTransitionManager;
class ViewLODListManager; class ViewLODListManager;
class ViewManager;
extern MxAtomId* g_copterScript; extern MxAtomId* g_copterScript;
extern MxAtomId* g_dunecarScript; extern MxAtomId* g_dunecarScript;
@ -125,7 +126,7 @@ class LegoOmni : public MxOmni {
LegoUnkSaveDataWriter* GetUnkSaveDataWriter() { return m_saveDataWriter; } LegoUnkSaveDataWriter* GetUnkSaveDataWriter() { return m_saveDataWriter; }
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; } inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
inline void SetWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; } inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
inline void SetExit(MxBool p_exit) { m_exit = p_exit; } inline void SetExit(MxBool p_exit) { m_exit = p_exit; }
inline void CloseMainWindow() { PostMessageA(m_windowHandle, WM_CLOSE, 0, 0); } inline void CloseMainWindow() { PostMessageA(m_windowHandle, WM_CLOSE, 0, 0); }
@ -164,14 +165,15 @@ LegoROI* PickROI(MxLong, MxLong);
LegoSoundManager* SoundManager(); LegoSoundManager* SoundManager();
MxTransitionManager* TransitionManager(); MxTransitionManager* TransitionManager();
LegoVideoManager* VideoManager(); LegoVideoManager* VideoManager();
LegoAnimationManager* AnimationManager(); LegoAnimationManager* AnimationManager();
LegoNavController* NavController();
LegoBuildingManager* BuildingManager(); LegoBuildingManager* BuildingManager();
LegoControlManager* ControlManager(); LegoControlManager* ControlManager();
IslePathActor* GetCurrentVehicle(); IslePathActor* CurrentVehicle();
ViewManager* GetViewManager();
LegoPlantManager* PlantManager(); LegoPlantManager* PlantManager();
LegoWorld* GetCurrentWorld(); LegoWorld* CurrentWorld();
LegoUnkSaveDataWriter* GetUnkSaveDataWriter(); LegoUnkSaveDataWriter* UnkSaveDataWriter();
GifManager* GetGifManager(); GifManager* GetGifManager();
void FUN_10015820(MxBool p_disable, MxU16 p_flags); void FUN_10015820(MxBool p_disable, MxU16 p_flags);
void FUN_10015860(const char*, MxU8); void FUN_10015860(const char*, MxU8);

View File

@ -30,6 +30,8 @@ class LegoPathController : public MxCore {
virtual void VTable0x14(); // vtable+0x14 virtual void VTable0x14(); // vtable+0x14
virtual void Destroy(); // vtable+0x18 virtual void Destroy(); // vtable+0x18
void Enable(MxBool p_enable);
}; };
#endif // LEGOPATHCONTROLLER_H #endif // LEGOPATHCONTROLLER_H

View File

@ -5,6 +5,12 @@
#include "mxlist.h" #include "mxlist.h"
#include "mxtypes.h" #include "mxtypes.h"
// VTABLE: LEGO1 0x100d6380
// class MxCollection<LegoPathController *>
// VTABLE: LEGO1 0x100d6398
// class MxList<LegoPathController *>
// VTABLE: LEGO1 0x100d6320 // VTABLE: LEGO1 0x100d6320
// class MxPtrList<LegoPathController> // class MxPtrList<LegoPathController>
@ -19,16 +25,20 @@ class LegoPathControllerList : public MxPtrList<LegoPathController> {
{ {
return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; return p_a == p_b ? 0 : p_a < p_b ? -1 : 1;
} // vtable+0x14 } // vtable+0x14
// SYNTHETIC: LEGO1 0x1001d3d0
// LegoPathControllerList::`scalar deleting destructor'
}; };
// VTABLE: LEGO1 0x100d6380 // VTABLE: LEGO1 0x100d6578
// class MxCollection<LegoPathController *> // class MxListCursor<LegoPathController *>
// VTABLE: LEGO1 0x100d6398 // VTABLE: LEGO1 0x100d6548
// class MxList<LegoPathController *> // class MxPtrListCursor<LegoPathController>
// VTABLE: LEGO1 0x100d6560
// SIZE 0x10
class LegoPathControllerListCursor : public MxPtrListCursor<LegoPathController> {
public:
LegoPathControllerListCursor(LegoPathControllerList* p_list) : MxPtrListCursor<LegoPathController>(p_list){};
};
// TEMPLATE: LEGO1 0x1001d230 // TEMPLATE: LEGO1 0x1001d230
// MxCollection<LegoPathController *>::Compare // MxCollection<LegoPathController *>::Compare
@ -48,6 +58,9 @@ class LegoPathControllerList : public MxPtrList<LegoPathController> {
// TEMPLATE: LEGO1 0x1001d3c0 // TEMPLATE: LEGO1 0x1001d3c0
// MxPtrList<LegoPathController>::Destroy // MxPtrList<LegoPathController>::Destroy
// SYNTHETIC: LEGO1 0x1001d3d0
// LegoPathControllerList::`scalar deleting destructor'
// TEMPLATE: LEGO1 0x1001d440 // TEMPLATE: LEGO1 0x1001d440
// MxPtrList<LegoPathController>::~MxPtrList<LegoPathController> // MxPtrList<LegoPathController>::~MxPtrList<LegoPathController>
@ -63,4 +76,21 @@ class LegoPathControllerList : public MxPtrList<LegoPathController> {
// SYNTHETIC: LEGO1 0x1001d620 // SYNTHETIC: LEGO1 0x1001d620
// LegoPathControllerList::~LegoPathControllerList // LegoPathControllerList::~LegoPathControllerList
// SYNTHETIC: LEGO1 0x1001f830
// LegoPathControllerListCursor::`scalar deleting destructor'
// FUNCTION: LEGO1 0x1001f8a0
// MxPtrListCursor<LegoPathController>::~MxPtrListCursor<LegoPathController>
// SYNTHETIC: LEGO1 0x1001f8f0
// MxListCursor<LegoPathController *>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1001f960
// MxPtrListCursor<LegoPathController>::`scalar deleting destructor'
// FUNCTION: LEGO1 0x1001f9d0
// MxListCursor<LegoPathController *>::~MxListCursor<LegoPathController *>
// LegoPathControllerListCursor::~LegoPathControllerListCursor
#endif // LEGOPATHCONTROLLERLIST_H #endif // LEGOPATHCONTROLLERLIST_H

View File

@ -86,6 +86,7 @@ class LegoPointOfViewController : public LegoMouseController {
void OnViewSize(int p_width, int p_height); void OnViewSize(int p_width, int p_height);
inline LegoEntity* GetEntity() { return m_entity; } inline LegoEntity* GetEntity() { return m_entity; }
inline LegoNavController* GetNavController() { return m_nav; }
protected: protected:
void AffectPointOfView(); void AffectPointOfView();

View File

@ -34,7 +34,7 @@ Helicopter::~Helicopter()
MxResult Helicopter::Create(MxDSAction& p_dsAction) MxResult Helicopter::Create(MxDSAction& p_dsAction)
{ {
MxResult result = IslePathActor::Create(p_dsAction); MxResult result = IslePathActor::Create(p_dsAction);
LegoWorld* world = GetCurrentWorld(); LegoWorld* world = CurrentWorld();
SetWorld(world); SetWorld(world);
if (world->IsA("Act3")) { if (world->IsA("Act3")) {
((Act3*) GetWorld())->SetUnkown420c(this); ((Act3*) GetWorld())->SetUnkown420c(this);
@ -65,9 +65,9 @@ void Helicopter::VTable0xe4()
IslePathActor::VTable0xe4(); IslePathActor::VTable0xe4();
if (!GameState()->GetUnknown10()) { if (!GameState()->GetUnknown10()) {
GameState()->SetCurrentArea(0x3c); GameState()->SetCurrentArea(0x3c);
if (GetCurrentVehicle()) { if (CurrentVehicle()) {
if (GetCurrentVehicle()->IsA("IslePathActor")) { if (CurrentVehicle()->IsA("IslePathActor")) {
((IslePathActor*) GetCurrentVehicle())->VTable0xe8(0x37, TRUE, 7); ((IslePathActor*) CurrentVehicle())->VTable0xe8(0x37, TRUE, 7);
} }
} }
} }
@ -93,12 +93,12 @@ MxU32 Helicopter::VTable0xcc()
return 1; return 1;
} }
if (!m_world) { if (!m_world) {
m_world = GetCurrentWorld(); m_world = CurrentWorld();
} }
AnimationManager()->FUN_1005f6d0(FALSE); AnimationManager()->FUN_1005f6d0(FALSE);
if (GetCurrentVehicle()) { if (CurrentVehicle()) {
if (GetCurrentVehicle()->VTable0x60() != GameState()->GetUnknownC()) { if (CurrentVehicle()->VTable0x60() != GameState()->GetUnknownC()) {
GetCurrentVehicle()->VTable0xe4(); CurrentVehicle()->VTable0xe4();
} }
} }
switch (GameState()->GetUnknown10()) { switch (GameState()->GetUnknown10()) {
@ -106,7 +106,7 @@ MxU32 Helicopter::VTable0xcc()
m_script = *g_isleScript; m_script = *g_isleScript;
AnimationManager()->FUN_10064670(FALSE); AnimationManager()->FUN_10064670(FALSE);
VTable0xe8(0x29, TRUE, 7); VTable0xe8(0x29, TRUE, 7);
((Isle*) GetCurrentWorld())->SetUnknown13c(0x3c); ((Isle*) CurrentWorld())->SetUnknown13c(0x3c);
FUN_10015820(TRUE, 0); FUN_10015820(TRUE, 0);
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, TRUE); TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, TRUE);
SetUnknownDC(4); SetUnknownDC(4);
@ -146,7 +146,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param)
switch (p_param.GetClickedObjectId()) { switch (p_param.GetClickedObjectId()) {
case 0x17: case 0x17:
if (*g_act3Script == script) { if (*g_act3Script == script) {
((Act3*) GetCurrentWorld())->SetUnkown4270(2); ((Act3*) CurrentWorld())->SetUnkown4270(2);
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
} }
else if (m_state->GetUnkown8() != 0) { else if (m_state->GetUnkown8() != 0) {
@ -218,7 +218,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param)
break; break;
case 0x1c: case 0x1c:
if (GameState()->GetUnknown10() == 0) { if (GameState()->GetUnknown10() == 0) {
((Isle*) GetCurrentWorld())->SetUnknown13c(2); ((Isle*) CurrentWorld())->SetUnknown13c(2);
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
VTable0xe4(); VTable0xe4();
} }

View File

@ -113,6 +113,12 @@ void LegoGameState::FUN_10039780(MxU8)
// TODO // TODO
} }
// STUB: LEGO1 0x10039940
void LegoGameState::FUN_10039940()
{
// TODO
}
// FUNCTION: LEGO1 0x10039980 // FUNCTION: LEGO1 0x10039980
MxResult LegoGameState::Save(MxULong p_slot) MxResult LegoGameState::Save(MxULong p_slot)
{ {

View File

@ -6,7 +6,7 @@
// FUNCTION: LEGO1 0x10076c30 // FUNCTION: LEGO1 0x10076c30
void LegoActorPresenter::ReadyTickle() void LegoActorPresenter::ReadyTickle()
{ {
if (GetCurrentWorld()) { if (CurrentWorld()) {
m_entity = (LegoEntity*) CreateEntity("LegoActor"); m_entity = (LegoEntity*) CreateEntity("LegoActor");
if (m_entity) { if (m_entity) {
SetEntityLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp()); SetEntityLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());

View File

@ -55,7 +55,7 @@ void LegoEntity::Destroy(MxBool p_fromDestructor)
m_roi->SetUnknown0x104(NULL); m_roi->SetUnknown0x104(NULL);
} }
GetUnkSaveDataWriter()->FUN_10083db0(m_roi); UnkSaveDataWriter()->FUN_10083db0(m_roi);
} }
else { else {
VideoManager()->Get3DManager()->GetLego3DView()->Remove(*m_roi); VideoManager()->Get3DManager()->GetLego3DView()->Remove(*m_roi);
@ -70,7 +70,7 @@ void LegoEntity::Destroy(MxBool p_fromDestructor)
// FUNCTION: LEGO1 0x10010880 // FUNCTION: LEGO1 0x10010880
void LegoEntity::SetWorld() void LegoEntity::SetWorld()
{ {
LegoWorld* world = GetCurrentWorld(); LegoWorld* world = CurrentWorld();
if (world != NULL && world != (LegoWorld*) this) { if (world != NULL && world != (LegoWorld*) this) {
world->Add(this); world->Add(this);
} }
@ -91,7 +91,7 @@ void LegoEntity::SetLocation(Mx3DPointFloat& p_location, Mx3DPointFloat& p_direc
// FUNCTION: LEGO1 0x10010c30 // FUNCTION: LEGO1 0x10010c30
void LegoEntity::FUN_10010c30() void LegoEntity::FUN_10010c30()
{ {
LegoWorld* world = GetCurrentWorld(); LegoWorld* world = CurrentWorld();
if (m_cameraFlag && world && world->GetCamera() && m_roi) { if (m_cameraFlag && world && world->GetCamera() && m_roi) {
world->GetCamera()->FUN_100123e0(m_roi->GetLocal2World(), 1); world->GetCamera()->FUN_100123e0(m_roi->GetLocal2World(), 1);

View File

@ -62,7 +62,7 @@ MxResult LegoEntityPresenter::StartAction(MxStreamController* p_controller, MxDS
// FUNCTION: LEGO1 0x100536c0 // FUNCTION: LEGO1 0x100536c0
void LegoEntityPresenter::ReadyTickle() void LegoEntityPresenter::ReadyTickle()
{ {
if (GetCurrentWorld()) { if (CurrentWorld()) {
m_entity = (LegoEntity*) MxPresenter::CreateEntity("LegoEntity"); m_entity = (LegoEntity*) MxPresenter::CreateEntity("LegoEntity");
if (m_entity) { if (m_entity) {
m_entity->Create(*m_action); m_entity->Create(*m_action);

View File

@ -1,10 +1,13 @@
#include "legoworld.h" #include "legoworld.h"
#include "legoanimationmanager.h"
#include "legoanimpresenter.h" #include "legoanimpresenter.h"
#include "legobuildingmanager.h" #include "legobuildingmanager.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legogamestate.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"
#include "legolocomotionanimpresenter.h" #include "legolocomotionanimpresenter.h"
#include "legonavcontroller.h"
#include "legoomni.h" #include "legoomni.h"
#include "legoplantmanager.h" #include "legoplantmanager.h"
#include "legosoundmanager.h" #include "legosoundmanager.h"
@ -80,8 +83,8 @@ MxResult LegoWorld::Create(MxDSAction& p_dsAction)
} }
if (p_dsAction.GetFlags() & MxDSAction::c_enabled) { if (p_dsAction.GetFlags() & MxDSAction::c_enabled) {
if (GetCurrentWorld()) { if (CurrentWorld()) {
GetCurrentWorld()->VTable0x68(0); CurrentWorld()->VTable0x68(0);
} }
SetCurrentWorld(this); SetCurrentWorld(this);
@ -99,7 +102,7 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
{ {
m_destroyed = TRUE; m_destroyed = TRUE;
if (GetCurrentWorld() == this) { if (CurrentWorld() == this) {
ControlManager()->FUN_10028df0(NULL); ControlManager()->FUN_10028df0(NULL);
SetCurrentWorld(NULL); SetCurrentWorld(NULL);
} }
@ -513,10 +516,129 @@ MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId)
return NULL; return NULL;
} }
// STUB: LEGO1 0x10021a70 // FUNCTION: LEGO1 0x10021a70
void LegoWorld::VTable0x68(MxBool p_add) void LegoWorld::VTable0x68(MxBool p_und)
{ {
// TODO if (p_und) {
if (!m_set0xd0.empty() && CurrentWorld() != this) {
if (CurrentWorld()) {
AnimationManager()->FUN_10061010(0);
CurrentWorld()->VTable0x68(FALSE);
LegoEntityListCursor cursor(m_entityList);
LegoEntity* entity;
while (cursor.Next(entity)) {
if (entity->GetROI()) {
entity->GetROI()->SetUnknown0x104(entity);
GetViewManager()->GetUnknown0x08().push_back(entity->GetROI());
}
}
}
while (!m_set0xd0.empty()) {
MxCoreSet::iterator it = m_set0xa8.begin();
MxCore* object = *it;
if (object->IsA("MxPresenter")) {
((MxPresenter*) object)->Enable(TRUE);
}
else if (object->IsA("LegoPathController")) {
((LegoPathController*) object)->Enable(TRUE);
}
m_set0xd0.erase(it);
}
SetCurrentWorld(this);
ControlManager()->FUN_10028df0(&m_controlPresenters);
InputManager()->SetCamera(m_cameraController);
if (m_cameraController) {
InputManager()->Register(m_cameraController->GetNavController());
Lego()->SetNavController(m_cameraController->GetNavController());
}
if (m_unk0xec != -1) {
PlantManager()->FUN_10026360(m_unk0xec);
AnimationManager()->FUN_1005f720(m_unk0xec);
BuildingManager()->FUN_1002fa00();
AnimationManager()->FUN_1005f0b0();
}
GameState()->FUN_10039940();
SetIsWorldActive(TRUE);
return;
}
if (p_und)
return;
}
if (m_set0xd0.empty()) {
IslePathActor* vehicle = CurrentVehicle();
if (vehicle) {
FUN_1001fc80(vehicle);
}
AnimationManager()->FUN_1005ee80(FALSE);
m_set0xd0.insert(this);
if (m_unk0xec != -1) {
PlantManager()->FUN_100263a0(m_unk0xec);
BuildingManager()->FUN_1002fb30();
}
MxPresenterListCursor controlPresenterCursor(&m_controlPresenters);
MxPresenter* presenter;
while (controlPresenterCursor.Next(presenter)) {
if (presenter->IsEnabled()) {
m_set0xd0.insert(presenter);
presenter->Enable(FALSE);
}
}
for (MxCoreSet::iterator it = m_set0xa8.begin(); it != m_set0xa8.end(); it++) {
if ((*it)->IsA("LegoActionControlPresenter")) {
m_set0xd0.insert(*it);
((MxPresenter*) *it)->Enable(FALSE);
}
else if ((*it)->IsA("MxPresenter") && ((MxPresenter*) *it)->IsEnabled()) {
m_set0xd0.insert(*it);
((MxPresenter*) *it)->Enable(FALSE);
}
}
if (CurrentWorld() && CurrentWorld() == this) {
ControlManager()->FUN_10028df0(NULL);
Lego()->SetCurrentWorld(NULL);
}
if (InputManager()->GetCamera() == m_cameraController) {
InputManager()->ClearCamera();
}
if (m_cameraController) {
InputManager()->UnRegister(m_cameraController->GetNavController());
if (NavController() == m_cameraController->GetNavController()) {
Lego()->SetNavController(NULL);
}
}
LegoPathControllerListCursor pathControllerCursor(&m_list0x68);
LegoPathController* controller;
while (pathControllerCursor.Next(controller)) {
controller->Enable(FALSE);
m_set0xd0.insert(controller);
}
GetViewManager()->RemoveAll(NULL);
}
} }
// FUNCTION: LEGO1 0x10022080 // FUNCTION: LEGO1 0x10022080

View File

@ -46,8 +46,8 @@ Isle::~Isle()
InputManager()->ClearWorld(); InputManager()->ClearWorld();
} }
if (GetCurrentVehicle() != NULL) { if (CurrentVehicle() != NULL) {
VTable0x6c(GetCurrentVehicle()); VTable0x6c(CurrentVehicle());
} }
NotificationManager()->Unregister(this); NotificationManager()->Unregister(this);
@ -121,7 +121,7 @@ MxLong Isle::Notify(MxParam& p_param)
case c_notificationType18: case c_notificationType18:
switch (m_act1state->GetUnknown18()) { switch (m_act1state->GetUnknown18()) {
case 4: case 4:
result = GetCurrentVehicle()->Notify(p_param); result = CurrentVehicle()->Notify(p_param);
break; break;
case 8: case 8:
result = m_towtrack->Notify(p_param); result = m_towtrack->Notify(p_param);

View File

@ -54,7 +54,7 @@ MxLong Radio::Notify(MxParam& p_param)
void Radio::Play() void Radio::Play()
{ {
if (!m_state->IsActive()) { if (!m_state->IsActive()) {
GetCurrentWorld(); CurrentWorld();
MxDSAction action; MxDSAction action;
action.SetObjectId(m_state->FUN_1002d090()); action.SetObjectId(m_state->FUN_1002d090());
@ -75,7 +75,7 @@ void Radio::Play()
void Radio::Stop() void Radio::Stop()
{ {
if (m_state->IsActive()) { if (m_state->IsActive()) {
LegoWorld* world = GetCurrentWorld(); LegoWorld* world = CurrentWorld();
MxControlPresenter* presenter = (MxControlPresenter*) world->Find(world->GetAtom(), 18); MxControlPresenter* presenter = (MxControlPresenter*) world->Find(world->GetAtom(), 18);
@ -103,12 +103,12 @@ MxLong Radio::HandleClick(LegoControlManagerEvent& p_param)
Play(); Play();
} }
if (GetCurrentWorld()) { if (CurrentWorld()) {
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
MxNotificationParam param(c_notificationEndAction, this); MxNotificationParam param(c_notificationEndAction, this);
GetCurrentWorld()->Notify(param); CurrentWorld()->Notify(param);
#else #else
GetCurrentWorld()->Notify(MxNotificationParam(c_notificationType0, this)); CurrentWorld()->Notify(MxNotificationParam(c_notificationType0, this));
#endif #endif
} }

View File

@ -22,6 +22,7 @@
#include "mxstreamer.h" #include "mxstreamer.h"
#include "mxticklemanager.h" #include "mxticklemanager.h"
#include "mxtransitionmanager.h" #include "mxtransitionmanager.h"
#include "viewmanager/viewmanager.h"
DECOMP_SIZE_ASSERT(LegoWorldList, 0x18); DECOMP_SIZE_ASSERT(LegoWorldList, 0x18);
DECOMP_SIZE_ASSERT(LegoWorldListCursor, 0x10); DECOMP_SIZE_ASSERT(LegoWorldListCursor, 0x10);
@ -172,23 +173,29 @@ LegoNavController* NavController()
} }
// FUNCTION: LEGO1 0x10015790 // FUNCTION: LEGO1 0x10015790
IslePathActor* GetCurrentVehicle() IslePathActor* CurrentVehicle()
{ {
return LegoOmni::GetInstance()->GetCurrentVehicle(); return LegoOmni::GetInstance()->GetCurrentVehicle();
} }
// FUNCTION: LEGO1 0x100157a0 // FUNCTION: LEGO1 0x100157a0
LegoWorld* GetCurrentWorld() LegoWorld* CurrentWorld()
{ {
return LegoOmni::GetInstance()->GetCurrentWorld(); return LegoOmni::GetInstance()->GetCurrentWorld();
} }
// FUNCTION: LEGO1 0x100157b0 // FUNCTION: LEGO1 0x100157b0
LegoUnkSaveDataWriter* GetUnkSaveDataWriter() LegoUnkSaveDataWriter* UnkSaveDataWriter()
{ {
return LegoOmni::GetInstance()->GetUnkSaveDataWriter(); return LegoOmni::GetInstance()->GetUnkSaveDataWriter();
} }
// FUNCTION: LEGO1 0x100157c0
ViewManager* GetViewManager()
{
return VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager();
}
// FUNCTION: LEGO1 0x100157e0 // FUNCTION: LEGO1 0x100157e0
LegoPlantManager* PlantManager() LegoPlantManager* PlantManager()
{ {
@ -234,7 +241,7 @@ MxDSAction& GetCurrentAction()
// FUNCTION: LEGO1 0x100158f0 // FUNCTION: LEGO1 0x100158f0
void SetCurrentWorld(LegoWorld* p_world) void SetCurrentWorld(LegoWorld* p_world)
{ {
LegoOmni::GetInstance()->SetWorld(p_world); LegoOmni::GetInstance()->SetCurrentWorld(p_world);
} }
// FUNCTION: LEGO1 0x10015900 // FUNCTION: LEGO1 0x10015900
@ -740,11 +747,11 @@ MxBool LegoOmni::DoesEntityExist(MxDSAction& p_dsAction)
// FUNCTION: LEGO1 0x1005b400 // FUNCTION: LEGO1 0x1005b400
MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value) MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
{ {
if (::GetCurrentWorld() == NULL) { if (::CurrentWorld() == NULL) {
return -1; return -1;
} }
return ::GetCurrentWorld()->GetCurrPathInfo(p_path, p_value); return ::CurrentWorld()->GetCurrPathInfo(p_path, p_value);
} }
// FUNCTION: LEGO1 0x1005b4f0 // FUNCTION: LEGO1 0x1005b4f0

View File

@ -24,3 +24,9 @@ MxResult LegoPathController::Tickle()
// TODO // TODO
return SUCCESS; return SUCCESS;
} }
// STUB: LEGO1 0x10046be0
void LegoPathController::Enable(MxBool p_enable)
{
// TODO
}

View File

@ -21,9 +21,22 @@ LegoAnimationManager::~LegoAnimationManager()
// TODO // TODO
} }
// STUB: LEGO1 0x1005ee80
void LegoAnimationManager::FUN_1005ee80(MxBool)
{
// TODO
}
// STUB: LEGO1 0x1005ef10 // STUB: LEGO1 0x1005ef10
void LegoAnimationManager::FUN_1005ef10() void LegoAnimationManager::FUN_1005ef10()
{ {
// TODO
}
// STUB: LEGO1 0x1005f0b0
void LegoAnimationManager::FUN_1005f0b0()
{
// TODO
} }
// STUB: LEGO1 0x1005f130 // STUB: LEGO1 0x1005f130
@ -44,6 +57,12 @@ void LegoAnimationManager::FUN_1005f720(undefined4)
// TODO // TODO
} }
// STUB: LEGO1 0x10061010
void LegoAnimationManager::FUN_10061010(undefined4)
{
// TODO
}
// STUB: LEGO1 0x100619f0 // STUB: LEGO1 0x100619f0
MxLong LegoAnimationManager::Notify(MxParam& p_param) MxLong LegoAnimationManager::Notify(MxParam& p_param)
{ {

View File

@ -102,7 +102,7 @@ void LegoAnimPresenter::PutFrame()
// FUNCTION: LEGO1 0x1006b550 // FUNCTION: LEGO1 0x1006b550
void LegoAnimPresenter::ReadyTickle() void LegoAnimPresenter::ReadyTickle()
{ {
m_currentWorld = GetCurrentWorld(); m_currentWorld = CurrentWorld();
if (m_currentWorld) { if (m_currentWorld) {
MxStreamChunk* chunk = m_subscriber->CurrentChunk(); MxStreamChunk* chunk = m_subscriber->CurrentChunk();

View File

@ -137,7 +137,7 @@ void MxTransitionManager::EndTransition(MxBool p_notifyWorld)
TickleManager()->UnregisterClient(this); TickleManager()->UnregisterClient(this);
if (p_notifyWorld) { if (p_notifyWorld) {
LegoWorld* world = GetCurrentWorld(); LegoWorld* world = CurrentWorld();
if (world) { if (world) {
#ifdef COMPAT_MODE #ifdef COMPAT_MODE

View File

@ -1,5 +1,9 @@
#include "viewmanager.h" #include "viewmanager.h"
#include "decomp.h"
DECOMP_SIZE_ASSERT(ViewManager, 0x1bc)
// STUB: LEGO1 0x100a5eb0 // STUB: LEGO1 0x100a5eb0
ViewManager::ViewManager(Tgl::Renderer* pRenderer, Tgl::Group* scene, const OrientableROI* point_of_view) ViewManager::ViewManager(Tgl::Renderer* pRenderer, Tgl::Group* scene, const OrientableROI* point_of_view)
{ {

View File

@ -20,8 +20,11 @@ class ViewManager {
// SYNTHETIC: LEGO1 0x100a6000 // SYNTHETIC: LEGO1 0x100a6000
// ViewManager::`scalar deleting destructor' // ViewManager::`scalar deleting destructor'
inline CompoundObject& GetUnknown0x08() { return m_unk0x08; }
private: private:
undefined m_pad[0x1b8]; CompoundObject m_unk0x08; // 0x08
undefined m_pad[0x1cc]; // 0x14
}; };
#endif // VIEWMANAGER_H #endif // VIEWMANAGER_H