diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index 439b9346..fd1c0c9e 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -152,7 +152,7 @@ class LegoAnimationManager : public MxCore { MxBool FUN_10063b90(LegoWorld* p_world, LegoExtraActor* p_actor, MxU8 p_unk0x14, MxU32 p_characterId); void FUN_10063d10(); MxBool FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world); - MxBool FUN_10064010(LegoPathBoundary*, LegoUnknown100db7f4*, float); + 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); MxResult FUN_10064380( const char* p_name, diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index b4db53fd..35a97b8d 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -2085,12 +2085,27 @@ MxBool LegoAnimationManager::FUN_10063fb0(LegoLocation::Boundary* p_boundary, Le return TRUE; } -// STUB: LEGO1 0x10064010 +// FUNCTION: LEGO1 0x10064010 // FUNCTION: BETA10 0x100453a5 -MxBool LegoAnimationManager::FUN_10064010(LegoPathBoundary*, LegoUnknown100db7f4*, float) +MxBool LegoAnimationManager::FUN_10064010(LegoPathBoundary* p_boundary, LegoUnknown100db7f4* p_edge, float p_destScale) { - // TODO - return TRUE; + Mx3DPointFloat p1; + Vector3* v1 = p_edge->GetOpposingPoint(p_boundary); + Vector3* v2 = p_edge->GetPoint(p_boundary); + + p1 = *v2; + ((Vector3&) p1).Sub(v1); + ((Vector3&) p1).Mul(p_destScale); + ((Vector3&) p1).Add(v1); + + BoundingBox boundingBox; + Mx3DPointFloat vec(1.0f, 1.0f, 1.0f); + + boundingBox.Min() = p1; + boundingBox.Min().Sub(&vec); + boundingBox.Max() = p1; + boundingBox.Max().Add(&vec); + return GetViewManager()->FUN_100a6150(boundingBox) == FALSE; } // FUNCTION: LEGO1 0x10064120