Skip to content

Commit 20e4b41

Browse files
committed
decompile TestTriangle
1 parent 9d527b4 commit 20e4b41

File tree

11 files changed

+237
-27
lines changed

11 files changed

+237
-27
lines changed

include/ctr/coll.h

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ typedef struct CollVertex
2929
u16 normalDominantAxis;
3030
const Vertex* levVertex;
3131
SVec3 triNormal;
32-
u16 planeDist;
32+
s16 planeDist;
3333
} CollVertex;
3434

3535
typedef struct TestVertex
3636
{
3737
SVec3 pos;
3838
u16 normalDominantAxis;
3939
SVec3 triNormal;
40-
u16 planeDist;
40+
s16 planeDist;
4141
SVec3 interpolationPoint;
4242
} TestVertex;
4343

@@ -66,31 +66,27 @@ typedef struct CollDCache
6666
s16 unk0;
6767
s16 unk1;
6868
CollInputData collInput;
69-
MeshInfo* meshInfo;
69+
const MeshInfo* meshInfo;
7070
BoundingBox bbox;
7171
s16 numVerticesTested;
72-
s16 numTrianglesTouched;
72+
s16 numTrianglesCollided;
7373
s16 unk2;
7474
s16 numInstancesCollided;
7575
u32 unk3;
76-
BSPNode* bspNodes;
76+
const BSPNode* bspNodes;
7777
TestVertex collIntersection;
7878
u8 unk4;
7979
u8 currTriangleIndex;
80-
Quadblock* currQuadblock;
81-
SVec3 collPos;
82-
u16 normalDominantAxis_TriCollided;
83-
SVec3 normalTriCollided;
84-
s16 unk5;
85-
SVec3 interpolationPoint;
86-
u8 barycentricTest;
80+
const Quadblock* currQuadblock;
81+
TestVertex coll;
82+
s8 barycentricTest;
8783
u8 collidedTriangleIndex;
88-
Quadblock* collidedQuadblock;
84+
const Quadblock* collidedQuadblock;
8985
s32 speedScale;
9086
u8 unk6[0x44];
91-
Vertex* collidedVertices[NUM_VERTICES_TRIANGLE];
92-
CollVertex* currTestVertices[NUM_VERTICES_TRIANGLE];
93-
SVec3 distInterpolationIntersection;
87+
const Vertex* collidedVertices[NUM_VERTICES_TRIANGLE];
88+
const CollVertex* currTestVertices[NUM_VERTICES_TRIANGLE];
89+
SVec3 deltaInterpolationIntersection;
9490
s16 unk7;
9591
u16 quadblockThirdIndex;
9692
u16 quadblockFourthIndex;
@@ -106,4 +102,6 @@ typedef struct CollDCache
106102
void COLL_ProjectPointToEdge(SVec3* out, const SVec3* v1, const SVec3* v2, const SVec3* point);
107103
void COLL_LoadQuadblockData_LowLOD(CollDCache* cache, Quadblock* quadblock);
108104
void COLL_LoadQuadblockData_HighLOD(CollDCache* cache, Quadblock* quadblock);
109-
s32 COLL_BarycentricTest(TestVertex* t, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3);
105+
void COLL_TestTriangle(CollDCache* cache, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3);
106+
107+
extern u32 e_ignoreCollisionDoorFlagTerrain; // 0x8008d728

include/ctr/driver.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#pragma once
2+
3+
#include <ctr/macros.h>
4+
5+
typedef enum StepFlags
6+
{
7+
STEPFLAGS_OUT_OF_BOUNDS = 0x4000,
8+
} StepFlags;

include/ctr/gte.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ typedef enum GTE_CALC
8282
#define _gte_dotProduct_GTE_ROW_INDEX_1_GTE_CALC_FLOATING_POINT(out, matrixType, vecType) gte_mvmva(1, matrixType, vecType, 3, 0); _gte_readMac_GTE_MAC_2(out)
8383
#define _gte_dotProduct_GTE_ROW_INDEX_2_GTE_CALC_FLOATING_POINT(out, matrixType, vecType) gte_mvmva(1, matrixType, vecType, 3, 0); _gte_readMac_GTE_MAC_3(out)
8484
#define _gte_mulMatrixVec(out, matrixType, vecType, shift) gte_mvmva(shift, matrixType, vecType, 3, 0); _gte_readMac_GTE_VECTOR_MAC(out)
85-
#define _gte_interpolate_GTE_CALC_INT() gte_gpl0()
86-
#define _gte_interpolate_GTE_CALC_FLOATING_POINT() gte_gpl12()
85+
#define _gte_interpolate_GTE_CALC_INT() gte_gpf0()
86+
#define _gte_interpolate_GTE_CALC_FLOATING_POINT() gte_gpf12()
87+
#define _gte_interpolateBase_GTE_CALC_INT() gte_gpl0()
88+
#define _gte_interpolateBase_GTE_CALC_FLOATING_POINT() gte_gpl12()
8789
#define _gte_leadingZeroes(out, in) __asm__ volatile ( \
8890
"mtc2 %1, $30;" \
8991
"nop;" \
@@ -104,4 +106,5 @@ typedef enum GTE_CALC
104106
#define gte_dotProduct(out, rowIndex, matrixType, vecType, calcType) CAT3(_gte_dotProduct_, rowIndex, _##calcType)(out, matrixType, vecType)
105107
#define gte_leadingZeroes(out, in) _gte_leadingZeroes(out, in)
106108
#define gte_interpolate(out, calcType) CAT(_gte_interpolate_, calcType)(); _gte_readMac_GTE_VECTOR_MAC(out)
109+
#define gte_interpolateBase(out, calcType) CAT(_gte_interpolateBase_, calcType)(); _gte_readMac_GTE_VECTOR_MAC(out)
107110
#define gte_crossProduct(out, matrix, vector) gte_SetRotMatrix(matrix); gte_loadSVec(vector, GTE_VECTOR_IR); gte_op0(); gte_readMac(out, GTE_VECTOR_MAC)

include/ctr/lev.h

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,46 @@ typedef struct VisibleSet
5353
u32* visibleExtra;
5454
} VisibleSet;
5555

56+
typedef enum QuadFlags
57+
{
58+
QUADFLAGS_INVISIBLE = 1 << 0,
59+
QUADFLAGS_MOON_GRAVITY = 1 << 1,
60+
QUADFLAGS_REFLECTION = 1 << 2,
61+
QUADFLAGS_KICKERS = 1 << 3,
62+
QUADFLAGS_OUT_OF_BOUNDS = 1 << 4,
63+
QUADFLAGS_NEVER_USED = 1 << 5,
64+
QUADFLAGS_TRIGGER_SCRIPT = 1 << 6,
65+
QUADFLAGS_REVERB = 1 << 7,
66+
QUADFLAGS_KICKERS_TWO = 1 << 8,
67+
QUADFLAGS_MASK_GRAB = 1 << 9,
68+
QUADFLAGS_TIGER_TEMPLE_DOOR = 1 << 10,
69+
QUADFLAGS_COLLISION_TRIGGER = 1 << 11,
70+
QUADFLAGS_GROUND = 1 << 12,
71+
QUADFLAGS_WALL = 1 << 13,
72+
QUADFLAGS_NO_COLLISION = 1 << 14,
73+
QUADFLAGS_INVISIBLE_TRIGGER = 1 << 15,
74+
} QuadFlags;
75+
76+
typedef struct DrawOrder
77+
{
78+
u32 drawOrder : 8;
79+
u32 rotFlipFace0 : 3;
80+
u32 drawModeFace0 : 2;
81+
u32 rotFlipFace1 : 3;
82+
u32 drawModeFace1 : 2;
83+
u32 rotFlipFace2 : 3;
84+
u32 drawModeFace2 : 2;
85+
u32 rotFlipFace3 : 3;
86+
u32 drawModeFace3 : 2;
87+
u32 unk : 3;
88+
u32 doubleSided : 1;
89+
} DrawOrder;
90+
5691
typedef struct Quadblock
5792
{
5893
u16 index[NUM_VERTICES_QUADBLOCK]; // 0x0
5994
u16 flags; // 0x12
60-
u32 drawOrderLow; // 0x14
95+
DrawOrder drawOrderLow; // 0x14
6196
u32 drawOrderHigh; // 0x18
6297
u32 offMidTextures[4]; // 0x1C
6398
BoundingBox bbox; // 0x2C

include/ctr/nd.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ void ND_COLL_LoadQuadblockData_LowLOD(CollDCache* cache, Quadblock* quadblock);
3434
void ND_COLL_LoadQuadblockData_HighLOD(CollDCache* cache, Quadblock* quadblock);
3535
void ND_COLL_CalculateTrianglePlane(const CollDCache* cache, CollVertex* v1, const CollVertex* v2, const CollVertex* v3);
3636
void ND_COLL_LoadVerticeData(CollDCache* cache);
37-
s32 ND_COLL_BarycentricTest(TestVertex* t, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3);
37+
s32 ND_COLL_BarycentricTest(TestVertex* t, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3);
38+
void ND_COLL_TestTriangle(CollDCache* cache, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3);

include/ctr/test.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ force_inline void FlushCache()
2626

2727
//#define TEST_MATH_IMPL
2828
//#define TEST_RNG_IMPL
29-
//#define TEST_COLL_IMPL
29+
#define TEST_COLL_IMPL
3030

3131
#ifdef TEST_MATH_IMPL
3232
void TEST_MATH_Sin(u32 angle, s32 ret);
@@ -69,9 +69,11 @@ force_inline void FlushCache()
6969
void TEST_COLL_CalculateTrianglePlane(const CollDCache* cache, CollVertex* v1, const CollVertex* v2, const CollVertex* v3, const CollVertex* ret);
7070
void TEST_COLL_LoadVerticeData(CollDCache* cache);
7171
void TEST_COLL_BarycentricTest(TestVertex* t, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3, const SVec3* pos, s32 ret);
72+
void TEST_COLL_TestTriangle(CollDCache* cache, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3, const CollDCache* ret);
7273
#else
7374
#define TEST_COLL_ProjectPointToEdge(out, v1, v2, point)
7475
#define TEST_COLL_CalculateTrianglePlane(cache, v1, v2, v3, ret)
7576
#define TEST_COLL_LoadVerticeData(cache)
7677
#define TEST_COLL_BarycentricTest(t, v1, v2, v3, pos, ret)
78+
#define TEST_COLL_TestTriangle(cache, v1, v2, v3, ret)
7779
#endif

rewrite/src/exe/coll.c

Lines changed: 141 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <ctr/coll.h>
22
#include <ctr/gte.h>
3+
#include <ctr/driver.h>
34
#include <ctr/test.h>
45

56
/* Address: 0x8001ede4 */
@@ -31,7 +32,7 @@ void COLL_ProjectPointToEdge(SVec3* out, const SVec3* v1, const SVec3* v2, const
3132
gte_loadVec(V1.v, GTE_VECTOR_MAC);
3233

3334
Vec3 coords;
34-
gte_interpolate(coords.v, GTE_CALC_FLOATING_POINT);
35+
gte_interpolateBase(coords.v, GTE_CALC_FLOATING_POINT);
3536
out->x = coords.x;
3637
out->y = coords.y;
3738
out->z = coords.z;
@@ -244,12 +245,150 @@ static s32 _COLL_BarycentricTest(TestVertex* t, const CollVertex* v1, const Coll
244245
return BARYCENTRIC_TEST_INSIDE_TRIANGLE;
245246
}
246247

247-
s32 COLL_BarycentricTest(TestVertex* t, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3)
248+
static s32 COLL_BarycentricTest(TestVertex* t, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3)
248249
{
249250
#ifdef TEST_COLL_IMPL
250251
TestVertex input = *t;
251252
#endif
252253
const s32 ret = _COLL_BarycentricTest(t, v1, v2, v3);
253254
TEST_COLL_BarycentricTest(&input, v1, v2, v3, &t->pos, ret);
254255
return ret;
256+
}
257+
258+
static void _COLL_TestTriangle(CollDCache* cache, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3)
259+
{
260+
cache->numVerticesTested++;
261+
cache->collIntersection.triNormal = v1->triNormal;
262+
cache->collIntersection.planeDist = v1->planeDist;
263+
cache->collIntersection.normalDominantAxis = v1->normalDominantAxis;
264+
265+
const u16 quadFlags = cache->currQuadblock->flags;
266+
if ((quadFlags & QUADFLAGS_TIGER_TEMPLE_DOOR) && (cache->currQuadblock->terrain & e_ignoreCollisionDoorFlagTerrain)) { return; }
267+
268+
const u32 triggerScript = quadFlags & QUADFLAGS_TRIGGER_SCRIPT;
269+
const Matrix m = {
270+
.m[0][0] = cache->inputNextPos.x, .m[0][1] = cache->inputNextPos.y, .m[0][2] = cache->inputNextPos.z,
271+
.m[1][0] = cache->collInput.quadblock.driverPos.x, .m[1][1] = cache->collInput.quadblock.driverPos.y, .m[1][2] = cache->collInput.quadblock.driverPos.z,
272+
};
273+
s32 distTriNextPos, distTriCurrPos;
274+
gte_SetRotMatrix(m.m);
275+
gte_loadSVec(cache->collIntersection.triNormal.v, GTE_VECTOR_0);
276+
gte_dotProduct(&distTriNextPos, GTE_ROW_INDEX_0, GTE_MATRIX_ROT, GTE_VECTOR_0, GTE_CALC_FLOATING_POINT);
277+
gte_readMac(&distTriCurrPos, GTE_MAC_2);
278+
distTriNextPos = distTriNextPos + (cache->collIntersection.planeDist * -2);
279+
distTriCurrPos = distTriCurrPos + (cache->collIntersection.planeDist * -2);
280+
cache->numVerticesTested++;
281+
if (distTriCurrPos < 0)
282+
{
283+
if ((!triggerScript) && (cache->currQuadblock->drawOrderLow.doubleSided == 0)) { return; }
284+
distTriCurrPos = -distTriCurrPos;
285+
distTriNextPos = -distTriNextPos;
286+
cache->collIntersection.triNormal.x = -cache->collIntersection.triNormal.x;
287+
cache->collIntersection.triNormal.y = -cache->collIntersection.triNormal.y;
288+
cache->collIntersection.triNormal.z = -cache->collIntersection.triNormal.z;
289+
cache->collIntersection.planeDist = -cache->collIntersection.planeDist;
290+
}
291+
if ((distTriNextPos >= cache->inputHitRadius) || ((!triggerScript) && (distTriNextPos > distTriCurrPos))) { return; }
292+
293+
u32 crossedPlane = false;
294+
const SVec3 deltaPos = {
295+
.x = cache->inputNextPos.x - cache->collInput.quadblock.driverPos.x,
296+
.y = cache->inputNextPos.y - cache->collInput.quadblock.driverPos.y,
297+
.z = cache->inputNextPos.z - cache->collInput.quadblock.driverPos.z
298+
};
299+
if (distTriNextPos < 0)
300+
{
301+
const s32 interpolationFactor = FP_DIV(-distTriNextPos, distTriCurrPos - distTriNextPos);
302+
gte_loadSVec(deltaPos.v, GTE_VECTOR_IR);
303+
gte_loadIR(interpolationFactor, GTE_IR_0);
304+
crossedPlane = true;
305+
}
306+
else
307+
{
308+
gte_loadSVec(cache->collIntersection.triNormal.v, GTE_VECTOR_IR);
309+
gte_loadIR(distTriNextPos, GTE_IR_0);
310+
}
311+
Vec3 interpolation;
312+
gte_interpolate(interpolation.v, GTE_CALC_FLOATING_POINT);
313+
cache->collIntersection.interpolationPoint.x = cache->inputNextPos.x - interpolation.x;
314+
cache->collIntersection.interpolationPoint.y = cache->inputNextPos.y - interpolation.y;
315+
cache->collIntersection.interpolationPoint.z = cache->inputNextPos.z - interpolation.z;
316+
cache->currTestVertices[0] = v1;
317+
cache->currTestVertices[1] = v2;
318+
cache->currTestVertices[2] = v3;
319+
const s32 barycentricTest = COLL_BarycentricTest(&cache->collIntersection, v1, v2, v3);
320+
if (barycentricTest == BARYCENTRIC_TEST_INVALID) { return; }
321+
322+
if (crossedPlane)
323+
{
324+
cache->deltaInterpolationIntersection.x = cache->collIntersection.interpolationPoint.x - cache->collIntersection.pos.x;
325+
cache->deltaInterpolationIntersection.y = cache->collIntersection.interpolationPoint.y - cache->collIntersection.pos.y;
326+
cache->deltaInterpolationIntersection.z = cache->collIntersection.interpolationPoint.z - cache->collIntersection.pos.z;
327+
}
328+
else
329+
{
330+
cache->deltaInterpolationIntersection.x = cache->inputNextPos.x - cache->collIntersection.pos.x;
331+
cache->deltaInterpolationIntersection.y = cache->inputNextPos.y - cache->collIntersection.pos.y;
332+
cache->deltaInterpolationIntersection.z = cache->inputNextPos.z - cache->collIntersection.pos.z;
333+
}
334+
s32 distSquaredInterpolationIntersection;
335+
gte_loadRowMatrix(cache->deltaInterpolationIntersection.v, GTE_ROW_INDEX_0, GTE_MATRIX_ROT);
336+
gte_loadSVec(cache->deltaInterpolationIntersection.v, GTE_VECTOR_0);
337+
gte_dotProduct(&distSquaredInterpolationIntersection, GTE_ROW_INDEX_0, GTE_MATRIX_ROT, GTE_VECTOR_0, GTE_CALC_INT);
338+
if (distSquaredInterpolationIntersection > cache->inputHitRadiusSquared) { return; }
339+
340+
if (triggerScript)
341+
{
342+
const u32 skip = (distTriNextPos >= 0) && (distTriNextPos >= cache->inputHitRadius) && (distTriCurrPos >= cache->inputHitRadius);
343+
if (!skip) { cache->stepFlags |= cache->currQuadblock->terrain; return; }
344+
}
345+
346+
s32 deltaDist = distTriCurrPos - distTriNextPos;
347+
if (deltaDist != 0) { deltaDist = FP_ONE - FP_DIV(cache->inputHitRadius - distTriNextPos, deltaDist); }
348+
if (deltaDist >= cache->speedScale) { return; }
349+
350+
if (quadFlags & QUADFLAGS_OUT_OF_BOUNDS)
351+
{
352+
if ((quadFlags & QUADFLAGS_MASK_GRAB) == 0) { return; }
353+
cache->stepFlags |= STEPFLAGS_OUT_OF_BOUNDS;
354+
return;
355+
}
356+
357+
cache->speedScale = deltaDist;
358+
cache->collidedVertices[0] = cache->currTestVertices[0]->levVertex;
359+
cache->collidedVertices[1] = cache->currTestVertices[1]->levVertex;
360+
cache->collidedVertices[2] = cache->currTestVertices[2]->levVertex;
361+
cache->coll.pos = cache->collIntersection.pos;
362+
cache->coll.normalDominantAxis = cache->collIntersection.normalDominantAxis;
363+
cache->coll.triNormal = cache->collIntersection.triNormal;
364+
cache->coll.planeDist = cache->collIntersection.planeDist;
365+
cache->coll.interpolationPoint = cache->collIntersection.interpolationPoint;
366+
cache->collidedQuadblock = cache->currQuadblock;
367+
cache->collidedTriangleIndex = cache->currTriangleIndex;
368+
cache->barycentricTest = barycentricTest;
369+
if (deltaDist > 0)
370+
{
371+
Vec3 nextPos;
372+
gte_loadSVec(deltaPos.v, GTE_VECTOR_IR);
373+
gte_loadIR(deltaDist, GTE_IR_0);
374+
gte_interpolate(nextPos.v, GTE_CALC_FLOATING_POINT);
375+
cache->collInput.quadblock.driverNextPos.x = cache->collInput.quadblock.driverPos.x + nextPos.x;
376+
cache->collInput.quadblock.driverNextPos.y = cache->collInput.quadblock.driverPos.y + nextPos.y;
377+
cache->collInput.quadblock.driverNextPos.z = cache->collInput.quadblock.driverPos.z + nextPos.z;
378+
}
379+
else { cache->collInput.quadblock.driverNextPos = cache->collInput.quadblock.driverPos; }
380+
cache->numTrianglesCollided++;
381+
}
382+
383+
void COLL_TestTriangle(CollDCache* cache, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3)
384+
{
385+
#ifdef TEST_COLL_IMPL
386+
*(CollDCache*)(BACKUP_ADDR) = *cache;
387+
#endif
388+
_COLL_TestTriangle(cache, v1, v2, v3);
389+
TEST_COLL_TestTriangle((CollDCache*)(BACKUP_ADDR), v1, v2, v3, cache);
390+
/* This is a hand written assembly function that breaks the ABI,
391+
and some callers expect the argument registers to be untouched */
392+
__asm__ volatile("move $a0, %0" : : "r"((u32)cache));
393+
__asm__ volatile("move $t9, %0" : : "r"((u32)cache->currQuadblock));
255394
}

rewrite/src/tests/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ FunctionPatch s_functions[] =
3030
TEST_FUNC(RNG_PseudoRand),
3131
TEST_FUNC(RNG_Random),
3232
TEST_FUNC(COLL_ProjectPointToEdge),
33-
TEST_FUNC(COLL_BarycentricTest),
3433
TEST_FUNC(COLL_LoadQuadblockData_LowLOD),
3534
TEST_FUNC(COLL_LoadQuadblockData_HighLOD),
35+
TEST_FUNC(COLL_TestTriangle),
3636
};
3737

3838
void LoadTestPatches()

rewrite/src/tests/test_coll.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
#ifdef TEST_COLL_IMPL
44

5+
static u32 PrintDCacheDiff(const char* name, const CollDCache* expected, const CollDCache* ret)
6+
{
7+
u32 failed = false;
8+
const u8* pExpected = (const u8*) expected;
9+
const u8* pRet = (const u8*) ret;
10+
const u32 len = sizeof(CollDCache);
11+
for (u32 i = 0; i < len; i++)
12+
{
13+
if (pExpected[i] != pRet[i]) { ND_printf("[%s] Test Failed:\nOffset %x: %d, got: %d\n", name, i, (u32) pExpected[i], (u32) pRet[i]); failed = true; }
14+
}
15+
return failed;
16+
}
17+
518
void TEST_COLL_ProjectPointToEdge(const SVec3* v1, const SVec3* v2, const SVec3* point, const SVec3* ret)
619
{
720
const u32 index = PatchFunction_Beg((u32*)(&ND_COLL_ProjectPointToEdge));
@@ -68,4 +81,14 @@ void TEST_COLL_BarycentricTest(TestVertex* t, const CollVertex* v1, const CollVe
6881
PatchFunction_End(index);
6982
}
7083

84+
void TEST_COLL_TestTriangle(CollDCache* cache, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3, const CollDCache* ret)
85+
{
86+
const u32 index = PatchFunction_Beg((u32*)(&ND_COLL_TestTriangle));
87+
typedef void (*Func)(CollDCache* cache, const CollVertex* v1, const CollVertex* v2, const CollVertex* v3);
88+
Func func = (Func) TEST_WRAPPER;
89+
func(cache, v1, v2, v3);
90+
PrintDCacheDiff("COLL_TestTriangle", cache, ret);
91+
PatchFunction_End(index);
92+
}
93+
7194
#endif // TEST_COLL_IMPL

0 commit comments

Comments
 (0)