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