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; |
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); |