--- ray/src/common/color.h 1991/10/24 12:15:07 1.14 +++ ray/src/common/color.h 1993/06/04 14:51:41 2.5 @@ -1,4 +1,4 @@ -/* Copyright (c) 1986 Regents of the University of California */ +/* Copyright (c) 1991 Regents of the University of California */ /* SCCSid "$SunId$ LBL" */ @@ -42,10 +42,10 @@ typedef float COLOR[3]; /* red, green, blue */ #ifdef NTSC #define bright(col) (.295*(col)[RED]+.636*(col)[GRN]+.070*(col)[BLU]) -#define normbright(c) (int)((74L*(c)[RED]+164L*(c)[GRN]+18L*(c)[BLU])/256) +#define normbright(c) (int)((74L*(c)[RED]+164L*(c)[GRN]+18L*(c)[BLU])>>8) #else #define bright(col) (.263*(col)[RED]+.655*(col)[GRN]+.082*(col)[BLU]) -#define normbright(c) (int)((67L*(c)[RED]+168L*(c)[GRN]+21L*(c)[BLU])/256) +#define normbright(c) (int)((67L*(c)[RED]+168L*(c)[GRN]+21L*(c)[BLU])>>8) #endif /* luminous efficacies over visible spectrum */ @@ -72,11 +72,6 @@ typedef float COLOR[3]; /* red, green, blue */ #define WHTCOLR {128,128,128,COLXS+1} #define BLKCOLR {0,0,0,0} - /* definitions for resolution header */ -#define XDECR 1 -#define YDECR 2 -#define YMAJOR 4 - /* picture format identifier */ #define COLRFMT "32-bit_rle_rgbe" @@ -102,5 +97,3 @@ typedef float COLOR[3]; /* red, green, blue */ &(cc)[RED],&(cc)[GRN],&(cc)[BLU]) #define fputcolcor(cc,fp) fprintf(fp,"%s %f %f %f\n",COLCORSTR, \ (cc)[RED],(cc)[GRN],(cc)[BLU]) - -extern double ldexp(), atof();