mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-23 07:58:21 -05:00
Implement MxStreamController::vtable0x2c (#265)
* MxStreamController::vtable0x2c * Add size comment --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
49bad74104
commit
42a82794a8
3 changed files with 46 additions and 5 deletions
|
@ -4,8 +4,17 @@
|
||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
|
|
||||||
// VTABLE 0x100dc9a0
|
// VTABLE 0x100dc9a0
|
||||||
|
// SIZE 0x14
|
||||||
class MxNextActionDataStart : public MxCore {
|
class MxNextActionDataStart : public MxCore {
|
||||||
public:
|
public:
|
||||||
|
// inlined constructor at 0x100c1847
|
||||||
|
inline MxNextActionDataStart(MxU32 p_objectId, MxS16 p_unk24val, MxU32 p_data)
|
||||||
|
{
|
||||||
|
m_objectId = p_objectId;
|
||||||
|
m_unk24val = p_unk24val;
|
||||||
|
m_data = p_data;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c1900
|
// OFFSET: LEGO1 0x100c1900
|
||||||
inline virtual const char* ClassName() const override // vtable+0xc
|
inline virtual const char* ClassName() const override // vtable+0xc
|
||||||
{
|
{
|
||||||
|
@ -18,6 +27,11 @@ class MxNextActionDataStart : public MxCore {
|
||||||
{
|
{
|
||||||
return !strcmp(name, MxNextActionDataStart::ClassName()) || MxCore::IsA(name);
|
return !strcmp(name, MxNextActionDataStart::ClassName()) || MxCore::IsA(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
MxU32 m_objectId;
|
||||||
|
MxS16 m_unk24val;
|
||||||
|
MxU32 m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXNEXTACTIONDATASTART_H
|
#endif // MXNEXTACTIONDATASTART_H
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
#include "legoomni.h"
|
#include "legoomni.h"
|
||||||
#include "mxautolocker.h"
|
#include "mxautolocker.h"
|
||||||
|
#include "mxnextactiondatastart.h"
|
||||||
|
|
||||||
|
DECOMP_SIZE_ASSERT(MxNextActionDataStart, 0x14)
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c0b90 STUB
|
// OFFSET: LEGO1 0x100c0b90 STUB
|
||||||
MxStreamController::MxStreamController()
|
MxStreamController::MxStreamController()
|
||||||
|
@ -74,20 +77,42 @@ MxResult MxStreamController::vtable0x24(undefined4 p_unknown)
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c1800 STUB
|
||||||
|
MxResult MxStreamController::FUN_100c1800(MxDSAction* p_action, MxU32 p_val)
|
||||||
|
{
|
||||||
|
MxNextActionDataStart* dataActionStart =
|
||||||
|
new MxNextActionDataStart(p_action->GetObjectId(), p_action->GetUnknown24(), p_val);
|
||||||
|
if (dataActionStart == NULL) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
// TODO: insert dataActionStart to a list
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b9420
|
// OFFSET: LEGO1 0x100b9420
|
||||||
MxResult MxStreamController::vtable0x28()
|
MxResult MxStreamController::vtable0x28()
|
||||||
{
|
{
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c1c10 STUB
|
// OFFSET: LEGO1 0x100c1c10
|
||||||
MxResult MxStreamController::vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval)
|
MxResult MxStreamController::vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval)
|
||||||
{
|
{
|
||||||
|
MxAutoLocker locker(&m_criticalSection);
|
||||||
|
if (FUN_100c1a00(p_action, p_bufferval) != SUCCESS) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
return FUN_100c1800(p_action, (p_bufferval / m_provider->GetFileSize()) * m_provider->GetFileSize());
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c1ce0 STUB
|
// OFFSET: LEGO1 0x100c1ce0 STUB
|
||||||
MxResult MxStreamController::vtable0x30(undefined4 p_unknown)
|
MxResult MxStreamController::vtable0x30(undefined4 p_unknown)
|
||||||
{
|
{
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c1a00 STUB
|
||||||
|
MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_bufferval)
|
||||||
|
{
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
|
@ -35,11 +35,13 @@ class MxStreamController : public MxCore {
|
||||||
virtual MxResult vtable0x1C(undefined4 p_unknown, undefined4 p_unknown2); // vtable+0x1c
|
virtual MxResult vtable0x1C(undefined4 p_unknown, undefined4 p_unknown2); // vtable+0x1c
|
||||||
virtual MxResult vtable0x20(MxDSAction* p_action); // vtable+0x20
|
virtual MxResult vtable0x20(MxDSAction* p_action); // vtable+0x20
|
||||||
virtual MxResult vtable0x24(undefined4 p_unknown); // vtable+0x24
|
virtual MxResult vtable0x24(undefined4 p_unknown); // vtable+0x24
|
||||||
|
MxResult FUN_100c1800(MxDSAction* p_action, MxU32 p_val);
|
||||||
virtual MxResult vtable0x28(); // vtable+0x28
|
virtual MxResult vtable0x28(); // vtable+0x28
|
||||||
virtual MxResult vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval); // vtable+0x2c
|
virtual MxResult vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval); // vtable+0x2c
|
||||||
virtual MxResult vtable0x30(undefined4 p_unknown); // vtable+0x30
|
virtual MxResult vtable0x30(undefined4 p_unknown); // vtable+0x30
|
||||||
|
|
||||||
MxBool FUN_100c20d0(MxDSObject& p_obj);
|
MxBool FUN_100c20d0(MxDSObject& p_obj);
|
||||||
|
MxResult FUN_100c1a00(MxDSAction* p_action, MxU32 p_bufferval);
|
||||||
|
|
||||||
inline MxAtomId& GetAtom() { return atom; };
|
inline MxAtomId& GetAtom() { return atom; };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue