mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-27 01:45:37 -05:00
Implement MxDiskStreamController::VTable0x20 (#325)
* push code * fixes * Update mxdiskstreamcontroller.h * Update mxdsstreamingaction.h * Match MxDiskStreamController::VTable0x20 * Move declaration * Remove cast --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
0278d032b9
commit
403b3dddb4
5 changed files with 44 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "mxautolocker.h"
|
#include "mxautolocker.h"
|
||||||
#include "mxdiskstreamprovider.h"
|
#include "mxdiskstreamprovider.h"
|
||||||
|
#include "mxdsstreamingaction.h"
|
||||||
#include "mxomni.h"
|
#include "mxomni.h"
|
||||||
#include "mxticklemanager.h"
|
#include "mxticklemanager.h"
|
||||||
|
|
||||||
|
@ -71,12 +72,41 @@ MxResult MxDiskStreamController::VTable0x30(MxDSAction* p_action)
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100c7ff0
|
// FUNCTION: LEGO1 0x100c7f40
|
||||||
|
void MxDiskStreamController::FUN_100c7f40(MxDSStreamingAction* p_streamingaction)
|
||||||
|
{
|
||||||
|
MxAutoLocker lock(&this->m_criticalSection);
|
||||||
|
if (p_streamingaction) {
|
||||||
|
m_list0x64.push_back(p_streamingaction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100c7ff0
|
||||||
MxResult MxDiskStreamController::VTable0x20(MxDSAction* p_action)
|
MxResult MxDiskStreamController::VTable0x20(MxDSAction* p_action)
|
||||||
{
|
{
|
||||||
// TODO
|
MxAutoLocker lock(&this->m_criticalSection);
|
||||||
|
MxDSStreamingAction* entry =
|
||||||
|
(MxDSStreamingAction*) m_list0x80.Find(p_action, FALSE); // TODO: is this a seperate class?
|
||||||
|
|
||||||
|
if (entry) {
|
||||||
|
MxDSStreamingAction* action = new MxDSStreamingAction(*p_action, 0);
|
||||||
|
action->SetUnknown28(entry->GetUnknown28());
|
||||||
|
action->SetUnknown84(entry->GetUnknown84());
|
||||||
|
action->SetOrigin(entry->GetOrigin());
|
||||||
|
action->SetUnknowna0(entry->GetUnknowna4());
|
||||||
|
|
||||||
|
FUN_100c7f40(action);
|
||||||
|
|
||||||
|
if (VTable0x2c(p_action, entry->GetUnknown94()) != SUCCESS)
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
else if (MxStreamController::VTable0x20(p_action) != SUCCESS)
|
||||||
|
return FAILURE;
|
||||||
|
|
||||||
|
m_unk0x70 = 1;
|
||||||
|
m_unk0xc4 = 1;
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100c8160
|
// STUB: LEGO1 0x100c8160
|
||||||
MxResult MxDiskStreamController::VTable0x24(MxDSAction* p_action)
|
MxResult MxDiskStreamController::VTable0x24(MxDSAction* p_action)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
#include "mxdsbuffer.h"
|
#include "mxdsbuffer.h"
|
||||||
|
#include "mxdsstreamingaction.h"
|
||||||
#include "mxstl/stlcompat.h"
|
#include "mxstl/stlcompat.h"
|
||||||
#include "mxstreamcontroller.h"
|
#include "mxstreamcontroller.h"
|
||||||
#include "mxtypes.h"
|
#include "mxtypes.h"
|
||||||
|
@ -48,6 +49,8 @@ class MxDiskStreamController : public MxStreamController {
|
||||||
MxCriticalSection m_critical9c; // 0x9c
|
MxCriticalSection m_critical9c; // 0x9c
|
||||||
MxStreamListMxDSAction m_list0xb8; // 0xb8
|
MxStreamListMxDSAction m_list0xb8; // 0xb8
|
||||||
undefined m_unk0xc4; // 0xc4
|
undefined m_unk0xc4; // 0xc4
|
||||||
|
|
||||||
|
void FUN_100c7f40(MxDSStreamingAction* p_streamingaction);
|
||||||
};
|
};
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x100c7330
|
// TEMPLATE: LEGO1 0x100c7330
|
||||||
|
|
|
@ -63,6 +63,7 @@ class MxDSAction : public MxDSObject {
|
||||||
inline MxS32 GetLoopCount() { return m_loopCount; }
|
inline MxS32 GetLoopCount() { return m_loopCount; }
|
||||||
inline void SetLoopCount(MxS32 p_loopCount) { m_loopCount = p_loopCount; }
|
inline void SetLoopCount(MxS32 p_loopCount) { m_loopCount = p_loopCount; }
|
||||||
inline const Vector3Data& GetLocation() const { return m_location; }
|
inline const Vector3Data& GetLocation() const { return m_location; }
|
||||||
|
inline MxCore* GetUnknown84() { return m_unk0x84; }
|
||||||
inline void SetUnknown84(MxCore* p_unk0x84) { m_unk0x84 = p_unk0x84; }
|
inline void SetUnknown84(MxCore* p_unk0x84) { m_unk0x84 = p_unk0x84; }
|
||||||
inline MxCore* GetOrigin() { return m_origin; }
|
inline MxCore* GetOrigin() { return m_origin; }
|
||||||
inline void SetOrigin(MxCore* p_origin) { m_origin = p_origin; }
|
inline void SetOrigin(MxCore* p_origin) { m_origin = p_origin; }
|
||||||
|
|
|
@ -38,10 +38,12 @@ class MxDSObject : public MxCore {
|
||||||
inline MxU32 GetObjectId() { return this->m_objectId; }
|
inline MxU32 GetObjectId() { return this->m_objectId; }
|
||||||
inline const MxAtomId& GetAtomId() { return this->m_atomId; }
|
inline const MxAtomId& GetAtomId() { return this->m_atomId; }
|
||||||
inline MxS16 GetUnknown24() { return this->m_unk0x24; }
|
inline MxS16 GetUnknown24() { return this->m_unk0x24; }
|
||||||
|
inline undefined4 GetUnknown28() { return this->m_unk0x28; }
|
||||||
|
|
||||||
inline void SetType(MxDSType p_type) { this->m_type = p_type; }
|
inline void SetType(MxDSType p_type) { this->m_type = p_type; }
|
||||||
inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; }
|
inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; }
|
||||||
inline void SetUnknown24(MxS16 p_unk0x24) { this->m_unk0x24 = p_unk0x24; }
|
inline void SetUnknown24(MxS16 p_unk0x24) { this->m_unk0x24 = p_unk0x24; }
|
||||||
|
inline void SetUnknown28(undefined4 p_unk0x28) { this->m_unk0x28 = p_unk0x28; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxU32 m_sizeOnDisk; // 0x8
|
MxU32 m_sizeOnDisk; // 0x8
|
||||||
|
|
|
@ -31,6 +31,11 @@ class MxDSStreamingAction : public MxDSAction {
|
||||||
void SetInternalAction(MxDSAction* p_dsAction);
|
void SetInternalAction(MxDSAction* p_dsAction);
|
||||||
void FUN_100cd2d0();
|
void FUN_100cd2d0();
|
||||||
|
|
||||||
|
inline MxU32 GetUnknown94() { return m_unk0x94; }
|
||||||
|
inline MxDSBuffer* GetUnknowna0() { return m_unk0xa0; }
|
||||||
|
inline MxDSBuffer* GetUnknowna4() { return m_unk0xa4; }
|
||||||
|
inline void SetUnknowna0(MxDSBuffer* p_unk0xa0) { m_unk0xa0 = p_unk0xa0; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxU32 m_unk0x94;
|
MxU32 m_unk0x94;
|
||||||
MxU32 m_bufferOffset;
|
MxU32 m_bufferOffset;
|
||||||
|
|
Loading…
Reference in a new issue