home *** CD-ROM | disk | FTP | other *** search
/ GRIPS 2: Government Rast…rocessing Software & Data / GRIPS_2.cdr / dos / pcshow / src / msc5_1 / showext.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-06  |  5.5 KB  |  131 lines

  1. /* include file for options.c & parse.c */
  2.  
  3. /* include statements */
  4.  
  5. #include <stdio.h>        /* standard i/o routines */
  6. #include <fcntl.h>        /* other standard routines */
  7. #include <stdlib.h>        /* more lattice c standard i/o routines */
  8. /*#include <tardev.h>        /* targa header files */
  9. #include <math.h>        /* some math functions needed */
  10. /*#include <time.h>        /* some time functions needed */
  11. #include <dos.h>        /* used for NO9 init call */
  12. #include <ctype.h>        /* used for some character testing */
  13. #include <memory.h>        /* used for some memory allocation routines */
  14. #include <direct.h>        /* used for some directory routines */
  15. #include <search.h>        /* used for some search and sort routines */
  16. #include <string.h>        /* string functions */
  17. #include <io.h>            /* used for mktemp call */
  18. #include "df.h"            /* header file with defines for HDF */
  19.  
  20. #define NOMOUSE            /* change to define MOUSE if a mouse is to be used */
  21.  
  22. /* define statements */
  23. #define HI 2
  24. #define LO 3
  25. #define    SCRLLEFT    203
  26. #define    SCRLUP        200
  27. #define    SCRLDOWN    208
  28. #define    SCRLRIGHT    205
  29. #define    PAGEUP        201
  30. #define    PAGEDOWN    209
  31. #define    HOME        199
  32. #define    END            207
  33. #define ALTSCRLUP        152
  34. #define ALTSCRLDOWN        160
  35. #define ALTSCRLLEFT        155
  36. #define ALTSCRLRIGHT    157    
  37. #define ALTPAGEUP        153
  38. #define ALTPAGEDOWN        161
  39. #define ALTHOME            151
  40. #define ALTEND            159
  41. #define HDF            'h'
  42. #define    RASTER        'b'
  43. #define NO9            '9'
  44. #define    VGA            'v'
  45. #define    EGA            'e'
  46. #define    TARGA        't'
  47. #define RAWSIZE 32000    /* maximum size of the block to be read in from disk */
  48.  
  49. extern int        i,j,k,l,c,        /* temporary global counters and such */
  50.     xdim,ydim,            /* x & y dimensions for the image to be displayed */
  51.     file,                /* the file pointer for binary files */
  52.     xoff,yoff,            /* the offset into the picture to be displayed */
  53.     palnum,                /* the palette number which is currently displayed */
  54.     show,                /* a binary variable telling whether the palette is displayed on the screen */
  55.     palmax,                /* the number of palettes in memory */
  56.     maxx,maxy,            /* the x & y dimensions of the screen */
  57.     palspeed,            /* how fast the palette rotates */
  58.     lastref,            /* the last reference number used in palette searching */
  59.     lasttag,            /* the last tag number used in searching for palettes */
  60.     newref,                /* reference number for a new palette */
  61.     imref,                /* the current image's reference number */
  62.     imtag,                /* the current image's tag number */
  63.     slope,                /* slope of line in fiddle mode */
  64.     offset,                /* offset for center of palette for fiddle mode */
  65.     animate,            /* the animation toggle */
  66.     one_file,            /* the one file animation toggle */
  67.     first_hdf,            /* boolean to flag the first time through an hdf animation */
  68.     cycled,                /* boolean variable to tell whether a sequence has been animated */
  69.     oneimage,            /* boolean variable to indicate whether there are multiple binary images to be displayed */
  70.     xshow,                /* the width of the image */
  71.     m1,m2,m3,m4,        /* mouse variables */
  72.     leftbutton,            /* boolean variables for buttons on the mouse */
  73.     rightbutton,
  74.     mouse,                /* boolean variable to determine if the mouse is active */
  75.     mx,my,                /* last position where the mouse was at */
  76.     pal_xoff,            /* location of the upper left hand corner of the color bar */
  77.     pal_yoff,
  78.     screen,                /* boolean variable for screen on or off */
  79.     before,                /* boolean variable for mouse activated previously */
  80.     anispeed,            /* speed for animation */
  81.     doneinit,            /* boolean variable to keep track of whether the palette has been initialized for ega mode */
  82.     getout,                /* boolean variable to exit program abruptly */
  83.     pal_height,            /* height in bytes of the color bar on the screen */
  84.     expandit,            /* preference boolean variable to expand(1) or interpolate(0) */ 
  85.     center,                /* boolean variable to specify a centered image */
  86.     xwhere,ywhere;        /* where the upper left hand of the image is */
  87.  
  88. #ifdef QAK
  89. extern    long    waitcount;        /* counter for timing out */
  90. #endif
  91.  
  92. extern    unsigned short int l16[512];    /* array for the targa line */
  93.  
  94.  
  95. extern char *store[1024],         /* one per line of image */
  96.     *p,                    /* temporary character storage */
  97.     mode,                /* the display mode we are in = EGA,VGA,NO9 */
  98.     filetype;              /* the type of file to be read = 'h,'b' */
  99.  
  100. extern unsigned char rmap[256],gmap[256],bmap[256],    /* the red, green, and blue bytes for 24 bit palettes */
  101.             pal[768],                            /* the full 24 bit palette, interleaved as red, green, blue, red, green ... */
  102.             *rpal[16],*gpal[16],*bpal[16],        /* arrays of pointers to different palettes */
  103.             *egapals[16],                        /* array of pointers to different ega palettes */
  104.             raw[RAWSIZE],                        /* for file buffering */
  105.             filename[128],                        /* name of binary image file */
  106.             palfile[128],                        /* starts out = NULL */
  107.             palstore[8][512],                    /* large array to store the portion of the screen the palette overlays */
  108.             bigstore[4096];                        /* array to expand four lines of imcomp compressed image into */
  109.  
  110. extern unsigned char trans[256],    /* translation table for palette in ega mode */
  111.                     trans1[256],    /* temporary translation table */
  112.                     count[64],        /* the colors to choose from in ega mode */
  113.                     regrs[16];        /* the actual palette for ega mode */
  114.  
  115. extern FILE *fp,        /* file pointer for binary image files */
  116.         *pfp;    /* file pointer for binary palette files */
  117.  
  118. extern struct {
  119.         int xdim,
  120.             ydim;
  121.         } dims;        /* dimension structure for HDF dimension reads */
  122.  
  123. /* HDF stuff */
  124. extern DF *dff;            /* HDF file descriptor */
  125. extern DFdesc ddstr;        /* HDF structure for the tag & ref of something */
  126.  
  127. /* mouse stuff */
  128. #ifdef MOUSE
  129. extern void mousecml();        /* appropriate mouse routines for compiler size */
  130. #endif
  131.