mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 07:37:59 -05:00
Implement/match LegoAnimationManager::FUN_10063d10 (#927)
This commit is contained in:
parent
02c4aad33e
commit
ed782980ec
2 changed files with 40 additions and 4 deletions
|
@ -32,7 +32,7 @@ class LegoAnimationManager : public MxCore {
|
|||
MxBool m_unk0x07; // 0x07
|
||||
MxBool m_unk0x08; // 0x08
|
||||
MxBool m_unk0x09; // 0x09
|
||||
MxU32 m_unk0x0c; // 0x0c
|
||||
MxS32 m_unk0x0c; // 0x0c
|
||||
MxS32 m_unk0x10; // 0x10
|
||||
MxBool m_active; // 0x14
|
||||
MxU8 m_unk0x15; // 0x15
|
||||
|
@ -51,7 +51,7 @@ class LegoAnimationManager : public MxCore {
|
|||
LegoROI* m_roi; // 0x00
|
||||
MxS32 m_characterId; // 0x04
|
||||
MxLong m_unk0x08; // 0x08
|
||||
undefined m_unk0x0c; // 0x0c
|
||||
MxBool m_unk0x0c; // 0x0c
|
||||
MxBool m_unk0x0d; // 0x0d
|
||||
float m_unk0x10; // 0x10
|
||||
MxBool m_unk0x14; // 0x14
|
||||
|
|
|
@ -1824,11 +1824,47 @@ MxBool LegoAnimationManager::FUN_10063b90(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10063d10
|
||||
// FUNCTION: LEGO1 0x10063d10
|
||||
// FUNCTION: BETA10 0x10045034
|
||||
void LegoAnimationManager::FUN_10063d10()
|
||||
{
|
||||
// TODO
|
||||
if (CurrentWorld() != NULL) {
|
||||
MxLong time = Timer()->GetTime();
|
||||
|
||||
for (MxS32 i = 0; i < (MxS32) sizeOfArray(m_extras); i++) {
|
||||
LegoROI* roi = m_extras[i].m_roi;
|
||||
|
||||
if (roi != NULL) {
|
||||
if (m_extras[i].m_unk0x0c && g_characters[m_extras[i].m_characterId].m_unk0x0c >= 0 &&
|
||||
g_characters[m_extras[i].m_characterId].m_unk0x0c < time - m_extras[i].m_unk0x08) {
|
||||
|
||||
m_extras[i].m_unk0x0c = FALSE;
|
||||
|
||||
LegoExtraActor* actor = CharacterManager()->GetActor(roi->GetName());
|
||||
if (actor != NULL) {
|
||||
float speed = m_extras[i].m_unk0x10;
|
||||
|
||||
if (speed < 0.0f) {
|
||||
if (m_extras[i].m_unk0x14) {
|
||||
speed = ((float) (rand() * 1.5) / 32767.0f) + 0.9;
|
||||
}
|
||||
else {
|
||||
speed = ((float) (rand() * 1.4) / 32767.0f) + 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
actor->SetWorldSpeed(speed);
|
||||
}
|
||||
}
|
||||
else {
|
||||
LegoExtraActor* actor = CharacterManager()->GetActor(roi->GetName());
|
||||
if (actor != NULL) {
|
||||
actor->Restart();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10063fb0
|
||||
|
|
Loading…
Reference in a new issue