Finish some missing methods (#448)

* Finish some missing methods

* Minor style updates/fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Nathan M Gilbert 2024-01-17 12:08:48 -05:00 committed by GitHub
parent 240ca5570d
commit b25239f22d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 66 additions and 8 deletions

View file

@ -58,9 +58,7 @@ void LegoEntity::Destroy(MxBool p_fromDestructor)
}
else {
VideoManager()->Get3DManager()->GetLego3DView()->Remove(*m_roi);
if (m_roi)
delete m_roi;
delete m_roi;
}
}

View file

@ -42,11 +42,12 @@ class MxDiskStreamController : public MxStreamController {
inline MxBool GetUnk0xc4() const { return m_unk0xc4; }
void FUN_100c7f40(MxDSStreamingAction* p_streamingaction);
void FUN_100c8670(MxDSStreamingAction* p_streamingAction);
void InsertToList74(MxDSBuffer* p_buffer);
void FUN_100c7cb0(MxDSStreamingAction* p_action);
MxResult FUN_100c7890(MxDSStreamingAction* p_action);
void FUN_100c7cb0(MxDSStreamingAction* p_action);
void FUN_100c7f40(MxDSStreamingAction* p_streamingaction);
void FUN_100c8120(MxDSAction* p_action);
void InsertToList74(MxDSBuffer* p_buffer);
void FUN_100c8670(MxDSStreamingAction* p_streamingAction);
private:
MxStreamListMxDSAction m_list0x64; // 0x64
@ -87,4 +88,7 @@ class MxDiskStreamController : public MxStreamController {
// TEMPLATE: LEGO1 0x100c74e0
// List<MxDSBuffer *>::~List<MxDSBuffer *>
// TEMPLATE: LEGO1 0x100c7ef0
// list<MxNextActionDataStart *>::insert
#endif // MXDISKSTREAMCONTROLLER_H

View file

@ -28,8 +28,13 @@ class MxDSMediaAction : public MxDSAction {
return !strcmp(p_name, MxDSMediaAction::ClassName()) || MxDSAction::IsA(p_name);
}
// SYNTHETIC: LEGO1 0x100c8cd0
// MxDSMediaAction::`scalar deleting destructor'
virtual undefined4 VTable0x14(); // vtable+14;
virtual MxU32 GetSizeOnDisk() override; // vtable+18;
virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
virtual MxDSAction* Clone() override; // vtable+2c;
void CopyMediaSrcPath(const char* p_mediaSrcPath);

View file

@ -26,8 +26,15 @@ class MxDSParallelAction : public MxDSMultiAction {
return !strcmp(p_name, MxDSParallelAction::ClassName()) || MxDSMultiAction::IsA(p_name);
}
// SYNTHETIC: LEGO1 0x100cb020
// MxDSParallelAction::`scalar deleting destructor'
virtual MxLong GetDuration() override; // vtable+24;
virtual MxDSAction* Clone() override; // vtable+2c;
// FUNCTION: LEGO1 0x100caef0
virtual void SetDuration(MxLong p_duration) override { m_duration = p_duration; } // vtable+0x28
virtual MxDSAction* Clone() override; // vtable+2c;
};
#endif // MXDSPARALLELACTION_H

View file

@ -100,6 +100,7 @@ class MxStreamer : public MxCore {
MxBool FUN_100b9b30(MxDSObject& p_dsObject);
MxStreamController* GetOpenStream(const char* p_name);
void FUN_100b98f0(MxDSAction* p_action);
MxResult AddStreamControllerToOpenList(MxStreamController* p_stream);
MxResult FUN_100b99b0(MxDSAction* p_action);
MxResult DeleteObject(MxDSAction* p_dsAction);

View file

@ -47,6 +47,17 @@ MxDSMediaAction& MxDSMediaAction::operator=(MxDSMediaAction& p_dsMediaAction)
return *this;
}
// FUNCTION: LEGO1 0x100c8df0
MxDSAction* MxDSMediaAction::Clone()
{
MxDSMediaAction* clone = new MxDSMediaAction();
if (clone)
*clone = *this;
return clone;
}
// FUNCTION: LEGO1 0x100c8e80
void MxDSMediaAction::CopyMediaSrcPath(const char* p_mediaSrcPath)
{
@ -64,6 +75,12 @@ void MxDSMediaAction::CopyMediaSrcPath(const char* p_mediaSrcPath)
this->m_mediaSrcPath = NULL;
}
// FUNCTION: LEGO1 0x100c8f00
undefined4 MxDSMediaAction::VTable0x14()
{
return MxDSAction::VTable0x14();
}
// FUNCTION: LEGO1 0x100c8f10
MxU32 MxDSMediaAction::GetSizeOnDisk()
{

View file

@ -301,6 +301,23 @@ MxResult MxDiskStreamController::VTable0x20(MxDSAction* p_action)
return SUCCESS;
}
// FUNCTION: LEGO1 0x100c8120
void MxDiskStreamController::FUN_100c8120(MxDSAction* p_action)
{
VTable0x30(p_action);
if (m_provider) {
m_provider->VTable0x20(p_action);
}
while (TRUE) {
MxDSAction* found = m_unk0x54.Find(p_action, TRUE);
if (!found)
break;
delete found;
}
}
// FUNCTION: LEGO1 0x100c8160
MxResult MxDiskStreamController::VTable0x24(MxDSAction* p_action)
{

View file

@ -121,6 +121,15 @@ MxStreamController* MxStreamer::GetOpenStream(const char* p_name)
return NULL;
}
// FUNCTION: LEGO1 0x100b98f0
void MxStreamer::FUN_100b98f0(MxDSAction* p_action)
{
MxStreamController* controller = GetOpenStream(p_action->GetAtomId().GetInternal());
if (controller && controller->IsA("MxDiskStreamController")) {
((MxDiskStreamController*) controller)->FUN_100c8120(p_action);
}
}
// FUNCTION: LEGO1 0x100b9930
MxResult MxStreamer::AddStreamControllerToOpenList(MxStreamController* p_stream)
{