| 1 |
< |
/* Copyright (c) 1993 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1996 Regents of the University of California */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
| 14 |
|
#include "face.h" |
| 15 |
|
#include "cone.h" |
| 16 |
|
#include "instance.h" |
| 17 |
+ |
#include "color.h" |
| 18 |
+ |
#include "data.h" |
| 19 |
|
|
| 20 |
|
|
| 21 |
|
int |
| 36 |
|
case OBJ_INSTANCE: /* octree instance */ |
| 37 |
|
getinstance(op, IO_ALL); |
| 38 |
|
return(1); |
| 39 |
+ |
case PAT_CPICT: /* color picture */ |
| 40 |
+ |
if (op->oargs.nsargs < 4) |
| 41 |
+ |
goto sargerr; |
| 42 |
+ |
getpict(op->oargs.sarg[3]); |
| 43 |
+ |
return(1); |
| 44 |
+ |
case PAT_CDATA: /* color data */ |
| 45 |
+ |
/* FALL THROUGH */ |
| 46 |
+ |
case TEX_DATA: /* texture data */ |
| 47 |
+ |
if (op->oargs.nsargs < 6) |
| 48 |
+ |
goto sargerr; |
| 49 |
+ |
getdata(op->oargs.sarg[3]); |
| 50 |
+ |
getdata(op->oargs.sarg[4]); |
| 51 |
+ |
getdata(op->oargs.sarg[5]); |
| 52 |
+ |
return(1); |
| 53 |
+ |
case PAT_BDATA: /* brightness data */ |
| 54 |
+ |
/* FALL THROUGH */ |
| 55 |
+ |
case MAT_PDATA: /* plastic BRDF data */ |
| 56 |
+ |
case MAT_MDATA: /* metal BRDF data */ |
| 57 |
+ |
case MAT_TDATA: /* trans BRDF data */ |
| 58 |
+ |
if (op->oargs.nsargs < 2) |
| 59 |
+ |
goto sargerr; |
| 60 |
+ |
getdata(op->oargs.sarg[1]); |
| 61 |
+ |
return(1); |
| 62 |
|
} |
| 63 |
< |
/* don't bother with non-surfaces -- too tricky */ |
| 63 |
> |
/* don't bother with others -- too tricky */ |
| 64 |
|
return(0); |
| 65 |
+ |
sargerr: |
| 66 |
+ |
objerror(op, USER, "too few string arguments"); |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
|
| 70 |
|
preload_objs() /* preload object data structures */ |
| 71 |
|
{ |
| 72 |
|
register OBJECT on; |
| 73 |
< |
/* note that nobjects may change during */ |
| 73 |
> |
/* note that nobjects may change during loop */ |
| 74 |
|
for (on = 0; on < nobjects; on++) |
| 75 |
|
load_os(objptr(on)); |
| 76 |
|
} |