mirror of
https://github.com/isledecomp/isle.git
synced 2025-04-02 01:39:45 -04:00
Implement/match LegoAnimationManager::FUN_10063270 (#965)
This commit is contained in:
parent
5f00634b9c
commit
36ec252f7e
2 changed files with 119 additions and 5 deletions
LEGO1/lego/legoomni
|
@ -108,7 +108,7 @@ public:
|
|||
void FUN_10062770();
|
||||
void PurgeExtra(MxBool p_und);
|
||||
void AddExtra(MxS32 p_location, MxBool p_und);
|
||||
void FUN_10063270(LegoROIList*, LegoAnimPresenter*);
|
||||
void FUN_10063270(LegoROIList* p_list, LegoAnimPresenter* p_presenter);
|
||||
void FUN_10063780(LegoROIList* p_list);
|
||||
MxResult FUN_10064670(Vector3* p_position);
|
||||
MxResult FUN_10064740(Vector3* p_position);
|
||||
|
@ -151,9 +151,12 @@ private:
|
|||
void FUN_10062580(AnimInfo& p_info);
|
||||
MxBool FUN_10062650(Vector3& p_position, float p_und, LegoROI* p_roi);
|
||||
MxBool FUN_10062710(AnimInfo& p_info);
|
||||
MxBool FUN_10062e20(LegoROI* p_roi, LegoAnimPresenter* p_presenter);
|
||||
void FUN_10063950(LegoROI* p_roi);
|
||||
void FUN_10063aa0();
|
||||
MxBool FUN_10063b90(LegoWorld* p_world, LegoExtraActor* p_actor, MxU8 p_mood, MxU32 p_characterId);
|
||||
void FUN_10063d10();
|
||||
void FUN_10063e40(LegoAnimPresenter* p_presenter);
|
||||
MxBool FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world);
|
||||
MxBool FUN_10064010(LegoPathBoundary* p_boundary, LegoUnknown100db7f4* p_edge, float p_destScale);
|
||||
MxBool FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool p_bool1, MxBool p_bool2);
|
||||
|
|
|
@ -1396,7 +1396,6 @@ MxLong LegoAnimationManager::Notify(MxParam& p_param)
|
|||
|
||||
if (roi != NULL) {
|
||||
LegoExtraActor* actor = CharacterManager()->GetActor(roi->GetName());
|
||||
|
||||
if (actor != NULL) {
|
||||
actor->Restart();
|
||||
}
|
||||
|
@ -2030,10 +2029,92 @@ void LegoAnimationManager::AddExtra(MxS32 p_location, MxBool p_und)
|
|||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10063270
|
||||
void LegoAnimationManager::FUN_10063270(LegoROIList*, LegoAnimPresenter*)
|
||||
// STUB: LEGO1 0x10062e20
|
||||
// FUNCTION: BETA10 0x100444cb
|
||||
MxBool LegoAnimationManager::FUN_10062e20(LegoROI* p_roi, LegoAnimPresenter* p_presenter)
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10063270
|
||||
// FUNCTION: BETA10 0x10044b9a
|
||||
void LegoAnimationManager::FUN_10063270(LegoROIList* p_list, LegoAnimPresenter* p_presenter)
|
||||
{
|
||||
if (p_list != NULL) {
|
||||
LegoWorld* world = CurrentWorld();
|
||||
LegoROI* roi;
|
||||
MxU32 i;
|
||||
|
||||
for (i = 0; i < sizeOfArray(g_vehicles); i++) {
|
||||
roi = Lego()->FindROI(g_vehicles[i].m_name);
|
||||
|
||||
if (roi != NULL) {
|
||||
if (!g_vehicles[i].m_unk0x05 && roi->GetVisibility()) {
|
||||
g_vehicles[i].m_unk0x04 = TRUE;
|
||||
}
|
||||
else {
|
||||
g_vehicles[i].m_unk0x04 = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LegoROIListCursor cursor(p_list);
|
||||
|
||||
while (cursor.Next(roi)) {
|
||||
if (roi->GetVisibility() && FUN_10062e20(roi, p_presenter)) {
|
||||
cursor.Detach();
|
||||
FUN_10063950(roi);
|
||||
}
|
||||
else {
|
||||
LegoExtraActor* actor = CharacterManager()->GetActor(roi->GetName());
|
||||
|
||||
if (actor != NULL) {
|
||||
for (MxS32 i = 0; i < (MxS32) sizeOfArray(m_extras); i++) {
|
||||
if (m_extras[i].m_roi == roi) {
|
||||
if (actor->GetController() != NULL) {
|
||||
actor->GetController()->RemoveActor(actor);
|
||||
actor->SetController(NULL);
|
||||
}
|
||||
|
||||
if (m_extras[i].m_unk0x14) {
|
||||
m_extras[i].m_unk0x14 = FALSE;
|
||||
|
||||
MxS32 vehicleId = g_characters[m_extras[i].m_characterId].m_vehicleId;
|
||||
if (vehicleId >= 0) {
|
||||
g_vehicles[vehicleId].m_unk0x05 = FALSE;
|
||||
|
||||
LegoROI* roi = Lego()->FindROI(g_vehicles[vehicleId].m_name);
|
||||
if (roi != NULL) {
|
||||
roi->SetVisibility(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_extras[i].m_roi = NULL;
|
||||
g_characters[m_extras[i].m_characterId].m_unk0x04 = FALSE;
|
||||
g_characters[m_extras[i].m_characterId].m_unk0x07 = FALSE;
|
||||
m_extras[i].m_characterId = -1;
|
||||
m_extras[i].m_unk0x0d = FALSE;
|
||||
m_unk0x414--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FUN_10063e40(p_presenter);
|
||||
|
||||
for (i = 0; i < sizeOfArray(g_vehicles); i++) {
|
||||
if (!g_vehicles[i].m_unk0x05) {
|
||||
roi = Lego()->FindROI(g_vehicles[i].m_name);
|
||||
|
||||
if (roi != NULL) {
|
||||
roi->SetVisibility(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10063780
|
||||
|
@ -2054,6 +2135,19 @@ void LegoAnimationManager::FUN_10063780(LegoROIList* p_list)
|
|||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10063950
|
||||
void LegoAnimationManager::FUN_10063950(LegoROI* p_roi)
|
||||
{
|
||||
if (m_unk0x424 != NULL) {
|
||||
LegoROIListCursor cursor(m_unk0x424);
|
||||
|
||||
if (cursor.Find(p_roi)) {
|
||||
CharacterManager()->FUN_10083db0(p_roi);
|
||||
cursor.Detach();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10063aa0
|
||||
void LegoAnimationManager::FUN_10063aa0()
|
||||
{
|
||||
|
@ -2171,6 +2265,23 @@ void LegoAnimationManager::FUN_10063d10()
|
|||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10063e40
|
||||
void LegoAnimationManager::FUN_10063e40(LegoAnimPresenter* p_presenter)
|
||||
{
|
||||
if (m_unk0x424 != NULL) {
|
||||
LegoROIListCursor cursor(m_unk0x424);
|
||||
LegoROI* roi;
|
||||
|
||||
while (cursor.Next(roi)) {
|
||||
if (!FUN_10062e20(roi, p_presenter)) {
|
||||
CharacterManager()->FUN_10083db0(roi);
|
||||
}
|
||||
|
||||
cursor.Detach();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10063fb0
|
||||
// FUNCTION: BETA10 0x100452a7
|
||||
MxBool LegoAnimationManager::FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world)
|
||||
|
|
Loading…
Add table
Reference in a new issue