home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / lineah / linea.h
Encoding:
C/C++ Source or Header  |  1988-03-24  |  32.2 KB  |  584 lines

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