Implement/match FUN_1003ef00 and related (#931)

This commit is contained in:
Christian Semmler 2024-05-17 21:42:21 -04:00 committed by GitHub
parent 5fe0b7e0bb
commit c92341527e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 31 additions and 4 deletions

View file

@ -85,6 +85,8 @@ class LegoAnimationManager : public MxCore {
MxBool FindVehicle(const char* p_name, MxU32& p_index);
MxResult ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info);
MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info);
void FUN_100604d0(MxBool p_unk0x08);
void FUN_10060540(MxBool p_unk0x29);
void FUN_10060570(MxBool p_unk0x1a);
MxResult StartEntityAction(MxDSAction& p_dsAction, LegoEntity* p_entity);
MxResult FUN_10060dc0(

View file

@ -27,7 +27,7 @@ void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bO
void FUN_1003ecc0(IslePathActor* p_actor, undefined4, undefined4, MxBool);
void FUN_1003eda0();
MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id);
void FUN_1003ef00(MxBool);
void FUN_1003ef00(MxBool p_enable);
void SetAppCursor(WPARAM p_wparam);
MxBool FUN_1003ef60();
MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_worldAtom, MxS32 p_worldEntityId);

View file

@ -874,6 +874,24 @@ void LegoAnimationManager::DeleteAnimations()
m_suspended = suspended;
}
// FUNCTION: LEGO1 0x100604d0
// FUNCTION: BETA10 0x10041335
void LegoAnimationManager::FUN_100604d0(MxBool p_unk0x08)
{
for (MxS32 i = 0; i < (MxS32) sizeOfArray(g_characters); i++) {
g_characters[i].m_unk0x08 = p_unk0x08;
}
}
// FUNCTION: LEGO1 0x10060540
// FUNCTION: BETA10 0x1004140f
void LegoAnimationManager::FUN_10060540(MxBool p_unk0x29)
{
for (MxS32 i = 0; i < m_animCount; i++) {
m_anims[i].m_unk0x29 = p_unk0x29;
}
}
// FUNCTION: LEGO1 0x10060570
// FUNCTION: BETA10 0x10041463
void LegoAnimationManager::FUN_10060570(MxBool p_unk0x1a)

View file

@ -4,6 +4,7 @@
#include "act1state.h"
#include "anim/legoanim.h"
#include "islepathactor.h"
#include "legoanimationmanager.h"
#include "legoanimpresenter.h"
#include "legogamestate.h"
#include "legoinputmanager.h"
@ -424,10 +425,16 @@ MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_wor
return FALSE;
}
// STUB: LEGO1 0x1003ef00
void FUN_1003ef00(MxBool)
// FUNCTION: LEGO1 0x1003ef00
void FUN_1003ef00(MxBool p_enable)
{
// TODO (something related to animation manager)
if (p_enable) {
AnimationManager()->Resume();
}
AnimationManager()->FUN_1005f6d0(p_enable);
AnimationManager()->FUN_10060540(p_enable);
AnimationManager()->FUN_100604d0(p_enable);
}
// FUNCTION: LEGO1 0x1003ef40