32 |
|
#include "random.h" |
33 |
|
#include "resolu.h" |
34 |
|
|
35 |
+ |
#ifdef __alpha |
36 |
+ |
#define int4 int |
37 |
+ |
#endif |
38 |
+ |
#ifndef int4 |
39 |
+ |
#define int4 long |
40 |
+ |
#endif |
41 |
+ |
|
42 |
|
#define FONTNAME "8x13" /* text font we'll use */ |
43 |
|
|
44 |
|
#define CTRL(c) ((c)-'@') |
473 |
|
goto fail; |
474 |
|
getmono(); |
475 |
|
} else if (ourvis.class == TrueColor | ourvis.class == DirectColor) { |
476 |
< |
ourdata = (unsigned char *)malloc(4*xmax*ymax); |
476 |
> |
ourdata = (unsigned char *)malloc(sizeof(int4)*xmax*ymax); |
477 |
|
if (ourdata == NULL) |
478 |
|
goto fail; |
479 |
< |
ourras = make_raster(thedisplay, &ourvis, 32, |
479 |
> |
ourras = make_raster(thedisplay, &ourvis, sizeof(int4)*8, |
480 |
|
ourdata, xmax, ymax, 32); |
481 |
|
if (ourras == NULL) |
482 |
|
goto fail; |
660 |
|
make_rpixmap(ourras, wind); |
661 |
|
redraw(0, 0, width, height); |
662 |
|
return(0); |
663 |
+ |
case 'f': /* turn on fast redraw */ |
664 |
+ |
fast = 1; |
665 |
+ |
make_rpixmap(ourras, wind); |
666 |
+ |
return(0); |
667 |
+ |
case 'F': /* turn off fast redraw */ |
668 |
+ |
fast = 0; |
669 |
+ |
free_rpixmap(ourras); |
670 |
+ |
return(0); |
671 |
|
case '0': /* recenter origin */ |
672 |
|
if (xoff == 0 & yoff == 0) |
673 |
|
return(0); |
883 |
|
getfull() /* get full (24-bit) data */ |
884 |
|
{ |
885 |
|
int y; |
886 |
< |
register unsigned long *dp; |
886 |
> |
register unsigned int4 *dp; |
887 |
|
register int x; |
888 |
|
/* set gamma correction */ |
889 |
|
setcolrgam(gamcor); |
890 |
|
/* read and convert file */ |
891 |
< |
dp = (unsigned long *)ourdata; |
891 |
> |
dp = (unsigned int4 *)ourdata; |
892 |
|
for (y = 0; y < ymax; y++) { |
893 |
|
getscan(y); |
894 |
|
add2icon(y, scanline); |