DEFINITION MODULE GraphicsL{"graphics.library",33};
(* 13-Apr-1992/cn *)

FROM SYSTEM IMPORT ADDRESS,BITSET,BYTE,LONGSET,WORD;

FROM Hardware IMPORT
 BltnodePtr;

FROM UtilityD IMPORT
 TagItemPtr;

IMPORT
 d:GraphicsD,R;

VAR
 graphicsVersion:INTEGER;
 graphicsBase:d.GfxBasePtr;

CONST
 graphicsMinVersion=33;
 graphicsName="graphics.library";

PROCEDURE AddAnimOb(
           anOb{R.A0}:d.AnimObPtr;
           VAR anKey{R.A1}:d.AnimObPtr;
           rp{R.A2}:d.RastPortPtr); CODE -156;

PROCEDURE AddBob(
           Bob{R.A0}:d.BobPtr;
           rp{R.A1}:d.RastPortPtr); CODE -96;

PROCEDURE AddFont(textFont{R.A1}:d.TextFontPtr); CODE -480;

PROCEDURE AddVSprite(
           vs{R.A0}:d.VSpritePtr;
           rp{R.A1}:d.RastPortPtr); CODE -102;

PROCEDURE AllocRaster(
           width{R.D0}:CARDINAL;
           height{R.D1}:CARDINAL):ADDRESS; CODE -492;

PROCEDURE AndRectRegion(
           region{R.A0}:d.RegionPtr;
           rectangle{R.A1}:d.RectanglePtr); CODE -504;

PROCEDURE AndRegionRegion(
           region1{R.A0}:d.RegionPtr;
           region2{R.A1}:d.RegionPtr):BOOLEAN; CODE -624;

PROCEDURE Animate(
           VAR anKey{R.A0}:d.AnimObPtr;
           rp{R.A1}:d.RastPortPtr); CODE -162;

PROCEDURE AreaDraw(
           rp{R.A1}:d.RastPortPtr;
           x{R.D0}:INTEGER;
           y{R.D1}:INTEGER):BOOLEAN; CODE -258;

PROCEDURE AreaEllipse(
           rp{R.A1}:d.RastPortPtr;
           cX{R.D0}:INTEGER;
           cY{R.D1}:INTEGER;
           a{R.D2}:INTEGER;
           b{R.D3}:INTEGER):BOOLEAN; CODE -186;

PROCEDURE AreaEnd(rp{R.A1}:d.RastPortPtr):BOOLEAN; CODE -264;

PROCEDURE AreaMove(
           rp{R.A1}:d.RastPortPtr;
           x{R.D0}:INTEGER;
           y{R.D1}:INTEGER):BOOLEAN; CODE -252;

PROCEDURE AskFont(
           rp{R.A1}:d.RastPortPtr;
           textAttr{R.A0}:d.TextAttrPtr); CODE -474;

PROCEDURE AskSoftStyle(
           rp{R.A1}:d.RastPortPtr):d.FontStyleSet; CODE -84;

PROCEDURE AttemptLockLayerRom(
           layer{R.A5}:d.LayerPtr):BOOLEAN; CODE -654;

PROCEDURE(*36*) BitMapScale(
                 VAR bitScaleArgs{R.A0}:d.BitScaleArgs); CODE -678;

PROCEDURE BltBitMap(
           srcBitMap{R.A0}:d.BitMapPtr;
           srcX{R.D0}:INTEGER;
           srcY{R.D1}:INTEGER;
           dstBitMap{R.A1}:d.BitMapPtr;
           dstX{R.D2}:INTEGER;
           dstY{R.D3}:INTEGER;
           sizeX{R.D4}:INTEGER;
           sizeY{R.D5}:INTEGER;
           minterm{R.D6}:SHORTCARD;
           mask{R.D7}:SHORTCARD;
           tempA{R.A2}:ADDRESS):LONGCARD; CODE -30;

PROCEDURE BltBitMapRastPort(
           srcbm{R.A0}:d.BitMapPtr;
           srcX{R.D0}:INTEGER;
           srcY{R.D1}:INTEGER;
           destRp{R.A1}:d.RastPortPtr;
           destX{R.D2}:INTEGER;
           destY{R.D3}:INTEGER;
           sizeX{R.D4}:INTEGER;
           sizeY{R.D5}:INTEGER;
           minterm{R.D6}:SHORTCARD); CODE -606;

PROCEDURE BltClear(
           memBlock{R.A1}:ADDRESS;
           bytecount{R.D0}:LONGCARD;
           flags{R.D1}:LONGSET); CODE -300;

PROCEDURE BltMaskBitMapRastPort(
           srcbm{R.A0}:d.BitMapPtr;
           srcX{R.D0}:INTEGER;
           srcY{R.D1}:INTEGER;
           destRp{R.A1}:d.RastPortPtr;
           destX{R.D2}:INTEGER;
           destY{R.D3}:INTEGER;
           sizeX{R.D4}:INTEGER;
           sizeY{R.D5}:INTEGER;
           minterm{R.D6}:BYTE;
           bltmask{R.A2}:ADDRESS); CODE -636;

PROCEDURE BltPattern(
           rp{R.A1}:d.RastPortPtr;
           mask{R.A0}:ADDRESS;
           xl{R.D0}:INTEGER;
           yl{R.D1}:INTEGER;
           maxX{R.D2}:INTEGER;
           maxY{R.D3}:INTEGER;
           bytecnt{R.D4}:INTEGER); CODE -312;

PROCEDURE BltTemplate(
           srcTemplate{R.A0}:ADDRESS;
           srcX{R.D0}:INTEGER;
           srcMod{R.D1}:INTEGER;
           rp{R.A1}:d.RastPortPtr;
           dstX{R.D2}:INTEGER;
           dstY{R.D3}:INTEGER;
           sizeX{R.D4}:INTEGER;
           sizeY{R.D5}:INTEGER); CODE -36;

PROCEDURE CBump(c{R.A1}:d.UCopListPtr); CODE -366;

PROCEDURE ChangeSprite(
           vp{R.A0}:d.ViewPortPtr;
           s{R.A1}:d.SimpleSpritePtr;
           newdata{R.A2}:ADDRESS); CODE -420;

PROCEDURE CINIT(
           copperList{R.A0}:d.UCopListPtr;
           num{R.D0}:LONGINT):d.CopListPtr; CODE -594;
(*
 CINIT ist in C ein Makro dass die Funktion UCopperListInit aufruft.
 Hier ist CINIT so definiert, dass es identisch zu UCopperListInit
 ist.
*)

PROCEDURE ClearEOL(rp{R.A1}:d.RastPortPtr); CODE -42;

PROCEDURE ClearRectRegion(
           region{R.A0}:d.RegionPtr;
           rectangle{R.A1}:d.RectanglePtr):BOOLEAN; CODE -522;

PROCEDURE ClearRegion(region{R.A0}:d.RegionPtr); CODE -528;

PROCEDURE ClearScreen(rp{R.A1}:d.RastPortPtr); CODE -48;

PROCEDURE ClipBlit(
           src{R.A0}:d.RastPortPtr;
           srcX{R.D0}:INTEGER;
           srcY{R.D1}:INTEGER;
           dest{R.A1}:d.RastPortPtr;
           destX{R.D2}:INTEGER;
           destY{R.D3}:INTEGER;
           xSize{R.D4}:INTEGER;
           ySize{R.D5}:INTEGER;
           minterm{R.D6}:SHORTCARD); CODE -552;

PROCEDURE CloseFont(font{R.A1}:d.TextFontPtr); CODE -78;

PROCEDURE(*36*) CloseMonitor(
                 monitorSpec{R.A0}:d.MonitorSpecPtr):BOOLEAN; CODE -720;

PROCEDURE CMove(
           c{R.A1}:d.UCopListPtr;
           a{R.D0}:ADDRESS;
           v{R.D1}:INTEGER); CODE -372;

PROCEDURE CopySBitMap(layer{R.A0}:d.LayerPtr); CODE -450;

PROCEDURE CWait(
           c{R.A1}:d.UCopListPtr;
           v{R.D0}:INTEGER;
           h{R.D1}:INTEGER); CODE -378;

PROCEDURE DisownBlitter(); CODE -462;

PROCEDURE DisposeRegion(region{R.A0}:d.RegionPtr); CODE -534;

PROCEDURE DoCollision(rp{R.A1}:d.RastPortPtr); CODE -108;

PROCEDURE Draw(
           rp{R.A1}:d.RastPortPtr;
           x{R.D0}:INTEGER;
           y{R.D1}:INTEGER); CODE -246;

PROCEDURE DrawEllipse(
           rp{R.A1}:d.RastPortPtr;
           cX{R.D0}:INTEGER;
           cY{R.D1}:INTEGER;
           a{R.D2}:INTEGER;
           b{R.D3}:INTEGER); CODE -180;

PROCEDURE DrawGList(
           rp{R.A1}:d.RastPortPtr;
           vp{R.A0}:d.ViewPortPtr); CODE -114;

PROCEDURE(*36*) EraseRect(
                 rp{R.A1}:d.RastPortPtr;
                 xMin{R.D0}:INTEGER;
                 yMin{R.D1}:INTEGER;
                 xMax{R.D2}:INTEGER;
                 yMax{R.D3}:INTEGER); CODE -810;

PROCEDURE(*36*) ExtendFont(
                 font{R.A0}:d.TextFontPtr;
                 fontTags{R.A1}:TagItemPtr):LONGCARD; CODE -816;

PROCEDURE(*36*) FindDisplayInfo(
                 dispID{R.D0}:LONGCARD):d.DisplayInfoHandle; CODE -726;

PROCEDURE Flood(
           rp{R.A1}:d.RastPortPtr;
           mode{R.D2}:LONGCARD;
           x{R.D0}:INTEGER;
           y{R.D1}:INTEGER):BOOLEAN; CODE -330;

PROCEDURE(*36*) FontExtent(
                 font{R.A0}:d.TextFontPtr;
                 VAR fontExtent{R.A1}:d.TextExtent); CODE -762;

PROCEDURE FreeColorMap(colorMap{R.A0}:d.ColorMapPtr); CODE -576;

PROCEDURE FreeCopList(coplist{R.A0}:d.CopListPtr); CODE -546;

PROCEDURE FreeCprList(cprlist{R.A0}:d.CprlistPtr); CODE -564;

PROCEDURE FreeGBuffers(
           anOb{R.A0}:d.AnimObPtr;
           rp{R.A1}:d.RastPortPtr;
           db{R.D0}:BOOLEAN); CODE -600;

PROCEDURE FreeRaster(
           p{R.A0}:ADDRESS;
           width{R.D0}:CARDINAL;
           height{R.D1}:CARDINAL); CODE -498;

PROCEDURE FreeSprite(pick{R.D0}:INTEGER); CODE -414;

PROCEDURE FreeVPortCopLists(vp{R.A0}:d.ViewPortPtr); CODE -540;

PROCEDURE GetColorMap(
           entries{R.D0}:LONGINT):d.ColorMapPtr; CODE -570;

PROCEDURE(*36*) GetDisplayInfoData(
                 handle{R.A0}:d.DisplayInfoHandle;
                 buf{R.A1}:ADDRESS;
                 size{R.D0}:LONGCARD;
                 tagID{R.D1}:LONGCARD;
                 displayID{R.D2}:LONGCARD):LONGCARD; CODE -756;

PROCEDURE GetGBuffers(
           anOb{R.A0}:d.AnimObPtr;
           rp{R.A1}:d.RastPortPtr;
           db{R.D0}:BOOLEAN):BOOLEAN; CODE -168;

PROCEDURE GetRGB4(
           colorMap{R.A0}:d.ColorMapPtr;
           entry{R.D0}:LONGINT):LONGINT; CODE -582;

PROCEDURE GetSprite(
           sprite{R.A0}:d.SimpleSpritePtr;
           pick{R.D0}:INTEGER):INTEGER; CODE -408;

PROCEDURE(*36*) GetVPModeID(
                 vp{R.A0}:d.ViewPortPtr):LONGCARD; CODE -792;

PROCEDURE(*36*) GfxAssociate(
                 associateNode{R.A0}:ADDRESS;
                 gfxNodePtr{R.A1}:ADDRESS); CODE -672;

PROCEDURE(*36*) GfxFree(gfxNodePtr{R.A0}:ADDRESS); CODE -666;

PROCEDURE(*36*) GfxLookUp(
                 associateNode{R.A0}:ADDRESS):ADDRESS; CODE -702;

PROCEDURE(*36*) GfxNew(gfxNodeType{R.D0}:LONGCARD):ADDRESS; CODE -660;

PROCEDURE InitArea(
           VAR areainfo{R.A0}:d.AreaInfo;
           buffer{R.A1}:ADDRESS;
           maxvectors{R.D0}:INTEGER); CODE -282;

PROCEDURE InitBitMap(
           VAR bm{R.A0}:d.BitMap;
           depth{R.D0}:INTEGER;
           width{R.D1}:LONGCARD;
           height{R.D2}:LONGCARD); CODE -390;

PROCEDURE InitGels(
           head{R.A0}:d.VSpritePtr;
           tail{R.A1}:d.VSpritePtr;
           gInfo{R.A2}:d.GelsInfoPtr); CODE -120;

PROCEDURE InitGMasks(anOb{R.A0}:d.AnimObPtr); CODE -174;

PROCEDURE InitMasks(vs{R.A0}:d.VSpritePtr); CODE -126;

PROCEDURE InitRastPort(VAR rp{R.A1}:d.RastPort); CODE -198;

PROCEDURE InitTmpRas(
           VAR tmpras{R.A0}:d.TmpRas;
           buffer{R.A1}:ADDRESS;
           size{R.D0}:LONGINT); CODE -468;

PROCEDURE InitView(VAR view{R.A1}:d.View); CODE -360;

PROCEDURE InitVPort(VAR vp{R.A0}:d.ViewPort); CODE -204;

PROCEDURE LoadRGB4(
           vp{R.A0}:d.ViewPortPtr;
           colors{R.A1}:ADDRESS;
           count{R.D0}:INTEGER); CODE -192;

PROCEDURE LoadView(view{R.A1}:d.ViewPtr); CODE -222;

PROCEDURE LockLayerRom(layer{R.A5}:d.LayerPtr); CODE -432;

PROCEDURE MakeVPort(
           view{R.A0}:d.ViewPtr;
           viewport{R.A1}:d.ViewPortPtr); CODE -216;

PROCEDURE(*36*) ModeNotAvailable(
                 modeID{R.D0}:LONGCARD):LONGCARD; CODE -798;

PROCEDURE Move(
           rp{R.A1}:d.RastPortPtr;
           x{R.D0}:INTEGER;
           y{R.D1}:INTEGER); CODE -240;

PROCEDURE MoveSprite(
           vp{R.A0}:d.ViewPortPtr;
           sprite{R.A1}:d.SimpleSpritePtr;
           x{R.D0}:INTEGER;
           y{R.D1}:INTEGER); CODE -426;

PROCEDURE MrgCop(view{R.A1}:d.ViewPtr); CODE -210;

PROCEDURE NewRegion():d.RegionPtr; CODE -516;

PROCEDURE(*36*) NextDisplayInfo(
                 displayID{R.D0}:LONGCARD):LONGCARD; CODE -732;

PROCEDURE OpenFont(
           textAttr{R.A0}:d.TextAttrPtr):d.TextFontPtr; CODE -72;

PROCEDURE(*36*) OpenMonitor(
                 monitorName{R.A1}:ADDRESS;
                 displayID{R.D0}:LONGCARD):d.MonitorSpecPtr; CODE -714;

PROCEDURE OrRectRegion(
           region{R.A0}:d.RegionPtr;
           rectangle{R.A1}:d.RectanglePtr):BOOLEAN; CODE -510;

PROCEDURE OrRegionRegion(
           region1{R.A0}:d.RegionPtr;
           region2{R.A1}:d.RegionPtr):BOOLEAN; CODE -612;

PROCEDURE OwnBlitter(); CODE -456;

PROCEDURE PolyDraw(
           rp{R.A1}:d.RastPortPtr;
           count{R.D0}:INTEGER;
           array{R.A0}:ADDRESS); CODE -336;

PROCEDURE QBlit(bp{R.A1}:BltnodePtr); CODE -276;

PROCEDURE QBSBlit(bsp{R.A1}:BltnodePtr); CODE -294;

PROCEDURE ReadPixel(
           rp{R.A1}:d.RastPortPtr;
           x{R.D0}:INTEGER;
           y{R.D1}:INTEGER):LONGINT; CODE -318;

PROCEDURE(*36*) ReadPixelArray8(
                 rp{R.A0}:d.RastPortPtr;
                 xstart{R.D0}:CARDINAL;
                 ystart{R.D1}:CARDINAL;
                 xstop{R.D2}:CARDINAL;
                 ystop{R.D3}:CARDINAL;
                 array{R.A2}:ADDRESS;
                 temprp{R.A1}:d.RastPortPtr):LONGINT; CODE -780;

PROCEDURE(*36*) ReadPixelLine8(
                 rp{R.A0}:d.RastPortPtr;
                 xstart{R.D0}:CARDINAL;
                 ystart{R.D1}:CARDINAL;
                 width{R.D2}:CARDINAL;
                 array{R.A2}:ADDRESS;
                 tempRP{R.A1}:d.RastPortPtr):LONGINT; CODE -768;

PROCEDURE RectFill(
           rp{R.A1}:d.RastPortPtr;
           xMin{R.D0}:INTEGER;
           yMin{R.D1}:INTEGER;
           xMax{R.D2}:INTEGER;
           yMax{R.D3}:INTEGER); CODE -306;

PROCEDURE RemFont(textFont{R.A1}:d.TextFontPtr); CODE -486;

PROCEDURE RemIBob(
           bob{R.A0}:d.BobPtr;
           rp{R.A1}:d.RastPortPtr;
           vp{R.A2}:d.ViewPortPtr); CODE -132;

PROCEDURE RemVSprite(vs{R.A0}:d.VSpritePtr); CODE -138;

PROCEDURE(*36*) ScalerDiv(
                 factor{R.D0}:CARDINAL;
                 numerator{R.D1}:CARDINAL;
                 denominator{R.D2}:CARDINAL):CARDINAL; CODE -684;

PROCEDURE ScrollRaster(
           rp{R.A1}:d.RastPortPtr;
           dx{R.D0}:INTEGER;
           dy{R.D1}:INTEGER;
           xMin{R.D2}:INTEGER;
           yMin{R.D3}:INTEGER;
           xMax{R.D4}:INTEGER;
           yMax{R.D5}:INTEGER); CODE -396;

PROCEDURE ScrollVPort(vp{R.A0}:d.ViewPortPtr); CODE -588;

PROCEDURE SetAPen(
           rp{R.A1}:d.RastPortPtr;
           pen{R.D0}:CARDINAL); CODE -342;

PROCEDURE SetBPen(
           rp{R.A1}:d.RastPortPtr;
           pen{R.D0}:CARDINAL); CODE -348;

PROCEDURE SetCollision(
           num{R.D0}:LONGCARD;
           routine{R.A0}:ADDRESS;
           gInfo{R.A1}:d.GelsInfoPtr); CODE -144;

PROCEDURE SetDrMd(
           rp{R.A1}:d.RastPortPtr;
           mode{R.D0}:d.DrawModeSet); CODE -354;

PROCEDURE SetFont(
           rp{R.A1}:d.RastPortPtr;
           font{R.A0}:d.TextFontPtr); CODE -66;

PROCEDURE SetRast(
           rp{R.A1}:d.RastPortPtr;
           pen{R.D0}:CARDINAL); CODE -234;

PROCEDURE SetRGB4(
           vp{R.A0}:d.ViewPortPtr;
           n{R.D0}:CARDINAL;
           r{R.D1}:CARDINAL;
           g{R.D2}:CARDINAL;
           b{R.D3}:CARDINAL); CODE -288;

PROCEDURE SetRGB4CM(
           cm{R.A0}:d.ColorMapPtr;
           n{R.D0}:CARDINAL;
           r{R.D1}:CARDINAL;
           g{R.D2}:CARDINAL;
           b{R.D3}:CARDINAL); CODE -630;

PROCEDURE SetSoftStyle(
           rp{R.A1}:d.RastPortPtr;
           style{R.D0}:d.FontStyleSet;
           enable{R.D1}:d.FontStyleSet):d.FontStyleSet; CODE -90;

PROCEDURE SortGList(rp{R.A1}:d.RastPortPtr); CODE -150;

PROCEDURE(*36*) StripFont(font{R.A0}:d.TextFontPtr); CODE -822;

PROCEDURE SyncSBitMap(layer{R.A0}:d.LayerPtr); CODE -444;

PROCEDURE Text(
           rp{R.A1}:d.RastPortPtr;
           string{R.A0}:ADDRESS;
           count{R.D0}:LONGINT); CODE -60;

PROCEDURE(*36*) TextExtent(
                 rp{R.A1}:d.RastPortPtr;
                 string{R.A0}:ADDRESS;
                 count{R.D0}:INTEGER;
                 VAR textExtent{R.A2}:d.TextExtent); CODE -690;

PROCEDURE(*36*) TextFit(
                 rp{R.A1}:d.RastPortPtr;
                 string{R.A0}:ADDRESS;
                 strLen{R.D0}:CARDINAL;
                 VAR textExtent{R.A2}:d.TextExtent;
                 constrainingExtent{R.A3}:d.TextExtentPtr;
                 strDirection{R.D1}:INTEGER;
                 constrainBitWidth{R.D2}:CARDINAL;
                 constrainBitHeight{R.D3}:CARDINAL):LONGCARD; CODE -696;

PROCEDURE TextLength(
           rp{R.A1}:d.RastPortPtr;
           string{R.A0}:ADDRESS;
           count{R.D0}:INTEGER):INTEGER; CODE -54;

PROCEDURE UCopperListInit(
           copperList{R.A0}:d.UCopListPtr;
           num{R.D0}:LONGINT):d.CopListPtr; CODE -594;

PROCEDURE UnlockLayerRom(layer{R.A5}:d.LayerPtr); CODE -438;

PROCEDURE VBeamPos():LONGINT; CODE -384;

PROCEDURE(*36*) VideoControl(
                 VAR colorMap{R.A0}:d.ColorMap;
                 tagarray{R.A1}:TagItemPtr):BOOLEAN; CODE -708;

PROCEDURE WaitBlit(); CODE -228;

PROCEDURE WaitBOVP(vp{R.A0}:d.ViewPortPtr); CODE -402;

PROCEDURE WaitTOF(); CODE -270;

PROCEDURE(*36*) WeighTAMatch(
                 reqTextAttr{R.A0}:d.TTextAttrPtr;
                 targetTextAttr{R.A1}:d.TTextAttrPtr;
                 targetTags{R.A2}:TagItemPtr):CARDINAL; CODE -804;

PROCEDURE WritePixel(
           rp{R.A1}:d.RastPortPtr;
           x{R.D0}:INTEGER;
           y{R.D1}:INTEGER):BOOLEAN; CODE -324;

PROCEDURE(*36*) WritePixelArray8(
                 rp{R.A0}:d.RastPortPtr;
                 xstart{R.D0}:CARDINAL;
                 ystart{R.D1}:CARDINAL;
                 xstop{R.D2}:CARDINAL;
                 ystop{R.D3}:CARDINAL;
                 array{R.A2}:ADDRESS;
                 temprp{R.A1}:d.RastPortPtr):LONGINT; CODE -786;

PROCEDURE(*36*) WritePixelLine8(
                 rp{R.A0}:d.RastPortPtr;
                 xstart{R.D0}:CARDINAL;
                 ystart{R.D1}:CARDINAL;
                 width{R.D2}:CARDINAL;
                 array{R.A2}:ADDRESS;
                 tempRP{R.A1}:d.RastPortPtr):LONGINT; CODE -774;

PROCEDURE XorRectRegion(
           region{R.A0}:d.RegionPtr;
           rectangle{R.A1}:d.RectanglePtr):BOOLEAN; CODE -558;

PROCEDURE XorRegionRegion(
           region1{R.A0}:d.RegionPtr;
           region2{R.A1}:d.RegionPtr):BOOLEAN; CODE -618;

END GraphicsL.lib33
