home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 100-199 / ff119.lzh / MicroEMACS / src / src.zoo / aline.h next >
Text File  |  1987-12-09  |  30KB  |  531 lines

  1.  
  2.                /***********************************************\
  3.                *                                               *
  4.                *                    aline.h                    *
  5.                *       Common include file for C interface     *
  6.                *       to low level Line A calls               *
  7.                *                                               *
  8.                *       J.R. Bammi                              *
  9.                *         decvax!cwruecmp!bammi                 *
  10.                *         bammi%cwru.edu.CSNET                  *
  11.                *         bammi@cwru.edu.ARPA                   *
  12.                *         CIS: 71515,155                        *
  13.                *                                               *
  14.                \***********************************************/
  15.  
  16. #define    WORD    int
  17. #define    VOID    void
  18.  
  19. /*****************************************************************************\
  20. *                                                                            *
  21. *                                 Defines                                     *
  22. *                                                                            *
  23. \*****************************************************************************/
  24.  
  25. /*
  26.  *  Object colors (default pallette)
  27.  *
  28.  */
  29. #define WHITE    0
  30. #define BLACK    1
  31. #define RED      2
  32. #define GREEN    3
  33. #define BLUE     4
  34. #define CYAN     5
  35. #define YELLOW   6
  36. #define MAGENTA  7
  37. #define LWHITE   8
  38. #define LBLACK   9
  39. #define LRED     10
  40. #define LGREEN   11
  41. #define LBLUE    12
  42. #define LCYAN    13
  43. #define LYELLOW  14
  44. #define LMAGENTA 15
  45.  
  46.  
  47. /* 
  48.  * Vdi writing modes
  49.  *
  50.  */
  51. #define MD_REPLACE 1
  52. #define MD_TRANS   2
  53. #define MD_XOR     3
  54. #define MD_ERASE   4
  55.  
  56.  
  57. /*
  58.  * Raster Op Codes
  59.  *
  60.  */
  61. #define ALL_WHITE  0
  62. #define S_AND_D    1
  63. #define    S_AND_NOTD 2
  64. #define S_ONLY     3
  65. #define NOTS_AND_D 4
  66. #define    D_ONLY     5
  67. #define S_XOR_D    6
  68. #define S_OR_D     7
  69. #define    NOT_SORD   8
  70. #define    NOT_SXORD  9
  71. #define D_INVERT  10
  72. #define    NOT_D     11
  73. #define    S_OR_NOTD 12
  74. #define NOTS_OR_D 13
  75. #define    NOT_SANDD 14
  76. #define ALL_BLACK 15
  77.  
  78. /*
  79.  * Sprite formats
  80.  *
  81.  */
  82. #define SP_VDI     0
  83. #define SP_XOR     1
  84.  
  85. /*
  86.  * Line A Opcodes
  87.  *
  88.  */
  89. #define INIT        0
  90. #define PUTPIXEL    1
  91. #define GETPIXEL    2
  92. #define LINE        3
  93. #define HLINE        4
  94. #define RECTANGLE    5
  95. #define FPOLYGON    6
  96. #define BITBLT        7
  97. #define TEXTBLT        8
  98. #define SHOWMOUSE    9
  99. #define HIDEMOUSE    10
  100. #define TRANMOUSE    11
  101. #define USPRITE        12
  102. #define DSPRITE        13
  103. #define CPYRASTER    14
  104. #define FSEEDFILL    15      /* ROM TOS only */
  105.  
  106.  
  107. /*****************************************************************************\
  108. *                                                                            *
  109. *                                 Types                                       *
  110. *                                                                            *
  111. \*****************************************************************************/
  112.  
  113.        /*
  114.         * Global Variables at negative offsets from the Line A parameter
  115.         * block address returned by init. (I have no way of telling if this
  116.         * list is complete).
  117.         *
  118.         */
  119. /* Name   Offset  Type Description                                          */
  120. /* --------------------------------------------------------------------------*/
  121. /* V_Y_MAX    -4   W   Max Y pixel value of the screen                      */
  122. /* V_STATUS   -6   W   Text Status byte                                     */
  123. /*                       Bit   Field           Zero            One          */
  124. /*                       0     cursor flash    disabled        enabled      */
  125. /*                       1     flash state     off             on           */
  126. /*                       2     cursor visible  no              yes          */
  127. /*                       3     end of line     no-wrap         wrap         */
  128. /*                       4     inverse video   on              off          */
  129. /*                       5     cursor saved    false           true         */
  130. /* V_OFF_AD  -10   L   Font offset table address                            */
  131. /* V_X_MAX   -12   W   Max X pixel value                                    */
  132. /* V_FNT_WR  -14   W   Width of Font Form in bytes (see type FONT below)    */
  133. /* V_FNT_ST  -16   W   First font ASCII code (first_ade)                    */
  134. /* V_FNT_ND  -18   W   Last  font ASCII code (last_ade )                    */
  135. /* V_FNT_AD  -22   L   Font Form address                                    */
  136. /*                     Mono Spaced, 8 pixels wide and byte aligned, any ht. */
  137. /* V_CUR_TIM -23   B   Cursor countdown timer                               */
  138. /* V_CUR_CNT -24   B   Cursor flash interval( in frames)                    */
  139. /* V_CUR_CY  -26   W   Y cursor position                                    */
  140. /* V_CUR_CX  -28   W   X cursor position                                    */
  141. /* V_CUR_OFF -30   W   Offset from screen base to first cell (bytes)        */
  142. /* V_CUR_AD  -34   L   Current cursor address                               */
  143. /* V_COL_FG  -36   W   Foreground color index                               */
  144. /* V_COL_BG  -38   W   Background color index                               */
  145. /* V_CEL_WR  -40   W   Offset to next vertical cell (bytes)                 */
  146. /* V_CEL_MY  -42   W   Max cells high - 1                                   */
  147. /* V_CEL_MX  -44   W   Max cells across - 1                                 */
  148. /* V_CEL_HT  -46   W   Cell height in pixels (font form's height)           */
  149. /* --------------------------------------------------------------------------*/
  150.  
  151. /*
  152.  * Atari finally named these variables
  153.  * so here they are
  154.  *
  155.  */
  156. typedef struct {
  157.        WORD    V_CEL_HT;    /* *((WORD  *)((char  *)aline - (char  *)46L)) */
  158.        WORD    V_CEL_MX;    /* *((WORD  *)((char  *)aline - (char  *)44L)) */
  159.        WORD    V_CEL_MY;    /* *((WORD  *)((char  *)aline - (char  *)42L)) */
  160.        WORD    V_CEL_WR;    /* *((WORD  *)((char  *)aline - (char  *)40L)) */
  161.        WORD    V_COL_BG;    /* *((WORD  *)((char  *)aline - (char  *)38L)) */
  162.        WORD    V_COL_FG;    /* *((WORD  *)((char  *)aline - (char  *)36L)) */
  163.        char    *V_CUR_AD;   /* *((char **)((char **)aline - (char **)34L)) */
  164.        WORD    V_CUR_OFF;   /* *((WORD  *)((char  *)aline - (char  *)30L)) */
  165.        WORD    V_CUR_CX;    /* *((WORD  *)((char  *)aline - (char  *)28L)) */
  166.        WORD    V_CUR_CY;    /* *((WORD  *)((char  *)aline - (char  *)26L)) */
  167.        WORD    V_CUR_CNT;   /* *((char  *)((char  *)aline - (char  *)24L)) */
  168. /*     char    V_CUR_TIM;    *((char  *)((char  *)aline - (char  *)23L))   */
  169.        char    **V_FNT_AD;  /* *((char **)((char **)aline - (char **)22L)) */
  170.        WORD    V_FNT_ND;    /* *((WORD  *)((char  *)aline - (char  *)18L)) */
  171.        WORD    V_FNT_ST;    /* *((WORD  *)((char  *)aline - (char  *)16L)) */
  172.        WORD    V_FNT_WR;    /* *((WORD  *)((char  *)aline - (char  *)14L)) */
  173.        WORD    V_X_MAX;     /* *((WORD  *)((char  *)aline - (char  *)12L)) */
  174.        char    **V_OFF_AD;  /* *((char **)((char **)aline - (char **)10L)) */
  175.        WORD    V_STATUS;    /* *((WORD  *)((char  *)aline - (char  *) 6L)) */
  176.        WORD    V_Y_MAX;     /* *((WORD  *)((char  *)aline - (char  *) 4L)) */
  177.        WORD    xxdummy;     /* *((WORD  *)((char  *)aline - (char  *) 2L)) */
  178. } NLINEA;
  179.  
  180.        /* A pointer to the type LINEA is returned by the Line A init call
  181.         * ($A000), in registers A0 and D0.
  182.          * This pointer is saved in the global variable 'aline'.
  183.         *
  184.         */
  185. typedef struct {
  186.  
  187. /* Type    Name       Offset   Function                    Comments                 */
  188. /* ------------------------------------------------------------------------- */
  189.    WORD   VPLANES;    /*  0  # of Planes        Also see CurrRez             */
  190.    WORD   VWRAP;      /*  2  Bytes / scan line    "    "    "                */
  191.                       /*     VWRAP can be changed to implement special effect*/
  192.                       /*     Doubling VWRAP will skip every other scan line  */
  193.                       /*                                                     */
  194.                       /*                                                     */
  195.    WORD   *CONTRL;    /*  4  Ptr to CONTRL Array  Contrl gets set to this    */
  196.    WORD   *INTIN;     /*  8  Ptr to INTIN  Array  Intin  gets set to this    */
  197.    WORD   *PTSIN;     /* 12  Ptr to PTSIN  Array  Ptsin  gets set to this    */
  198.    WORD   *INTOUT;    /* 16  Ptr to INTOUT Array  Intout gets set to this    */
  199.    WORD   *PTSOUT;    /* 20  Ptr to PTSOUT Array  Ptsout gets set to this    */
  200.                       /*     CONTRL is the control array                     */
  201.                       /*     INTIN is the array of input parameters          */
  202.                       /*     PTSIN is the array of input coordinates         */
  203.                       /*          Even entrys are X coordinate               */
  204.                       /*          Odd  entrys are corresponding Y coodinates */
  205.                       /*     INTOUT is the array of output parameters        */
  206.                       /*     PTSOUT is the array of output coordinates       */
  207.                       /*        organizes like PTSIN.                        */
  208.                       /*                                                     */
  209.    WORD   COLBIT0;    /* 24  Plane 0 Color Value  All Three Rez's            */
  210.    WORD   COLBIT1;    /* 26  Plane 1 Color Value  Med and Low Rez only       */
  211.    WORD   COLBIT2;    /* 28  Plane 2 Color Value  Low Rez only               */
  212.    WORD   COLBIT3;    /* 30  Plane 3 Color Value  Low Rez Only               */
  213.                       /*     Foreground color COLBIT0 + 2*COLBIT1 + 4*COLBIT2*/
  214.                       /*                      + 8*COLBIT3                    */
  215.                       /*                                                     */
  216.                       /*                                                     */
  217.    WORD   LSTLIN;     /* 32  Always set to -1, Done for you in init_aline()  */
  218.                       /*     Does anyone know what it is supposed to be?     */
  219.                       /*                                                     */
  220.    WORD   LNMASK;     /* 34  Linemask used when drawing lines, same as Vdi's */
  221.                       /*     line style                                      */
  222.                       /*                                                     */
  223.    WORD   WMODE;      /* 36  Writing mode                                    */
  224.                       /*     0=Replace Mode-Replace all bits in Dest with src*/
  225.                       /*     1=Trans. Mode-Only additional bits in src set(OR*/
  226.                       /*     2=Xor Mode- Src XOR Dest                        */
  227.                       /*     3=Inverse Trans.- (NOT src) Or Dest             */
  228.                       /*     Values upto 16 are permitted                    */
  229.                       /*                                                     */
  230.    WORD   X1;         /* 38  X1 coordinate used in various calls             */
  231.                       /*                                                     */
  232.    WORD   Y1;         /* 40  Y1 coordinate used in various calls             */
  233.                       /*                                                     */
  234.    WORD   X2;         /* 42  X2 coordinate used in various calls             */
  235.                       /*                                                     */
  236.    WORD   Y2;         /* 44  Y2 coordinate used in various calls             */
  237.                       /*                                                     */
  238.                       /*                                                     */
  239.    WORD   *PATPTR;    /* 46  Pointer to current fill pattern                 */
  240.                       /*     Must be integral power of 2 (words) in length   */
  241.    WORD   PATMSK;     /* 50  I don't know why they call it a mask. It is in  */
  242.                       /*     reality the length in words of the current patt.*/
  243.    WORD   MFILL;      /* 52  Multi Plane fill flag 1 == Current fill Pattern */
  244.                       /*     is for Muti Plane.                              */
  245.                       /*                                                     */
  246.                       /*                                                     */
  247.    WORD   CLIP;       /* 54  Clipping Flag 1 == TRUE                         */
  248.    WORD   XMINCL;     /* 56  Min X of clipping window                        */
  249.    WORD   YMINCL;     /* 58  Min Y of clipping window                        */
  250.    WORD   XMAXCL;     /* 60  Max X of clipping window                        */
  251.    WORD   YMAXCL;     /* 62  Max Y of clipping window                        */
  252.                       /*                                                     */
  253.                       /*                                                     */
  254.    WORD   XDDA;       /* 64  Accumulator for Scaling, Must be set to 0x08000 */
  255.                       /*     before each call to Text Blt. Done for you in   */
  256.                       /*     in aline_text()                                 */
  257.    WORD   DDAINC;     /* 66  Scaling factor - Fractional amount to scale char*/
  258.                       /*     When scaling up = 256 *(Size-Textsize)/Textsize */
  259.                       /*     When scaling down = 256*(Size)/Textsize         */
  260.                       /*     scaling down does not work                      */
  261.    WORD   SCALDIR;    /* 68  Scaling direction 0 == down                     */
  262.    WORD   MONO;       /* 70  Mono flag 0== current font is a propotional font*/
  263.                       /*     Its Ok for Thickening to increase the width of  */
  264.                       /*     the current character.                          */
  265.                       /*     1 == current font is mono spaced, so thickening */
  266.                       /*     may not increase the width of the current char  */
  267.                       /*                                                     */
  268.    WORD   SOURCEX;    /* 72  X coordinate of character in the font form      */
  269.                       /*     SOURCEX is caluclated from info in the font     */
  270.                       /*     header for the current font (see FONT type)     */
  271.                       /*     SOURCEX = off_table[char-first_ade]             */
  272.                       /*     SOURCEX is calculated for you in aline_text()   */
  273.                       /*     The pointer to a table of font header for the   */
  274.                       /*     internal fonts is returned in A2 on init (A000) */
  275.    WORD   SOURCEY;    /* 74  Y coodinate of character in the font form       */
  276.                       /*     Typically set to 0 (top line of font form)      */
  277.    WORD   DESTX;      /* 76  X coordinate of character on screen             */
  278.    WORD   DESTY;      /* 78  Y coordinate of character on screen             */
  279.    WORD   DELX;       /* 80  Width of Character                              */
  280.                       /*     Difference between two SOURCEX's                */
  281.    WORD   DELY;       /* 82  Height of Character                             */
  282.                       /*     form_height field of FONT_HEAD of current font  */
  283.    WORD   *FBASE;     /* 84  Pointer to start of font form                   */
  284.    WORD   FWIDTH;     /* 88  Width of the current font's form                */
  285.                       /*                                                     */
  286.    WORD   STYLE;      /* 90  Vector of style flags                           */
  287.                       /*     Bit 0 = Thicken Flag                            */
  288.                       /*     Bit 1 = Lighten Flag                            */
  289.                       /*     Bit 2 = Skewing Flag                            */
  290.                       /*     Bit 3 = Underline Flag (ignored)                */
  291.                       /*     Bit 4 = Outline Flag                            */
  292.                       /*                                                     */
  293.    WORD   LITEMASK;   /* 92  Mask used for lightening text                   */
  294.                       /*     The Mask is picked up from the font header      */
  295.    WORD   SKEWMASK;   /* 94  Mask used for skewing text                      */
  296.                       /*     The Mask is picked up from the font header      */
  297.    WORD   WEIGHT;     /* 96  The number of bits by which to thicken text     */
  298.                       /*     The number is picked up from the font header    */
  299.    WORD   ROFF;       /* 98  Offset above baseline when skewing              */
  300.                       /*     Again picked up from the font header            */
  301.                       /*                                                     */
  302.    WORD   LOFF;       /* 100 Offset below character baseline when skewing    */
  303.                       /*     Again picked up from the font header            */
  304.                       /*                                                     */
  305.    WORD   SCALE;      /* 102 Scaling Flag 1 == true                          */
  306.                       /*                                                     */
  307.    WORD   CHUP;       /* 104 Character rotation vector.                      */
  308.                       /*     0 = normal (0 degrees)                          */
  309.                       /*     1800 = 180 degrees                              */
  310.                       /*     2700 = 270 degrees                              */
  311.                       /*                                                     */
  312.    WORD   TEXTFG;     /* 106 Text foreground color                           */
  313.                       /*                                                     */
  314.    char   *SCRTCHP;   /* 108 Address of buffer required for creating special */
  315.                       /*     text effects. The size of this buffer should be */
  316.                       /*     1K according the Internals. The Atari document  */
  317.                       /*     of course does not talk about such things :-)   */
  318.                       /*                                                     */
  319.    WORD   SCRPT2;     /* 112 The offset of the scaling buffer buffer in above*/
  320.                       /*     buffer. Internals suggests an offset of 0x0040  */
  321.                       /*     As usual the Atari document does'nt say a thing */
  322.                       /*                                                     */
  323.    WORD   TEXTBG;     /* 114 Text background color (Ram Vdi only)            */
  324.                       /*     used for the BitBlt writing modes (4-19) only   */
  325.                       /*                                                     */
  326.    WORD   COPYTRAN;   /* 116 Copy raster form type flag (Ram vdi only)       */
  327.                       /*     0 => Opaque type                                */
  328.                       /*          n-plane source  ->  n-plane dest           */
  329.                       /*              BitBlt writing modes (4-19)            */
  330.                       /*    ~0 => Transparent type                           */
  331.                       /*          1-plane source  ->  n-plane dest           */
  332.                       /*              Vdi writing modes (1-3)                */
  333.                       /*                                                     */
  334.    WORD(*SEEDABORT)();/* 118 Pointer to function returning int, which is     */
  335.                       /*     called by the fill logic to allow the fill to   */
  336.                       /*     be aborted. If the routine returns FALSE (0)    */
  337.                       /*     the fill is not aborted. If it returns TRUE (~0)*/
  338.                       /*     the fill is aborted                             */
  339. /* ------------------------------------------------------------------------- */
  340.  
  341. } LINEA;             /*       P H E W !!!!!                                  */
  342.  
  343.  
  344.  
  345.  /* A pointer to array of type FONT is returned by the Line A init call
  346.   * ($A000), in regsister A1.
  347.   * This pointer is saved in the global array variable 'fonts[]'.
  348.   *
  349.   */
  350.  
  351. typedef struct _font {
  352.  
  353. /* Type    Name       Offset   Function                    Comments          */
  354. /* ------------------------------------------------------------------------- */
  355.    WORD   font_id;    /*  0 Font face identifier  1 == system font           */
  356.                       /*                                                     */
  357.    WORD   size;       /*  2 Font size in points                              */
  358.                       /*                                                     */
  359.    char   name[32];   /*  4 Face name                                        */
  360.                       /*                                                     */
  361.    WORD   first_ade;  /* 36 Lowest ADE value in the face (lowest ASCII value */
  362.                       /*    of displayable character).                       */
  363.                       /*                                                     */
  364.    WORD   last_ade;   /* 38 Highest ADE value in the face (highest ASCII valu*/
  365.                       /*    of displayable character).                       */
  366.                       /*                                                     */
  367.    WORD   top;        /* 40 Distance of top line relative to baseline        */
  368.                       /*                                                     */
  369.    WORD   ascent;     /* 42 Distance of ascent line relative to baseline     */
  370.                       /*                                                     */
  371.    WORD   half;       /* 44 Distance of half line relative to baseline       */
  372.                       /*                                                     */
  373.    WORD   descent;    /* 46 Distance of decent line relative to baseline     */
  374.                       /*                                                     */
  375.    WORD   bottom;     /* 48 Distance of bottom line relative to baseline     */
  376.                       /*    All distances are measured in absolute values    */
  377.                       /*    rather than as offsets. They are always +ve      */
  378.                       /*                                                     */
  379.  WORD max_char_width; /* 50 Width of the widest character in font            */
  380.                       /*                                                     */
  381.  WORD max_cell_width; /* 52 Width of the widest cell character cell in face  */
  382.                       /*                                                     */
  383.    WORD left_offset;  /* 54 Left Offset see Vdi appendix G                   */
  384.                       /*                                                     */
  385.    WORD right_offset; /* 56 Right offset   "      "     "                    */
  386.                       /*                                                     */
  387.    WORD   thicken;    /* 58 Number of pixels by which to thicken characters  */
  388.                       /*                                                     */
  389.    WORD   ul_size;    /* 60 Width in  pixels of the underline                */
  390.                       /*                                                     */
  391.    WORD   lighten;    /* 62 The mask used to lighten characters              */
  392.                       /*                                                     */
  393.    WORD   skew;       /* 64 The mask used to determine when to perform       */
  394.                       /*    additional rotation on the character to perform  */
  395.                       /*    skewing                                          */
  396.                       /*                                                     */
  397.    WORD   flags;      /* 66 Flags                                            */
  398.                       /*      bit 0 set if default system font               */
  399.                       /*      bit 1 set if horiz offset table should be used */
  400.                       /*      bit 2 byte-swap flag (thanks to Intel idiots)  */
  401.                       /*      bit 3 set if mono spaced font                  */
  402.                       /*                                                     */
  403.    char   *h_table;   /* 68 Pointer to horizontal offset table               */
  404.                       /*                                                     */
  405.    WORD   *off_table; /* 72 Pointer to character offset table                */
  406.                       /*                                                     */
  407.    char   *dat_table; /* 76 Pointer to font data                             */
  408.                       /*                                                     */
  409.    WORD   form_width; /* 80 Form width (#of bytes /scanline in font data)    */
  410.                       /*                                                     */
  411.    WORD   form_height;/* 82 Form height (#of scanlines in font data)         */
  412.                       /*                                                     */
  413.  struct _font *next_font;  /* 84 Pointer to next font in face                */
  414.                       /*                                                     */
  415. /* ------------------------------------------------------------------------- */
  416. } FONT;
  417.  
  418.        
  419.        /*
  420.         * OP_TAB type required for Bit Blt parameter block.
  421.         * each entry defines the logic operation to apply for
  422.         * the 4 Fore/Back ground bit combinations
  423.         */
  424. typedef struct {
  425.  
  426. /* Type    Name       Offset   Function             Comments                 */
  427. /* ------------------------------------------------------------------------- */
  428.    char   fg0bg0;     /* 0     Logic op to employ when both FG and BG are 0  */
  429.    char   fg0bg1;     /* 1     Logic op to employ when FG = 0 and BG = 1     */
  430.    char   fg1bg0;     /* 2     Logic op to employ when FG = 1 and BG = 0     */
  431.    char   fg1bg1;     /* 3     Logic op to employ when both FG and BG are 1  */
  432. /* ------------------------------------------------------------------------- */
  433. } OP_TAB;
  434.  
  435.  
  436. /*
  437.  * Source and destination description blocks
  438.  */
  439. typedef struct  {
  440.        WORD    bl_xmin;                /* Minimum x                    */
  441.        WORD    bl_ymin;                /* Minimum y                    */
  442.        char    *bl_form;               /* Word aligned memory form     */
  443.        WORD    bl_nxwd;                /* Offset to next word in line  */
  444.        WORD    bl_nxln;                /* Offset to next line in plane */
  445.        WORD    bl_nxpl;                /* Offset to next plane         */
  446. }SDDB;
  447.  
  448.        /* Offsets to next word in plane */
  449. #define HI_NXWD        2
  450. #define MED_NXWD       4
  451. #define LOW_NXWD       8
  452.  
  453.        /* Scan line widths of the screen */
  454. #define HI_NXLN        80
  455. #define MED_NXLN       160
  456. #define LOW_NXLN       160
  457.  
  458.        /*
  459.         * Offsets between planes - always the same due to
  460.         * the way the STs video memory is laid out
  461.          */
  462. #define NXPL           2
  463.  
  464.        /* 
  465.         * Bit Blt Parameter Block Type (for function $A007)
  466.         *
  467.         */
  468.  
  469. typedef struct {
  470.  
  471. /* Type           Name           Offset   Function          Comments         */
  472. /* ------------------------------------------------------------------------- */
  473.    WORD           bb_b_wd;     /*       width of block in pixels             */
  474.    WORD           bb_b_ht;     /*       height of block in pixels            */
  475.    WORD           bb_plane_ct; /*       number of planes to blit             */
  476.    WORD           bb_fg_col;   /*       foreground color                     */
  477.    WORD           bb_bg_col;   /*       back   ground color                  */
  478.    OP_TAB  bb_op_tab;          /*       logic for fg x bg combination        */
  479.    SDDB           bb_s;        /*       source info block                    */
  480.    SDDB           bb_d;        /*       destination info block               */
  481.    WORD           *bb_p_addr;  /*       pattern buffer address               */
  482.    WORD           bb_p_nxln;   /*       offset to next line in pattern       */
  483.    WORD           bb_p_nxpl;   /*       offset to next plane in pattern      */
  484.    WORD           bb_p_mask;   /*       pattern index mask                   */
  485.    char           bb_fill[24]; /*       work space                           */
  486. /* ------------------------------------------------------------------------- */
  487. } BBPB;
  488.  
  489.  
  490. /*
  491.  * Memory Form Definition Block
  492.  *
  493.  */
  494. typedef struct
  495. {
  496.        char            *fd_addr;    /* Addrerss of upper left corner of firs*/
  497.                                     /* plane of raster area. If NULL then   */
  498.                                     /* MFDB is for a physical device        */
  499.        WORD            fd_w;        /* Form Width in Pixels                 */
  500.        WORD            fd_h;        /* Form Height in Pixels                */
  501.        WORD            fd_wdwidth;  /* Form Width in words (fd_w/sizeof(int)*/
  502.        WORD            fd_stand;    /* Form format 0= device spec 1=standard*/
  503.        WORD            fd_nplanes;  /* Number of memory planes              */
  504.        WORD            fd_r1;       /* Reserved                             */
  505.        WORD            fd_r2;       /* Reserved                             */
  506.        WORD            fd_r3;       /* Reserved                             */
  507. } MFDB;
  508.  
  509.  
  510.  
  511.  
  512. /*
  513.  * Sprite definition block
  514.  *
  515.  */
  516. typedef struct
  517. {
  518.        WORD    sp_xhot;                /* Offset to X hot spot           */
  519.        WORD    sp_yhot;                /* Offset to Y hot spot           */
  520.        WORD    sp_format;              /* Format SP_VDI or SP_XOR        */
  521.        WORD    sp_bg;                  /* Background color               */
  522.        WORD    sp_fg;                  /* Foregroud color                */
  523.        WORD    sp_data[32];            /* Sprite data -                  */
  524.                                        /* Alternating words of back/fore */
  525.                                        /* ground data                    */
  526.                                        /* Note that:                     */
  527.                                        /*   sprite save block is         */
  528.                                        /*  10+VPLANES*64 bytes long      */
  529.  
  530. } SFORM;
  531.