--- ray/src/common/rglinst.c 1998/09/02 18:42:11 3.4 +++ ray/src/common/rglinst.c 2003/04/23 02:28:06 3.7 @@ -1,13 +1,12 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: rglinst.c,v 3.7 2003/04/23 02:28:06 greg Exp $"; #endif - /* * Routines for reading instances and converting to OpenGL. */ +#include "copyright.h" + #include "radogl.h" #include "octree.h" @@ -20,14 +19,12 @@ typedef struct { char octfile[256]; /* octree file path */ } OCTINST; /* octree to instantiate */ -OBJECT nobjects; /* number of objects loaded so far */ - -extern int free(); - static double ogetflt(); static long ogetint(); static char *ogetstr(); -static int loadobj(), octerror(), skiptree(); +static int loadobj(); +static void skiptree(); +static void octerror(); static OCTINST *getoct(); static char *infn; /* input file name */ @@ -41,6 +38,7 @@ static LUTAB imtab = {imhash,NULL,NULL,NULL,0,NULL,0}; static LUTAB ottab = LU_SINIT(free,free); +int o_instance(o) /* convert instance to list call */ register OBJREC *o; { @@ -69,7 +67,7 @@ register OBJREC *o; } ot = getoct(o->oargs.sarg[0]); /* get octree reference */ if (ot->localmatl &= o->os != NULL) /* set material */ - setmaterial(o->os, ot->cent, 0); + setmaterial((MATREC *)o->os, ot->cent, 0); /* call the assigned list */ glCallList(ot->listid); @@ -79,6 +77,7 @@ register OBJREC *o; glPopAttrib(); } rgl_checkerr("creating instance"); + return(0); } @@ -197,6 +196,7 @@ FVECT cent; } +int loadoct(fname) /* read in objects from octree */ char *fname; { @@ -286,7 +286,7 @@ ogetflt() /* get a floating point number */ } -static +static void skiptree() /* skip octree on input */ { register int i; @@ -311,7 +311,7 @@ skiptree() /* skip octree on input */ } -static +static int loadobj() /* get next object */ { static OBJREC ob; @@ -384,7 +384,7 @@ memerr: } -static +static void octerror(etyp, msg) /* octree error */ int etyp; char *msg;