--- ray/src/rt/glass.c 2003/03/03 00:10:51 2.12 +++ ray/src/rt/glass.c 2004/03/30 16:13:01 2.15 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: glass.c,v 2.12 2003/03/03 00:10:51 greg Exp $"; +static const char RCSid[] = "$Id: glass.c,v 2.15 2004/03/30 16:13:01 schorsch Exp $"; #endif /* * glass.c - simpler shading function for thin glass surfaces. @@ -8,8 +8,8 @@ static const char RCSid[] = "$Id: glass.c,v 2.12 2003/ #include "copyright.h" #include "ray.h" - #include "otypes.h" +#include "rtotypes.h" /* * This definition of glass provides for a quick calculation @@ -41,9 +41,11 @@ static const char RCSid[] = "$Id: glass.c,v 2.12 2003/ #define RINDEX 1.52 /* refractive index of glass */ -m_glass(m, r) /* color a ray which hit a thin glass surface */ -OBJREC *m; -register RAY *r; +extern int +m_glass( /* color a ray which hit a thin glass surface */ + OBJREC *m, + register RAY *r +) { COLOR mcolor; double pdot; @@ -73,9 +75,9 @@ register RAY *r; mirtest = transtest = 0; mirdist = transdist = r->rot; /* perturb normal */ - if (hastexture = DOT(r->pert,r->pert) > FTINY*FTINY) + if ( (hastexture = (DOT(r->pert,r->pert) > FTINY*FTINY)) ) { pdot = raynormal(pnorm, r); - else { + } else { VCOPY(pnorm, r->ron); pdot = r->rod; }