home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / useful / os-include / graphics / gfx.h < prev    next >
C/C++ Source or Header  |  1992-09-24  |  2KB  |  82 lines

  1. #ifndef    GRAPHICS_GFX_H
  2. #define    GRAPHICS_GFX_H
  3. /*
  4. **    $VER: gfx.h 39.5 (19.03.92)
  5. **    Includes Release 39.108
  6. **
  7. **    general include file for application programs
  8. **
  9. **    (C) Copyright 1985-1992 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #define BITSET    0x8000
  18. #define BITCLR    0
  19.  
  20. #define AGNUS
  21. #ifdef AGNUS
  22. #define TOBB(a)      ((long)(a))
  23. #else
  24. #define TOBB(a)      ((long)(a)>>1)  /* convert Chip adr to Bread Board Adr */
  25. #endif
  26.  
  27. struct Rectangle
  28. {
  29.     WORD   MinX,MinY;
  30.     WORD   MaxX,MaxY;
  31. };
  32.  
  33. struct Rect32
  34. {
  35.     LONG    MinX,MinY;
  36.     LONG    MaxX,MaxY;
  37. };
  38.  
  39. typedef struct tPoint
  40. {
  41.     WORD x,y;
  42. } Point;
  43.  
  44. typedef UBYTE *PLANEPTR;
  45.  
  46. struct BitMap
  47. {
  48.     UWORD   BytesPerRow;
  49.     UWORD   Rows;
  50.     UBYTE   Flags;
  51.     UBYTE   Depth;
  52.     UWORD   pad;
  53.     PLANEPTR Planes[8];
  54. };
  55.  
  56. /* This macro is obsolete as of V39. AllocBitMap() should be used for allocating
  57.    bitmap data, since it knows about the machine's particular alignment
  58.    restrictions.
  59. */
  60. #define RASSIZE(w,h)    ((ULONG)(h)*( ((ULONG)(w)+15)>>3&0xFFFE))
  61.  
  62. /* flags for AllocBitMap, etc. */
  63. #define BMB_CLEAR 0
  64. #define BMB_DISPLAYABLE 1
  65. #define BMB_INTERLEAVED 2
  66. #define BMB_STANDARD 3
  67. #define BMB_MINPLANES 4
  68.  
  69. #define BMF_CLEAR (1l<<BMB_CLEAR)
  70. #define BMF_DISPLAYABLE (1l<<BMB_DISPLAYABLE)
  71. #define BMF_INTERLEAVED (1l<<BMB_INTERLEAVED)
  72. #define BMF_STANDARD (1l<<BMB_STANDARD)
  73. #define BMF_MINPLANES (1l<<BMB_MINPLANES)
  74.  
  75. /* the following are for GetBitMapAttr() */
  76. #define BMA_HEIGHT 0
  77. #define BMA_DEPTH 4
  78. #define BMA_WIDTH 8
  79. #define BMA_FLAGS 12
  80.  
  81. #endif    /* GRAPHICS_GFX_H */
  82.