home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / nduk-v37.lha / V37 / include / graphics / rastport.h < prev    next >
C/C++ Source or Header  |  1991-11-27  |  4KB  |  116 lines

  1. #ifndef    GRAPHICS_RASTPORT_H
  2. #define    GRAPHICS_RASTPORT_H
  3. /*
  4. **    $Filename: graphics/rastport.h $
  5. **    $Release: 2.04 Includes, V37.4 $
  6. **    $Revision: 37.0 $
  7. **    $Date: 91/01/07 $
  8. **
  9. **
  10. **
  11. **    (C) Copyright 1985-1991 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_TYPES_H
  16. #include <exec/types.h>
  17. #endif
  18.  
  19. #ifndef GRAPHICS_GFX_H
  20. #include <graphics/gfx.h>
  21. #endif
  22.  
  23. struct AreaInfo
  24. {
  25.     WORD   *VctrTbl;         /* ptr to start of vector table */
  26.     WORD   *VctrPtr;         /* ptr to current vertex */
  27.     BYTE    *FlagTbl;          /* ptr to start of vector flag table */
  28.     BYTE    *FlagPtr;          /* ptrs to areafill flags */
  29.     WORD   Count;         /* number of vertices in list */
  30.     WORD   MaxCount;         /* AreaMove/Draw will not allow Count>MaxCount*/
  31.     WORD   FirstX,FirstY;    /* first point for this polygon */
  32. };
  33.  
  34. struct TmpRas
  35. {
  36.     BYTE *RasPtr;
  37.     LONG Size;
  38. };
  39.  
  40. /* unoptimized for 32bit alignment of pointers */
  41. struct GelsInfo
  42. {
  43.     BYTE sprRsrvd;          /* flag of which sprites to reserve from
  44.                  vsprite system */
  45.     UBYTE Flags;          /* system use */
  46.     struct VSprite *gelHead, *gelTail; /* dummy vSprites for list management*/
  47.     /* pointer to array of 8 WORDS for sprite available lines */
  48.     WORD *nextLine;
  49.     /* pointer to array of 8 pointers for color-last-assigned to vSprites */
  50.     WORD **lastColor;
  51.     struct collTable *collHandler;     /* addresses of collision routines */
  52.     WORD leftmost, rightmost, topmost, bottommost;
  53.    APTR firstBlissObj,lastBlissObj;    /* system use only */
  54. };
  55.  
  56. struct RastPort
  57. {
  58.     struct  Layer *Layer;
  59.     struct  BitMap   *BitMap;
  60.     UWORD  *AreaPtrn;         /* ptr to areafill pattern */
  61.     struct  TmpRas *TmpRas;
  62.     struct  AreaInfo *AreaInfo;
  63.     struct  GelsInfo *GelsInfo;
  64.     UBYTE   Mask;          /* write mask for this raster */
  65.     BYTE    FgPen;          /* foreground pen for this raster */
  66.     BYTE    BgPen;          /* background pen  */
  67.     BYTE    AOlPen;          /* areafill outline pen */
  68.     BYTE    DrawMode;          /* drawing mode for fill, lines, and text */
  69.     BYTE    AreaPtSz;          /* 2^n words for areafill pattern */
  70.     BYTE    linpatcnt;          /* current line drawing pattern preshift */
  71.     BYTE    dummy;
  72.     UWORD  Flags;         /* miscellaneous control bits */
  73.     UWORD  LinePtrn;         /* 16 bits for textured lines */
  74.     WORD   cp_x, cp_y;         /* current pen position */
  75.     UBYTE   minterms[8];
  76.     WORD   PenWidth;
  77.     WORD   PenHeight;
  78.     struct  TextFont *Font;   /* current font address */
  79.     UBYTE   AlgoStyle;          /* the algorithmically generated style */
  80.     UBYTE   TxFlags;          /* text specific flags */
  81.     UWORD   TxHeight;          /* text height */
  82.     UWORD   TxWidth;          /* text nominal width */
  83.     UWORD   TxBaseline;       /* text baseline */
  84.     WORD    TxSpacing;          /* text spacing (per character) */
  85.     APTR    *RP_User;
  86.     ULONG   longreserved[2];
  87. #ifndef GFX_RASTPORT_1_2
  88.     UWORD   wordreserved[7];  /* used to be a node */
  89.     UBYTE   reserved[8];      /* for future use */
  90. #endif
  91. };
  92.  
  93. /* drawing modes */
  94. #define JAM1        0          /* jam 1 color into raster */
  95. #define JAM2        1          /* jam 2 colors into raster */
  96. #define COMPLEMENT  2          /* XOR bits into raster */
  97. #define INVERSVID   4          /* inverse video for drawing modes */
  98.  
  99. /* these are the flag bits for RastPort flags */
  100. #define FRST_DOT    0x01      /* draw the first dot of this line ? */
  101. #define ONE_DOT     0x02      /* use one dot mode for drawing lines */
  102. #define DBUFFER     0x04      /* flag set when RastPorts
  103.                  are double-buffered */
  104.  
  105.          /* only used for bobs */
  106.  
  107. #define AREAOUTLINE 0x08      /* used by areafiller */
  108. #define NOCROSSFILL 0x20      /* areafills have no crossovers */
  109.  
  110. /* there is only one style of clipping: raster clipping */
  111. /* this preserves the continuity of jaggies regardless of clip window */
  112. /* When drawing into a RastPort, if the ptr to ClipRect is nil then there */
  113. /* is no clipping done, this is dangerous but useful for speed */
  114.  
  115. #endif    /* GRAPHICS_RASTPORT_H */
  116.