--- ray/src/rt/t_func.c 2010/10/25 22:57:45 2.8 +++ ray/src/rt/t_func.c 2014/07/08 18:25:00 2.10 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: t_func.c,v 2.8 2010/10/25 22:57:45 greg Exp $"; +static const char RCSid[] = "$Id: t_func.c,v 2.10 2014/07/08 18:25:00 greg Exp $"; #endif /* * t_func.c - routine for procedural textures. @@ -28,16 +28,16 @@ static const char RCSid[] = "$Id: t_func.c,v 2.8 2010/ */ -extern int +int t_func( /* compute texture for ray */ - register OBJREC *m, - register RAY *r + OBJREC *m, + RAY *r ) { FVECT disp; double d; - register MFUNC *mf; - register int i; + MFUNC *mf; + int i; if (m->oargs.nsargs < 4) objerror(m, USER, "bad # arguments"); @@ -51,13 +51,13 @@ t_func( /* compute texture for ray */ return(0); } } - if (mf->f != &unitxf) - multv3(disp, disp, mf->f->xfm); + if (mf->fxp != &unitxf) + multv3(disp, disp, mf->fxp->xfm); if (r->rox != NULL) { multv3(disp, disp, r->rox->f.xfm); - d = 1.0 / (mf->f->sca * r->rox->f.sca); + d = 1.0 / (mf->fxp->sca * r->rox->f.sca); } else - d = 1.0 / mf->f->sca; + d = 1.0 / mf->fxp->sca; VSUM(r->pert, r->pert, disp, d); return(0); }