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