mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 08:54:15 +00:00
Implement/match LegoEntity::VTable0x34 (#633)
* Implement/match LegoEntity::VTable0x34 * Change parameter name * Fix order
This commit is contained in:
committed by
GitHub
parent
71bcd4c771
commit
a12146f52f
@@ -56,6 +56,13 @@ MxResult LegoBuildingManager::Load(LegoStorage* p_storage)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1002ff40
|
||||
MxU32 LegoBuildingManager::FUN_1002ff40(LegoROI*, MxBool)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002ff90
|
||||
void LegoBuildingManager::SetCustomizeAnimFile(const char* p_value)
|
||||
{
|
||||
|
||||
@@ -47,6 +47,13 @@ MxResult LegoPlantManager::Load(LegoStorage* p_storage)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10026ba0
|
||||
MxU32 LegoPlantManager::FUN_10026ba0(LegoROI*, MxBool)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10026be0
|
||||
void LegoPlantManager::SetCustomizeAnimFile(const char* p_value)
|
||||
{
|
||||
|
||||
@@ -123,6 +123,13 @@ MxBool LegoUnkSaveDataWriter::FUN_10084c00(const LegoChar*)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10085140
|
||||
MxU32 LegoUnkSaveDataWriter::FUN_10085140(LegoROI*, MxBool)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100851a0
|
||||
void LegoUnkSaveDataWriter::SetCustomizeAnimFile(const char* p_value)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#include "legoentity.h"
|
||||
|
||||
#include "define.h"
|
||||
#include "legobuildingmanager.h"
|
||||
#include "legoomni.h"
|
||||
#include "legoplantmanager.h"
|
||||
#include "legounksavedatawriter.h"
|
||||
#include "legoutil.h"
|
||||
#include "legovideomanager.h"
|
||||
@@ -80,7 +82,7 @@ void LegoEntity::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
if (m_roi) {
|
||||
if (m_flags & c_bit1) {
|
||||
if (m_roi->GetUnknown0x104() == this) {
|
||||
if (m_roi->GetEntity() == this) {
|
||||
m_roi->SetEntity(NULL);
|
||||
}
|
||||
|
||||
@@ -203,10 +205,35 @@ void LegoEntity::ParseAction(char* p_extra)
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10010f10
|
||||
void LegoEntity::VTable0x34()
|
||||
// FUNCTION: LEGO1 0x10010f10
|
||||
void LegoEntity::VTable0x34(MxBool p_und)
|
||||
{
|
||||
// TODO
|
||||
if (!GetUnknown0x10IsSet(c_altBit1)) {
|
||||
MxU32 objectId = 0;
|
||||
const LegoChar* roiName = m_roi->GetName();
|
||||
|
||||
switch (m_unk0x59) {
|
||||
case 0:
|
||||
objectId = UnkSaveDataWriter()->FUN_10085140(m_roi, p_und);
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
objectId = PlantManager()->FUN_10026ba0(m_roi, p_und);
|
||||
break;
|
||||
case 3:
|
||||
objectId = BuildingManager()->FUN_1002ff40(m_roi, p_und);
|
||||
break;
|
||||
}
|
||||
|
||||
if (objectId) {
|
||||
MxDSAction action;
|
||||
action.SetAtomId(MxAtomId(UnkSaveDataWriter()->GetCustomizeAnimFile(), e_lowerCase2));
|
||||
action.SetObjectId(objectId);
|
||||
action.AppendData(strlen(roiName) + 1, roiName);
|
||||
Start(&action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10011070
|
||||
|
||||
@@ -392,7 +392,7 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param)
|
||||
roi = (LegoROI*) oroi;
|
||||
}
|
||||
|
||||
LegoEntity* entity = roi->GetUnknown0x104();
|
||||
LegoEntity* entity = roi->GetEntity();
|
||||
if (entity && entity->Notify(p_param) != 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user