1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/small3dlib.git synced 2024-11-21 20:39:57 +01:00

Fix formatting

This commit is contained in:
Miloslav Ciz 2022-07-25 20:44:17 +02:00
parent e4fa1a714f
commit d72ca57d2a

View file

@ -2422,33 +2422,32 @@ void S3L_drawTriangle(
#endif #endif
#if S3L_NEAR_CROSS_STRATEGY == 3 #if S3L_NEAR_CROSS_STRATEGY == 3
if (_S3L_projectedTriangleState != 0)
{
S3L_Unit newBarycentric[3];
if (_S3L_projectedTriangleState != 0) newBarycentric[0] = S3L_interpolateBarycentric(
{ _S3L_triangleRemapBarycentrics[0].x,
S3L_Unit newBarycentric[3]; _S3L_triangleRemapBarycentrics[1].x,
_S3L_triangleRemapBarycentrics[2].x,
p.barycentric);
newBarycentric[0] = S3L_interpolateBarycentric( newBarycentric[1] = S3L_interpolateBarycentric(
_S3L_triangleRemapBarycentrics[0].x, _S3L_triangleRemapBarycentrics[0].y,
_S3L_triangleRemapBarycentrics[1].x, _S3L_triangleRemapBarycentrics[1].y,
_S3L_triangleRemapBarycentrics[2].x, _S3L_triangleRemapBarycentrics[2].y,
p.barycentric); p.barycentric);
newBarycentric[1] = S3L_interpolateBarycentric( newBarycentric[2] = S3L_interpolateBarycentric(
_S3L_triangleRemapBarycentrics[0].y, _S3L_triangleRemapBarycentrics[0].z,
_S3L_triangleRemapBarycentrics[1].y, _S3L_triangleRemapBarycentrics[1].z,
_S3L_triangleRemapBarycentrics[2].y, _S3L_triangleRemapBarycentrics[2].z,
p.barycentric); p.barycentric);
newBarycentric[2] = S3L_interpolateBarycentric( p.barycentric[0] = newBarycentric[0];
_S3L_triangleRemapBarycentrics[0].z, p.barycentric[1] = newBarycentric[1];
_S3L_triangleRemapBarycentrics[1].z, p.barycentric[2] = newBarycentric[2];
_S3L_triangleRemapBarycentrics[2].z, }
p.barycentric);
p.barycentric[0] = newBarycentric[0];
p.barycentric[1] = newBarycentric[1];
p.barycentric[2] = newBarycentric[2];
}
#endif #endif
S3L_PIXEL_FUNCTION(&p); S3L_PIXEL_FUNCTION(&p);
} // tests passed } // tests passed
@ -2772,12 +2771,12 @@ void _S3L_projectTriangle(
transformed[5] = transformed[infrontI[0]]; transformed[5] = transformed[infrontI[0]];
#if S3L_NEAR_CROSS_STRATEGY == 3 #if S3L_NEAR_CROSS_STRATEGY == 3
_S3L_triangleRemapBarycentrics[3] = _S3L_triangleRemapBarycentrics[3] =
_S3L_triangleRemapBarycentrics[behindI[1]]; _S3L_triangleRemapBarycentrics[behindI[1]];
_S3L_triangleRemapBarycentrics[4] = _S3L_triangleRemapBarycentrics[4] =
_S3L_triangleRemapBarycentrics[infrontI[0]]; _S3L_triangleRemapBarycentrics[infrontI[0]];
_S3L_triangleRemapBarycentrics[5] = _S3L_triangleRemapBarycentrics[5] =
_S3L_triangleRemapBarycentrics[infrontI[0]]; _S3L_triangleRemapBarycentrics[infrontI[0]];
#endif #endif
for (uint8_t i = 0; i < 2; ++i) for (uint8_t i = 0; i < 2; ++i)