@@ -6,17 +6,20 @@ void TEST_COLL_ProjectPointToEdge(const SVec3* v1, const SVec3* v2, const SVec3*
66{
77 const u32 index = PatchFunction_Beg ((u32 * )(& ND_COLL_ProjectPointToEdge ));
88 SVec3 expected ;
9- ND_COLL_ProjectPointToEdge (& expected , v1 , v2 , point );
9+ typedef void (* Func )(SVec3 * out , const SVec3 * v1 , const SVec3 * v2 , const SVec3 * point );
10+ Func func = (Func ) TEST_WRAPPER ;
11+ func (& expected , v1 , v2 , point );
1012 PrintSVectorDiff ("COLL_ProjectPointToEdge" , & expected , ret );
1113 PatchFunction_End (index );
1214}
1315
14- s32 WRAPPER_ND_COLL_BarycentricTest (TestVertex * t , const CollVertex * v1 , const CollVertex * v2 , const CollVertex * v3 );
1516
1617void TEST_COLL_BarycentricTest (TestVertex * t , const CollVertex * v1 , const CollVertex * v2 , const CollVertex * v3 , const SVec3 * pos , s32 ret )
1718{
1819 const u32 index = PatchFunction_Beg ((u32 * )(& ND_COLL_BarycentricTest ));
19- const s32 expected = WRAPPER_ND_COLL_BarycentricTest (t , v1 , v2 , v3 );
20+ typedef s32 (* Func )(TestVertex * t , const CollVertex * v1 , const CollVertex * v2 , const CollVertex * v3 );
21+ Func func = (Func ) TEST_WRAPPER ;
22+ const s32 expected = func (t , v1 , v2 , v3 );
2023 PrintSVectorDiff ("COLL_BarycentricTest" , & t -> pos , pos );
2124 if (expected != ret ) { ND_printf ("[COLL_BarycentricTest] Test Failed:\nExpected: %d\nResult: %d\n" , expected , ret ); }
2225 PatchFunction_End (index );
0 commit comments