Utah Raster Toolkit  9999-git
URT Development version (post-3.1b)
Macros | Typedefs | Functions | Variables
get_orion.c File Reference
#include <stdio.h>
#include <math.h>
#include <graphics/grafix.h>
#include <graphics/window.h>
#include <graphics/control.h>
#include <graphics/events.h>
#include <sys/ioctl.h>
#include <machine/graphics.h>
#include "rle.h"
Include dependency graph for get_orion.c:

Go to the source code of this file.

Macros

#define RASTERSIZE_LIM   1280
 
#define MONOCHROME_MODE   1
 
#define EIGHT_BIT_COLOUR_MODE   2
 
#define MONOCHROME_ENTRIES   128
 
#define DMAP(v, x, y)    (errN[v]>dm16[x][y] ? divN[v]+1 : divN[v])
 
#define WriteCLT(cltp)   (ioctl (_gdev, GTIOCSCLT, &(cltp)))
 
#define ReadCLT(cltp)    (ioctl (_gdev, GTIOCGCLT, &(cltp)))
 

Typedefs

typedef int boolean
 

Functions

 main (int argc, argv)
 
 init_gamma_map ()
 
 init_8_bit_colour_map ()
 
 init_monochrome_colour_map ()
 
 init_24_bit_colour_map ()
 
 put_line_8 (int yscan)
 
 put_line_mono (int yscan)
 
 write_colour_map ()
 
 write_scanline (int yscan)
 
 translate_bits (BitMapPtr db, Rect dr)
 
 EventLoop ()
 
 MyClose ()
 
 MyActivate ()
 

Variables

rle_hdrhdr
 
unsigned char scanline [4][1280]
 
unsigned char * rows [4]
 
unsigned char dest_pixels [1280]
 
BitMap scanbitmap
 
Rect trandr
 
int dm16 [16][16]
 
int errN [256]
 
int divN [256]
 
int gammamap [256]
 
float gam = 2.0
 
boolean linear_flag = FALSE
 
boolean gamma_flag = FALSE
 
boolean all_colours_flag = FALSE
 
int put_mode = 2
 
int n_colmap_colours
 
int colmap [256][3]
 
WindowPtr rle_window
 
EventRecord myEvent
 
WindowPtr whichWindow
 
Point myPt
 
int thePart
 
boolean isActive = FALSE
 
int window_size_x
 
int window_size_y
 
boolean debug_flag = FALSE
 
boolean reverse_flag = FALSE
 
boolean onec_threem_mode = FALSE
 

Macro Definition Documentation

#define DMAP (   v,
  x,
  y 
)    (errN[v]>dm16[x][y] ? divN[v]+1 : divN[v])

Definition at line 310 of file get_orion.c.

#define EIGHT_BIT_COLOUR_MODE   2

Definition at line 26 of file get_orion.c.

#define MONOCHROME_ENTRIES   128

Definition at line 27 of file get_orion.c.

#define MONOCHROME_MODE   1

Definition at line 25 of file get_orion.c.

#define RASTERSIZE_LIM   1280

Definition at line 24 of file get_orion.c.

#define ReadCLT (   cltp)    (ioctl (_gdev, GTIOCGCLT, &(cltp)))

Definition at line 434 of file get_orion.c.

#define WriteCLT (   cltp)    (ioctl (_gdev, GTIOCSCLT, &(cltp)))

Definition at line 433 of file get_orion.c.

Typedef Documentation

typedef int boolean

Definition at line 31 of file get_orion.c.

Function Documentation

EventLoop ( )

Definition at line 566 of file get_orion.c.

567 {
568  while (TRUE)
569  {
570  GetNextEvent (everyEvent, &myEvent);
571  switch (myEvent.what)
572  {
573  case mouseDown:
574  whichWindow = (WindowPtr) myEvent.refCon;
575  switch (FindWindow (myEvent.where, whichWindow))
576  {
577  case inGoAway:
578  if (TrackGoAway (whichWindow, myEvent.where))
579  {
580  MyClose ();
581  }
582  break;
583 
584  case inDrag:
585  DragWindow (whichWindow, myEvent.where, stdBoundsRect);
586  break;
587 
588  case inContent:
589  if (whichWindow != FrontWindow ())
590  {
591  BringToFront (whichWindow);
592  }
593  else
594  {
595  myPt = myEvent.where;
596  GlobalToLocal (&myPt);
597  }
598  break;
599  }
600  break; /* End of mouseDown */
601 
602  case activate:
603  MyActivate ();
604  break;
605  }
606  } /* while (TRUE) */
607 }
EventRecord myEvent
Definition: get_orion.c:71
MyClose()
Definition: get_orion.c:610
MyActivate()
Definition: get_orion.c:617
WindowPtr whichWindow
Definition: get_orion.c:72
#define TRUE
Definition: giftorle.c:38
Point myPt
Definition: get_orion.c:73
init_24_bit_colour_map ( )

Definition at line 289 of file get_orion.c.

References rle_hdr::cmap, rle_hdr::cmaplen, colmap, hdr, and n_colmap_colours.

290 {
291  int i, g_offset, b_offset;
292 
293  /* set up the colour map entries, will use the number supplied in the
294  header */
296  g_offset = n_colmap_colours;
297  b_offset = 2 * g_offset;
298 
299  /* set the device colour map to the one in the header */
300  for (i = 0; i < n_colmap_colours; i++) {
301  colmap[i][0] = hdr.cmap[i];
302  colmap[i][1] = hdr.cmap[i + g_offset];
303  colmap[i][2] = hdr.cmap[i + b_offset];
304  }
305 }
rle_map * cmap
Definition: rle.h:112
int colmap[256][3]
Definition: get_orion.c:67
rle_hdr * hdr
Definition: get_orion.c:34
int n_colmap_colours
Definition: get_orion.c:66
int cmaplen
Definition: rle.h:100
int i
Definition: rletorla.c:82
init_8_bit_colour_map ( )

Definition at line 244 of file get_orion.c.

References colmap, dithermap(), divN, dm16, errN, and n_colmap_colours.

245 {
246  double gamma;
247 
248  /* Set up the colour map entries. We will use 216 colours. */
249  n_colmap_colours = 216;
250 
251  /* calculate tables but don't gamma correct the colour map */
252  gamma = 1.0;
253  dithermap(6, gamma, colmap, divN, errN, dm16);
254 }
int colmap[256][3]
Definition: get_orion.c:67
void dithermap(int levels, double gamma, int rgbmap[][3], int divN[256], int modN[256], int magic[16][16])
int n_colmap_colours
Definition: get_orion.c:66
int dm16[16][16]
Definition: get_orion.c:48
int gamma(int x, float gamma_value)
Definition: gamma.c:24
int errN[256]
Definition: get_orion.c:51
int divN[256]
Definition: get_orion.c:51

Here is the call graph for this function:

init_gamma_map ( )

Definition at line 228 of file get_orion.c.

References gam, and gammamap.

229 {
230  int i;
231 
232  for (i = 0; i < 256; i++) {
233  gammamap[i] = (int) (0.5 + 255 * pow(i / 255.0, 1.0/gam));
234  }
235 }
float gam
Definition: get_orion.c:55
int gammamap[256]
Definition: get_orion.c:54
int
Definition: getami.c:848
int i
Definition: rletorla.c:82
init_monochrome_colour_map ( )

Definition at line 264 of file get_orion.c.

References bwdithermap(), colmap, divN, dm16, errN, and n_colmap_colours.

265 {
266  int i, bwmap[256];
267  double gamma;
268 
269  /* Set up the colour map entries into a single greyscale ramp */
271 
272  /* calculate tables but don't gamma correct the colour map */
273  gamma = 1.0;
274  bwdithermap(n_colmap_colours, gamma, bwmap, divN, errN, dm16);
275  for (i = 0; i < n_colmap_colours; i++)
276  colmap[i][0] = colmap[i][1] = colmap[i][2] = bwmap[i];
277 
278 }
void bwdithermap(int levels, double gamma, int bwmap[], int divN[256], int modN[256], int magic[16][16])
int colmap[256][3]
Definition: get_orion.c:67
int n_colmap_colours
Definition: get_orion.c:66
int dm16[16][16]
Definition: get_orion.c:48
int gamma(int x, float gamma_value)
Definition: gamma.c:24
int i
Definition: rletorla.c:82
int errN[256]
Definition: get_orion.c:51
#define MONOCHROME_ENTRIES
Definition: get_orion.c:27
int divN[256]
Definition: get_orion.c:51

Here is the call graph for this function:

main ( int  argc,
argv   
)

Definition at line 114 of file get_orion.c.

117 {
118  int i, temp;
119  int bw_flag = 0;
120  char *infname = NULL, *window_name;
121  FILE *fopen();
122  Rect r;
123 
124  hdr = *rle_hdr_init( (rle_hdr *)NULL );
125 
126  /* Get command line arguments */
127  if (scanargs(argc, argv, "getOrion D%- w%- f%- g%-gamma!f l%- r%- infile
128 %s",
129  &debug_flag, &bw_flag, &all_colours_flag,
130  &gamma_flag, &gam, &linear_flag, &reverse_flag, &infname) == 0)
131  exit(1);
132 
133  /* Open file for reading, if no filename was specified, read from
134  stdin */
135  rle_names( &hdr, cmd_name( argv ), infname, 0 );
136  hdr.rle_file = rle_open_f(hdr.cmd, infname, "r");
137 
138  temp = rle_get_setup(&hdr);
139  if (temp < 0) {
140  fprintf(stderr, "getOrion: error reading setup information from %s\n",
141  infname ? infname : "stdin");
142  fprintf(stderr, "with return code %d\n", temp);
143  exit(1);
144  }
145 
146  if (debug_flag) rle_debug(1);
147 
148  /* a linear map has no gamma correction */
149  if (linear_flag) gam = 1.0;
150 
151  /* Set up gamma correction table */
152  init_gamma_map();
153 
154  /* we're only interested in R, G and B */
156  for (i = 3; i < hdr.ncolors; i++)
157  RLE_CLR_BIT(hdr, i);
158 
159  /* Set up rows to point to our copy of the scanline */
160  for (i = 0; i < 3; i++)
161  rows[i] = scanline[i];
162 
163  /* Pretend origin is at 0,0 */
164  hdr.xmax -= hdr.xmin;
165  hdr.xmin = 0;
166  hdr.ymax -= hdr.ymin;
167  hdr.ymin = 0;
168 
169  /* shift the colour map, if present, down to 8 bits precision */
170  for (i = 0; i < hdr.ncmap * (1 << hdr.cmaplen); i++)
171  hdr.cmap[i] = hdr.cmap[i] >> 8;
172 
173  if (bw_flag) {
176  }
177  else if ((hdr.ncmap == 3) && hdr.ncolors == 1) {
178  /* one channel and 24-bit colour map supplied */
181  }
182  else
183  /* use 216 standard colour map */
185 
186  /* Initialise the device and create window */
187  InitGraf();
188  window_size_x = hdr.xmax + 1;
189  window_size_y = hdr.ymax + 1;
190  SetRect (&r, 50, 50, window_size_x, window_size_y);
191  if (infname == NULL)
192  window_name = "piped";
193  else {
194  window_name = infname;
195  }
196  rle_window = NewWindow(NIL, r, window_name, VISIBLE, noGrowDocProc, FRONT,
197  GOAWAY, 0, 7);
198  PenPat(black);
199  UpdateWindow(rle_window, TRUE);
201 
202  /* make the scan line bit map */
203  scanbitmap = NewRBitMap(window_size_x, 1, 8); /* really need only one pla
204 ne */
205 
206  /* Get the scanlines */
207  for (i = hdr.ymin; i <= hdr.ymax; i++) {
208  rle_getrow(&hdr, rows);
209  if (put_mode == MONOCHROME_MODE)
210  put_line_mono(i);
211  else
212  put_line_8(i);
213  }
214 
215  /* loop */
216  EventLoop();
217 }
int xmin
Definition: rle.h:100
boolean onec_threem_mode
Definition: get_orion.c:86
int scanargs(int argc, char **argv, const char *format,...)
Definition: scanargs.c:94
BitMap scanbitmap
Definition: get_orion.c:43
init_monochrome_colour_map()
Definition: get_orion.c:264
write_colour_map()
Definition: get_orion.c:442
init_8_bit_colour_map()
Definition: get_orion.c:244
put_line_mono(int yscan)
Definition: get_orion.c:380
int window_size_x
Definition: get_orion.c:76
EventLoop()
Definition: get_orion.c:566
static unsigned char r
Definition: getami.c:692
rle_map * cmap
Definition: rle.h:112
float gam
Definition: get_orion.c:55
boolean linear_flag
Definition: get_orion.c:58
unsigned char * rows[4]
Definition: get_orion.c:37
boolean reverse_flag
Definition: get_orion.c:82
boolean all_colours_flag
Definition: get_orion.c:60
int ymin
Definition: rle.h:100
int window_size_y
Definition: get_orion.c:76
init_24_bit_colour_map()
Definition: get_orion.c:289
rle_hdr * hdr
Definition: get_orion.c:34
string infname
Definition: getbob.c:68
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
put_line_8(int yscan)
Definition: get_orion.c:318
const char * cmd
Definition: rle.h:133
int rle_get_setup(rle_hdr *the_hdr)
Definition: rle_getrow.c:74
Definition: rle.h:96
int xmax
Definition: rle.h:100
static char temp[]
Definition: into.c:45
#define TRUE
Definition: giftorle.c:38
boolean debug_flag
Definition: get_orion.c:79
int put_mode
Definition: get_orion.c:63
#define RLE_CLR_BIT(glob, bit)
Definition: rle.h:124
int ncmap
Definition: rle.h:100
int ymax
Definition: rle.h:100
void rle_debug(int on_off)
Definition: rle_getrow.c:293
if(tfd)
Definition: getami.c:852
int cmaplen
Definition: rle.h:100
int i
Definition: rletorla.c:82
#define RLE_ALPHA
Definition: rle.h:65
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
#define MONOCHROME_MODE
Definition: get_orion.c:25
char * cmd_name(char **argv)
Definition: cmd_name.c:31
unsigned char scanline[4][1280]
Definition: get_orion.c:37
init_gamma_map()
Definition: get_orion.c:228
int bw_flag
Definition: getap.c:89
boolean gamma_flag
Definition: get_orion.c:59
WindowPtr rle_window
Definition: get_orion.c:70
int rle_getrow(rle_hdr *the_hdr, rle_pixel *scanline[])
FILE * rle_file
Definition: rle.h:114
int ncolors
Definition: rle.h:100
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)
Definition: rle_hdr.c:267
MyActivate ( )

Definition at line 617 of file get_orion.c.

618 {
619  WindowPtr theWindow;
620  Bool theState;
621 
622  theWindow = (WindowPtr) myEvent.message;
623  theState = (myEvent.modifiers & activateFlag) != 0;
624  if (theState)
625  {
626  if (!isActive)
627  {
628  HiliteWindow (theWindow, TRUE);
629  SetPort (theWindow);
630  isActive = TRUE;
631  }
632  }
633  else
634  {
635  HiliteWindow (theWindow, FALSE);
636  isActive = FALSE;
637  }
638 }
EventRecord myEvent
Definition: get_orion.c:71
#define FALSE
Definition: giftorle.c:39
boolean isActive
Definition: get_orion.c:75
#define TRUE
Definition: giftorle.c:38
MyClose ( )

Definition at line 610 of file get_orion.c.

611 {
612  exit (0);
613 }
put_line_8 ( int  yscan)

Definition at line 318 of file get_orion.c.

320 {
321  unsigned char *r, *g, *b;
322  int i, dither_col, dither_row;
323  int xmax = hdr.xmax;
324  int g_offset, b_offset;
325  unsigned char *dest_pixel_ptr;
326 
327  /* treat 1 colour and 3 colmap channels as special case */
328  if (onec_threem_mode) {
329  bcopy(rows[0], dest_pixels, xmax+1);
330  write_scanline(yscan);
331  return;
332  }
333 
334  dither_row = yscan % 16;
335  dither_col = 0;
336  dest_pixel_ptr = dest_pixels;
337  r = rows[0];
338  /* check if we have less than three colour channels */
339  g = rows[(hdr.ncolors >= 2 ? 1 : 0)];
340  b = rows[(hdr.ncolors >= 3 ? 2 : 0)];
341 
342  /* RLE file with colour map */
343  if (hdr.ncmap) {
344  /* offsets to the green and blue sections of the map */
345  g_offset = 1 << hdr.cmaplen;
346  b_offset = 2 * g_offset;
347 
348  for (i = 0; i <= xmax; i++, r++, g++, b++,
349  dither_col = ((dither_col + 1) & 15),
350  dest_pixel_ptr++)
351  *dest_pixel_ptr =
352  DMAP(hdr.cmap[*r], dither_col, dither_row) +
353  DMAP(hdr.cmap[*g + g_offset], dither_col,
354  dither_row) * 6 +
355  DMAP(hdr.cmap[*b + b_offset], dither_col,
356  dither_row) * 36;
357  }
358 
359  else
360  for (i = 0; i <= xmax; i++, r++, g++, b++,
361  dither_col = ((dither_col + 1) & 15),
362  dest_pixel_ptr++) {
363  *dest_pixel_ptr =
364  DMAP(*r, dither_col, dither_row) +
365  DMAP(*g, dither_col, dither_row) * 6 +
366  DMAP(*b, dither_col, dither_row) * 36;
367  }
368 
369  /* Write the scanline to the device */
370  write_scanline(yscan);
371 }
static unsigned char g
Definition: getami.c:692
boolean onec_threem_mode
Definition: get_orion.c:86
unsigned char dest_pixels[1280]
Definition: get_orion.c:40
static unsigned char r
Definition: getami.c:692
rle_map * cmap
Definition: rle.h:112
unsigned char * rows[4]
Definition: get_orion.c:37
write_scanline(int yscan)
Definition: get_orion.c:475
rle_hdr * hdr
Definition: get_orion.c:34
static unsigned char b
Definition: getami.c:692
int xmax
Definition: rle.h:100
int ncmap
Definition: rle.h:100
int cmaplen
Definition: rle.h:100
int i
Definition: rletorla.c:82
#define DMAP(v, x, y)
Definition: get_orion.c:310
int ncolors
Definition: rle.h:100
put_line_mono ( int  yscan)

Definition at line 380 of file get_orion.c.

382 {
383  unsigned char *r, *g, *b;
384  int i, dither_col, dither_row;
385  unsigned char *dest_pixel_ptr;
386  int xmax = hdr.xmax;
387  int bw_val;
388  int g_offset, b_offset;
389 
390  dither_row = yscan % 16;
391  dither_col = 0;
392  dest_pixel_ptr = dest_pixels;
393 
394  r = rows[0];
395  /* check if we have less than three colour channels */
396  g = rows[(hdr.ncolors >= 2 ? 1 : 0)];
397  b = rows[(hdr.ncolors >= 3 ? 2 : 0)];
398 
399  /* RLE file with colour map */
400  if (hdr.ncmap) {
401  /* offsets in table */
402  g_offset = 1 << hdr.cmaplen;
403  b_offset = 2 * g_offset;
404 
405  for (i = 0; i <= xmax; i++, r++, g++, b++,
406  dither_col = ((dither_col + 1) & 15),
407  dest_pixel_ptr++) {
408  bw_val =
409  (35 * hdr.cmap[*r] +
410  55 * hdr.cmap[*g + g_offset] +
411  10 * hdr.cmap[*b + b_offset]) / 100;
412  *dest_pixel_ptr = DMAP(bw_val, dither_col, dither_row);
413  }
414  }
415 
416  /* Gamma correction is the default */
417  else
418  for (i = 0; i <= xmax; i++, r++, g++, b++,
419  dither_col = ((dither_col + 1) & 15),
420  dest_pixel_ptr++) {
421  bw_val =
422  (35*(*r) + 55*(*g) + 10*(*b)) / 100;
423  *dest_pixel_ptr =
424  DMAP(bw_val, dither_col, dither_row);
425  }
426 
427  /* write the scanline */
428  write_scanline(yscan);
429 }
static unsigned char g
Definition: getami.c:692
unsigned char dest_pixels[1280]
Definition: get_orion.c:40
static unsigned char r
Definition: getami.c:692
rle_map * cmap
Definition: rle.h:112
unsigned char * rows[4]
Definition: get_orion.c:37
write_scanline(int yscan)
Definition: get_orion.c:475
rle_hdr * hdr
Definition: get_orion.c:34
static unsigned char b
Definition: getami.c:692
int xmax
Definition: rle.h:100
int ncmap
Definition: rle.h:100
int cmaplen
Definition: rle.h:100
int i
Definition: rletorla.c:82
#define DMAP(v, x, y)
Definition: get_orion.c:310
int ncolors
Definition: rle.h:100
translate_bits ( BitMapPtr  db,
Rect  dr 
)

Definition at line 511 of file get_orion.c.

514 {
515  Ptr sa = scanbitmap.baseAddr;
516  unsigned sw = scanbitmap.rowBits;
517  Ptr da = db->baseAddr;
518  int dy = top(dr);
519  unsigned dw = db->rowBits;
520  unsigned dh = db->colBits;
521  unsigned dps = db->planeSize;
522  int cw = width (db->bounds);
523  int ch = height (db->bounds);
524  unsigned w = window_size_x;
525  int *scanad;
526  unsigned char *srcad;
527  register int dest;
528  int bitpos, bytes_in_source;
529  int plane = 7; /* all planes are of interest */
530 
531  while(plane+1) {
532  scanad = scanbitmap.baseAddr; /* baseAddr is always word-aligned */
533  srcad = dest_pixels;
534  bitpos = dest = 0;
535  bytes_in_source = window_size_x;
536 
537  while(bytes_in_source){
538  /* *srcad++ >> plane is a logical shift */
539  dest = dest | (((*srcad++ >> plane) & 0x01) << bitpos);
540  if (bitpos++ == 31) {
541  *scanad++ = dest;
542  dest = bitpos = 0;
543  }
544  bytes_in_source--;
545  }
546  *scanad = dest; /* might be some residue */
547 
548  /* raster op the translated scanline to the plane in window */
549  rasterop(sa, sw, 1, 0, 0,
550  da, dw, dh, 1, 23, cw, ch,
551  0, dy, w, 1, srcCopy);
552 
553  plane--;
554  da += dps;
555  }
556 }
static USHORT * Ptr
Definition: getami.c:109
BitMap scanbitmap
Definition: get_orion.c:43
unsigned char dest_pixels[1280]
Definition: get_orion.c:40
int window_size_x
Definition: get_orion.c:76
int width
Definition: pgmtorle.c:51
int height
Definition: pgmtorle.c:51
static int sw
Definition: getami.c:101
int top
Definition: getap.c:94
write_colour_map ( )

Definition at line 442 of file get_orion.c.

References all_colours_flag, colmap, gammamap, and n_colmap_colours.

443 {
444  int cltable[256], i;
445  int *cltp = cltable; /* to avoid warning */
446  int terminate;
447 
448  /* Need to preserve colours 240-255 by default */
449  if (all_colours_flag)
450  terminate = 256;
451  else {
452  /* read in current CLT */
453  ReadCLT(cltp);
454  terminate = (n_colmap_colours < 240 ? n_colmap_colours : 240);
455  }
456 
457  /* create the colour look up table, changing only required number of
458  colours, and gamma correcting */
459  for (i = 0; i < terminate; i++)
460  cltable[i] = (gammamap[colmap[i][0]] << 16) +
461  (gammamap[colmap[i][1]] << 8) +
462  gammamap[colmap[i][2]];
463 
464  /* Write it to the device */
465  WriteCLT(cltp);
466 }
int colmap[256][3]
Definition: get_orion.c:67
boolean all_colours_flag
Definition: get_orion.c:60
#define WriteCLT(cltp)
Definition: get_orion.c:433
int n_colmap_colours
Definition: get_orion.c:66
#define ReadCLT(cltp)
Definition: get_orion.c:434
int gammamap[256]
Definition: get_orion.c:54
int i
Definition: rletorla.c:82
write_scanline ( int  yscan)

Definition at line 475 of file get_orion.c.

477 {
478  if (!reverse_flag)
479  yscan = hdr.ymax - yscan;
480 
481  /* the following may seem like a long-winded way of doing things,
482  * but it's a lot quicker than setting points and lines with the usual
483  * routines .
484  */
485 
486  /* set destination rectangle */
487  SetRect(&trandr, 0, yscan, window_size_x, 1);
488 
489  /* translate the scanline data to the corresponding strip in the
490  window */
491  translate_bits(&((*rle_window).port.portBits), trandr);
492 
493  /* add strip to the update list of window and update */
494  AddUpdate(rle_window, trandr, 255);
495  UpdateWindow(rle_window, TRUE);
496 }
Rect trandr
Definition: get_orion.c:44
int window_size_x
Definition: get_orion.c:76
boolean reverse_flag
Definition: get_orion.c:82
rle_hdr * hdr
Definition: get_orion.c:34
#define TRUE
Definition: giftorle.c:38
int ymax
Definition: rle.h:100
WindowPtr rle_window
Definition: get_orion.c:70
translate_bits(BitMapPtr db, Rect dr)
Definition: get_orion.c:511

Variable Documentation

boolean all_colours_flag = FALSE

Definition at line 60 of file get_orion.c.

Referenced by write_colour_map().

int colmap[256][3]

Definition at line 67 of file get_orion.c.

boolean debug_flag = FALSE

Definition at line 79 of file get_orion.c.

unsigned char dest_pixels[1280]

Definition at line 40 of file get_orion.c.

int divN[256]

Definition at line 51 of file get_orion.c.

int dm16[16][16]

Definition at line 48 of file get_orion.c.

int errN[256]

Definition at line 51 of file get_orion.c.

float gam = 2.0

Definition at line 55 of file get_orion.c.

boolean gamma_flag = FALSE

Definition at line 59 of file get_orion.c.

int gammamap[256]

Definition at line 54 of file get_orion.c.

rle_hdr* hdr

Definition at line 34 of file get_orion.c.

boolean isActive = FALSE

Definition at line 75 of file get_orion.c.

boolean linear_flag = FALSE

Definition at line 58 of file get_orion.c.

EventRecord myEvent

Definition at line 71 of file get_orion.c.

Point myPt

Definition at line 73 of file get_orion.c.

int n_colmap_colours
boolean onec_threem_mode = FALSE

Definition at line 86 of file get_orion.c.

int put_mode = 2

Definition at line 63 of file get_orion.c.

boolean reverse_flag = FALSE

Definition at line 82 of file get_orion.c.

WindowPtr rle_window

Definition at line 70 of file get_orion.c.

unsigned char * rows[4]

Definition at line 37 of file get_orion.c.

BitMap scanbitmap

Definition at line 43 of file get_orion.c.

unsigned char scanline[4][1280]

Definition at line 37 of file get_orion.c.

int thePart

Definition at line 74 of file get_orion.c.

Rect trandr

Definition at line 44 of file get_orion.c.

WindowPtr whichWindow

Definition at line 72 of file get_orion.c.

int window_size_x

Definition at line 76 of file get_orion.c.

int window_size_y

Definition at line 76 of file get_orion.c.