MxDSAction/Chunk/MediaAction/Sound (#85)

* Match MxDSChunk ctor/dtor

* Push work on MxDSAction/MediaAction/Sound

* MxDSMediaAction constructor is matching up to a mov location

* Match MxDSSound constructor by adding the missing member

just four bytes in between them in ghidra.. isn't that enough for ghidra to justify a member variable?

* Match MxDSMediaAction constructor

Today's lesson: ecx suggests '1'
This commit is contained in:
Joshua Peisach 2023-07-16 02:51:11 -04:00 committed by GitHub
parent e3bf7b53b5
commit a31626cffb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 80 additions and 40 deletions

View file

@ -5,10 +5,12 @@ MxDSAction::MxDSAction()
{ {
// TODO // TODO
this->SetType(MxDSType_Action); this->SetType(MxDSType_Action);
this->m_omni = NULL;
this->m_someTimingField = -0x80000000;
} }
// OFFSET: LEGO1 0x100ada80 STUB // OFFSET: LEGO1 0x100ada80
MxDSAction::~MxDSAction() MxDSAction::~MxDSAction()
{ {
// TODO delete this->m_unk7c;
} }

View file

@ -2,6 +2,7 @@
#define MXDSACTION_H #define MXDSACTION_H
#include "mxdsobject.h" #include "mxdsobject.h"
#include "mxomni.h"
// VTABLE 0x100dc098 // VTABLE 0x100dc098
// SIZE 0x94 // SIZE 0x94
@ -23,33 +24,33 @@ public:
{ {
return !strcmp(name, MxDSAction::ClassName()) || MxDSObject::IsA(name); return !strcmp(name, MxDSAction::ClassName()) || MxDSObject::IsA(name);
} }
private:
int m_unk2c; MxLong m_unk2c;
int m_unk30; MxLong m_unk30;
int m_unk34; MxLong m_unk34;
int m_unk38; MxLong* m_unk38;
int m_unk3c; MxLong m_unk3c;
int m_unk40; MxLong m_unk40;
int m_unk44; MxLong m_unk44;
int m_unk48; MxLong m_unk48;
int m_unk4c; MxLong m_unk4c;
int m_unk50; MxLong m_unk50;
int m_unk54; MxLong m_unk54;
int m_unk58; MxLong m_unk58;
int m_unk5c; MxLong m_unk5c;
int m_unk60; MxLong m_unk60;
int m_unk64; MxLong m_unk64;
int m_unk68; MxLong m_unk68;
int m_unk6c; MxLong m_unk6c;
int m_unk70; MxLong m_unk70;
int m_unk74; MxLong m_unk74;
int m_unk78; MxLong m_unk78;
int m_unk7c; MxLong* m_unk7c;
int m_unk80; MxLong m_unk80;
int m_unk84; MxLong m_unk84;
int m_unk88; MxLong m_unk88;
int m_unk8c; MxOmni* m_omni; // 0x8c
int m_unk90; MxS32 m_someTimingField; // 0x90
}; };
#endif // MXDSACTION_H #endif // MXDSACTION_H

View file

@ -1,13 +1,19 @@
#include "mxdschunk.h" #include "mxdschunk.h"
// OFFSET: LEGO1 0x100be050 STUB // OFFSET: LEGO1 0x100be050
MxDSChunk::MxDSChunk() MxDSChunk::MxDSChunk()
{ {
// TODO this->m_length = 0;
this->m_pStuff = NULL;
this->m_buffer = -1;
this->m_long1FromHeader = 0;
this->m_long2FromHeader = 0;
} }
// OFFSET: LEGO1 0x100be170 STUB // OFFSET: LEGO1 0x100be170
MxDSChunk::~MxDSChunk() MxDSChunk::~MxDSChunk()
{ {
// TODO if ((this->m_length & 1) != 0) {
delete this->m_pStuff;
}
} }

View file

@ -1,8 +1,11 @@
#ifndef MXDSCHUNK_H #ifndef MXDSCHUNK_H
#define MXDSCHUNK_H #define MXDSCHUNK_H
#include "mxcore.h"
#include "mxcore.h"
#include "mxtypes.h"
// VTABLE 0x100dc7f8
class MxDSChunk : public MxCore class MxDSChunk : public MxCore
{ {
public: public:
@ -21,6 +24,13 @@ public:
{ {
return !strcmp(name, MxDSChunk::ClassName()) || MxCore::IsA(name); return !strcmp(name, MxDSChunk::ClassName()) || MxCore::IsA(name);
} }
private:
MxS16 m_length; // 0x8
MxLong m_buffer; // 0xc
MxLong m_long1FromHeader; // 0x10
MxLong m_long2FromHeader; // 0x14
void* m_pStuff; // 0x18
void* m_pSomething; // 0x1c
}; };
#endif // MXDSCHUNK_H #endif // MXDSCHUNK_H

View file

@ -3,12 +3,19 @@
// OFFSET: LEGO1 0x100c8b40 // OFFSET: LEGO1 0x100c8b40
MxDSMediaAction::MxDSMediaAction() MxDSMediaAction::MxDSMediaAction()
{ {
// TODO this->m_unk98 = 0;
this->m_unk9c = 0;
this->m_unka0 = 0;
this->m_unka4 = 0;
this->m_unka8 = 0;
this->m_unkac = 1;
this->m_unkb4 = 0xffffffff;
this->m_unkb0 = 0;
this->SetType(MxDSType_MediaAction); this->SetType(MxDSType_MediaAction);
} }
// OFFSET: LEGO1 0x100c8cf0 STUB // OFFSET: LEGO1 0x100c8cf0
MxDSMediaAction::~MxDSMediaAction() MxDSMediaAction::~MxDSMediaAction()
{ {
// TODO delete this->m_unk98;
} }

View file

@ -1,6 +1,7 @@
#ifndef MXDSMEDIAACTION_H #ifndef MXDSMEDIAACTION_H
#define MXDSMEDIAACTION_H #define MXDSMEDIAACTION_H
#include "decomp.h"
#include "mxdsaction.h" #include "mxdsaction.h"
// VTABLE 0x100dcd40 // VTABLE 0x100dcd40
@ -23,7 +24,16 @@ public:
{ {
return !strcmp(name, MxDSMediaAction::ClassName()) || MxDSAction::IsA(name); return !strcmp(name, MxDSMediaAction::ClassName()) || MxDSAction::IsA(name);
} }
private:
MxS32* m_unk94;
MxS32* m_unk98;
MxS32* m_unk9c;
MxS32* m_unka0;
MxS32* m_unka4;
MxS32* m_unka8;
MxS32 m_unkac;
MxS32* m_unkb0;
MxS32 m_unkb4;
}; };
#endif // MXDSMEDIAACTION_H #endif // MXDSMEDIAACTION_H

View file

@ -3,7 +3,7 @@
// OFFSET: LEGO1 0x100c92c0 // OFFSET: LEGO1 0x100c92c0
MxDSSound::MxDSSound() MxDSSound::MxDSSound()
{ {
// TODO this->m_lastField = 0x4f;
this->SetType(MxDSType_Sound); this->SetType(MxDSType_Sound);
} }

View file

@ -2,6 +2,7 @@
#define MXDSSOUND_H #define MXDSSOUND_H
#include "mxdsmediaaction.h" #include "mxdsmediaaction.h"
#include "mxtypes.h"
// VTABLE 0x100dcdd0 // VTABLE 0x100dcdd0
// SIZE 0xc0 // SIZE 0xc0
@ -23,6 +24,9 @@ public:
{ {
return !strcmp(name, MxDSSound::ClassName()) || MxDSMediaAction::IsA(name); return !strcmp(name, MxDSSound::ClassName()) || MxDSMediaAction::IsA(name);
} }
private:
MxS32 m_unkb8;
MxLong m_lastField; // 0xbc
}; };