1 #ifndef GRAPHICS_GFX_H
    2 #define GRAPHICS_GFX_H
    3 
    4 /*
    5 	graphics.library general include
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_TYPES_H
   11 # include <exec/types.h>
   12 #endif
   13 
   14 #pragma pack(2)
   15 
   16 
   17 #define BITSET  0x8000
   18 #define BITCLR  0
   19 
   20 
   21 #define AGNUS
   22 
   23 #ifdef AGNUS
   24 # define TOBB(a)  ((long)(a))
   25 #else
   26 # define TOBB(a)  ((long)(a)>>1)
   27 #endif
   28 
   29 
   30 struct Rectangle
   31 {
   32 	WORD MinX, MinY;
   33 	WORD MaxX, MaxY;
   34 };
   35 
   36 struct Rect32
   37 {
   38 	LONG MinX, MinY;
   39 	LONG MaxX, MaxY;
   40 };
   41 
   42 typedef
   43 struct tPoint
   44 {
   45 	WORD x, y;
   46 } Point;
   47 
   48 typedef UBYTE *PLANEPTR;
   49 
   50 struct BitMap
   51 {
   52 	UWORD    BytesPerRow;
   53 	UWORD    Rows;
   54 	UBYTE    Flags;
   55 	UBYTE    Depth;
   56 	UWORD    pad;
   57 	PLANEPTR Planes[8];
   58 };
   59 
   60 
   61 #define RASSIZE(w,h)  ((ULONG)(h)*(((ULONG)(w)+15)>>3&0xFFFE))
   62 
   63 
   64 #define BMB_CLEAR        0
   65 #define BMB_DISPLAYABLE  1
   66 #define BMB_INTERLEAVED  2
   67 #define BMB_STANDARD     3
   68 #define BMB_MINPLANES    4
   69 
   70 #define BMF_CLEAR        (1<<BMB_CLEAR)
   71 #define BMF_DISPLAYABLE  (1<<BMB_DISPLAYABLE)
   72 #define BMF_INTERLEAVED  (1<<BMB_INTERLEAVED)
   73 #define BMF_STANDARD     (1<<BMB_STANDARD)
   74 #define BMF_MINPLANES    (1<<BMB_MINPLANES)
   75 
   76 #define BMA_HEIGHT  0
   77 #define BMA_DEPTH   4
   78 #define BMA_WIDTH   8
   79 #define BMA_FLAGS   12
   80 
   81 
   82 #pragma pack()
   83 
   84 #endif /* GRAPHICS_GFX_H */