home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / GameSmith1-Hisoft-System.DMS / in.adf / GDS_System.lha / include / display / copper.h next >
Encoding:
C/C++ Source or Header  |  1994-08-23  |  4.5 KB  |  87 lines

  1. #ifndef GS_USERCOPPER
  2. #define GS_USERCOPPER
  3.  
  4. struct copper_struct
  5.   {
  6.   unsigned short *list;       /* pointer to list of copper instructions */
  7.   void *copctrl;              /* ptr to controlling struct for user copper lists (UCopList) */
  8.                               /* This is NULL for 1st call & alloced by copper routines */
  9.                               /* Additional calls to copper routines use same struct */
  10.   void *display;              /* ptr to controlling Intuition Screen struct */
  11.   };
  12.  
  13. struct hard_copper
  14.   {
  15.   struct display_struct *d;   /* ptr to GameSmith display structure already set up */
  16.   unsigned short *list;       /* ptr to list of copper instructions (pnemonic list) */
  17.   unsigned long flags;        /* hard copper flags (allocation, etc.) */
  18.   /* the following are system only fields.  Do not touch! */
  19.   unsigned short *LOF_cop[2]; /* ptr to hardware copper list (long frame) pages 1 & 2 */
  20.   unsigned short *SHF_cop[2]; /* ptr to hardware copper list (short frame) pgs 1 & 2 */
  21.   unsigned long coplen;       /* length (in bytes) of hardware copper list */
  22.   };
  23.  
  24. /* hard copper flags: */
  25.  
  26. #define UCF_DOUBLE      0x01  /* build two display lists for double buffered display */
  27.  
  28. /* user copper instructions: */
  29.  
  30. #define UC_END          0     /* marks end of copper list.  MUST be last command in table */
  31. #define UC_WAIT         1     /* wait for display beam position (y,x) */
  32. #define UC_MOVE         2     /* move data to a hardware register (register,data) */
  33. #define UC_NOSPRITES    3     /* turn sprites off (NOT SUPPORTED IN GS_VIEWPORT) */
  34. #define UC_SPRITES      4     /* turn sprites back on (NOT SUPPORTED IN GS_VIEWPORT) */
  35. #define UC_SETCOLOR     5     /* set a color register (color number,color value) */
  36. /* The following are hardware copper instructions only.  For use with gs_viewport */
  37. #define UC_SETCOLORAGA  6     /* set an AGA color register */
  38. #define UC_PVP          7     /* load a parallax viewport */
  39. #define UC_SPVP         8     /* load a sliced parallax viewport */
  40.  
  41. struct gs_pvp        /* parallax viewport */
  42.   {
  43.   struct gs_pvp *next;        /* (SYSTEM USE ONLY!) next parallax viewport this display */
  44.   int height;                 /* height in scan lines */
  45.   int width;                  /* width in pixels */
  46.   int depth;                  /* depth of viewport */
  47.   int xoff;                   /* X offset within bitmap (in pixels) */
  48.   int yoff;                   /* Y offset */
  49.   unsigned long flags;
  50.   struct BitMap *bitmap[2];   /* ptr to bitmap(s) pages 1 & 2 */
  51.     /* SYSTEM FIELDS.  DO NOT TOUCH!  DANGER, HIGH VOLTAGE! */
  52.   unsigned long bplcon;       /* offset to horizontal shift load copper instruction */
  53.   unsigned long bplptr;       /* offset to 1st bitplane pointer copper instruction */
  54.   unsigned short scroll;      /* horizontal scroll value */
  55.   struct gs_viewport *vp;     /* ptr to gs_viewport this pvp belongs to */
  56.   unsigned char *LOF_planes1[8]; /* bitplane ptr temp hold for scroll reload (long frame) */
  57.   unsigned char *SHF_planes1[8]; /* bitplane ptr temp hold for scroll reload (short frame) */
  58.   unsigned char *LOF_planes2[8]; /* bitplane ptr temp hold for scroll reload (long frame) */
  59.   unsigned char *SHF_planes2[8]; /* bitplane ptr temp hold for scroll reload (short frame) */
  60.   };
  61.  
  62. #define PVP_DPF         0x01  /* dual playfield mode */
  63. #define PVP_DPF1        0x02  /* only load/scroll playfield 1 */
  64. #define PVP_DPF2        0x04  /* only load/scroll playfield 2 */
  65.                       /* NEVER set both PVP_DPF1 and PVP_DPF2 */
  66. #define PVP_AGACOLOR    0x08  /* used only by spvp, set AGA color regs */
  67. #define PVP_RELOAD      0x10  /* SYSTEM FLAG: reload new scroll offsets */
  68. #define PVP_LINE1       0x20  /* spvp only: load color regs line 1 only */
  69.  
  70. struct gs_spvp       /* sliced parallax viewport */
  71.   {
  72.   int top,bottom;             /* top and bottom movement values for scroll ratio */
  73.   int height;                 /* height in scan lines */
  74.   int width;                  /* width in pixels */
  75.   int depth;                  /* depth of viewport */
  76.   unsigned long flags;        /* same as pvp */
  77.   struct BitMap *bitmap[2];   /* ptr to bitmap to slice (pages 1 & 2) */
  78.   unsigned long *ctable;      /* ptr to color table for color change each line */
  79.   unsigned short *cregs;      /* ptr to list of color registers to modify each line */
  80.   unsigned short nregs;       /* number of registers in list */
  81.   unsigned short scroll_type; /* scroll type (0 through n), effects ratio setup & scroller */
  82.   short inc,carry;             /* SYSTEM USE: Do Not Touch! */
  83.   struct gs_pvp *list;        /* SYSTEM USE: Do Not Touch! */
  84.   };
  85.  
  86. #endif
  87.