Implement/match LegoAnimPresenter::FUN_100695c0 (#595)

This commit is contained in:
Christian Semmler 2024-02-25 12:55:57 -05:00 committed by GitHub
parent 96c98cec3d
commit c5318dca13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 53 additions and 4 deletions

View file

@ -50,12 +50,14 @@ class LegoAnimPresenter : public MxVideoPresenter {
void Destroy(MxBool p_fromDestructor); void Destroy(MxBool p_fromDestructor);
LegoChar* FUN_10069150(const LegoChar*); LegoChar* FUN_10069150(const LegoChar*);
void FUN_100692b0(); void FUN_100692b0();
void FUN_100695c0();
LegoChar* FUN_100697c0(const LegoChar*, LegoChar*); LegoChar* FUN_100697c0(const LegoChar*, LegoChar*);
LegoBool FUN_100698b0(CompoundObject&, const LegoChar*);
LegoAnim* m_anim; // 0x64 LegoAnim* m_anim; // 0x64
undefined4 m_unk0x68; // 0x68 undefined4 m_unk0x68; // 0x68
undefined4 m_unk0x6c; // 0x6c undefined4 m_unk0x6c; // 0x6c
undefined4 m_unk0x70; // 0x70 LegoROIList* m_unk0x70; // 0x70
LegoROIList* m_unk0x74; // 0x74 LegoROIList* m_unk0x74; // 0x74
undefined4 m_unk0x78; // 0x78 undefined4 m_unk0x78; // 0x78
undefined4 m_unk0x7c; // 0x7c undefined4 m_unk0x7c; // 0x7c

View file

@ -64,7 +64,7 @@ class LegoUnkSaveDataWriter {
void FUN_100832a0(); void FUN_100832a0();
void FUN_10083db0(LegoROI* p_roi); void FUN_10083db0(LegoROI* p_roi);
void FUN_10083f10(LegoROI* p_roi); void FUN_10083f10(LegoROI* p_roi);
LegoROI* FUN_10085210(LegoChar*, LegoChar*, undefined); LegoROI* FUN_10085210(const LegoChar*, LegoChar*, undefined);
LegoROI* FUN_10085a80(LegoChar* p_und1, LegoChar* p_und2, undefined p_und3); LegoROI* FUN_10085a80(LegoChar* p_und1, LegoChar* p_und2, undefined p_und3);
private: private:

View file

@ -129,7 +129,7 @@ void LegoUnkSaveDataWriter::SetCustomizeAnimFile(const char* p_value)
} }
// STUB: LEGO1 0x10085210 // STUB: LEGO1 0x10085210
LegoROI* LegoUnkSaveDataWriter::FUN_10085210(LegoChar*, LegoChar*, undefined) LegoROI* LegoUnkSaveDataWriter::FUN_10085210(const LegoChar*, LegoChar*, undefined)
{ {
return NULL; return NULL;
} }

View file

@ -2,6 +2,7 @@
#include "legoomni.h" #include "legoomni.h"
#include "legounksavedatawriter.h" #include "legounksavedatawriter.h"
#include "legovideomanager.h"
#include "legoworld.h" #include "legoworld.h"
#include "mxcompositepresenter.h" #include "mxcompositepresenter.h"
#include "mxdsanim.h" #include "mxdsanim.h"
@ -29,7 +30,7 @@ void LegoAnimPresenter::Init()
m_unk0x68 = 0; m_unk0x68 = 0;
m_unk0x6c = 0; m_unk0x6c = 0;
m_unk0x74 = NULL; m_unk0x74 = NULL;
m_unk0x70 = 0; m_unk0x70 = NULL;
m_unk0x78 = 0; m_unk0x78 = 0;
m_unk0x7c = 0; m_unk0x7c = 0;
m_unk0xa8.Clear(); m_unk0xa8.Clear();
@ -108,6 +109,7 @@ MxResult LegoAnimPresenter::CreateAnim(MxStreamChunk* p_chunk)
// STUB: LEGO1 0x10069150 // STUB: LEGO1 0x10069150
LegoChar* LegoAnimPresenter::FUN_10069150(const LegoChar*) LegoChar* LegoAnimPresenter::FUN_10069150(const LegoChar*)
{ {
// TODO
return NULL; return NULL;
} }
@ -188,12 +190,54 @@ void LegoAnimPresenter::FUN_100692b0()
} }
} }
// FUNCTION: LEGO1 0x100695c0
void LegoAnimPresenter::FUN_100695c0()
{
m_unk0x70 = new LegoROIList();
if (m_unk0x70) {
CompoundObject& unk0x08 = VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->GetUnknown0x08();
LegoU32 numActors = m_anim->GetNumActors();
for (LegoU32 i = 0; i < numActors; i++) {
if (FUN_100698b0(unk0x08, m_anim->GetActorName(i)) == FALSE) {
undefined4 unk0x04 = m_anim->GetActorUnknown0x04(i);
if (unk0x04 == 5 || unk0x04 == 6) {
LegoChar dest[256];
const LegoChar* str = m_anim->GetActorName(i);
LegoU32 len = strlen(str);
strcpy(dest, str);
for (LegoChar* i = &dest[len - 1]; isdigit(*i) || *i == '_'; i--) {
*i = '\0';
}
strlwr(dest);
UnkSaveDataWriter()->FUN_10085210(str, dest, 0);
FUN_100698b0(unk0x08, str);
}
}
}
}
}
// STUB: LEGO1 0x100697c0 // STUB: LEGO1 0x100697c0
LegoChar* LegoAnimPresenter::FUN_100697c0(const LegoChar*, LegoChar*) LegoChar* LegoAnimPresenter::FUN_100697c0(const LegoChar*, LegoChar*)
{ {
// TODO
return NULL; return NULL;
} }
// STUB: LEGO1 0x100698b0
LegoBool LegoAnimPresenter::FUN_100698b0(CompoundObject&, const LegoChar*)
{
// TODO
return FALSE;
}
// STUB: LEGO1 0x1006ad30 // STUB: LEGO1 0x1006ad30
void LegoAnimPresenter::PutFrame() void LegoAnimPresenter::PutFrame()
{ {

View file

@ -81,6 +81,9 @@
// LIBRARY: LEGO1 0x1008c5c0 // LIBRARY: LEGO1 0x1008c5c0
// _fseek // _fseek
// LIBRARY: LEGO1 0x1008c6a0
// _isdigit
// LIBRARY: LEGO1 0x1008ca60 // LIBRARY: LEGO1 0x1008ca60
// _abort // _abort