mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 15:48:09 -05:00
Implement/match LegoAnimPresenter::FUN_1006b9a0 (#797)
This commit is contained in:
parent
67127e2515
commit
54421ebcdf
4 changed files with 43 additions and 4 deletions
|
@ -92,7 +92,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
|||
LegoBool FUN_1006aba0();
|
||||
MxBool FUN_1006abb0(LegoTreeNode* p_node, LegoROI* p_roi);
|
||||
void FUN_1006ac90();
|
||||
void FUN_1006b9a0(LegoAnim* p_anim, MxLong p_time, MxMatrix& p_matrix);
|
||||
void FUN_1006b9a0(LegoAnim* p_anim, MxLong p_time, Matrix4* p_matrix);
|
||||
void FUN_1006c8a0(MxBool p_bool);
|
||||
|
||||
LegoAnim* m_anim; // 0x64
|
||||
|
|
|
@ -523,7 +523,7 @@ void LegoAnimPresenter::PutFrame()
|
|||
time = 0;
|
||||
}
|
||||
|
||||
FUN_1006b9a0(m_anim, time, *m_unk0x78);
|
||||
FUN_1006b9a0(m_anim, time, m_unk0x78);
|
||||
|
||||
if (m_unk0x8c != NULL && m_currentWorld != NULL && m_currentWorld->GetCamera() != NULL) {
|
||||
for (MxS32 i = 0; i < m_unk0x94; i++) {
|
||||
|
@ -690,9 +690,37 @@ const char* LegoAnimPresenter::GetActionObjectName()
|
|||
return m_action->GetObjectName();
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006b9a0
|
||||
void LegoAnimPresenter::FUN_1006b9a0(LegoAnim* p_anim, MxLong p_time, MxMatrix& p_matrix)
|
||||
// FUNCTION: LEGO1 0x1006b9a0
|
||||
void LegoAnimPresenter::FUN_1006b9a0(LegoAnim* p_anim, MxLong p_time, Matrix4* p_matrix)
|
||||
{
|
||||
LegoTreeNode* root = p_anim->GetRoot();
|
||||
MxMatrix mat;
|
||||
LegoAnimNodeData* data = (LegoAnimNodeData*) root->GetData();
|
||||
|
||||
if (p_matrix != NULL) {
|
||||
mat = *p_matrix;
|
||||
}
|
||||
else {
|
||||
LegoROI* roi = m_unk0x68[data->GetUnknown0x20()];
|
||||
|
||||
if (roi != NULL) {
|
||||
mat = roi->GetLocal2World();
|
||||
}
|
||||
else {
|
||||
mat.SetIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
if (p_anim->GetScene() != NULL) {
|
||||
MxMatrix transform(mat);
|
||||
p_anim->GetScene()->FUN_1009f490(p_time, transform);
|
||||
|
||||
if (m_currentWorld != NULL && m_currentWorld->GetCamera() != NULL) {
|
||||
m_currentWorld->GetCamera()->FUN_100123e0(transform, 0);
|
||||
}
|
||||
}
|
||||
|
||||
LegoROI::FUN_100a8e80(root, mat, p_time, m_unk0x68);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006bac0
|
||||
|
|
|
@ -136,6 +136,13 @@ LegoResult LegoAnimScene::Read(LegoStorage* p_storage)
|
|||
return result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1009f490
|
||||
undefined4 LegoAnimScene::FUN_1009f490(LegoFloat p_time, Matrix4& p_matrix)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1009f900
|
||||
LegoAnimKey::LegoAnimKey()
|
||||
{
|
||||
|
|
|
@ -123,6 +123,7 @@ class LegoAnimNodeData : public LegoTreeNodeData {
|
|||
LegoU32 GetRotationIndex() { return m_rotationIndex; }
|
||||
LegoU32 GetScaleIndex() { return m_scaleIndex; }
|
||||
LegoU32 GetMorphIndex() { return m_morphIndex; }
|
||||
undefined2 GetUnknown0x20() { return m_unk0x20; }
|
||||
|
||||
void SetTranslationIndex(LegoU32 p_translationIndex) { m_translationIndex = p_translationIndex; }
|
||||
void SetRotationIndex(LegoU32 p_rotationIndex) { m_rotationIndex = p_rotationIndex; }
|
||||
|
@ -207,6 +208,7 @@ class LegoAnimScene {
|
|||
LegoAnimScene();
|
||||
~LegoAnimScene();
|
||||
LegoResult Read(LegoStorage* p_storage);
|
||||
undefined4 FUN_1009f490(LegoFloat p_time, Matrix4& p_matrix);
|
||||
|
||||
private:
|
||||
LegoU16 m_unk0x00; // 0x00
|
||||
|
@ -234,6 +236,8 @@ class LegoAnim : public LegoTree {
|
|||
const LegoChar* GetActorName(LegoU32 p_index);
|
||||
undefined4 GetActorUnknown0x04(LegoU32 p_index);
|
||||
|
||||
inline LegoAnimScene* GetScene() { return m_scene; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100a0ba0
|
||||
// LegoAnim::`scalar deleting destructor'
|
||||
|
||||
|
|
Loading…
Reference in a new issue