diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index 3e362e5a..49ee513e 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -105,8 +105,8 @@ class LegoAnimationManager : public MxCore { void AddExtra(MxS32 p_location, MxBool p_und); void FUN_10063270(LegoROIList*, LegoAnimPresenter*); void FUN_10063780(LegoROIList* p_list); - void FUN_10064670(Vector3*); - void FUN_10064740(Vector3*); + MxResult FUN_10064670(Vector3* p_position); + MxResult FUN_10064740(Vector3* p_position); static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig); diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index a8bcc375..67f2e7bd 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -2177,15 +2177,60 @@ MxResult LegoAnimationManager::FUN_10064380( return FAILURE; } -// STUB: LEGO1 0x10064670 -void LegoAnimationManager::FUN_10064670(Vector3*) +// FUNCTION: LEGO1 0x10064670 +MxResult LegoAnimationManager::FUN_10064670(Vector3* p_position) { - // TODO + MxBool success = FALSE; + + if (p_position != NULL) { + Mx3DPointFloat vec(98.875f, 0.0f, -46.1564f); + ((Vector3&) vec).Sub(p_position); + + if (vec.LenSquared() < 800.0f) { + success = TRUE; + } + } + else { + success = TRUE; + } + + if (success) { + return FUN_10064380("brickstr", "EDG02_95", 1, 0.5f, 3, 0.5f, rand() % 3 + 14, -1, rand() % 3, -1, 0.5f); + } + + return FAILURE; } -// STUB: LEGO1 0x10064740 -void LegoAnimationManager::FUN_10064740(Vector3*) +// FUNCTION: LEGO1 0x10064740 +MxResult LegoAnimationManager::FUN_10064740(Vector3* p_position) { + MxBool success = FALSE; + + if (p_position != NULL) { + Mx3DPointFloat vec(-21.375f, 0.0f, -41.75f); + ((Vector3&) vec).Sub(p_position); + + if (vec.LenSquared() < 1000.0f) { + success = TRUE; + } + } + else { + success = TRUE; + } + + if (success) { + if (GameState()->GetActorId() != 2) { + FUN_10064380("mama", "USR00_47", 1, 0.43f, 3, 0.84f, rand() % 3 + 13, -1, rand() % 3, -1, 0.7f); + } + + if (GameState()->GetActorId() != 3) { + FUN_10064380("papa", "USR00_193", 3, 0.55f, 1, 0.4f, rand() % 3 + 13, -1, rand() % 3, -1, 0.9f); + } + + return SUCCESS; + } + + return FAILURE; } // STUB: LEGO1 0x100648f0