home *** CD-ROM | disk | FTP | other *** search
/ Graphics 16,000 / graphics-16000.iso / msdos / animutil / pvquan / flilib / aascreen.h < prev    next >
C/C++ Source or Header  |  1992-11-30  |  1KB  |  51 lines

  1. /* aascreen.h  Copyright 1990 Dancing Flame, San Francisco */
  2.  
  3. #ifndef AASCREEN_H
  4. #define AASCREEN_H
  5.  
  6. #include <stdlib.h>
  7.  
  8. /* Graphics types */
  9. typedef unsigned char Cmap;
  10. typedef unsigned char Pixel;
  11. typedef unsigned char Bitplane;
  12.  
  13. /* Constants pertaining to 320x200 256 color mode mostly */
  14. #define AA_VGA_SCREEN ((Pixel *)0xa0000000L)
  15. #define AA_XMAX 320
  16. #define AA_YMAX 200
  17. #define AA_BPR 320
  18. #define AA_COLORS 256
  19.  
  20. /* This structure is something we can draw on.  A superset of Vcel
  21.    (and keep it that way or things break!)  */
  22. struct vscreen
  23.     {
  24.     int x, y;    /* upper left corner in screen coordinates */
  25.     unsigned w, h;    /* width, height */
  26.     unsigned bpr;    /* bytes per row of image p */
  27.     Pixel *pmap;    /* Screen memory map */
  28.     Cmap *cmap;
  29.     unsigned psize;    /* size of pixels */
  30.     };
  31. typedef struct vscreen Vscreen;
  32.  
  33. #ifdef __TURBOC__
  34. extern Vscreen aa_screen;
  35. extern Cmap aa_colors[];    /* software echo of color map */
  36.  
  37. Boolean aa_open_vga_screen(void);    /* opens 256 color screen */
  38. void aa_close_vga_screen(void);
  39. void far cdecl aa_wait_vblank(void);
  40. #endif
  41.  
  42. /* Open a screen can draw on but not see */
  43. Vscreen *aa_alloc_mem_screen(void);
  44. /* For screens not full size */
  45. Vscreen *aa_alloc_mem_cel(int x, int y, int w, int h);
  46. void aa_free_mem_screen(Vscreen *ms);    /* dispose of a memory screen */
  47. void aa_copy_screen(Vscreen *source, Vscreen *dest);
  48. void aa_clear_screen(Vscreen *vs);
  49.  
  50. #endif /* AASCREEN_H */
  51.