mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-10 08:03:13 +00:00
Bootstrap anim.lib (#577)
* Bootstrap anim.lib * Fix order * Fix LegoMorphKey
This commit is contained in:
committed by
GitHub
parent
35a566c243
commit
58482ff676
@@ -1,8 +1,7 @@
|
||||
#ifndef LEGOANIMPRESENTER_H
|
||||
#define LEGOANIMPRESENTER_H
|
||||
|
||||
#include "lego/sources/misc/legostorage.h"
|
||||
#include "lego/sources/misc/legotree.h"
|
||||
#include "lego/sources/anim/legoanim.h"
|
||||
#include "mxgeometry/mxgeometry3d.h"
|
||||
#include "mxvideopresenter.h"
|
||||
|
||||
@@ -41,7 +40,7 @@ public:
|
||||
void PutFrame() override; // vtable+0x6c
|
||||
virtual MxResult VTable0x88(MxStreamChunk* p_chunk); // vtable+0x88
|
||||
|
||||
inline LegoAnimClass* GetUnknown0x64() { return m_unk0x64; }
|
||||
inline LegoAnim* GetAnimation() { return m_anim; }
|
||||
|
||||
const char* GetActionObjectName();
|
||||
|
||||
@@ -49,7 +48,7 @@ protected:
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
||||
LegoAnimClass* m_unk0x64; // 0x64
|
||||
LegoAnim* m_anim; // 0x64
|
||||
undefined4 m_unk0x68; // 0x68
|
||||
undefined4 m_unk0x6c; // 0x6c
|
||||
undefined4 m_unk0x70; // 0x70
|
||||
@@ -76,27 +75,4 @@ protected:
|
||||
// SYNTHETIC: LEGO1 0x10068650
|
||||
// LegoAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
// VTABLE: LEGO1 0x100db8d8
|
||||
// SIZE 0x18
|
||||
class LegoAnimClass : public LegoTree {
|
||||
public:
|
||||
LegoAnimClass();
|
||||
~LegoAnimClass() override;
|
||||
|
||||
LegoResult Write(LegoStorage* p_storage) override; // vtable+0x08
|
||||
LegoTreeNodeData* CreateData() override; // vtable+0x0c
|
||||
virtual MxResult VTable0x10(LegoMemory* p_stream, MxS32); // vtable+0x10
|
||||
|
||||
inline MxLong GetUnknown0x8() { return m_unk0x08; }
|
||||
|
||||
private:
|
||||
MxLong m_unk0x08; // 0x08
|
||||
undefined4 m_unk0x0c; // 0x0c
|
||||
undefined4 m_unk0x10; // 0x10
|
||||
undefined4 m_unk0x14; // 0x14
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100a0ba0
|
||||
// LegoAnimClass::`scalar deleting destructor'
|
||||
|
||||
#endif // LEGOANIMPRESENTER_H
|
||||
|
||||
@@ -302,7 +302,7 @@ void LegoWorld::Add(MxCore* p_object)
|
||||
|
||||
if (!strcmpi(animPresenter->GetAction()->GetObjectName(), "ConfigAnimation")) {
|
||||
FUN_1003e050(animPresenter);
|
||||
animPresenter->GetAction()->SetDuration(animPresenter->GetUnknown0x64()->GetUnknown0x8());
|
||||
animPresenter->GetAction()->SetDuration(animPresenter->GetAnimation()->GetDuration());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "mxvideomanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoAnimPresenter, 0xc0)
|
||||
DECOMP_SIZE_ASSERT(LegoAnimClass, 0x18)
|
||||
|
||||
// FUNCTION: LEGO1 0x10068420
|
||||
LegoAnimPresenter::LegoAnimPresenter()
|
||||
@@ -25,7 +24,7 @@ LegoAnimPresenter::~LegoAnimPresenter()
|
||||
// FUNCTION: LEGO1 0x100686f0
|
||||
void LegoAnimPresenter::Init()
|
||||
{
|
||||
m_unk0x64 = NULL;
|
||||
m_anim = NULL;
|
||||
m_unk0x68 = 0;
|
||||
m_unk0x6c = 0;
|
||||
m_unk0x74 = 0;
|
||||
@@ -71,9 +70,9 @@ MxResult LegoAnimPresenter::VTable0x88(MxStreamChunk* p_chunk)
|
||||
if (stream.Read(&m_unk0xa8[2], sizeof(float)) == SUCCESS) {
|
||||
if (stream.Read(&val2, sizeof(MxS32)) == SUCCESS) {
|
||||
if (stream.Read(&val3, sizeof(MxS32)) == SUCCESS) {
|
||||
m_unk0x64 = new LegoAnimClass();
|
||||
if (m_unk0x64) {
|
||||
if (m_unk0x64->VTable0x10(&stream, val2) == SUCCESS) {
|
||||
m_anim = new LegoAnim();
|
||||
if (m_anim) {
|
||||
if (m_anim->Read(&stream, val2) == SUCCESS) {
|
||||
result = SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -86,7 +85,7 @@ MxResult LegoAnimPresenter::VTable0x88(MxStreamChunk* p_chunk)
|
||||
}
|
||||
|
||||
if (result != SUCCESS) {
|
||||
delete m_unk0x64;
|
||||
delete m_anim;
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -148,7 +147,7 @@ void LegoAnimPresenter::StreamingTickle()
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_action->GetElapsedTime() > m_unk0x64->GetUnknown0x8() + m_action->GetStartTime()) {
|
||||
if (m_action->GetElapsedTime() > m_anim->GetDuration() + m_action->GetStartTime()) {
|
||||
m_unk0x95 = 1;
|
||||
}
|
||||
}
|
||||
@@ -198,38 +197,3 @@ void LegoAnimPresenter::EndAction()
|
||||
// TODO
|
||||
MxVideoPresenter::EndAction();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a0b30
|
||||
LegoAnimClass::LegoAnimClass()
|
||||
{
|
||||
m_unk0x08 = 0;
|
||||
m_unk0x0c = 0;
|
||||
m_unk0x10 = 0;
|
||||
m_unk0x14 = 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100a0bc0
|
||||
LegoAnimClass::~LegoAnimClass()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100a0c70
|
||||
MxResult LegoAnimClass::VTable0x10(LegoMemory* p_stream, MxS32)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100a0e30
|
||||
LegoResult LegoAnimClass::Write(LegoStorage* p_storage)
|
||||
{
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100a1040
|
||||
LegoTreeNodeData* LegoAnimClass::CreateData()
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user