home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Pascal / HISOFTPASCAL2,0-2.DMS / in.adf / Units / Graphics.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-05-20  |  37.3 KB  |  2,339 lines

  1. unit Graphics;
  2.  
  3. INTERFACE
  4. uses Exec, Hardware;
  5.  
  6.  
  7. type
  8.     PLANEPTR = pointer;
  9.     pPoint = ^tPoint;
  10.     tPoint = record
  11.         x: integer;
  12.         y: integer;
  13.         end;
  14.  
  15.     Point = tPoint;
  16.     pLayer = ^tLayer;
  17.     pClipRect = ^tClipRect;
  18.     pRastPort = ^tRastPort;
  19.     pRectangle = ^tRectangle;
  20.     tRectangle = record
  21.         MinX: integer;
  22.         MinY: integer;
  23.         MaxX: integer;
  24.         MaxY: integer;
  25.         end;
  26.  
  27.     pBitMap = ^tBitMap;
  28.     pLayer_Info = ^tLayer_Info;
  29.     pRegion = ^tRegion;
  30.     tLayer = record
  31.         front: pLayer;
  32.         back: pLayer;
  33.         ClipRect: pClipRect;
  34.         rp: pRastPort;
  35.         bounds: tRectangle;
  36.         reserved: array [0..3] of byte;
  37.         priority: word;
  38.         Flags: word;
  39.         SuperBitMap: pBitMap;
  40.         SuperClipRect: pClipRect;
  41.         Window: pointer;
  42.         Scroll_X: integer;
  43.         Scroll_Y: integer;
  44.         cr: pClipRect;
  45.         cr2: pClipRect;
  46.         crnew: pClipRect;
  47.         SuperSaveClipRects: pClipRect;
  48.         _cliprects: pClipRect;
  49.         LayerInfo: pLayer_Info;
  50.         Lock: tSignalSemaphore;
  51.         reserved3: array [0..7] of byte;
  52.         ClipRegion: pRegion;
  53.         saveClipRects: pRegion;
  54.         reserved2: array [0..21] of byte;
  55.         DamageList: pRegion;
  56.         end;
  57.  
  58.     pcollTable = ^tcollTable;
  59.     tcollTable = record
  60.         collPtrs: array [0..15] of pointer;
  61.         end;
  62.  
  63.     pRegionRectangle = ^tRegionRectangle;
  64.     tRegion = record
  65.         bounds: tRectangle;
  66.         RegionRectangle: pRegionRectangle;
  67.         end;
  68.  
  69.     pViewPort = ^tViewPort;
  70.     pcprlist = ^tcprlist;
  71.     pView = ^tView;
  72.     tView = record
  73.         ViewPort: pViewPort;
  74.         LOFCprList: pcprlist;
  75.         SHFCprList: pcprlist;
  76.         DyOffset: integer;
  77.         DxOffset: integer;
  78.         Modes: word;
  79.         end;
  80.  
  81.     pVSprite = ^tVSprite;
  82.     pBob = ^tBob;
  83.     tVSprite = record
  84.         NextVSprite: pVSprite;
  85.         PrevVSprite: pVSprite;
  86.         DrawPath: pVSprite;
  87.         ClearPath: pVSprite;
  88.         OldY: integer;
  89.         OldX: integer;
  90.         Flags: integer;
  91.         Y: integer;
  92.         X: integer;
  93.         Height: integer;
  94.         Width: integer;
  95.         Depth: integer;
  96.         MeMask: integer;
  97.         HitMask: integer;
  98.         ImageData: pinteger;
  99.         BorderLine: pinteger;
  100.         CollMask: pinteger;
  101.         SprColors: pinteger;
  102.         VSBob: pBob;
  103.         PlanePick: shortint;
  104.         PlaneOnOff: shortint;
  105.         VUserExt: integer;
  106.         end;
  107.  
  108.     tRegionRectangle = record
  109.         Next: pRegionRectangle;
  110.         Prev: pRegionRectangle;
  111.         bounds: tRectangle;
  112.         end;
  113.  
  114.     pTextFont = ^tTextFont;
  115.     tTextFont = record
  116.         tf_Message: tMessage;
  117.         tf_YSize: word;
  118.         tf_Style: byte;
  119.         tf_Flags: byte;
  120.         tf_XSize: word;
  121.         tf_Baseline: word;
  122.         tf_BoldSmear: word;
  123.         tf_Accessors: word;
  124.         tf_LoChar: byte;
  125.         tf_HiChar: byte;
  126.         tf_CharData: pointer;
  127.         tf_Modulo: word;
  128.         tf_CharLoc: pointer;
  129.         tf_CharSpace: pointer;
  130.         tf_CharKern: pointer;
  131.         end;
  132.  
  133.     pTmpRas = ^tTmpRas;
  134.     pAreaInfo = ^tAreaInfo;
  135.     pGelsInfo = ^tGelsInfo;
  136.     tRastPort = record
  137.         Layer: pLayer;
  138.         BitMap: pBitMap;
  139.         AreaPtrn: pword;
  140.         TmpRas: pTmpRas;
  141.         AreaInfo: pAreaInfo;
  142.         GelsInfo: pGelsInfo;
  143.         Mask: byte;
  144.         FgPen: shortint;
  145.         BgPen: shortint;
  146.         AOlPen: shortint;
  147.         DrawMode: shortint;
  148.         AreaPtSz: shortint;
  149.         linpatcnt: shortint;
  150.         dummy: shortint;
  151.         Flags: word;
  152.         LinePtrn: word;
  153.         cp_x: integer;
  154.         cp_y: integer;
  155.         minterms: array [0..7] of byte;
  156.         PenWidth: integer;
  157.         PenHeight: integer;
  158.         Font: pTextFont;
  159.         AlgoStyle: byte;
  160.         TxFlags: byte;
  161.         TxHeight: word;
  162.         TxWidth: word;
  163.         TxBaseline: word;
  164.         TxSpacing: integer;
  165.         RP_User: ppointer;
  166.         longreserved: array [0..1] of long;
  167.         wordreserved: array [0..6] of word;
  168.         reserved: array [0..7] of byte;
  169.         end;
  170.  
  171.     pTextAttr = ^tTextAttr;
  172.     tTextAttr = record
  173.         ta_Name: STRPTR;
  174.         ta_YSize: word;
  175.         ta_Style: byte;
  176.         ta_Flags: byte;
  177.         end;
  178.  
  179.     pColorMap = ^tColorMap;
  180.     pCopList = ^tCopList;
  181.     pUCopList = ^tUCopList;
  182.     pRasInfo = ^tRasInfo;
  183.     tViewPort = record
  184.         Next: pViewPort;
  185.         ColorMap: pColorMap;
  186.         DspIns: pCopList;
  187.         SprIns: pCopList;
  188.         ClrIns: pCopList;
  189.         UCopIns: pUCopList;
  190.         DWidth: integer;
  191.         DHeight: integer;
  192.         DxOffset: integer;
  193.         DyOffset: integer;
  194.         Modes: word;
  195.         SpritePriorities: byte;
  196.         reserved: byte;
  197.         RasInfo: pRasInfo;
  198.         end;
  199.  
  200.     pSimpleSprite = ^tSimpleSprite;
  201.     tSimpleSprite = record
  202.         posctldata: pword;
  203.         height: word;
  204.         x: word;
  205.         y: word;
  206.         num: word;
  207.         end;
  208.  
  209.     pDBufPacket = ^tDBufPacket;
  210.     tDBufPacket = record
  211.         BufY: integer;
  212.         BufX: integer;
  213.         BufPath: pVSprite;
  214.         BufBuffer: pinteger;
  215.         end;
  216.  
  217.     pcopinit = ^tcopinit;
  218.     tcopinit = record
  219.         diagstrt: array [0..3] of word;
  220.         sprstrtup: array [0..39] of word;
  221.         sprstop: array [0..1] of word;
  222.         end;
  223.  
  224.     pIsrvstr = ^tIsrvstr;
  225.     tIsrvstr = record
  226.         is_Node: tNode;
  227.         Iptr: pIsrvstr;
  228.         code: pointer;
  229.         ccode: pointer;
  230.         Carg: longint;
  231.         end;
  232.  
  233.     pAnimOb = ^tAnimOb;
  234.     pAnimComp = ^tAnimComp;
  235.     tAnimOb = record
  236.         NextOb: pAnimOb;
  237.         PrevOb: pAnimOb;
  238.         Clock: longint;
  239.         AnOldY: integer;
  240.         AnOldX: integer;
  241.         AnY: integer;
  242.         AnX: integer;
  243.         YVel: integer;
  244.         XVel: integer;
  245.         YAccel: integer;
  246.         XAccel: integer;
  247.         RingYTrans: integer;
  248.         RingXTrans: integer;
  249.         AnimORoutine: pointer;
  250.         HeadComp: pAnimComp;
  251.         AUserExt: integer;
  252.         end;
  253.  
  254.     tcprlist = record
  255.         Next: pcprlist;
  256.         start: pword;
  257.         MaxCount: integer;
  258.         end;
  259.  
  260.     ppSimpleSprite = ^pSimpleSprite;
  261.     pGfxBase = ^tGfxBase;
  262.     tGfxBase = record
  263.         LibNode: tLibrary;
  264.         ActiView: pView;
  265.         copinit: pcopinit;
  266.         cia: plongint;
  267.         blitter: plongint;
  268.         LOFlist: pword;
  269.         SHFlist: pword;
  270.         blthd: pbltnode;
  271.         blttl: pbltnode;
  272.         bsblthd: pbltnode;
  273.         bsblttl: pbltnode;
  274.         vbsrv: tInterrupt;
  275.         timsrv: tInterrupt;
  276.         bltsrv: tInterrupt;
  277.         TextFonts: tList;
  278.         DefaultFont: pTextFont;
  279.         Modes: word;
  280.         VBlank: shortint;
  281.         Debug: shortint;
  282.         BeamSync: integer;
  283.         system_bplcon0: integer;
  284.         SpriteReserved: byte;
  285.         bytereserved: byte;
  286.         Flags: word;
  287.         BlitLock: integer;
  288.         BlitNest: integer;
  289.         BlitWaitQ: tList;
  290.         BlitOwner: pTask;
  291.         TOF_WaitQ: tList;
  292.         DisplayFlags: word;
  293.         SimpleSprites: ppSimpleSprite;
  294.         MaxDisplayRow: word;
  295.         MaxDisplayColumn: word;
  296.         NormalDisplayRows: word;
  297.         NormalDisplayColumns: word;
  298.         NormalDPMX: word;
  299.         NormalDPMY: word;
  300.         LastChanceMemory: pSignalSemaphore;
  301.         LCMptr: pword;
  302.         MicrosPerLine: word;
  303.         MinDisplayColumn: word;
  304.         reserved: array [0..22] of long;
  305.         end;
  306.  
  307.     tAreaInfo = record
  308.         VctrTbl: pinteger;
  309.         VctrPtr: pinteger;
  310.         FlagTbl: pshortint;
  311.         FlagPtr: pshortint;
  312.         Count: integer;
  313.         MaxCount: integer;
  314.         FirstX: integer;
  315.         FirstY: integer;
  316.         end;
  317.  
  318.     pPLANEPTR = ^PLANEPTR;
  319.     tBitMap = record
  320.         BytesPerRow: word;
  321.         Rows: word;
  322.         Flags: byte;
  323.         Depth: byte;
  324.         pad: word;
  325.         Planes: array [0..7] of PLANEPTR;
  326.         end;
  327.  
  328.     tBob = record
  329.         Flags: integer;
  330.         SaveBuffer: pinteger;
  331.         ImageShadow: pinteger;
  332.         Before: pBob;
  333.         After: pBob;
  334.         BobVSprite: pVSprite;
  335.         BobComp: pAnimComp;
  336.         DBuffer: pDBufPacket;
  337.         BUserExt: integer;
  338.         end;
  339.  
  340.     tUCopList = record
  341.         Next: pUCopList;
  342.         FirstCopList: pCopList;
  343.         CopList: pCopList;
  344.         end;
  345.  
  346.     tAnimComp = record
  347.         Flags: integer;
  348.         Timer: integer;
  349.         TimeSet: integer;
  350.         NextComp: pAnimComp;
  351.         PrevComp: pAnimComp;
  352.         NextSeq: pAnimComp;
  353.         PrevSeq: pAnimComp;
  354.         AnimCRoutine: pointer;
  355.         YTrans: integer;
  356.         XTrans: integer;
  357.         HeadOb: pAnimOb;
  358.         AnimBob: pBob;
  359.         end;
  360.  
  361.     pCopIns = ^tCopIns;
  362.     tCopIns = record
  363.         OpCode: integer;
  364.         case integer of
  365.         0: (
  366.         NXTLIST: pCopList;
  367.         );
  368.         1: (
  369.         VWAITPOS: integer;
  370.         HWAITPOS: integer;
  371.         );
  372.         2: (
  373.         DESTADDR: integer;
  374.         DESTDATA: integer;
  375.         );
  376.         end;
  377.  
  378.     tClipRect = record
  379.         Next: pClipRect;
  380.         prev: pClipRect;
  381.         lobs: pLayer;
  382.         BitMap: pBitMap;
  383.         bounds: tRectangle;
  384.         _p1: pClipRect;
  385.         _p2: pClipRect;
  386.         reserved: longint;
  387.         end;
  388.  
  389.     tRasInfo = record
  390.         Next: pRasInfo;
  391.         BitMap: pBitMap;
  392.         RxOffset: integer;
  393.         RyOffset: integer;
  394.         end;
  395.  
  396.     tGelsInfo = record
  397.         sprRsrvd: shortint;
  398.         Flags: byte;
  399.         gelHead: pVSprite;
  400.         gelTail: pVSprite;
  401.         nextLine: pinteger;
  402.         lastColor: ppinteger;
  403.         collHandler: pcollTable;
  404.         leftmost: integer;
  405.         rightmost: integer;
  406.         topmost: integer;
  407.         bottommost: integer;
  408.         firstBlissObj: pointer;
  409.         lastBlissObj: pointer;
  410.         end;
  411.  
  412.     tColorMap = record
  413.         Flags: byte;
  414.         Type_: byte;
  415.         Count: word;
  416.         ColorTable: pointer;
  417.         end;
  418.  
  419.     tLayer_Info = record
  420.         top_layer: pLayer;
  421.         check_lp: pLayer;
  422.         obs: pLayer;
  423.         FreeClipRects: tMinList;
  424.         Lock: tSignalSemaphore;
  425.         gs_Head: tList;
  426.         longreserved: longint;
  427.         Flags: word;
  428.         fatten_count: shortint;
  429.         LockLayersCount: shortint;
  430.         LayerInfo_extra_size: word;
  431.         blitbuff: pinteger;
  432.         LayerInfo_extra: pointer;
  433.         end;
  434.  
  435.     tTmpRas = record
  436.         RasPtr: pshortint;
  437.         Size: longint;
  438.         end;
  439.  
  440.     tCopList = record
  441.         Next: pCopList;
  442.         _CopList: pCopList;
  443.         _ViewPort: pViewPort;
  444.         CopIns: pCopIns;
  445.         CopPtr: pCopIns;
  446.         CopLStart: pword;
  447.         CopSStart: pword;
  448.         Count: integer;
  449.         MaxCount: integer;
  450.         DyOffset: integer;
  451.         end;
  452.  
  453.     ppAnimOb = ^pAnimOb;
  454.  
  455.  
  456. var
  457.     GfxBase: pGfxBase;
  458.  
  459.  
  460. const
  461.     FSF_BOLD = 2;
  462.     FSF_EXTENDED = 8;
  463.     RIGHTHIT = 8;
  464.     DBUFFER = 4;
  465.     GELGONE = $400;
  466.     ALERTLAYERSNOMEM = $83010000;
  467.     SAVEBOB = 1;
  468.     NTSC = 1;
  469.     CPR_NT_SHT = $4000;
  470.     FPB_DISKFONT = 1;
  471.     HAM = $800;
  472.     SAVEPRESERVE = $1000;
  473.     FPF_DISKFONT = 2;
  474.     CR_NEEDS_NO_CONCEALED_RASTERS = 1;
  475.     DIW_VRTCL_POS_SHIFT = 7;
  476.     AREAOUTLINE = 8;
  477.     NEWLAYERINFO_CALLED = 1;
  478.     PAL = 4;
  479.     PFB_FINE_SCROLL_SHIFT = 4;
  480.     HOLDNMODIFY = $800;
  481.     LEFTHIT = 4;
  482.     MUSTDRAW = 8;
  483.     B2SWAP = 1;
  484.     RINGTRIGGER = 1;
  485.     B2NORM = 0;
  486.     VPOSRLOF = $8000;
  487.     SPRITE_ATTACHED = $80;
  488.     EXTRA_HALFBRITE = $80;
  489.     PF2PRI = $40;
  490.     LAYERSIMPLE = 1;
  491.     FPB_WIDEDOT = 4;
  492.     FPB_REMOVED = 7;
  493.     COLORON = $200;
  494.     ANFRACSIZE = 6;
  495.     FPB_TALLDOT = 3;
  496.     FPF_WIDEDOT = $10;
  497.     GENLOC = 2;
  498.     FPB_PROPORTIONAL = 5;
  499.     MODE_640 = $8000;
  500.     FPF_REMOVED = $80;
  501.     BACKSAVED = $100;
  502.     NOCROSSFILL = $20;
  503.     VP_HIDE = $2000;
  504.     B2BOBBER = 2;
  505.     FRST_DOT = 1;
  506.     FPF_TALLDOT = 8;
  507.     FPF_PROPORTIONAL = $20;
  508.     DUALPF = $400;
  509.     OVERLAY = 4;
  510.     FPB_REVPATH = 2;
  511.     BDRAWN = $200;
  512.     BUSERFLAGS = $FF;
  513.     BITCLR = 0;
  514.     DIW_VRTCL_POS = $1FF;
  515.     FSB_ITALIC = 2;
  516.     FPF_REVPATH = 4;
  517.     DIW_HORIZ_POS = $7F;
  518.     BOBNIX = $800;
  519.     PFA_FINE_SCROLL = $F;
  520.     ONE_DOT = 2;
  521.     DFTCH_MASK = $FF;
  522.     COMPLEMENT = 2;
  523.     FSF_ITALIC = 4;
  524.     SPRITES = $4000;
  525.     ISLESSX = 1;
  526.     FSB_UNDERLINED = 0;
  527.     ISLESSY = 2;
  528.     VSPRITE = 1;
  529.     FPB_ROMFONT = 0;
  530.     COPPER_WAIT = 1;
  531.     LAYERBACKDROP = $40;
  532.     FSF_UNDERLINED = 1;
  533.     BITSET = $8000;
  534.     COPPER_MOVE = 0;
  535.     BOBUPDATE = $200;
  536.     FPF_ROMFONT = 1;
  537.     DBLPF = $400;
  538.     INTERLACE = 4;
  539.     ISGRTRX = 4;
  540.     ISGRTRY = 8;
  541.     OUTSTEP = $2000;
  542.     LAYER_CLIPRECTS_LOST = $100;
  543.     SUSERFLAGS = $FF;
  544.     JAM1 = 0;
  545.     BOBISCOMP = 2;
  546.     JAM2 = 1;
  547.     PLNCNTSHFT = $C;
  548.     LAYERSMART = 2;
  549.     TOPHIT = 1;
  550.     BORDERHIT = 0;
  551.     SAVEBACK = 2;
  552.     ANIMHALF = $20;
  553.     LMN_REGION = $FFFFFFFF;
  554.     GENLOCK_AUDIO = $100;
  555.     LAYERSUPER = 4;
  556.     PF_FINE_SCROLL_MASK = $F;
  557.     LACE = 4;
  558.     LAYERUPDATING = $10;
  559.     HIRES = $8000;
  560.     GENLOCK_VIDEO = 2;
  561.     PFBA = $40;
  562.     FPB_DESIGNED = 6;
  563.     FPF_DESIGNED = $40;
  564.     VSOVERFLOW = $800;
  565.     BOTTOMHIT = 2;
  566.     PLNCNTMSK = 7;
  567.     BWAITING = $100;
  568.     INVERSVID = 4;
  569.     CPRNXTBUF = 2;
  570.     BOBSAWAY = $400;
  571.     BLITMSG_FAULT = 4;
  572.     FSB_BOLD = 1;
  573.     CPR_NT_LOF = $8000;
  574.     FS_NORMAL = 0;
  575.     FSB_EXTENDED = 3;
  576.     LAYERREFRESH = $80;
  577.  
  578.  
  579. function BltBitMap
  580.         (srcBitMap: pBitMap;
  581.         srcX: integer;
  582.         srcY: integer;
  583.         destBitMap: pBitMap;
  584.         destX: integer;
  585.         destY: integer;
  586.         sizeX: integer;
  587.         sizeY: integer;
  588.         minterm: byte;
  589.         mask: byte;
  590.         tempA: PLANEPTR): long;
  591.  
  592. procedure BltTemplate
  593.         (source: PLANEPTR;
  594.         srcX: integer;
  595.         srcMod: integer;
  596.         destRastPort: pRastPort;
  597.         destX: integer;
  598.         destY: integer;
  599.         sizeX: integer;
  600.         sizeY: integer);
  601.  
  602. procedure ClearEOL (rastPort: pRastPort);
  603. procedure ClearScreen (rastPort: pRastPort);
  604. function TextLength
  605.         (RastPort: pRastPort;
  606.         string_: STRPTR;
  607.         count: integer): integer;
  608.  
  609. procedure Text_
  610.         (RastPort: pRastPort;
  611.         string_: STRPTR;
  612.         count: integer);
  613.  
  614. procedure SetFont
  615.         (RastPortID: pRastPort;
  616.         textFont: pTextFont);
  617.  
  618. function OpenFont (textAttr: pTextAttr): pTextFont;
  619. procedure CloseFont (textFont: pTextFont);
  620. function AskSoftStyle (rastPort: pRastPort): long;
  621. function SetSoftStyle
  622.         (rastPort: pRastPort;
  623.         style: long;
  624.         enable: long): long;
  625.  
  626. procedure AddBob
  627.         (bob: pBob;
  628.         rastPort: pRastPort);
  629.  
  630. procedure AddVSprite
  631.         (vSprite: pVSprite;
  632.         rastPort: pRastPort);
  633.  
  634. procedure DoCollision (rasPort: pRastPort);
  635. procedure DrawGList
  636.         (rastPort: pRastPort;
  637.         viewPort: pViewPort);
  638.  
  639. procedure InitGels
  640.         (dummyHead: pVSprite;
  641.         dummyTail: pVSprite;
  642.         GelsInfo: pGelsInfo);
  643.  
  644. procedure InitMasks (vSprite: pVSprite);
  645. procedure RemIBob
  646.         (bob: pBob;
  647.         rastPort: pRastPort;
  648.         viewPort: pViewPort);
  649.  
  650. procedure RemVSprite (vSprite: pVSprite);
  651. procedure SetCollision
  652.         (type_: long;
  653.         routine: pointer;
  654.         gelsInfo: pGelsInfo);
  655.  
  656. procedure SortGList (rastPort: pRastPort);
  657. procedure AddAnimOb
  658.         (obj: pAnimOb;
  659.         animationKey: ppAnimOb;
  660.         rastPort: pRastPort);
  661.  
  662. procedure Animate
  663.         (animationKey: ppAnimOb;
  664.         rastPort: pRastPort);
  665.  
  666. function GetGBuffers
  667.         (animationObj: pAnimOb;
  668.         rastPort: pRastPort;
  669.         doubleBuffer: boolean): boolean;
  670.  
  671. procedure InitGMasks (animationObj: pAnimOb);
  672. procedure DrawEllipse
  673.         (rastPort: pRastPort;
  674.         cx: integer;
  675.         cy: integer;
  676.         a: integer;
  677.         b: integer);
  678.  
  679. function AreaEllipse
  680.         (rastPort: pRastPort;
  681.         cx: integer;
  682.         cy: integer;
  683.         a: integer;
  684.         b: integer): longint;
  685.  
  686. procedure LoadRGB4
  687.         (viewPort: pViewPort;
  688.         colors: pword;
  689.         count: integer);
  690.  
  691. procedure InitRastPort (rastPort: pRastPort);
  692. procedure InitVPort (viewPort: pViewPort);
  693. procedure MrgCop (view: pView);
  694. procedure MakeVPort
  695.         (view: pView;
  696.         viewPort: pViewPort);
  697.  
  698. procedure LoadView (view: pView);
  699. procedure WaitBlit;
  700. procedure SetRast
  701.         (rastPort: pRastPort;
  702.         color: byte);
  703.  
  704. procedure Move_
  705.         (rastPort: pRastPort;
  706.         x: integer;
  707.         y: integer);
  708.  
  709. procedure Draw
  710.         (rastPort: pRastPort;
  711.         x: integer;
  712.         y: integer);
  713.  
  714. function AreaMove
  715.         (rastPort: pRastPort;
  716.         x: integer;
  717.         y: integer): longint;
  718.  
  719. function AreaDraw
  720.         (rastPort: pRastPort;
  721.         x: integer;
  722.         y: integer): long;
  723.  
  724. function AreaEnd (rastPort: pRastPort): longint;
  725. procedure WaitTOF;
  726. procedure QBlit (blit: pbltnode);
  727. procedure InitArea
  728.         (areaInfo: pAreaInfo;
  729.         vectorTable: pointer;
  730.         vectorTableSize: integer);
  731.  
  732. procedure SetRGB4
  733.         (viewPort: pViewPort;
  734.         index: integer;
  735.         r: byte;
  736.         g: byte;
  737.         b: byte);
  738.  
  739. procedure QBSBlit (blit: pbltnode);
  740. procedure BltClear
  741.         (memory: PLANEPTR;
  742.         size: long;
  743.         flags: long);
  744.  
  745. procedure RectFill
  746.         (rastPort: pRastPort;
  747.         xl: integer;
  748.         yl: integer;
  749.         xu: integer;
  750.         yu: integer);
  751.  
  752. procedure BltPattern
  753.         (rastPort: pRastPort;
  754.         ras: PLANEPTR;
  755.         xl: integer;
  756.         yl: integer;
  757.         maxX: integer;
  758.         maxY: integer;
  759.         fillBytes: integer);
  760.  
  761. function ReadPixel
  762.         (rastPort: pRastPort;
  763.         x: integer;
  764.         y: integer): longint;
  765.  
  766. function WritePixel
  767.         (rastPort: pRastPort;
  768.         x: integer;
  769.         y: integer): longint;
  770.  
  771. function Flood
  772.         (rastPort: pRastPort;
  773.         mode: long;
  774.         x: integer;
  775.         y: integer): boolean;
  776.  
  777. procedure PolyDraw
  778.         (rastPort: pRastPort;
  779.         count: integer;
  780.         polyTable: pinteger);
  781.  
  782. procedure SetAPen
  783.         (rastPort: pRastPort;
  784.         pen: byte);
  785.  
  786. procedure SetBPen
  787.         (rastPort: pRastPort;
  788.         pen: byte);
  789.  
  790. procedure SetDrMd
  791.         (rastPort: pRastPort;
  792.         drawMode: byte);
  793.  
  794. procedure InitView (view: pView);
  795. procedure CBump (copperList: pUCopList);
  796. procedure CMove_
  797.         (copperList: pUCopList;
  798.         destination: pointer;
  799.         data: integer);
  800.  
  801. procedure CWait_
  802.         (copperList: pUCopList;
  803.         x: integer;
  804.         y: integer);
  805.  
  806. function VBeamPos: longint;
  807. procedure InitBitMap
  808.         (bitMap: pBitMap;
  809.         depth: shortint;
  810.         width: word;
  811.         height: word);
  812.  
  813. procedure ScrollRaster
  814.         (rastPort: pRastPort;
  815.         dX: integer;
  816.         dY: integer;
  817.         minx: integer;
  818.         miny: integer;
  819.         maxx: integer;
  820.         maxy: integer);
  821.  
  822. procedure WaitBOVP (viewport: pViewPort);
  823. function GetSprite
  824.         (simplesprite: pSimpleSprite;
  825.         num: integer): integer;
  826.  
  827. procedure FreeSprite (num: integer);
  828. procedure ChangeSprite
  829.         (vp: pViewPort;
  830.         simplesprite: pSimpleSprite;
  831.         data: PLANEPTR);
  832.  
  833. procedure MoveSprite
  834.         (viewport: pViewPort;
  835.         simplesprite: pSimpleSprite;
  836.         x: integer;
  837.         y: integer);
  838.  
  839. procedure LockLayerRom (layer: pLayer);
  840. procedure UnlockLayerRom (layer: pLayer);
  841. procedure SyncSBitMap (l: pLayer);
  842. procedure CopySBitMap (l: pLayer);
  843. procedure OwnBlitter;
  844. procedure DisownBlitter;
  845. procedure InitTmpRas
  846.         (tmpras: pTmpRas;
  847.         buff: PLANEPTR;
  848.         size: long);
  849.  
  850. procedure AskFont
  851.         (rastPort: pRastPort;
  852.         textAttr: pTextAttr);
  853.  
  854. procedure AddFont (textFont: pTextFont);
  855. procedure RemFont (textFont: pTextFont);
  856. function AllocRaster
  857.         (width: word;
  858.         height: word): PLANEPTR;
  859.  
  860. procedure FreeRaster
  861.         (planeptr: PLANEPTR;
  862.         width: word;
  863.         height: word);
  864.  
  865. procedure AndRectRegion
  866.         (rgn: pRegion;
  867.         rect: pRectangle);
  868.  
  869. function OrRectRegion
  870.         (rgn: pRegion;
  871.         rect: pRectangle): boolean;
  872.  
  873. function NewRegion: pRegion;
  874. function ClearRectRegion
  875.         (rgn: pRegion;
  876.         rect: pRectangle): boolean;
  877.  
  878. procedure ClearRegion (rgn: pRegion);
  879. procedure DisposeRegion (rgn: pRegion);
  880. procedure FreeVPortCopLists (viewport: pViewPort);
  881. procedure FreeCopList (coplist: pCopList);
  882. procedure ClipBlit
  883.         (srcrp: pRastPort;
  884.         srcX: integer;
  885.         srcY: integer;
  886.         destrp: pRastPort;
  887.         destX: integer;
  888.         destY: integer;
  889.         sizeX: integer;
  890.         sizeY: integer;
  891.         minterm: byte);
  892.  
  893. function XorRectRegion
  894.         (rgn: pRegion;
  895.         rect: pRectangle): boolean;
  896.  
  897. procedure FreeCprList (cprlist: pcprlist);
  898. function GetColorMap (entries: long): pColorMap;
  899. procedure FreeColorMap (colormap: pColorMap);
  900. function GetRGB4
  901.         (colormap: pColorMap;
  902.         entry: longint): long;
  903.  
  904. procedure ScrollVPort (vp: pViewPort);
  905. function UCopperListInit
  906.         (copperlist: pUCopList;
  907.         num: word): pCopList;
  908.  
  909. procedure FreeGBuffers
  910.         (animationObj: pAnimOb;
  911.         rastPort: pRastPort;
  912.         doubleBuffer: boolean);
  913.  
  914. function BltBitMapRastPort
  915.         (srcbm: pBitMap;
  916.         srcx: integer;
  917.         srcy: integer;
  918.         destrp: pRastPort;
  919.         destX: integer;
  920.         destY: integer;
  921.         sizeX: integer;
  922.         sizeY: integer;
  923.         minterm: byte): boolean;
  924.  
  925. function OrRegionRegion
  926.         (src: pRegion;
  927.         dst: pRegion): boolean;
  928.  
  929. function XorRegionRegion
  930.         (src: pRegion;
  931.         dst: pRegion): boolean;
  932.  
  933. function AndRegionRegion
  934.         (src: pRegion;
  935.         dst: pRegion): boolean;
  936.  
  937. procedure SetRGB4CM
  938.         (cm: pColorMap;
  939.         i: integer;
  940.         r: byte;
  941.         g: byte;
  942.         b: byte);
  943.  
  944. procedure BltMaskBitMapRastPort
  945.         (srcbm: pBitMap;
  946.         srcx: integer;
  947.         srcy: integer;
  948.         destrp: pRastPort;
  949.         destX: integer;
  950.         destY: integer;
  951.         sizeX: integer;
  952.         sizeY: integer;
  953.         minterm: byte;
  954.         bltmask: PLANEPTR);
  955.  
  956. function AttemptLockLayerRom (layer: pLayer): boolean;
  957.  
  958.  
  959. function AreaCircle
  960.             (rastPort: pRastPort;
  961.             cx: integer;
  962.             cy: integer;
  963.             r: integer): longint;
  964.  
  965. procedure DrawCircle
  966.             (rastPort: pRastPort;
  967.             cx: integer;
  968.             cy: integer;
  969.             r: integer);
  970.  
  971. procedure SetOPen
  972.             (w: pRastPort;
  973.             c: shortint);
  974.  
  975. procedure SetWrMsk
  976.             (w: pRastPort;
  977.             m: Byte);
  978.  
  979. procedure SetDrPt
  980.             (w: pRastPort;
  981.             p: word);
  982.  
  983. procedure SetAfPt
  984.             (w: pRastPort;
  985.             p: pWord;
  986.             n: shortint);
  987.  
  988. function RASSIZE
  989.             (w: integer;
  990.             h: integer): longint;
  991.  
  992. procedure CINIT
  993.             (copperlist: pUCopList;
  994.             num: word);
  995.  
  996. procedure CMOVE
  997.             (copperList: pUCopList;
  998.             var destination: pointer;
  999.             data: integer);
  1000.  
  1001. procedure CWAIT
  1002.             (copperList: pUCopList;
  1003.             x: integer;
  1004.             y: integer);
  1005.  
  1006. procedure CEND (copperList: pUCopList);
  1007. procedure BNDRYOFF (w: pRastPort);
  1008. procedure OFF_DISPLAY (custom: pCustom);
  1009. procedure ON_DISPLAY (custom: pCustom);
  1010. procedure OFF_SPRITE (custom: pCustom);
  1011. procedure ON_SPRITE (custom: pCustom);
  1012. procedure OFF_VBLANK (custom: pCustom);
  1013. procedure ON_VBLANK (custom: pCustom);
  1014. procedure InitAnimate (animkey: ppAnimOb);
  1015. procedure RemBob (bob: pBob);
  1016.  
  1017.  
  1018. IMPLEMENTATION
  1019. procedure BNDRYOFF;
  1020. begin
  1021.     with w^ do
  1022.         Flags := Flags and (not AREAOUTLINE)
  1023. end;
  1024.  
  1025. procedure InitAnimate;
  1026. begin
  1027.     animkey^ := NIL
  1028. end;
  1029.  
  1030. procedure RemBob;
  1031. begin
  1032.     with bob^ do
  1033.         Flags := Flags or BOBSAWAY
  1034. end;
  1035.  
  1036. procedure SetAfPt;
  1037. begin
  1038.     with w^ do
  1039.     begin
  1040.         AreaPtrn := p;
  1041.         AreaPtSz := n
  1042.     end
  1043. end;
  1044.  
  1045. procedure SetDrPt;
  1046. begin
  1047.     with w^ do
  1048.     begin
  1049.         LinePtrn    := p;
  1050.         Flags        := Flags or FRST_DOT;
  1051.         linpatcnt    := 15
  1052.     end
  1053. end;
  1054.  
  1055. procedure SetOPen;
  1056. begin
  1057.     with w^ do
  1058.     begin
  1059.         AOlPen    := c;
  1060.         Flags    := Flags or AREAOUTLINE
  1061.     end
  1062. end;
  1063.  
  1064. procedure SetWrMsk;
  1065. begin
  1066.     w^.Mask := m
  1067. end;
  1068.  
  1069. procedure OFF_DISPLAY;
  1070. begin
  1071.     custom^.dmacon := BITCLR or DMAF_RASTER
  1072. end;
  1073.  
  1074. procedure ON_DISPLAY;
  1075. begin
  1076.     custom^.dmacon := BITSET or DMAF_RASTER
  1077. end;
  1078.  
  1079. procedure OFF_SPRITE;
  1080. begin
  1081.     custom^.dmacon := BITCLR or DMAF_SPRITE
  1082. end;
  1083.  
  1084. procedure ON_SPRITE;
  1085. begin
  1086.     custom^.dmacon := BITSET or DMAF_SPRITE
  1087. end;
  1088.  
  1089. procedure OFF_VBLANK;
  1090. begin
  1091.     custom^.intena := BITCLR or INTF_VERTB
  1092. end;
  1093.  
  1094. procedure ON_VBLANK;
  1095. begin
  1096.     custom^.intena := BITSET or INTF_VERTB
  1097. end;
  1098.  
  1099. function AreaCircle;
  1100. begin
  1101.     AreaCircle := AreaEllipse(rastPort, cx, cy, r, r)
  1102. end;
  1103.  
  1104. procedure DrawCircle;
  1105. begin
  1106.     DrawEllipse(rastPort, cx, cy, r, r)
  1107. end;
  1108.  
  1109. function RASSIZE;
  1110. var
  1111.     result: Longint;
  1112. begin
  1113.     result := ((w + 15) shr 3) and $FFFE;
  1114.     RASSIZE := h * result
  1115. end;
  1116.  
  1117. procedure CINIT;
  1118. var
  1119.     junk: pCopList;
  1120. begin
  1121.     junk := UCopperListInit(copperlist,num)
  1122. end;
  1123.  
  1124. procedure CMOVE;
  1125. begin
  1126.     CMove_(copperList, @destination, data);
  1127.     CBump(copperList)
  1128. end;
  1129.  
  1130. procedure CWAIT;
  1131. begin
  1132.     CWait_(copperList, x, y);
  1133.     CBump(copperList)
  1134. end;
  1135.     
  1136. procedure CEND;
  1137. begin
  1138.     CWAIT(copperlist, 10000, 255)
  1139. end;
  1140.  
  1141. function BltBitMap; xassembler;
  1142. asm
  1143.     movem.l    d3-d7/a2/a6,-(sp)
  1144.     lea        $20(sp),a6
  1145.     move.l    (a6)+,a2
  1146.     move.b    (a6)+,d7
  1147.     addq.l    #1,a6
  1148.     move.b    (a6)+,d6
  1149.     addq.l    #1,a6
  1150.     move.w    (a6)+,d5
  1151.     move.w    (a6)+,d4
  1152.     move.w    (a6)+,d3
  1153.     move.w    (a6)+,d2
  1154.     move.l    (a6)+,a1
  1155.     move.w    (a6)+,d1
  1156.     move.w    (a6)+,d0
  1157.     move.l    (a6)+,a0
  1158.     move.l    GfxBase,a6
  1159.     jsr        -$1E(a6)
  1160.     move.l    d0,$3C(sp)
  1161.     movem.l    (sp)+,d3-d7/a2/a6
  1162. end;
  1163.  
  1164. procedure BltTemplate; xassembler;
  1165. asm
  1166.     movem.l    d3-d5/a6,-(sp)
  1167.     lea        $14(sp),a6
  1168.     move.w    (a6)+,d5
  1169.     move.w    (a6)+,d4
  1170.     move.w    (a6)+,d3
  1171.     move.w    (a6)+,d2
  1172.     move.l    (a6)+,a1
  1173.     move.w    (a6)+,d1
  1174.     move.w    (a6)+,d0
  1175.     move.l    (a6)+,a0
  1176.     move.l    GfxBase,a6
  1177.     jsr        -$24(a6)
  1178.     movem.l    (sp)+,d3-d5/a6
  1179. end;
  1180.  
  1181. procedure ClearEOL; xassembler;
  1182. asm
  1183.     move.l    a6,-(sp)
  1184.     move.l    8(sp),a1
  1185.     move.l    GfxBase,a6
  1186.     jsr        -$2A(a6)
  1187.     move.l    (sp)+,a6
  1188. end;
  1189.  
  1190. procedure ClearScreen; xassembler;
  1191. asm
  1192.     move.l    a6,-(sp)
  1193.     move.l    8(sp),a1
  1194.     move.l    GfxBase,a6
  1195.     jsr        -$30(a6)
  1196.     move.l    (sp)+,a6
  1197. end;
  1198.  
  1199. function TextLength; xassembler;
  1200. asm
  1201.     move.l    a6,-(sp)
  1202.     lea        8(sp),a6
  1203.     move.w    (a6)+,d0
  1204.     move.l    (a6)+,a0
  1205.     move.l    (a6)+,a1
  1206.     move.l    GfxBase,a6
  1207.     jsr        -$36(a6)
  1208.     move.w    d0,$12(sp)
  1209.     move.l    (sp)+,a6
  1210. end;
  1211.  
  1212. procedure Text_; xassembler;
  1213. asm
  1214.     move.l    a6,-(sp)
  1215.     lea        8(sp),a6
  1216.     move.w    (a6)+,d0
  1217.     move.l    (a6)+,a0
  1218.     move.l    (a6)+,a1
  1219.     move.l    GfxBase,a6
  1220.     jsr        -$3C(a6)
  1221.     move.l    (sp)+,a6
  1222. end;
  1223.  
  1224. procedure SetFont; xassembler;
  1225. asm
  1226.     move.l    a6,-(sp)
  1227.     movem.l    8(sp),a0-a1
  1228.     move.l    GfxBase,a6
  1229.     jsr        -$42(a6)
  1230.     move.l    (sp)+,a6
  1231. end;
  1232.  
  1233. function OpenFont; xassembler;
  1234. asm
  1235.     move.l    a6,-(sp)
  1236.     move.l    8(sp),a0
  1237.     move.l    GfxBase,a6
  1238.     jsr        -$48(a6)
  1239.     move.l    d0,$C(sp)
  1240.     move.l    (sp)+,a6
  1241. end;
  1242.  
  1243. procedure CloseFont; xassembler;
  1244. asm
  1245.     move.l    a6,-(sp)
  1246.     move.l    8(sp),a1
  1247.     move.l    GfxBase,a6
  1248.     jsr        -$4E(a6)
  1249.     move.l    (sp)+,a6
  1250. end;
  1251.  
  1252. function AskSoftStyle; xassembler;
  1253. asm
  1254.     move.l    a6,-(sp)
  1255.     move.l    8(sp),a1
  1256.     move.l    GfxBase,a6
  1257.     jsr        -$54(a6)
  1258.     move.l    d0,$C(sp)
  1259.     move.l    (sp)+,a6
  1260. end;
  1261.  
  1262. function SetSoftStyle; xassembler;
  1263. asm
  1264.     move.l    a6,-(sp)
  1265.     lea        8(sp),a6
  1266.     move.l    (a6)+,d1
  1267.     move.l    (a6)+,d0
  1268.     move.l    (a6)+,a1
  1269.     move.l    GfxBase,a6
  1270.     jsr        -$5A(a6)
  1271.     move.l    d0,$14(sp)
  1272.     move.l    (sp)+,a6
  1273. end;
  1274.  
  1275. procedure AddBob; xassembler;
  1276. asm
  1277.     move.l    a6,-(sp)
  1278.     lea        8(sp),a6
  1279.     move.l    (a6)+,a1
  1280.     move.l    (a6)+,a0
  1281.     move.l    GfxBase,a6
  1282.     jsr        -$60(a6)
  1283.     move.l    (sp)+,a6
  1284. end;
  1285.  
  1286. procedure AddVSprite; xassembler;
  1287. asm
  1288.     move.l    a6,-(sp)
  1289.     lea        8(sp),a6
  1290.     move.l    (a6)+,a1
  1291.     move.l    (a6)+,a0
  1292.     move.l    GfxBase,a6
  1293.     jsr        -$66(a6)
  1294.     move.l    (sp)+,a6
  1295. end;
  1296.  
  1297. procedure DoCollision; xassembler;
  1298. asm
  1299.     move.l    a6,-(sp)
  1300.     move.l    8(sp),a1
  1301.     move.l    GfxBase,a6
  1302.     jsr        -$6C(a6)
  1303.     move.l    (sp)+,a6
  1304. end;
  1305.  
  1306. procedure DrawGList; xassembler;
  1307. asm
  1308.     move.l    a6,-(sp)
  1309.     movem.l    8(sp),a0-a1
  1310.     move.l    GfxBase,a6
  1311.     jsr        -$72(a6)
  1312.     move.l    (sp)+,a6
  1313. end;
  1314.  
  1315. procedure InitGels; xassembler;
  1316. asm
  1317.     movem.l    a2/a6,-(sp)
  1318.     lea        $C(sp),a6
  1319.     move.l    (a6)+,a2
  1320.     move.l    (a6)+,a1
  1321.     move.l    (a6)+,a0
  1322.     move.l    GfxBase,a6
  1323.     jsr        -$78(a6)
  1324.     movem.l    (sp)+,a2/a6
  1325. end;
  1326.  
  1327. procedure InitMasks; xassembler;
  1328. asm
  1329.     move.l    a6,-(sp)
  1330.     move.l    8(sp),a0
  1331.     move.l    GfxBase,a6
  1332.     jsr        -$7E(a6)
  1333.     move.l    (sp)+,a6
  1334. end;
  1335.  
  1336. procedure RemIBob; xassembler;
  1337. asm
  1338.     movem.l    a2/a6,-(sp)
  1339.     lea        $C(sp),a6
  1340.     move.l    (a6)+,a2
  1341.     move.l    (a6)+,a1
  1342.     move.l    (a6)+,a0
  1343.     move.l    GfxBase,a6
  1344.     jsr        -$84(a6)
  1345.     movem.l    (sp)+,a2/a6
  1346. end;
  1347.  
  1348. procedure RemVSprite; xassembler;
  1349. asm
  1350.     move.l    a6,-(sp)
  1351.     move.l    8(sp),a0
  1352.     move.l    GfxBase,a6
  1353.     jsr        -$8A(a6)
  1354.     move.l    (sp)+,a6
  1355. end;
  1356.  
  1357. procedure SetCollision; xassembler;
  1358. asm
  1359.     move.l    a6,-(sp)
  1360.     lea        8(sp),a6
  1361.     move.l    (a6)+,a1
  1362.     move.l    (a6)+,a0
  1363.     move.l    (a6)+,d0
  1364.     move.l    GfxBase,a6
  1365.     jsr        -$90(a6)
  1366.     move.l    (sp)+,a6
  1367. end;
  1368.  
  1369. procedure SortGList; xassembler;
  1370. asm
  1371.     move.l    a6,-(sp)
  1372.     move.l    8(sp),a1
  1373.     move.l    GfxBase,a6
  1374.     jsr        -$96(a6)
  1375.     move.l    (sp)+,a6
  1376. end;
  1377.  
  1378. procedure AddAnimOb; xassembler;
  1379. asm
  1380.     movem.l    a2/a6,-(sp)
  1381.     lea        $C(sp),a6
  1382.     move.l    (a6)+,a2
  1383.     move.l    (a6)+,a1
  1384.     move.l    (a6)+,a0
  1385.     move.l    GfxBase,a6
  1386.     jsr        -$9C(a6)
  1387.     movem.l    (sp)+,a2/a6
  1388. end;
  1389.  
  1390. procedure Animate; xassembler;
  1391. asm
  1392.     move.l    a6,-(sp)
  1393.     lea        8(sp),a6
  1394.     move.l    (a6)+,a1
  1395.     move.l    (a6)+,a0
  1396.     move.l    GfxBase,a6
  1397.     jsr        -$A2(a6)
  1398.     move.l    (sp)+,a6
  1399. end;
  1400.  
  1401. function GetGBuffers; xassembler;
  1402. asm
  1403.     move.l    a6,-(sp)
  1404.     moveq    #0,d0
  1405.     lea        8(sp),a6
  1406.     move.b    (a6)+,d0
  1407.     addq.l    #1,a6
  1408.     move.l    (a6)+,a1
  1409.     move.l    (a6)+,a0
  1410.     move.l    GfxBase,a6
  1411.     jsr        -$A8(a6)
  1412.     tst.l    d0
  1413.     sne        d0
  1414.     neg.b    d0
  1415.     move.b    d0,$12(sp)
  1416.     move.l    (sp)+,a6
  1417. end;
  1418.  
  1419. procedure InitGMasks; xassembler;
  1420. asm
  1421.     move.l    a6,-(sp)
  1422.     move.l    8(sp),a0
  1423.     move.l    GfxBase,a6
  1424.     jsr        -$AE(a6)
  1425.     move.l    (sp)+,a6
  1426. end;
  1427.  
  1428. procedure DrawEllipse; xassembler;
  1429. asm
  1430.     movem.l    d3/a6,-(sp)
  1431.     lea        $C(sp),a6
  1432.     move.w    (a6)+,d3
  1433.     move.w    (a6)+,d2
  1434.     move.w    (a6)+,d1
  1435.     move.w    (a6)+,d0
  1436.     move.l    (a6)+,a1
  1437.     move.l    GfxBase,a6
  1438.     jsr        -$B4(a6)
  1439.     movem.l    (sp)+,d3/a6
  1440. end;
  1441.  
  1442. function AreaEllipse; xassembler;
  1443. asm
  1444.     movem.l    d3/a6,-(sp)
  1445.     lea        $C(sp),a6
  1446.     move.w    (a6)+,d3
  1447.     move.w    (a6)+,d2
  1448.     move.w    (a6)+,d1
  1449.     move.w    (a6)+,d0
  1450.     move.l    (a6)+,a1
  1451.     move.l    GfxBase,a6
  1452.     jsr        -$BA(a6)
  1453.     move.l    d0,$18(sp)
  1454.     movem.l    (sp)+,d3/a6
  1455. end;
  1456.  
  1457. procedure LoadRGB4; xassembler;
  1458. asm
  1459.     move.l    a6,-(sp)
  1460.     lea        8(sp),a6
  1461.     move.w    (a6)+,d0
  1462.     move.l    (a6)+,a1
  1463.     move.l    (a6)+,a0
  1464.     move.l    GfxBase,a6
  1465.     jsr        -$C0(a6)
  1466.     move.l    (sp)+,a6
  1467. end;
  1468.  
  1469. procedure InitRastPort; xassembler;
  1470. asm
  1471.     move.l    a6,-(sp)
  1472.     move.l    8(sp),a1
  1473.     move.l    GfxBase,a6
  1474.     jsr        -$C6(a6)
  1475.     move.l    (sp)+,a6
  1476. end;
  1477.  
  1478. procedure InitVPort; xassembler;
  1479. asm
  1480.     move.l    a6,-(sp)
  1481.     move.l    8(sp),a0
  1482.     move.l    GfxBase,a6
  1483.     jsr        -$CC(a6)
  1484.     move.l    (sp)+,a6
  1485. end;
  1486.  
  1487. procedure MrgCop; xassembler;
  1488. asm
  1489.     move.l    a6,-(sp)
  1490.     move.l    8(sp),a1
  1491.     move.l    GfxBase,a6
  1492.     jsr        -$D2(a6)
  1493.     move.l    (sp)+,a6
  1494. end;
  1495.  
  1496. procedure MakeVPort; xassembler;
  1497. asm
  1498.     move.l    a6,-(sp)
  1499.     lea        8(sp),a6
  1500.     move.l    (a6)+,a1
  1501.     move.l    (a6)+,a0
  1502.     move.l    GfxBase,a6
  1503.     jsr        -$D8(a6)
  1504.     move.l    (sp)+,a6
  1505. end;
  1506.  
  1507. procedure LoadView; xassembler;
  1508. asm
  1509.     move.l    a6,-(sp)
  1510.     move.l    8(sp),a1
  1511.     move.l    GfxBase,a6
  1512.     jsr        -$DE(a6)
  1513.     move.l    (sp)+,a6
  1514. end;
  1515.  
  1516. procedure WaitBlit; xassembler;
  1517. asm
  1518.     move.l    a6,-(sp)
  1519.     move.l    GfxBase,a6
  1520.     jsr        -$E4(a6)
  1521.     move.l    (sp)+,a6
  1522. end;
  1523.  
  1524. procedure SetRast; xassembler;
  1525. asm
  1526.     move.l    a6,-(sp)
  1527.     move.b    8(sp),d0
  1528.     move.l    $A(sp),a1
  1529.     move.l    GfxBase,a6
  1530.     jsr        -$EA(a6)
  1531.     move.l    (sp)+,a6
  1532. end;
  1533.  
  1534. procedure Move_; xassembler;
  1535. asm
  1536.     move.l    a6,-(sp)
  1537.     lea        8(sp),a6
  1538.     move.w    (a6)+,d1
  1539.     move.w    (a6)+,d0
  1540.     move.l    (a6)+,a1
  1541.     move.l    GfxBase,a6
  1542.     jsr        -$F0(a6)
  1543.     move.l    (sp)+,a6
  1544. end;
  1545.  
  1546. procedure Draw; xassembler;
  1547. asm
  1548.     move.l    a6,-(sp)
  1549.     lea        8(sp),a6
  1550.     move.w    (a6)+,d1
  1551.     move.w    (a6)+,d0
  1552.     move.l    (a6)+,a1
  1553.     move.l    GfxBase,a6
  1554.     jsr        -$F6(a6)
  1555.     move.l    (sp)+,a6
  1556. end;
  1557.  
  1558. function AreaMove; xassembler;
  1559. asm
  1560.     move.l    a6,-(sp)
  1561.     lea        8(sp),a6
  1562.     move.w    (a6)+,d1
  1563.     move.w    (a6)+,d0
  1564.     move.l    (a6)+,a1
  1565.     move.l    GfxBase,a6
  1566.     jsr        -$FC(a6)
  1567.     move.l    d0,$10(sp)
  1568.     move.l    (sp)+,a6
  1569. end;
  1570.  
  1571. function AreaDraw; xassembler;
  1572. asm
  1573.     move.l    a6,-(sp)
  1574.     lea        8(sp),a6
  1575.     move.w    (a6)+,d1
  1576.     move.w    (a6)+,d0
  1577.     move.l    (a6)+,a1
  1578.     move.l    GfxBase,a6
  1579.     jsr        -$102(a6)
  1580.     move.l    d0,$10(sp)
  1581.     move.l    (sp)+,a6
  1582. end;
  1583.  
  1584. function AreaEnd; xassembler;
  1585. asm
  1586.     move.l    a6,-(sp)
  1587.     move.l    8(sp),a1
  1588.     move.l    GfxBase,a6
  1589.     jsr        -$108(a6)
  1590.     move.l    d0,$C(sp)
  1591.     move.l    (sp)+,a6
  1592. end;
  1593.  
  1594. procedure WaitTOF; xassembler;
  1595. asm
  1596.     move.l    a6,-(sp)
  1597.     move.l    GfxBase,a6
  1598.     jsr        -$10E(a6)
  1599.     move.l    (sp)+,a6
  1600. end;
  1601.  
  1602. procedure QBlit; xassembler;
  1603. asm
  1604.     move.l    a6,-(sp)
  1605.     move.l    8(sp),a1
  1606.     move.l    GfxBase,a6
  1607.     jsr        -$114(a6)
  1608.     move.l    (sp)+,a6
  1609. end;
  1610.  
  1611. procedure InitArea; xassembler;
  1612. asm
  1613.     move.l    a6,-(sp)
  1614.     lea        8(sp),a6
  1615.     move.w    (a6)+,d0
  1616.     move.l    (a6)+,a1
  1617.     move.l    (a6)+,a0
  1618.     move.l    GfxBase,a6
  1619.     jsr        -$11A(a6)
  1620.     move.l    (sp)+,a6
  1621. end;
  1622.  
  1623. procedure SetRGB4; xassembler;
  1624. asm
  1625.     movem.l    d3/a6,-(sp)
  1626.     lea        $C(sp),a6
  1627.     move.b    (a6)+,d3
  1628.     addq.l    #1,a6
  1629.     move.b    (a6)+,d2
  1630.     addq.l    #1,a6
  1631.     move.b    (a6)+,d1
  1632.     addq.l    #1,a6
  1633.     move.w    (a6)+,d0
  1634.     move.l    (a6)+,a0
  1635.     move.l    GfxBase,a6
  1636.     jsr        -$120(a6)
  1637.     movem.l    (sp)+,d3/a6
  1638. end;
  1639.  
  1640. procedure QBSBlit; xassembler;
  1641. asm
  1642.     move.l    a6,-(sp)
  1643.     move.l    8(sp),a1
  1644.     move.l    GfxBase,a6
  1645.     jsr        -$126(a6)
  1646.     move.l    (sp)+,a6
  1647. end;
  1648.  
  1649. procedure BltClear; xassembler;
  1650. asm
  1651.     move.l    a6,-(sp)
  1652.     lea        8(sp),a6
  1653.     move.l    (a6)+,d1
  1654.     move.l    (a6)+,d0
  1655.     move.l    (a6)+,a1
  1656.     move.l    GfxBase,a6
  1657.     jsr        -$12C(a6)
  1658.     move.l    (sp)+,a6
  1659. end;
  1660.  
  1661. procedure RectFill; xassembler;
  1662. asm
  1663.     movem.l    d3/a6,-(sp)
  1664.     lea        $C(sp),a6
  1665.     move.w    (a6)+,d3
  1666.     move.w    (a6)+,d2
  1667.     move.w    (a6)+,d1
  1668.     move.w    (a6)+,d0
  1669.     move.l    (a6)+,a1
  1670.     move.l    GfxBase,a6
  1671.     jsr        -$132(a6)
  1672.     movem.l    (sp)+,d3/a6
  1673. end;
  1674.  
  1675. procedure BltPattern; xassembler;
  1676. asm
  1677.     movem.l    d3-d4/a6,-(sp)
  1678.     lea        $10(sp),a6
  1679.     move.w    (a6)+,d4
  1680.     move.w    (a6)+,d3
  1681.     move.w    (a6)+,d2
  1682.     move.w    (a6)+,d1
  1683.     move.w    (a6)+,d0
  1684.     move.l    (a6)+,a0
  1685.     move.l    (a6)+,a1
  1686.     move.l    GfxBase,a6
  1687.     jsr        -$138(a6)
  1688.     movem.l    (sp)+,d3-d4/a6
  1689. end;
  1690.  
  1691. function ReadPixel; xassembler;
  1692. asm
  1693.     move.l    a6,-(sp)
  1694.     lea        8(sp),a6
  1695.     move.w    (a6)+,d1
  1696.     move.w    (a6)+,d0
  1697.     move.l    (a6)+,a1
  1698.     move.l    GfxBase,a6
  1699.     jsr        -$13E(a6)
  1700.     move.l    d0,$10(sp)
  1701.     move.l    (sp)+,a6
  1702. end;
  1703.  
  1704. function WritePixel; xassembler;
  1705. asm
  1706.     move.l    a6,-(sp)
  1707.     lea        8(sp),a6
  1708.     move.w    (a6)+,d1
  1709.     move.w    (a6)+,d0
  1710.     move.l    (a6)+,a1
  1711.     move.l    GfxBase,a6
  1712.     jsr        -$144(a6)
  1713.     move.l    d0,$10(sp)
  1714.     move.l    (sp)+,a6
  1715. end;
  1716.  
  1717. function Flood; xassembler;
  1718. asm
  1719.     move.l    a6,-(sp)
  1720.     lea        8(sp),a6
  1721.     move.w    (a6)+,d1
  1722.     move.w    (a6)+,d0
  1723.     move.l    (a6)+,d2
  1724.     move.l    (a6)+,a1
  1725.     move.l    GfxBase,a6
  1726.     jsr        -$14A(a6)
  1727.     tst.l    d0
  1728.     sne        d0
  1729.     neg.b    d0
  1730.     move.b    d0,$14(sp)
  1731.     move.l    (sp)+,a6
  1732. end;
  1733.  
  1734. procedure PolyDraw; xassembler;
  1735. asm
  1736.     move.l    a6,-(sp)
  1737.     lea        8(sp),a6
  1738.     move.l    (a6)+,a0
  1739.     move.w    (a6)+,d0
  1740.     move.l    (a6)+,a1
  1741.     move.l    GfxBase,a6
  1742.     jsr        -$150(a6)
  1743.     move.l    (sp)+,a6
  1744. end;
  1745.  
  1746. procedure SetAPen; xassembler;
  1747. asm
  1748.     move.l    a6,-(sp)
  1749.     move.b    8(sp),d0
  1750.     move.l    $A(sp),a1
  1751.     move.l    GfxBase,a6
  1752.     jsr        -$156(a6)
  1753.     move.l    (sp)+,a6
  1754. end;
  1755.  
  1756. procedure SetBPen; xassembler;
  1757. asm
  1758.     move.l    a6,-(sp)
  1759.     move.b    8(sp),d0
  1760.     move.l    $A(sp),a1
  1761.     move.l    GfxBase,a6
  1762.     jsr        -$15C(a6)
  1763.     move.l    (sp)+,a6
  1764. end;
  1765.  
  1766. procedure SetDrMd; xassembler;
  1767. asm
  1768.     move.l    a6,-(sp)
  1769.     move.b    8(sp),d0
  1770.     move.l    $A(sp),a1
  1771.     move.l    GfxBase,a6
  1772.     jsr        -$162(a6)
  1773.     move.l    (sp)+,a6
  1774. end;
  1775.  
  1776. procedure InitView; xassembler;
  1777. asm
  1778.     move.l    a6,-(sp)
  1779.     move.l    8(sp),a1
  1780.     move.l    GfxBase,a6
  1781.     jsr        -$168(a6)
  1782.     move.l    (sp)+,a6
  1783. end;
  1784.  
  1785. procedure CBump; xassembler;
  1786. asm
  1787.     move.l    a6,-(sp)
  1788.     move.l    8(sp),a1
  1789.     move.l    GfxBase,a6
  1790.     jsr        -$16E(a6)
  1791.     move.l    (sp)+,a6
  1792. end;
  1793.  
  1794. procedure CMove_; xassembler;
  1795. asm
  1796.     move.l    a6,-(sp)
  1797.     lea        8(sp),a6
  1798.     move.w    (a6)+,d1
  1799.     move.l    (a6)+,d0
  1800.     move.l    (a6)+,a1
  1801.     move.l    GfxBase,a6
  1802.     jsr        -$174(a6)
  1803.     move.l    (sp)+,a6
  1804. end;
  1805.  
  1806. procedure CWait_; xassembler;
  1807. asm
  1808.     move.l    a6,-(sp)
  1809.     lea        8(sp),a6
  1810.     move.w    (a6)+,d1
  1811.     move.w    (a6)+,d0
  1812.     move.l    (a6)+,a1
  1813.     move.l    GfxBase,a6
  1814.     jsr        -$17A(a6)
  1815.     move.l    (sp)+,a6
  1816. end;
  1817.  
  1818. function VBeamPos; xassembler;
  1819. asm
  1820.     move.l    a6,-(sp)
  1821.     move.l    GfxBase,a6
  1822.     jsr        -$180(a6)
  1823.     move.l    d0,8(sp)
  1824.     move.l    (sp)+,a6
  1825. end;
  1826.  
  1827. procedure InitBitMap; xassembler;
  1828. asm
  1829.     move.l    a6,-(sp)
  1830.     lea        8(sp),a6
  1831.     move.w    (a6)+,d2
  1832.     move.w    (a6)+,d1
  1833.     move.b    (a6)+,d0
  1834.     addq.l    #1,a6
  1835.     move.l    (a6)+,a0
  1836.     move.l    GfxBase,a6
  1837.     jsr        -$186(a6)
  1838.     move.l    (sp)+,a6
  1839. end;
  1840.  
  1841. procedure ScrollRaster; xassembler;
  1842. asm
  1843.     movem.l    d3-d5/a6,-(sp)
  1844.     lea        $14(sp),a6
  1845.     move.w    (a6)+,d5
  1846.     move.w    (a6)+,d4
  1847.     move.w    (a6)+,d3
  1848.     move.w    (a6)+,d2
  1849.     move.w    (a6)+,d1
  1850.     move.w    (a6)+,d0
  1851.     move.l    (a6)+,a1
  1852.     move.l    GfxBase,a6
  1853.     jsr        -$18C(a6)
  1854.     movem.l    (sp)+,d3-d5/a6
  1855. end;
  1856.  
  1857. procedure WaitBOVP; xassembler;
  1858. asm
  1859.     move.l    a6,-(sp)
  1860.     move.l    8(sp),a0
  1861.     move.l    GfxBase,a6
  1862.     jsr        -$192(a6)
  1863.     move.l    (sp)+,a6
  1864. end;
  1865.  
  1866. function GetSprite; xassembler;
  1867. asm
  1868.     move.l    a6,-(sp)
  1869.     lea        8(sp),a6
  1870.     move.w    (a6)+,d0
  1871.     move.l    (a6)+,a0
  1872.     move.l    GfxBase,a6
  1873.     jsr        -$198(a6)
  1874.     move.w    d0,$E(sp)
  1875.     move.l    (sp)+,a6
  1876. end;
  1877.  
  1878. procedure FreeSprite; xassembler;
  1879. asm
  1880.     move.l    a6,-(sp)
  1881.     move.w    8(sp),d0
  1882.     move.l    GfxBase,a6
  1883.     jsr        -$19E(a6)
  1884.     move.l    (sp)+,a6
  1885. end;
  1886.  
  1887. procedure ChangeSprite; xassembler;
  1888. asm
  1889.     movem.l    a2/a6,-(sp)
  1890.     lea        $C(sp),a6
  1891.     move.l    (a6)+,a2
  1892.     move.l    (a6)+,a1
  1893.     move.l    (a6)+,a0
  1894.     move.l    GfxBase,a6
  1895.     jsr        -$1A4(a6)
  1896.     movem.l    (sp)+,a2/a6
  1897. end;
  1898.  
  1899. procedure MoveSprite; xassembler;
  1900. asm
  1901.     move.l    a6,-(sp)
  1902.     lea        8(sp),a6
  1903.     move.w    (a6)+,d1
  1904.     move.w    (a6)+,d0
  1905.     move.l    (a6)+,a1
  1906.     move.l    (a6)+,a0
  1907.     move.l    GfxBase,a6
  1908.     jsr        -$1AA(a6)
  1909.     move.l    (sp)+,a6
  1910. end;
  1911.  
  1912. procedure LockLayerRom; xassembler;
  1913. asm
  1914.     movem.l    a5-a6,-(sp)
  1915.     move.l    $C(sp),a5
  1916.     move.l    GfxBase,a6
  1917.     jsr        -$1B0(a6)
  1918.     movem.l    (sp)+,a5-a6
  1919. end;
  1920.  
  1921. procedure UnlockLayerRom; xassembler;
  1922. asm
  1923.     movem.l    a5-a6,-(sp)
  1924.     move.l    $C(sp),a5
  1925.     move.l    GfxBase,a6
  1926.     jsr        -$1B6(a6)
  1927.     movem.l    (sp)+,a5-a6
  1928. end;
  1929.  
  1930. procedure SyncSBitMap; xassembler;
  1931. asm
  1932.     move.l    a6,-(sp)
  1933.     move.l    8(sp),a0
  1934.     move.l    GfxBase,a6
  1935.     jsr        -$1BC(a6)
  1936.     move.l    (sp)+,a6
  1937. end;
  1938.  
  1939. procedure CopySBitMap; xassembler;
  1940. asm
  1941.     move.l    a6,-(sp)
  1942.     move.l    8(sp),a0
  1943.     move.l    GfxBase,a6
  1944.     jsr        -$1C2(a6)
  1945.     move.l    (sp)+,a6
  1946. end;
  1947.  
  1948. procedure OwnBlitter; xassembler;
  1949. asm
  1950.     move.l    a6,-(sp)
  1951.     move.l    GfxBase,a6
  1952.     jsr        -$1C8(a6)
  1953.     move.l    (sp)+,a6
  1954. end;
  1955.  
  1956. procedure DisownBlitter; xassembler;
  1957. asm
  1958.     move.l    a6,-(sp)
  1959.     move.l    GfxBase,a6
  1960.     jsr        -$1CE(a6)
  1961.     move.l    (sp)+,a6
  1962. end;
  1963.  
  1964. procedure InitTmpRas; xassembler;
  1965. asm
  1966.     move.l    a6,-(sp)
  1967.     lea        8(sp),a6
  1968.     move.l    (a6)+,d0
  1969.     move.l    (a6)+,a1
  1970.     move.l    (a6)+,a0
  1971.     move.l    GfxBase,a6
  1972.     jsr        -$1D4(a6)
  1973.     move.l    (sp)+,a6
  1974. end;
  1975.  
  1976. procedure AskFont; xassembler;
  1977. asm
  1978.     move.l    a6,-(sp)
  1979.     movem.l    8(sp),a0-a1
  1980.     move.l    GfxBase,a6
  1981.     jsr        -$1DA(a6)
  1982.     move.l    (sp)+,a6
  1983. end;
  1984.  
  1985. procedure AddFont; xassembler;
  1986. asm
  1987.     move.l    a6,-(sp)
  1988.     move.l    8(sp),a1
  1989.     move.l    GfxBase,a6
  1990.     jsr        -$1E0(a6)
  1991.     move.l    (sp)+,a6
  1992. end;
  1993.  
  1994. procedure RemFont; xassembler;
  1995. asm
  1996.     move.l    a6,-(sp)
  1997.     move.l    8(sp),a1
  1998.     move.l    GfxBase,a6
  1999.     jsr        -$1E6(a6)
  2000.     move.l    (sp)+,a6
  2001. end;
  2002.  
  2003. function AllocRaster; xassembler;
  2004. asm
  2005.     move.l    a6,-(sp)
  2006.     lea        8(sp),a6
  2007.     move.w    (a6)+,d1
  2008.     move.w    (a6)+,d0
  2009.     move.l    GfxBase,a6
  2010.     jsr        -$1EC(a6)
  2011.     move.l    d0,$C(sp)
  2012.     move.l    (sp)+,a6
  2013. end;
  2014.  
  2015. procedure FreeRaster; xassembler;
  2016. asm
  2017.     move.l    a6,-(sp)
  2018.     lea        8(sp),a6
  2019.     move.w    (a6)+,d1
  2020.     move.w    (a6)+,d0
  2021.     move.l    (a6)+,a0
  2022.     move.l    GfxBase,a6
  2023.     jsr        -$1F2(a6)
  2024.     move.l    (sp)+,a6
  2025. end;
  2026.  
  2027. procedure AndRectRegion; xassembler;
  2028. asm
  2029.     move.l    a6,-(sp)
  2030.     lea        8(sp),a6
  2031.     move.l    (a6)+,a1
  2032.     move.l    (a6)+,a0
  2033.     move.l    GfxBase,a6
  2034.     jsr        -$1F8(a6)
  2035.     move.l    (sp)+,a6
  2036. end;
  2037.  
  2038. function OrRectRegion; xassembler;
  2039. asm
  2040.     move.l    a6,-(sp)
  2041.     lea        8(sp),a6
  2042.     move.l    (a6)+,a1
  2043.     move.l    (a6)+,a0
  2044.     move.l    GfxBase,a6
  2045.     jsr        -$1FE(a6)
  2046.     tst.l    d0
  2047.     sne        d0
  2048.     neg.b    d0
  2049.     move.b    d0,$10(sp)
  2050.     move.l    (sp)+,a6
  2051. end;
  2052.  
  2053. function NewRegion; xassembler;
  2054. asm
  2055.     move.l    a6,-(sp)
  2056.     move.l    GfxBase,a6
  2057.     jsr        -$204(a6)
  2058.     move.l    d0,8(sp)
  2059.     move.l    (sp)+,a6
  2060. end;
  2061.  
  2062. function ClearRectRegion; xassembler;
  2063. asm
  2064.     move.l    a6,-(sp)
  2065.     lea        8(sp),a6
  2066.     move.l    (a6)+,a1
  2067.     move.l    (a6)+,a0
  2068.     move.l    GfxBase,a6
  2069.     jsr        -$20A(a6)
  2070.     tst.l    d0
  2071.     sne        d0
  2072.     neg.b    d0
  2073.     move.b    d0,$10(sp)
  2074.     move.l    (sp)+,a6
  2075. end;
  2076.  
  2077. procedure ClearRegion; xassembler;
  2078. asm
  2079.     move.l    a6,-(sp)
  2080.     move.l    8(sp),a0
  2081.     move.l    GfxBase,a6
  2082.     jsr        -$210(a6)
  2083.     move.l    (sp)+,a6
  2084. end;
  2085.  
  2086. procedure DisposeRegion; xassembler;
  2087. asm
  2088.     move.l    a6,-(sp)
  2089.     move.l    8(sp),a0
  2090.     move.l    GfxBase,a6
  2091.     jsr        -$216(a6)
  2092.     move.l    (sp)+,a6
  2093. end;
  2094.  
  2095. procedure FreeVPortCopLists; xassembler;
  2096. asm
  2097.     move.l    a6,-(sp)
  2098.     move.l    8(sp),a0
  2099.     move.l    GfxBase,a6
  2100.     jsr        -$21C(a6)
  2101.     move.l    (sp)+,a6
  2102. end;
  2103.  
  2104. procedure FreeCopList; xassembler;
  2105. asm
  2106.     move.l    a6,-(sp)
  2107.     move.l    8(sp),a0
  2108.     move.l    GfxBase,a6
  2109.     jsr        -$222(a6)
  2110.     move.l    (sp)+,a6
  2111. end;
  2112.  
  2113. procedure ClipBlit; xassembler;
  2114. asm
  2115.     movem.l    d3-d6/a6,-(sp)
  2116.     lea        $18(sp),a6
  2117.     move.b    (a6)+,d6
  2118.     addq.l    #1,a6
  2119.     move.w    (a6)+,d5
  2120.     move.w    (a6)+,d4
  2121.     move.w    (a6)+,d3
  2122.     move.w    (a6)+,d2
  2123.     move.l    (a6)+,a1
  2124.     move.w    (a6)+,d1
  2125.     move.w    (a6)+,d0
  2126.     move.l    (a6)+,a0
  2127.     move.l    GfxBase,a6
  2128.     jsr        -$228(a6)
  2129.     movem.l    (sp)+,d3-d6/a6
  2130. end;
  2131.  
  2132. function XorRectRegion; xassembler;
  2133. asm
  2134.     move.l    a6,-(sp)
  2135.     lea        8(sp),a6
  2136.     move.l    (a6)+,a1
  2137.     move.l    (a6)+,a0
  2138.     move.l    GfxBase,a6
  2139.     jsr        -$22E(a6)
  2140.     tst.l    d0
  2141.     sne        d0
  2142.     neg.b    d0
  2143.     move.b    d0,$10(sp)
  2144.     move.l    (sp)+,a6
  2145. end;
  2146.  
  2147. procedure FreeCprList; xassembler;
  2148. asm
  2149.     move.l    a6,-(sp)
  2150.     move.l    8(sp),a0
  2151.     move.l    GfxBase,a6
  2152.     jsr        -$234(a6)
  2153.     move.l    (sp)+,a6
  2154. end;
  2155.  
  2156. function GetColorMap; xassembler;
  2157. asm
  2158.     move.l    a6,-(sp)
  2159.     move.l    8(sp),d0
  2160.     move.l    GfxBase,a6
  2161.     jsr        -$23A(a6)
  2162.     move.l    d0,$C(sp)
  2163.     move.l    (sp)+,a6
  2164. end;
  2165.  
  2166. procedure FreeColorMap; xassembler;
  2167. asm
  2168.     move.l    a6,-(sp)
  2169.     move.l    8(sp),a0
  2170.     move.l    GfxBase,a6
  2171.     jsr        -$240(a6)
  2172.     move.l    (sp)+,a6
  2173. end;
  2174.  
  2175. function GetRGB4; xassembler;
  2176. asm
  2177.     move.l    a6,-(sp)
  2178.     movem.l    8(sp),d0/a0
  2179.     move.l    GfxBase,a6
  2180.     jsr        -$246(a6)
  2181.     move.l    d0,$10(sp)
  2182.     move.l    (sp)+,a6
  2183. end;
  2184.  
  2185. procedure ScrollVPort; xassembler;
  2186. asm
  2187.     move.l    a6,-(sp)
  2188.     move.l    8(sp),a0
  2189.     move.l    GfxBase,a6
  2190.     jsr        -$24C(a6)
  2191.     move.l    (sp)+,a6
  2192. end;
  2193.  
  2194. function UCopperListInit; xassembler;
  2195. asm
  2196.     move.l    a6,-(sp)
  2197.     lea        8(sp),a6
  2198.     move.w    (a6)+,d0
  2199.     move.l    (a6)+,a0
  2200.     move.l    GfxBase,a6
  2201.     jsr        -$252(a6)
  2202.     move.l    d0,$E(sp)
  2203.     move.l    (sp)+,a6
  2204. end;
  2205.  
  2206. procedure FreeGBuffers; xassembler;
  2207. asm
  2208.     move.l    a6,-(sp)
  2209.     moveq    #0,d0
  2210.     lea        8(sp),a6
  2211.     move.b    (a6)+,d0
  2212.     addq.l    #1,a6
  2213.     move.l    (a6)+,a1
  2214.     move.l    (a6)+,a0
  2215.     move.l    GfxBase,a6
  2216.     jsr        -$258(a6)
  2217.     move.l    (sp)+,a6
  2218. end;
  2219.  
  2220. function BltBitMapRastPort; xassembler;
  2221. asm
  2222.     movem.l    d3-d6/a6,-(sp)
  2223.     lea        $18(sp),a6
  2224.     move.b    (a6)+,d6
  2225.     addq.l    #1,a6
  2226.     move.w    (a6)+,d5
  2227.     move.w    (a6)+,d4
  2228.     move.w    (a6)+,d3
  2229.     move.w    (a6)+,d2
  2230.     move.l    (a6)+,a1
  2231.     move.w    (a6)+,d1
  2232.     move.w    (a6)+,d0
  2233.     move.l    (a6)+,a0
  2234.     move.l    GfxBase,a6
  2235.     jsr        -$25E(a6)
  2236.     tst.l    d0
  2237.     sne        d0
  2238.     neg.b    d0
  2239.     move.b    d0,$2E(sp)
  2240.     movem.l    (sp)+,d3-d6/a6
  2241. end;
  2242.  
  2243. function OrRegionRegion; xassembler;
  2244. asm
  2245.     move.l    a6,-(sp)
  2246.     lea        8(sp),a6
  2247.     move.l    (a6)+,a1
  2248.     move.l    (a6)+,a0
  2249.     move.l    GfxBase,a6
  2250.     jsr        -$264(a6)
  2251.     tst.l    d0
  2252.     sne        d0
  2253.     neg.b    d0
  2254.     move.b    d0,$10(sp)
  2255.     move.l    (sp)+,a6
  2256. end;
  2257.  
  2258. function XorRegionRegion; xassembler;
  2259. asm
  2260.     move.l    a6,-(sp)
  2261.     lea        8(sp),a6
  2262.     move.l    (a6)+,a1
  2263.     move.l    (a6)+,a0
  2264.     move.l    GfxBase,a6
  2265.     jsr        -$26A(a6)
  2266.     tst.l    d0
  2267.     sne        d0
  2268.     neg.b    d0
  2269.     move.b    d0,$10(sp)
  2270.     move.l    (sp)+,a6
  2271. end;
  2272.  
  2273. function AndRegionRegion; xassembler;
  2274. asm
  2275.     move.l    a6,-(sp)
  2276.     lea        8(sp),a6
  2277.     move.l    (a6)+,a1
  2278.     move.l    (a6)+,a0
  2279.     move.l    GfxBase,a6
  2280.     jsr        -$270(a6)
  2281.     tst.l    d0
  2282.     sne        d0
  2283.     neg.b    d0
  2284.     move.b    d0,$10(sp)
  2285.     move.l    (sp)+,a6
  2286. end;
  2287.  
  2288. procedure SetRGB4CM; xassembler;
  2289. asm
  2290.     movem.l    d3/a6,-(sp)
  2291.     lea        $C(sp),a6
  2292.     move.b    (a6)+,d3
  2293.     addq.l    #1,a6
  2294.     move.b    (a6)+,d2
  2295.     addq.l    #1,a6
  2296.     move.b    (a6)+,d1
  2297.     addq.l    #1,a6
  2298.     move.w    (a6)+,d0
  2299.     move.l    (a6)+,a0
  2300.     move.l    GfxBase,a6
  2301.     jsr        -$276(a6)
  2302.     movem.l    (sp)+,d3/a6
  2303. end;
  2304.  
  2305. procedure BltMaskBitMapRastPort; xassembler;
  2306. asm
  2307.     movem.l    d3-d6/a2/a6,-(sp)
  2308.     lea        $1C(sp),a6
  2309.     move.l    (a6)+,a2
  2310.     move.b    (a6)+,d6
  2311.     addq.l    #1,a6
  2312.     move.w    (a6)+,d5
  2313.     move.w    (a6)+,d4
  2314.     move.w    (a6)+,d3
  2315.     move.w    (a6)+,d2
  2316.     move.l    (a6)+,a1
  2317.     move.w    (a6)+,d1
  2318.     move.w    (a6)+,d0
  2319.     move.l    (a6)+,a0
  2320.     move.l    GfxBase,a6
  2321.     jsr        -$27C(a6)
  2322.     movem.l    (sp)+,d3-d6/a2/a6
  2323. end;
  2324.  
  2325. function AttemptLockLayerRom; xassembler;
  2326. asm
  2327.     movem.l    a5-a6,-(sp)
  2328.     move.l    $C(sp),a5
  2329.     move.l    GfxBase,a6
  2330.     jsr        -$28E(a6)
  2331.     tst.l    d0
  2332.     sne        d0
  2333.     neg.b    d0
  2334.     move.b    d0,$10(sp)
  2335.     movem.l    (sp)+,a5-a6
  2336. end;
  2337.  
  2338. end.
  2339.