From f75c88b247d7d03fc71bf9931016dfe5b82d4707 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 20 Dec 2002 23:49:11 +0000 Subject: [PATCH] work around a gcc (GCC) 3.1 20020420 (prerelease) bug in darwin (ppc?) --- libs/video/renderer/sw/sw_rsprite.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/video/renderer/sw/sw_rsprite.c b/libs/video/renderer/sw/sw_rsprite.c index b1846ea33..bb4488006 100644 --- a/libs/video/renderer/sw/sw_rsprite.c +++ b/libs/video/renderer/sw/sw_rsprite.c @@ -116,9 +116,16 @@ R_ClipSpriteFace (int nump, clipplane_t *pclipplane) if (dists[i] == 0 || dists[i + 1] == 0) continue; - +#if __APPLE_CC__ == 1173 + // bug in gcc (GCC) 3.1 20020420 (prerelease) for darwin + if ((dists[i] > 0) && (dists[i + 1] > 0)) + continue; + if ((dists[i] <= 0) && (dists[i + 1] <= 0)) + continue; +#else if ((dists[i] > 0) == (dists[i + 1] > 0)) continue; +#endif // split it into a new vertex frac = dists[i] / (dists[i] - dists[i + 1]);