mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-28 15:13:13 -04:00
Implement/match remaining LegoWorld functions (#526)
* Implement/match remaining LegoWorld functions * Move functions * Move function * Fix function location * Fix function return type
This commit is contained in:
parent
d324fd664a
commit
434deecee4
@ -69,12 +69,6 @@ public:
|
|||||||
c_clearScreen = 0x04
|
c_clearScreen = 0x04
|
||||||
};
|
};
|
||||||
|
|
||||||
void CreateBackgroundAudio();
|
|
||||||
void RemoveWorld(const MxAtomId&, MxLong);
|
|
||||||
static int GetCurrPathInfo(LegoPathBoundary**, MxS32&);
|
|
||||||
static void CreateInstance();
|
|
||||||
static LegoOmni* GetInstance();
|
|
||||||
|
|
||||||
LegoOmni();
|
LegoOmni();
|
||||||
~LegoOmni() override; // vtable+00
|
~LegoOmni() override; // vtable+00
|
||||||
|
|
||||||
@ -108,6 +102,12 @@ public:
|
|||||||
void AddWorld(LegoWorld* p_world);
|
void AddWorld(LegoWorld* p_world);
|
||||||
void DeleteWorld(LegoWorld* p_world);
|
void DeleteWorld(LegoWorld* p_world);
|
||||||
void FUN_1005b4f0(MxBool p_disable, MxU16 p_flags);
|
void FUN_1005b4f0(MxBool p_disable, MxU16 p_flags);
|
||||||
|
void CreateBackgroundAudio();
|
||||||
|
void RemoveWorld(const MxAtomId&, MxLong);
|
||||||
|
|
||||||
|
static MxS32 GetCurrPathInfo(LegoPathBoundary**, MxS32&);
|
||||||
|
static void CreateInstance();
|
||||||
|
static LegoOmni* GetInstance();
|
||||||
|
|
||||||
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
|
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
|
||||||
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
|
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
#ifndef LEGOPATHCONTROLLER_H
|
#ifndef LEGOPATHCONTROLLER_H
|
||||||
#define LEGOPATHCONTROLLER_H
|
#define LEGOPATHCONTROLLER_H
|
||||||
|
|
||||||
|
#include "decomp.h"
|
||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
|
|
||||||
|
class IslePathActor;
|
||||||
|
class LegoPathBoundary;
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d7d60
|
// VTABLE: LEGO1 0x100d7d60
|
||||||
// SIZE 0x40
|
// SIZE 0x40
|
||||||
class LegoPathController : public MxCore {
|
class LegoPathController : public MxCore {
|
||||||
@ -31,6 +35,8 @@ public:
|
|||||||
virtual void VTable0x14(); // vtable+0x14
|
virtual void VTable0x14(); // vtable+0x14
|
||||||
virtual void Destroy(); // vtable+0x18
|
virtual void Destroy(); // vtable+0x18
|
||||||
|
|
||||||
|
undefined4 FUN_10046770(IslePathActor* p_actor);
|
||||||
|
MxResult FUN_10046b30(LegoPathBoundary** p_path, MxS32& p_value);
|
||||||
void Enable(MxBool p_enable);
|
void Enable(MxBool p_enable);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ public:
|
|||||||
MxBool PresentersPending();
|
MxBool PresentersPending();
|
||||||
void Remove(MxCore* p_object);
|
void Remove(MxCore* p_object);
|
||||||
void FUN_1001fc80(IslePathActor* p_actor);
|
void FUN_1001fc80(IslePathActor* p_actor);
|
||||||
MxS32 GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value);
|
MxResult GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value);
|
||||||
MxCore* Find(const char* p_class, const char* p_name);
|
MxCore* Find(const char* p_class, const char* p_name);
|
||||||
MxCore* Find(const MxAtomId& p_atom, MxS32 p_entityId);
|
MxCore* Find(const MxAtomId& p_atom, MxS32 p_entityId);
|
||||||
|
|
||||||
|
@ -265,16 +265,32 @@ done:
|
|||||||
return m_cameraController;
|
return m_cameraController;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1001fc80
|
// FUNCTION: LEGO1 0x1001fc80
|
||||||
void LegoWorld::FUN_1001fc80(IslePathActor* p_actor)
|
void LegoWorld::FUN_1001fc80(IslePathActor* p_actor)
|
||||||
{
|
{
|
||||||
|
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||||
|
LegoPathController* controller;
|
||||||
|
|
||||||
|
while (cursor.Next(controller)) {
|
||||||
|
if (!controller->FUN_10046770(p_actor)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10020120
|
// FUNCTION: LEGO1 0x10020120
|
||||||
MxS32 LegoWorld::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
|
MxResult LegoWorld::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
|
||||||
{
|
{
|
||||||
// TODO
|
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||||
return 0;
|
LegoPathController* controller;
|
||||||
|
|
||||||
|
cursor.Next(controller);
|
||||||
|
|
||||||
|
if (!controller) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return controller->FUN_10046b30(p_path, p_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10020220
|
// FUNCTION: LEGO1 0x10020220
|
||||||
|
@ -748,7 +748,7 @@ MxBool LegoOmni::DoesEntityExist(MxDSAction& p_dsAction)
|
|||||||
MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
|
MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
|
||||||
{
|
{
|
||||||
if (::CurrentWorld() == NULL) {
|
if (::CurrentWorld() == NULL) {
|
||||||
return -1;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ::CurrentWorld()->GetCurrPathInfo(p_path, p_value);
|
return ::CurrentWorld()->GetCurrPathInfo(p_path, p_value);
|
||||||
|
@ -25,6 +25,18 @@ MxResult LegoPathController::Tickle()
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10046770
|
||||||
|
undefined4 LegoPathController::FUN_10046770(IslePathActor* p_actor)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10046b30
|
||||||
|
MxResult LegoPathController::FUN_10046b30(LegoPathBoundary** p_path, MxS32& p_value)
|
||||||
|
{
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10046be0
|
// STUB: LEGO1 0x10046be0
|
||||||
void LegoPathController::Enable(MxBool p_enable)
|
void LegoPathController::Enable(MxBool p_enable)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user