fixes + improve match

This commit is contained in:
Misha 2023-12-16 11:36:07 -05:00
parent 82eb23e42b
commit 0d7d4bf7cc
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
9 changed files with 46 additions and 43 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/lego3dview.cpp
LEGO1/legoact2state.cpp LEGO1/legoact2state.cpp
LEGO1/legoactioncontrolpresenter.cpp LEGO1/legoactioncontrolpresenter.cpp
LEGO1/legoactor.cpp LEGO1/legoactor.cpp
@ -224,7 +225,6 @@ add_library(lego1 SHARED
LEGO1/towtrackmissionstate.cpp LEGO1/towtrackmissionstate.cpp
LEGO1/viewmanager/viewmanager.cpp LEGO1/viewmanager/viewmanager.cpp
LEGO1/viewmanager/viewroi.cpp LEGO1/viewmanager/viewroi.cpp
LEGO1/lego3dview.cpp
) )
if (MINGW) if (MINGW)
target_compile_definitions(lego1 PRIVATE DIRECTINPUT_VERSION=0x0500) target_compile_definitions(lego1 PRIVATE DIRECTINPUT_VERSION=0x0500)

View File

@ -2,7 +2,7 @@
#include "legoroi.h" #include "legoroi.h"
// STUB: LEGO1 0x1003dd70 // STUB: LEGO1 0x100ab2b0
LegoROI* Lego3DView::PickROI(MxLong p_a, MxLong p_b) LegoROI* Lego3DView::PickROI(MxLong p_a, MxLong p_b)
{ {
// TODO // TODO

View File

@ -605,7 +605,7 @@ MxBool LegoOmni::DoesEntityExist(MxDSAction& p_dsAction)
} }
// FUNCTION: LEGO1 0x1005b400 // FUNCTION: LEGO1 0x1005b400
int LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, int& p_value) MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
{ {
if (GetCurrentWorld() == NULL) { if (GetCurrentWorld() == NULL) {
return -1; return -1;

View File

@ -92,7 +92,7 @@ void LegoWorld::FUN_1001fc80(IslePathActor* p_actor)
} }
// STUB: LEGO1 0x10020120 // STUB: LEGO1 0x10020120
int LegoWorld::GetCurrPathInfo(LegoPathBoundary** p_path, int& p_value) MxS32 LegoWorld::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
{ {
// TODO // TODO
return 0; return 0;

View File

@ -4,6 +4,8 @@
#include "mxdsaction.h" #include "mxdsaction.h"
#include "mxnotificationparam.h" #include "mxnotificationparam.h"
class MxPresenter;
// VTABLE: LEGO1 0x100d8350 // VTABLE: LEGO1 0x100d8350
// SIZE 0x14 // SIZE 0x14
class MxActionNotificationParam : public MxNotificationParam { class MxActionNotificationParam : public MxNotificationParam {
@ -88,7 +90,7 @@ class MxEndActionNotificationParam : public MxActionNotificationParam {
// SIZE 0x18 // SIZE 0x18
class MxType4NotificationParam : public MxActionNotificationParam { class MxType4NotificationParam : public MxActionNotificationParam {
public: public:
inline MxType4NotificationParam(MxCore* p_sender, MxDSAction* p_action, undefined4 p_unk0x14) inline MxType4NotificationParam(MxCore* p_sender, MxDSAction* p_action, MxPresenter* p_unk0x14)
: MxActionNotificationParam(TYPE4, p_sender, p_action, FALSE) : MxActionNotificationParam(TYPE4, p_sender, p_action, FALSE)
{ {
m_unk0x14 = p_unk0x14; m_unk0x14 = p_unk0x14;
@ -97,7 +99,7 @@ class MxType4NotificationParam : public MxActionNotificationParam {
virtual MxNotificationParam* Clone() override; // vtable+0x4 virtual MxNotificationParam* Clone() override; // vtable+0x4
private: private:
undefined4 m_unk0x14; // 0x14 MxPresenter* m_unk0x14; // 0x14
}; };
// SYNTHETIC: LEGO1 0x100b0430 // SYNTHETIC: LEGO1 0x100b0430

View File

@ -324,10 +324,7 @@ MxResult MxOmni::CreatePresenter(MxStreamController* p_controller, MxDSAction& p
{ {
MxResult result = FAILURE; MxResult result = FAILURE;
MxPresenter* object = (MxPresenter*) m_objectFactory->Create(PresenterNameDispatch(p_action)); MxPresenter* object = (MxPresenter*) m_objectFactory->Create(PresenterNameDispatch(p_action));
if (object == NULL) { if (object) {
return result;
}
if (object->AddToManager() == SUCCESS) { if (object->AddToManager() == SUCCESS) {
MxPresenter* sender = (MxPresenter*) p_action.GetUnknown28(); MxPresenter* sender = (MxPresenter*) p_action.GetUnknown28();
if (sender == NULL && (sender = (MxPresenter*) p_controller->FUN_100c1e70(p_action)) == NULL) { if (sender == NULL && (sender = (MxPresenter*) p_controller->FUN_100c1e70(p_action)) == NULL) {
@ -344,7 +341,10 @@ MxResult MxOmni::CreatePresenter(MxStreamController* p_controller, MxDSAction& p
if (object->StartAction(p_controller, &p_action) == SUCCESS) { if (object->StartAction(p_controller, &p_action) == SUCCESS) {
if (sender) { if (sender) {
NotificationManager()->Send(p_action.GetUnknown84(), &MxType4NotificationParam(this, &p_action, FALSE)); NotificationManager()->Send(
p_action.GetUnknown84(),
&MxType4NotificationParam(this, &p_action, object)
);
} }
if (p_action.GetUnknown84()) { if (p_action.GetUnknown84()) {
@ -357,7 +357,7 @@ MxResult MxOmni::CreatePresenter(MxStreamController* p_controller, MxDSAction& p
result = SUCCESS; result = SUCCESS;
} }
}
return result; return result;
} }

View File

@ -10,6 +10,7 @@
class MxCompositePresenter; class MxCompositePresenter;
class MxStreamController; class MxStreamController;
class MxPresenter;
// VTABLE: LEGO1 0x100d4d38 // VTABLE: LEGO1 0x100d4d38
// SIZE 0x40 // SIZE 0x40

View File

@ -134,12 +134,12 @@ MxResult MxStreamController::VTable0x30(MxDSAction* p_action)
} }
// FUNCTION: LEGO1 0x100c1e70 // FUNCTION: LEGO1 0x100c1e70
MxCore* MxStreamController::FUN_100c1e70(MxDSAction& p_obj) MxCore* MxStreamController::FUN_100c1e70(MxDSAction& p_action)
{ {
MxAutoLocker locker(&m_criticalSection); MxAutoLocker locker(&m_criticalSection);
MxCore* result = NULL; MxCore* result = NULL;
if (p_obj.GetObjectId() != -1) { if (p_action.GetObjectId() != -1) {
MxDSAction* action = m_unk0x3c.Find(&p_obj, FALSE); MxDSAction* action = m_unk0x3c.Find(&p_action, FALSE);
if (action != NULL) { if (action != NULL) {
result = (MxCore*) action->GetUnknown28(); result = (MxCore*) action->GetUnknown28();
} }

View File

@ -44,7 +44,7 @@ class MxStreamController : public MxCore {
MxResult FUN_100c1800(MxDSAction* p_action, MxU32 p_val); MxResult FUN_100c1800(MxDSAction* p_action, MxU32 p_val);
MxBool FUN_100c20d0(MxDSObject& p_obj); MxBool FUN_100c20d0(MxDSObject& p_obj);
MxResult FUN_100c1a00(MxDSAction* p_action, MxU32 p_bufferval); MxResult FUN_100c1a00(MxDSAction* p_action, MxU32 p_bufferval);
MxCore* FUN_100c1e70(MxDSAction& p_obj); MxCore* FUN_100c1e70(MxDSAction& p_action);
MxResult FUN_100c1f00(MxDSAction* p_action); MxResult FUN_100c1f00(MxDSAction* p_action);
inline MxAtomId& GetAtom() { return m_atom; }; inline MxAtomId& GetAtom() { return m_atom; };