home *** CD-ROM | disk | FTP | other *** search
- unit Graphics;
-
- INTERFACE
- uses Exec, Hardware;
-
-
- type
- PLANEPTR = pointer;
- pPoint = ^tPoint;
- tPoint = record
- x: integer;
- y: integer;
- end;
-
- Point = tPoint;
- pLayer = ^tLayer;
- pClipRect = ^tClipRect;
- pRastPort = ^tRastPort;
- pRectangle = ^tRectangle;
- tRectangle = record
- MinX: integer;
- MinY: integer;
- MaxX: integer;
- MaxY: integer;
- end;
-
- pBitMap = ^tBitMap;
- pLayer_Info = ^tLayer_Info;
- pRegion = ^tRegion;
- tLayer = record
- front: pLayer;
- back: pLayer;
- ClipRect: pClipRect;
- rp: pRastPort;
- bounds: tRectangle;
- reserved: array [0..3] of byte;
- priority: word;
- Flags: word;
- SuperBitMap: pBitMap;
- SuperClipRect: pClipRect;
- Window: pointer;
- Scroll_X: integer;
- Scroll_Y: integer;
- cr: pClipRect;
- cr2: pClipRect;
- crnew: pClipRect;
- SuperSaveClipRects: pClipRect;
- _cliprects: pClipRect;
- LayerInfo: pLayer_Info;
- Lock: tSignalSemaphore;
- reserved3: array [0..7] of byte;
- ClipRegion: pRegion;
- saveClipRects: pRegion;
- reserved2: array [0..21] of byte;
- DamageList: pRegion;
- end;
-
- pcollTable = ^tcollTable;
- tcollTable = record
- collPtrs: array [0..15] of pointer;
- end;
-
- pRegionRectangle = ^tRegionRectangle;
- tRegion = record
- bounds: tRectangle;
- RegionRectangle: pRegionRectangle;
- end;
-
- pViewPort = ^tViewPort;
- pcprlist = ^tcprlist;
- pView = ^tView;
- tView = record
- ViewPort: pViewPort;
- LOFCprList: pcprlist;
- SHFCprList: pcprlist;
- DyOffset: integer;
- DxOffset: integer;
- Modes: word;
- end;
-
- pVSprite = ^tVSprite;
- pBob = ^tBob;
- tVSprite = record
- NextVSprite: pVSprite;
- PrevVSprite: pVSprite;
- DrawPath: pVSprite;
- ClearPath: pVSprite;
- OldY: integer;
- OldX: integer;
- Flags: integer;
- Y: integer;
- X: integer;
- Height: integer;
- Width: integer;
- Depth: integer;
- MeMask: integer;
- HitMask: integer;
- ImageData: pinteger;
- BorderLine: pinteger;
- CollMask: pinteger;
- SprColors: pinteger;
- VSBob: pBob;
- PlanePick: shortint;
- PlaneOnOff: shortint;
- VUserExt: integer;
- end;
-
- tRegionRectangle = record
- Next: pRegionRectangle;
- Prev: pRegionRectangle;
- bounds: tRectangle;
- end;
-
- pTextFont = ^tTextFont;
- tTextFont = record
- tf_Message: tMessage;
- tf_YSize: word;
- tf_Style: byte;
- tf_Flags: byte;
- tf_XSize: word;
- tf_Baseline: word;
- tf_BoldSmear: word;
- tf_Accessors: word;
- tf_LoChar: byte;
- tf_HiChar: byte;
- tf_CharData: pointer;
- tf_Modulo: word;
- tf_CharLoc: pointer;
- tf_CharSpace: pointer;
- tf_CharKern: pointer;
- end;
-
- pTmpRas = ^tTmpRas;
- pAreaInfo = ^tAreaInfo;
- pGelsInfo = ^tGelsInfo;
- tRastPort = record
- Layer: pLayer;
- BitMap: pBitMap;
- AreaPtrn: pword;
- TmpRas: pTmpRas;
- AreaInfo: pAreaInfo;
- GelsInfo: pGelsInfo;
- Mask: byte;
- FgPen: shortint;
- BgPen: shortint;
- AOlPen: shortint;
- DrawMode: shortint;
- AreaPtSz: shortint;
- linpatcnt: shortint;
- dummy: shortint;
- Flags: word;
- LinePtrn: word;
- cp_x: integer;
- cp_y: integer;
- minterms: array [0..7] of byte;
- PenWidth: integer;
- PenHeight: integer;
- Font: pTextFont;
- AlgoStyle: byte;
- TxFlags: byte;
- TxHeight: word;
- TxWidth: word;
- TxBaseline: word;
- TxSpacing: integer;
- RP_User: ppointer;
- longreserved: array [0..1] of long;
- wordreserved: array [0..6] of word;
- reserved: array [0..7] of byte;
- end;
-
- pTextAttr = ^tTextAttr;
- tTextAttr = record
- ta_Name: STRPTR;
- ta_YSize: word;
- ta_Style: byte;
- ta_Flags: byte;
- end;
-
- pColorMap = ^tColorMap;
- pCopList = ^tCopList;
- pUCopList = ^tUCopList;
- pRasInfo = ^tRasInfo;
- tViewPort = record
- Next: pViewPort;
- ColorMap: pColorMap;
- DspIns: pCopList;
- SprIns: pCopList;
- ClrIns: pCopList;
- UCopIns: pUCopList;
- DWidth: integer;
- DHeight: integer;
- DxOffset: integer;
- DyOffset: integer;
- Modes: word;
- SpritePriorities: byte;
- reserved: byte;
- RasInfo: pRasInfo;
- end;
-
- pSimpleSprite = ^tSimpleSprite;
- tSimpleSprite = record
- posctldata: pword;
- height: word;
- x: word;
- y: word;
- num: word;
- end;
-
- pDBufPacket = ^tDBufPacket;
- tDBufPacket = record
- BufY: integer;
- BufX: integer;
- BufPath: pVSprite;
- BufBuffer: pinteger;
- end;
-
- pcopinit = ^tcopinit;
- tcopinit = record
- diagstrt: array [0..3] of word;
- sprstrtup: array [0..39] of word;
- sprstop: array [0..1] of word;
- end;
-
- pIsrvstr = ^tIsrvstr;
- tIsrvstr = record
- is_Node: tNode;
- Iptr: pIsrvstr;
- code: pointer;
- ccode: pointer;
- Carg: longint;
- end;
-
- pAnimOb = ^tAnimOb;
- pAnimComp = ^tAnimComp;
- tAnimOb = record
- NextOb: pAnimOb;
- PrevOb: pAnimOb;
- Clock: longint;
- AnOldY: integer;
- AnOldX: integer;
- AnY: integer;
- AnX: integer;
- YVel: integer;
- XVel: integer;
- YAccel: integer;
- XAccel: integer;
- RingYTrans: integer;
- RingXTrans: integer;
- AnimORoutine: pointer;
- HeadComp: pAnimComp;
- AUserExt: integer;
- end;
-
- tcprlist = record
- Next: pcprlist;
- start: pword;
- MaxCount: integer;
- end;
-
- ppSimpleSprite = ^pSimpleSprite;
- pGfxBase = ^tGfxBase;
- tGfxBase = record
- LibNode: tLibrary;
- ActiView: pView;
- copinit: pcopinit;
- cia: plongint;
- blitter: plongint;
- LOFlist: pword;
- SHFlist: pword;
- blthd: pbltnode;
- blttl: pbltnode;
- bsblthd: pbltnode;
- bsblttl: pbltnode;
- vbsrv: tInterrupt;
- timsrv: tInterrupt;
- bltsrv: tInterrupt;
- TextFonts: tList;
- DefaultFont: pTextFont;
- Modes: word;
- VBlank: shortint;
- Debug: shortint;
- BeamSync: integer;
- system_bplcon0: integer;
- SpriteReserved: byte;
- bytereserved: byte;
- Flags: word;
- BlitLock: integer;
- BlitNest: integer;
- BlitWaitQ: tList;
- BlitOwner: pTask;
- TOF_WaitQ: tList;
- DisplayFlags: word;
- SimpleSprites: ppSimpleSprite;
- MaxDisplayRow: word;
- MaxDisplayColumn: word;
- NormalDisplayRows: word;
- NormalDisplayColumns: word;
- NormalDPMX: word;
- NormalDPMY: word;
- LastChanceMemory: pSignalSemaphore;
- LCMptr: pword;
- MicrosPerLine: word;
- MinDisplayColumn: word;
- reserved: array [0..22] of long;
- end;
-
- tAreaInfo = record
- VctrTbl: pinteger;
- VctrPtr: pinteger;
- FlagTbl: pshortint;
- FlagPtr: pshortint;
- Count: integer;
- MaxCount: integer;
- FirstX: integer;
- FirstY: integer;
- end;
-
- pPLANEPTR = ^PLANEPTR;
- tBitMap = record
- BytesPerRow: word;
- Rows: word;
- Flags: byte;
- Depth: byte;
- pad: word;
- Planes: array [0..7] of PLANEPTR;
- end;
-
- tBob = record
- Flags: integer;
- SaveBuffer: pinteger;
- ImageShadow: pinteger;
- Before: pBob;
- After: pBob;
- BobVSprite: pVSprite;
- BobComp: pAnimComp;
- DBuffer: pDBufPacket;
- BUserExt: integer;
- end;
-
- tUCopList = record
- Next: pUCopList;
- FirstCopList: pCopList;
- CopList: pCopList;
- end;
-
- tAnimComp = record
- Flags: integer;
- Timer: integer;
- TimeSet: integer;
- NextComp: pAnimComp;
- PrevComp: pAnimComp;
- NextSeq: pAnimComp;
- PrevSeq: pAnimComp;
- AnimCRoutine: pointer;
- YTrans: integer;
- XTrans: integer;
- HeadOb: pAnimOb;
- AnimBob: pBob;
- end;
-
- pCopIns = ^tCopIns;
- tCopIns = record
- OpCode: integer;
- case integer of
- 0: (
- NXTLIST: pCopList;
- );
- 1: (
- VWAITPOS: integer;
- HWAITPOS: integer;
- );
- 2: (
- DESTADDR: integer;
- DESTDATA: integer;
- );
- end;
-
- tClipRect = record
- Next: pClipRect;
- prev: pClipRect;
- lobs: pLayer;
- BitMap: pBitMap;
- bounds: tRectangle;
- _p1: pClipRect;
- _p2: pClipRect;
- reserved: longint;
- end;
-
- tRasInfo = record
- Next: pRasInfo;
- BitMap: pBitMap;
- RxOffset: integer;
- RyOffset: integer;
- end;
-
- tGelsInfo = record
- sprRsrvd: shortint;
- Flags: byte;
- gelHead: pVSprite;
- gelTail: pVSprite;
- nextLine: pinteger;
- lastColor: ppinteger;
- collHandler: pcollTable;
- leftmost: integer;
- rightmost: integer;
- topmost: integer;
- bottommost: integer;
- firstBlissObj: pointer;
- lastBlissObj: pointer;
- end;
-
- tColorMap = record
- Flags: byte;
- Type_: byte;
- Count: word;
- ColorTable: pointer;
- end;
-
- tLayer_Info = record
- top_layer: pLayer;
- check_lp: pLayer;
- obs: pLayer;
- FreeClipRects: tMinList;
- Lock: tSignalSemaphore;
- gs_Head: tList;
- longreserved: longint;
- Flags: word;
- fatten_count: shortint;
- LockLayersCount: shortint;
- LayerInfo_extra_size: word;
- blitbuff: pinteger;
- LayerInfo_extra: pointer;
- end;
-
- tTmpRas = record
- RasPtr: pshortint;
- Size: longint;
- end;
-
- tCopList = record
- Next: pCopList;
- _CopList: pCopList;
- _ViewPort: pViewPort;
- CopIns: pCopIns;
- CopPtr: pCopIns;
- CopLStart: pword;
- CopSStart: pword;
- Count: integer;
- MaxCount: integer;
- DyOffset: integer;
- end;
-
- ppAnimOb = ^pAnimOb;
-
-
- var
- GfxBase: pGfxBase;
-
-
- const
- FSF_BOLD = 2;
- FSF_EXTENDED = 8;
- RIGHTHIT = 8;
- DBUFFER = 4;
- GELGONE = $400;
- ALERTLAYERSNOMEM = $83010000;
- SAVEBOB = 1;
- NTSC = 1;
- CPR_NT_SHT = $4000;
- FPB_DISKFONT = 1;
- HAM = $800;
- SAVEPRESERVE = $1000;
- FPF_DISKFONT = 2;
- CR_NEEDS_NO_CONCEALED_RASTERS = 1;
- DIW_VRTCL_POS_SHIFT = 7;
- AREAOUTLINE = 8;
- NEWLAYERINFO_CALLED = 1;
- PAL = 4;
- PFB_FINE_SCROLL_SHIFT = 4;
- HOLDNMODIFY = $800;
- LEFTHIT = 4;
- MUSTDRAW = 8;
- B2SWAP = 1;
- RINGTRIGGER = 1;
- B2NORM = 0;
- VPOSRLOF = $8000;
- SPRITE_ATTACHED = $80;
- EXTRA_HALFBRITE = $80;
- PF2PRI = $40;
- LAYERSIMPLE = 1;
- FPB_WIDEDOT = 4;
- FPB_REMOVED = 7;
- COLORON = $200;
- ANFRACSIZE = 6;
- FPB_TALLDOT = 3;
- FPF_WIDEDOT = $10;
- GENLOC = 2;
- FPB_PROPORTIONAL = 5;
- MODE_640 = $8000;
- FPF_REMOVED = $80;
- BACKSAVED = $100;
- NOCROSSFILL = $20;
- VP_HIDE = $2000;
- B2BOBBER = 2;
- FRST_DOT = 1;
- FPF_TALLDOT = 8;
- FPF_PROPORTIONAL = $20;
- DUALPF = $400;
- OVERLAY = 4;
- FPB_REVPATH = 2;
- BDRAWN = $200;
- BUSERFLAGS = $FF;
- BITCLR = 0;
- DIW_VRTCL_POS = $1FF;
- FSB_ITALIC = 2;
- FPF_REVPATH = 4;
- DIW_HORIZ_POS = $7F;
- BOBNIX = $800;
- PFA_FINE_SCROLL = $F;
- ONE_DOT = 2;
- DFTCH_MASK = $FF;
- COMPLEMENT = 2;
- FSF_ITALIC = 4;
- SPRITES = $4000;
- ISLESSX = 1;
- FSB_UNDERLINED = 0;
- ISLESSY = 2;
- VSPRITE = 1;
- FPB_ROMFONT = 0;
- COPPER_WAIT = 1;
- LAYERBACKDROP = $40;
- FSF_UNDERLINED = 1;
- BITSET = $8000;
- COPPER_MOVE = 0;
- BOBUPDATE = $200;
- FPF_ROMFONT = 1;
- DBLPF = $400;
- INTERLACE = 4;
- ISGRTRX = 4;
- ISGRTRY = 8;
- OUTSTEP = $2000;
- LAYER_CLIPRECTS_LOST = $100;
- SUSERFLAGS = $FF;
- JAM1 = 0;
- BOBISCOMP = 2;
- JAM2 = 1;
- PLNCNTSHFT = $C;
- LAYERSMART = 2;
- TOPHIT = 1;
- BORDERHIT = 0;
- SAVEBACK = 2;
- ANIMHALF = $20;
- LMN_REGION = $FFFFFFFF;
- GENLOCK_AUDIO = $100;
- LAYERSUPER = 4;
- PF_FINE_SCROLL_MASK = $F;
- LACE = 4;
- LAYERUPDATING = $10;
- HIRES = $8000;
- GENLOCK_VIDEO = 2;
- PFBA = $40;
- FPB_DESIGNED = 6;
- FPF_DESIGNED = $40;
- VSOVERFLOW = $800;
- BOTTOMHIT = 2;
- PLNCNTMSK = 7;
- BWAITING = $100;
- INVERSVID = 4;
- CPRNXTBUF = 2;
- BOBSAWAY = $400;
- BLITMSG_FAULT = 4;
- FSB_BOLD = 1;
- CPR_NT_LOF = $8000;
- FS_NORMAL = 0;
- FSB_EXTENDED = 3;
- LAYERREFRESH = $80;
-
-
- function BltBitMap
- (srcBitMap: pBitMap;
- srcX: integer;
- srcY: integer;
- destBitMap: pBitMap;
- destX: integer;
- destY: integer;
- sizeX: integer;
- sizeY: integer;
- minterm: byte;
- mask: byte;
- tempA: PLANEPTR): long;
-
- procedure BltTemplate
- (source: PLANEPTR;
- srcX: integer;
- srcMod: integer;
- destRastPort: pRastPort;
- destX: integer;
- destY: integer;
- sizeX: integer;
- sizeY: integer);
-
- procedure ClearEOL (rastPort: pRastPort);
- procedure ClearScreen (rastPort: pRastPort);
- function TextLength
- (RastPort: pRastPort;
- string_: STRPTR;
- count: integer): integer;
-
- procedure Text_
- (RastPort: pRastPort;
- string_: STRPTR;
- count: integer);
-
- procedure SetFont
- (RastPortID: pRastPort;
- textFont: pTextFont);
-
- function OpenFont (textAttr: pTextAttr): pTextFont;
- procedure CloseFont (textFont: pTextFont);
- function AskSoftStyle (rastPort: pRastPort): long;
- function SetSoftStyle
- (rastPort: pRastPort;
- style: long;
- enable: long): long;
-
- procedure AddBob
- (bob: pBob;
- rastPort: pRastPort);
-
- procedure AddVSprite
- (vSprite: pVSprite;
- rastPort: pRastPort);
-
- procedure DoCollision (rasPort: pRastPort);
- procedure DrawGList
- (rastPort: pRastPort;
- viewPort: pViewPort);
-
- procedure InitGels
- (dummyHead: pVSprite;
- dummyTail: pVSprite;
- GelsInfo: pGelsInfo);
-
- procedure InitMasks (vSprite: pVSprite);
- procedure RemIBob
- (bob: pBob;
- rastPort: pRastPort;
- viewPort: pViewPort);
-
- procedure RemVSprite (vSprite: pVSprite);
- procedure SetCollision
- (type_: long;
- routine: pointer;
- gelsInfo: pGelsInfo);
-
- procedure SortGList (rastPort: pRastPort);
- procedure AddAnimOb
- (obj: pAnimOb;
- animationKey: ppAnimOb;
- rastPort: pRastPort);
-
- procedure Animate
- (animationKey: ppAnimOb;
- rastPort: pRastPort);
-
- function GetGBuffers
- (animationObj: pAnimOb;
- rastPort: pRastPort;
- doubleBuffer: boolean): boolean;
-
- procedure InitGMasks (animationObj: pAnimOb);
- procedure DrawEllipse
- (rastPort: pRastPort;
- cx: integer;
- cy: integer;
- a: integer;
- b: integer);
-
- function AreaEllipse
- (rastPort: pRastPort;
- cx: integer;
- cy: integer;
- a: integer;
- b: integer): longint;
-
- procedure LoadRGB4
- (viewPort: pViewPort;
- colors: pword;
- count: integer);
-
- procedure InitRastPort (rastPort: pRastPort);
- procedure InitVPort (viewPort: pViewPort);
- procedure MrgCop (view: pView);
- procedure MakeVPort
- (view: pView;
- viewPort: pViewPort);
-
- procedure LoadView (view: pView);
- procedure WaitBlit;
- procedure SetRast
- (rastPort: pRastPort;
- color: byte);
-
- procedure Move_
- (rastPort: pRastPort;
- x: integer;
- y: integer);
-
- procedure Draw
- (rastPort: pRastPort;
- x: integer;
- y: integer);
-
- function AreaMove
- (rastPort: pRastPort;
- x: integer;
- y: integer): longint;
-
- function AreaDraw
- (rastPort: pRastPort;
- x: integer;
- y: integer): long;
-
- function AreaEnd (rastPort: pRastPort): longint;
- procedure WaitTOF;
- procedure QBlit (blit: pbltnode);
- procedure InitArea
- (areaInfo: pAreaInfo;
- vectorTable: pointer;
- vectorTableSize: integer);
-
- procedure SetRGB4
- (viewPort: pViewPort;
- index: integer;
- r: byte;
- g: byte;
- b: byte);
-
- procedure QBSBlit (blit: pbltnode);
- procedure BltClear
- (memory: PLANEPTR;
- size: long;
- flags: long);
-
- procedure RectFill
- (rastPort: pRastPort;
- xl: integer;
- yl: integer;
- xu: integer;
- yu: integer);
-
- procedure BltPattern
- (rastPort: pRastPort;
- ras: PLANEPTR;
- xl: integer;
- yl: integer;
- maxX: integer;
- maxY: integer;
- fillBytes: integer);
-
- function ReadPixel
- (rastPort: pRastPort;
- x: integer;
- y: integer): longint;
-
- function WritePixel
- (rastPort: pRastPort;
- x: integer;
- y: integer): longint;
-
- function Flood
- (rastPort: pRastPort;
- mode: long;
- x: integer;
- y: integer): boolean;
-
- procedure PolyDraw
- (rastPort: pRastPort;
- count: integer;
- polyTable: pinteger);
-
- procedure SetAPen
- (rastPort: pRastPort;
- pen: byte);
-
- procedure SetBPen
- (rastPort: pRastPort;
- pen: byte);
-
- procedure SetDrMd
- (rastPort: pRastPort;
- drawMode: byte);
-
- procedure InitView (view: pView);
- procedure CBump (copperList: pUCopList);
- procedure CMove_
- (copperList: pUCopList;
- destination: pointer;
- data: integer);
-
- procedure CWait_
- (copperList: pUCopList;
- x: integer;
- y: integer);
-
- function VBeamPos: longint;
- procedure InitBitMap
- (bitMap: pBitMap;
- depth: shortint;
- width: word;
- height: word);
-
- procedure ScrollRaster
- (rastPort: pRastPort;
- dX: integer;
- dY: integer;
- minx: integer;
- miny: integer;
- maxx: integer;
- maxy: integer);
-
- procedure WaitBOVP (viewport: pViewPort);
- function GetSprite
- (simplesprite: pSimpleSprite;
- num: integer): integer;
-
- procedure FreeSprite (num: integer);
- procedure ChangeSprite
- (vp: pViewPort;
- simplesprite: pSimpleSprite;
- data: PLANEPTR);
-
- procedure MoveSprite
- (viewport: pViewPort;
- simplesprite: pSimpleSprite;
- x: integer;
- y: integer);
-
- procedure LockLayerRom (layer: pLayer);
- procedure UnlockLayerRom (layer: pLayer);
- procedure SyncSBitMap (l: pLayer);
- procedure CopySBitMap (l: pLayer);
- procedure OwnBlitter;
- procedure DisownBlitter;
- procedure InitTmpRas
- (tmpras: pTmpRas;
- buff: PLANEPTR;
- size: long);
-
- procedure AskFont
- (rastPort: pRastPort;
- textAttr: pTextAttr);
-
- procedure AddFont (textFont: pTextFont);
- procedure RemFont (textFont: pTextFont);
- function AllocRaster
- (width: word;
- height: word): PLANEPTR;
-
- procedure FreeRaster
- (planeptr: PLANEPTR;
- width: word;
- height: word);
-
- procedure AndRectRegion
- (rgn: pRegion;
- rect: pRectangle);
-
- function OrRectRegion
- (rgn: pRegion;
- rect: pRectangle): boolean;
-
- function NewRegion: pRegion;
- function ClearRectRegion
- (rgn: pRegion;
- rect: pRectangle): boolean;
-
- procedure ClearRegion (rgn: pRegion);
- procedure DisposeRegion (rgn: pRegion);
- procedure FreeVPortCopLists (viewport: pViewPort);
- procedure FreeCopList (coplist: pCopList);
- procedure ClipBlit
- (srcrp: pRastPort;
- srcX: integer;
- srcY: integer;
- destrp: pRastPort;
- destX: integer;
- destY: integer;
- sizeX: integer;
- sizeY: integer;
- minterm: byte);
-
- function XorRectRegion
- (rgn: pRegion;
- rect: pRectangle): boolean;
-
- procedure FreeCprList (cprlist: pcprlist);
- function GetColorMap (entries: long): pColorMap;
- procedure FreeColorMap (colormap: pColorMap);
- function GetRGB4
- (colormap: pColorMap;
- entry: longint): long;
-
- procedure ScrollVPort (vp: pViewPort);
- function UCopperListInit
- (copperlist: pUCopList;
- num: word): pCopList;
-
- procedure FreeGBuffers
- (animationObj: pAnimOb;
- rastPort: pRastPort;
- doubleBuffer: boolean);
-
- function BltBitMapRastPort
- (srcbm: pBitMap;
- srcx: integer;
- srcy: integer;
- destrp: pRastPort;
- destX: integer;
- destY: integer;
- sizeX: integer;
- sizeY: integer;
- minterm: byte): boolean;
-
- function OrRegionRegion
- (src: pRegion;
- dst: pRegion): boolean;
-
- function XorRegionRegion
- (src: pRegion;
- dst: pRegion): boolean;
-
- function AndRegionRegion
- (src: pRegion;
- dst: pRegion): boolean;
-
- procedure SetRGB4CM
- (cm: pColorMap;
- i: integer;
- r: byte;
- g: byte;
- b: byte);
-
- procedure BltMaskBitMapRastPort
- (srcbm: pBitMap;
- srcx: integer;
- srcy: integer;
- destrp: pRastPort;
- destX: integer;
- destY: integer;
- sizeX: integer;
- sizeY: integer;
- minterm: byte;
- bltmask: PLANEPTR);
-
- function AttemptLockLayerRom (layer: pLayer): boolean;
-
-
- function AreaCircle
- (rastPort: pRastPort;
- cx: integer;
- cy: integer;
- r: integer): longint;
-
- procedure DrawCircle
- (rastPort: pRastPort;
- cx: integer;
- cy: integer;
- r: integer);
-
- procedure SetOPen
- (w: pRastPort;
- c: shortint);
-
- procedure SetWrMsk
- (w: pRastPort;
- m: Byte);
-
- procedure SetDrPt
- (w: pRastPort;
- p: word);
-
- procedure SetAfPt
- (w: pRastPort;
- p: pWord;
- n: shortint);
-
- function RASSIZE
- (w: integer;
- h: integer): longint;
-
- procedure CINIT
- (copperlist: pUCopList;
- num: word);
-
- procedure CMOVE
- (copperList: pUCopList;
- var destination: pointer;
- data: integer);
-
- procedure CWAIT
- (copperList: pUCopList;
- x: integer;
- y: integer);
-
- procedure CEND (copperList: pUCopList);
- procedure BNDRYOFF (w: pRastPort);
- procedure OFF_DISPLAY (custom: pCustom);
- procedure ON_DISPLAY (custom: pCustom);
- procedure OFF_SPRITE (custom: pCustom);
- procedure ON_SPRITE (custom: pCustom);
- procedure OFF_VBLANK (custom: pCustom);
- procedure ON_VBLANK (custom: pCustom);
- procedure InitAnimate (animkey: ppAnimOb);
- procedure RemBob (bob: pBob);
-
-
- IMPLEMENTATION
- procedure BNDRYOFF;
- begin
- with w^ do
- Flags := Flags and (not AREAOUTLINE)
- end;
-
- procedure InitAnimate;
- begin
- animkey^ := NIL
- end;
-
- procedure RemBob;
- begin
- with bob^ do
- Flags := Flags or BOBSAWAY
- end;
-
- procedure SetAfPt;
- begin
- with w^ do
- begin
- AreaPtrn := p;
- AreaPtSz := n
- end
- end;
-
- procedure SetDrPt;
- begin
- with w^ do
- begin
- LinePtrn := p;
- Flags := Flags or FRST_DOT;
- linpatcnt := 15
- end
- end;
-
- procedure SetOPen;
- begin
- with w^ do
- begin
- AOlPen := c;
- Flags := Flags or AREAOUTLINE
- end
- end;
-
- procedure SetWrMsk;
- begin
- w^.Mask := m
- end;
-
- procedure OFF_DISPLAY;
- begin
- custom^.dmacon := BITCLR or DMAF_RASTER
- end;
-
- procedure ON_DISPLAY;
- begin
- custom^.dmacon := BITSET or DMAF_RASTER
- end;
-
- procedure OFF_SPRITE;
- begin
- custom^.dmacon := BITCLR or DMAF_SPRITE
- end;
-
- procedure ON_SPRITE;
- begin
- custom^.dmacon := BITSET or DMAF_SPRITE
- end;
-
- procedure OFF_VBLANK;
- begin
- custom^.intena := BITCLR or INTF_VERTB
- end;
-
- procedure ON_VBLANK;
- begin
- custom^.intena := BITSET or INTF_VERTB
- end;
-
- function AreaCircle;
- begin
- AreaCircle := AreaEllipse(rastPort, cx, cy, r, r)
- end;
-
- procedure DrawCircle;
- begin
- DrawEllipse(rastPort, cx, cy, r, r)
- end;
-
- function RASSIZE;
- var
- result: Longint;
- begin
- result := ((w + 15) shr 3) and $FFFE;
- RASSIZE := h * result
- end;
-
- procedure CINIT;
- var
- junk: pCopList;
- begin
- junk := UCopperListInit(copperlist,num)
- end;
-
- procedure CMOVE;
- begin
- CMove_(copperList, @destination, data);
- CBump(copperList)
- end;
-
- procedure CWAIT;
- begin
- CWait_(copperList, x, y);
- CBump(copperList)
- end;
-
- procedure CEND;
- begin
- CWAIT(copperlist, 10000, 255)
- end;
-
- function BltBitMap; xassembler;
- asm
- movem.l d3-d7/a2/a6,-(sp)
- lea $20(sp),a6
- move.l (a6)+,a2
- move.b (a6)+,d7
- addq.l #1,a6
- move.b (a6)+,d6
- addq.l #1,a6
- move.w (a6)+,d5
- move.w (a6)+,d4
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.l (a6)+,a1
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$1E(a6)
- move.l d0,$3C(sp)
- movem.l (sp)+,d3-d7/a2/a6
- end;
-
- procedure BltTemplate; xassembler;
- asm
- movem.l d3-d5/a6,-(sp)
- lea $14(sp),a6
- move.w (a6)+,d5
- move.w (a6)+,d4
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.l (a6)+,a1
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$24(a6)
- movem.l (sp)+,d3-d5/a6
- end;
-
- procedure ClearEOL; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$2A(a6)
- move.l (sp)+,a6
- end;
-
- procedure ClearScreen; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$30(a6)
- move.l (sp)+,a6
- end;
-
- function TextLength; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$36(a6)
- move.w d0,$12(sp)
- move.l (sp)+,a6
- end;
-
- procedure Text_; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$3C(a6)
- move.l (sp)+,a6
- end;
-
- procedure SetFont; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),a0-a1
- move.l GfxBase,a6
- jsr -$42(a6)
- move.l (sp)+,a6
- end;
-
- function OpenFont; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$48(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure CloseFont; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$4E(a6)
- move.l (sp)+,a6
- end;
-
- function AskSoftStyle; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$54(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- function SetSoftStyle; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d1
- move.l (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$5A(a6)
- move.l d0,$14(sp)
- move.l (sp)+,a6
- end;
-
- procedure AddBob; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$60(a6)
- move.l (sp)+,a6
- end;
-
- procedure AddVSprite; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$66(a6)
- move.l (sp)+,a6
- end;
-
- procedure DoCollision; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$6C(a6)
- move.l (sp)+,a6
- end;
-
- procedure DrawGList; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),a0-a1
- move.l GfxBase,a6
- jsr -$72(a6)
- move.l (sp)+,a6
- end;
-
- procedure InitGels; xassembler;
- asm
- movem.l a2/a6,-(sp)
- lea $C(sp),a6
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$78(a6)
- movem.l (sp)+,a2/a6
- end;
-
- procedure InitMasks; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$7E(a6)
- move.l (sp)+,a6
- end;
-
- procedure RemIBob; xassembler;
- asm
- movem.l a2/a6,-(sp)
- lea $C(sp),a6
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$84(a6)
- movem.l (sp)+,a2/a6
- end;
-
- procedure RemVSprite; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$8A(a6)
- move.l (sp)+,a6
- end;
-
- procedure SetCollision; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l (a6)+,d0
- move.l GfxBase,a6
- jsr -$90(a6)
- move.l (sp)+,a6
- end;
-
- procedure SortGList; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$96(a6)
- move.l (sp)+,a6
- end;
-
- procedure AddAnimOb; xassembler;
- asm
- movem.l a2/a6,-(sp)
- lea $C(sp),a6
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$9C(a6)
- movem.l (sp)+,a2/a6
- end;
-
- procedure Animate; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$A2(a6)
- move.l (sp)+,a6
- end;
-
- function GetGBuffers; xassembler;
- asm
- move.l a6,-(sp)
- moveq #0,d0
- lea 8(sp),a6
- move.b (a6)+,d0
- addq.l #1,a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$A8(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$12(sp)
- move.l (sp)+,a6
- end;
-
- procedure InitGMasks; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$AE(a6)
- move.l (sp)+,a6
- end;
-
- procedure DrawEllipse; xassembler;
- asm
- movem.l d3/a6,-(sp)
- lea $C(sp),a6
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$B4(a6)
- movem.l (sp)+,d3/a6
- end;
-
- function AreaEllipse; xassembler;
- asm
- movem.l d3/a6,-(sp)
- lea $C(sp),a6
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$BA(a6)
- move.l d0,$18(sp)
- movem.l (sp)+,d3/a6
- end;
-
- procedure LoadRGB4; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$C0(a6)
- move.l (sp)+,a6
- end;
-
- procedure InitRastPort; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$C6(a6)
- move.l (sp)+,a6
- end;
-
- procedure InitVPort; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$CC(a6)
- move.l (sp)+,a6
- end;
-
- procedure MrgCop; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$D2(a6)
- move.l (sp)+,a6
- end;
-
- procedure MakeVPort; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$D8(a6)
- move.l (sp)+,a6
- end;
-
- procedure LoadView; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$DE(a6)
- move.l (sp)+,a6
- end;
-
- procedure WaitBlit; xassembler;
- asm
- move.l a6,-(sp)
- move.l GfxBase,a6
- jsr -$E4(a6)
- move.l (sp)+,a6
- end;
-
- procedure SetRast; xassembler;
- asm
- move.l a6,-(sp)
- move.b 8(sp),d0
- move.l $A(sp),a1
- move.l GfxBase,a6
- jsr -$EA(a6)
- move.l (sp)+,a6
- end;
-
- procedure Move_; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$F0(a6)
- move.l (sp)+,a6
- end;
-
- procedure Draw; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$F6(a6)
- move.l (sp)+,a6
- end;
-
- function AreaMove; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$FC(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function AreaDraw; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$102(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function AreaEnd; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$108(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure WaitTOF; xassembler;
- asm
- move.l a6,-(sp)
- move.l GfxBase,a6
- jsr -$10E(a6)
- move.l (sp)+,a6
- end;
-
- procedure QBlit; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$114(a6)
- move.l (sp)+,a6
- end;
-
- procedure InitArea; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$11A(a6)
- move.l (sp)+,a6
- end;
-
- procedure SetRGB4; xassembler;
- asm
- movem.l d3/a6,-(sp)
- lea $C(sp),a6
- move.b (a6)+,d3
- addq.l #1,a6
- move.b (a6)+,d2
- addq.l #1,a6
- move.b (a6)+,d1
- addq.l #1,a6
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$120(a6)
- movem.l (sp)+,d3/a6
- end;
-
- procedure QBSBlit; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$126(a6)
- move.l (sp)+,a6
- end;
-
- procedure BltClear; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d1
- move.l (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$12C(a6)
- move.l (sp)+,a6
- end;
-
- procedure RectFill; xassembler;
- asm
- movem.l d3/a6,-(sp)
- lea $C(sp),a6
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$132(a6)
- movem.l (sp)+,d3/a6
- end;
-
- procedure BltPattern; xassembler;
- asm
- movem.l d3-d4/a6,-(sp)
- lea $10(sp),a6
- move.w (a6)+,d4
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$138(a6)
- movem.l (sp)+,d3-d4/a6
- end;
-
- function ReadPixel; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$13E(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function WritePixel; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$144(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function Flood; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,d2
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$14A(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$14(sp)
- move.l (sp)+,a6
- end;
-
- procedure PolyDraw; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a0
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$150(a6)
- move.l (sp)+,a6
- end;
-
- procedure SetAPen; xassembler;
- asm
- move.l a6,-(sp)
- move.b 8(sp),d0
- move.l $A(sp),a1
- move.l GfxBase,a6
- jsr -$156(a6)
- move.l (sp)+,a6
- end;
-
- procedure SetBPen; xassembler;
- asm
- move.l a6,-(sp)
- move.b 8(sp),d0
- move.l $A(sp),a1
- move.l GfxBase,a6
- jsr -$15C(a6)
- move.l (sp)+,a6
- end;
-
- procedure SetDrMd; xassembler;
- asm
- move.l a6,-(sp)
- move.b 8(sp),d0
- move.l $A(sp),a1
- move.l GfxBase,a6
- jsr -$162(a6)
- move.l (sp)+,a6
- end;
-
- procedure InitView; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$168(a6)
- move.l (sp)+,a6
- end;
-
- procedure CBump; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$16E(a6)
- move.l (sp)+,a6
- end;
-
- procedure CMove_; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.l (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$174(a6)
- move.l (sp)+,a6
- end;
-
- procedure CWait_; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$17A(a6)
- move.l (sp)+,a6
- end;
-
- function VBeamPos; xassembler;
- asm
- move.l a6,-(sp)
- move.l GfxBase,a6
- jsr -$180(a6)
- move.l d0,8(sp)
- move.l (sp)+,a6
- end;
-
- procedure InitBitMap; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d2
- move.w (a6)+,d1
- move.b (a6)+,d0
- addq.l #1,a6
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$186(a6)
- move.l (sp)+,a6
- end;
-
- procedure ScrollRaster; xassembler;
- asm
- movem.l d3-d5/a6,-(sp)
- lea $14(sp),a6
- move.w (a6)+,d5
- move.w (a6)+,d4
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l GfxBase,a6
- jsr -$18C(a6)
- movem.l (sp)+,d3-d5/a6
- end;
-
- procedure WaitBOVP; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$192(a6)
- move.l (sp)+,a6
- end;
-
- function GetSprite; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$198(a6)
- move.w d0,$E(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeSprite; xassembler;
- asm
- move.l a6,-(sp)
- move.w 8(sp),d0
- move.l GfxBase,a6
- jsr -$19E(a6)
- move.l (sp)+,a6
- end;
-
- procedure ChangeSprite; xassembler;
- asm
- movem.l a2/a6,-(sp)
- lea $C(sp),a6
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$1A4(a6)
- movem.l (sp)+,a2/a6
- end;
-
- procedure MoveSprite; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$1AA(a6)
- move.l (sp)+,a6
- end;
-
- procedure LockLayerRom; xassembler;
- asm
- movem.l a5-a6,-(sp)
- move.l $C(sp),a5
- move.l GfxBase,a6
- jsr -$1B0(a6)
- movem.l (sp)+,a5-a6
- end;
-
- procedure UnlockLayerRom; xassembler;
- asm
- movem.l a5-a6,-(sp)
- move.l $C(sp),a5
- move.l GfxBase,a6
- jsr -$1B6(a6)
- movem.l (sp)+,a5-a6
- end;
-
- procedure SyncSBitMap; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$1BC(a6)
- move.l (sp)+,a6
- end;
-
- procedure CopySBitMap; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$1C2(a6)
- move.l (sp)+,a6
- end;
-
- procedure OwnBlitter; xassembler;
- asm
- move.l a6,-(sp)
- move.l GfxBase,a6
- jsr -$1C8(a6)
- move.l (sp)+,a6
- end;
-
- procedure DisownBlitter; xassembler;
- asm
- move.l a6,-(sp)
- move.l GfxBase,a6
- jsr -$1CE(a6)
- move.l (sp)+,a6
- end;
-
- procedure InitTmpRas; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d0
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$1D4(a6)
- move.l (sp)+,a6
- end;
-
- procedure AskFont; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),a0-a1
- move.l GfxBase,a6
- jsr -$1DA(a6)
- move.l (sp)+,a6
- end;
-
- procedure AddFont; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$1E0(a6)
- move.l (sp)+,a6
- end;
-
- procedure RemFont; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l GfxBase,a6
- jsr -$1E6(a6)
- move.l (sp)+,a6
- end;
-
- function AllocRaster; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l GfxBase,a6
- jsr -$1EC(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeRaster; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$1F2(a6)
- move.l (sp)+,a6
- end;
-
- procedure AndRectRegion; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$1F8(a6)
- move.l (sp)+,a6
- end;
-
- function OrRectRegion; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$1FE(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function NewRegion; xassembler;
- asm
- move.l a6,-(sp)
- move.l GfxBase,a6
- jsr -$204(a6)
- move.l d0,8(sp)
- move.l (sp)+,a6
- end;
-
- function ClearRectRegion; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$20A(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure ClearRegion; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$210(a6)
- move.l (sp)+,a6
- end;
-
- procedure DisposeRegion; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$216(a6)
- move.l (sp)+,a6
- end;
-
- procedure FreeVPortCopLists; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$21C(a6)
- move.l (sp)+,a6
- end;
-
- procedure FreeCopList; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$222(a6)
- move.l (sp)+,a6
- end;
-
- procedure ClipBlit; xassembler;
- asm
- movem.l d3-d6/a6,-(sp)
- lea $18(sp),a6
- move.b (a6)+,d6
- addq.l #1,a6
- move.w (a6)+,d5
- move.w (a6)+,d4
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.l (a6)+,a1
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$228(a6)
- movem.l (sp)+,d3-d6/a6
- end;
-
- function XorRectRegion; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$22E(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeCprList; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$234(a6)
- move.l (sp)+,a6
- end;
-
- function GetColorMap; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),d0
- move.l GfxBase,a6
- jsr -$23A(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeColorMap; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$240(a6)
- move.l (sp)+,a6
- end;
-
- function GetRGB4; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),d0/a0
- move.l GfxBase,a6
- jsr -$246(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure ScrollVPort; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l GfxBase,a6
- jsr -$24C(a6)
- move.l (sp)+,a6
- end;
-
- function UCopperListInit; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$252(a6)
- move.l d0,$E(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeGBuffers; xassembler;
- asm
- move.l a6,-(sp)
- moveq #0,d0
- lea 8(sp),a6
- move.b (a6)+,d0
- addq.l #1,a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$258(a6)
- move.l (sp)+,a6
- end;
-
- function BltBitMapRastPort; xassembler;
- asm
- movem.l d3-d6/a6,-(sp)
- lea $18(sp),a6
- move.b (a6)+,d6
- addq.l #1,a6
- move.w (a6)+,d5
- move.w (a6)+,d4
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.l (a6)+,a1
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$25E(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$2E(sp)
- movem.l (sp)+,d3-d6/a6
- end;
-
- function OrRegionRegion; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$264(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function XorRegionRegion; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$26A(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function AndRegionRegion; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$270(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure SetRGB4CM; xassembler;
- asm
- movem.l d3/a6,-(sp)
- lea $C(sp),a6
- move.b (a6)+,d3
- addq.l #1,a6
- move.b (a6)+,d2
- addq.l #1,a6
- move.b (a6)+,d1
- addq.l #1,a6
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$276(a6)
- movem.l (sp)+,d3/a6
- end;
-
- procedure BltMaskBitMapRastPort; xassembler;
- asm
- movem.l d3-d6/a2/a6,-(sp)
- lea $1C(sp),a6
- move.l (a6)+,a2
- move.b (a6)+,d6
- addq.l #1,a6
- move.w (a6)+,d5
- move.w (a6)+,d4
- move.w (a6)+,d3
- move.w (a6)+,d2
- move.l (a6)+,a1
- move.w (a6)+,d1
- move.w (a6)+,d0
- move.l (a6)+,a0
- move.l GfxBase,a6
- jsr -$27C(a6)
- movem.l (sp)+,d3-d6/a2/a6
- end;
-
- function AttemptLockLayerRom; xassembler;
- asm
- movem.l a5-a6,-(sp)
- move.l $C(sp),a5
- move.l GfxBase,a6
- jsr -$28E(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$10(sp)
- movem.l (sp)+,a5-a6
- end;
-
- end.
-