--- ray/src/rt/aed.c 1989/10/03 11:10:02 1.3 +++ ray/src/rt/aed.c 1990/02/22 11:46:11 1.7 @@ -52,25 +52,23 @@ static char SCCSid[] = "$SunId$ LBL"; #define MINPIX 8 /* minimum hardware color */ #define NCOLS 512 /* maximum # columns for output */ -#define NROWS 512-COMHT /* maximum # rows for output */ +#define NROWS 483-COMHT /* maximum # rows for output */ #define COMHT 16 /* height of command line */ #define COMCW 63 /* maximum chars on command line */ -int anewcolr(); - int aed_close(), aed_clear(), aed_paintr(), aed_getcur(), aed_comout(), aed_errout(); static struct driver aed_driver = { aed_close, aed_clear, aed_paintr, aed_getcur, - aed_comout, NULL, - NCOLS, NROWS + aed_comout, NULL, NULL, + 1.0, NCOLS, NROWS }; struct driver * -aed_init(name) /* open AED */ -char *name; +aed_init(name, id) /* open AED */ +char *name, *id; { if (ttyset(&aed_driver, fileno(stdin)) < 0) { /* set tty driver */ stderr_v("cannot access terminal\n"); @@ -88,7 +86,7 @@ char *name; byte(BLK); byte(WHT); byte(15); command(SCP); byte('+'); byte(0); byte(1); - make_cmap(GAMMA); /* make color map */ + make_gmap(GAMMA); /* make color map */ errvec = aed_errout; /* set error vector */ cmdvec = aed_errout; if (wrnvec != NULL) @@ -119,7 +117,7 @@ aed_clear(x, y) /* clear AED */ int x, y; { command(FFD); - new_ctab(NCOLORS, anewcolr); /* init color table */ + new_ctab(NCOLORS); /* init color table */ flush(); } @@ -129,9 +127,10 @@ aed_paintr(col, xmin, ymin, xmax, ymax) /* paint a re COLOR col; int xmin, ymin, xmax, ymax; { + extern int anewcolr(); int ndx; - ndx = get_pixel(col); /* may call anewcolr() */ + ndx = get_pixel(col, anewcolr); /* calls anewcolr() */ command(SEC); /* draw rectangle */ byte(ndx+MINPIX); aedsetcap(xmin, ymin+COMHT);