home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
oberon_380.lzh
/
Oberon
/
Modules
/
Graphics.mod
/
Graphics.mod
Wrap
Text File
|
1990-10-11
|
28KB
|
924 lines
(*-------------------------------------------------------------------------*)
(* *)
(* Amiga Oberon Interface Module: Graphics Date: 16-Jun-90 *)
(* *)
(* © 1990 by Fridtjof Siebert *)
(* *)
(*-------------------------------------------------------------------------*)
MODULE Graphics;
IMPORT e: Exec,
h: Hardware,
s: SYSTEM;
TYPE
AnimCompPtr * = POINTER TO AnimComp;
AnimObPtr * = POINTER TO AnimOb;
AreaInfoPtr * = POINTER TO AreaInfo;
BitMapPtr * = POINTER TO BitMap;
BobPtr * = POINTER TO Bob;
ClipRectPtr * = POINTER TO ClipRect;
CollTablePtr * = POINTER TO CollTable;
ColorMapPtr * = POINTER TO ColorMap;
CopinitPtr * = POINTER TO Copinit;
CopInsPtr * = POINTER TO CopIns;
CopListPtr * = POINTER TO CopList;
CprlistPtr * = POINTER TO Cprlist;
DBufPacketPtr * = POINTER TO DBufPacket;
GelsInfoPtr * = POINTER TO GelsInfo;
IsrvstrPtr * = POINTER TO Isrvstr;
LayerPtr * = POINTER TO Layer;
LayerInfoPtr * = POINTER TO LayerInfo;
RasInfoPtr * = POINTER TO RasInfo;
RastPortPtr * = POINTER TO RastPort;
RectanglePtr * = POINTER TO Rectangle;
RegionPtr * = POINTER TO Region;
RegionRectanglePtr * = POINTER TO RegionRectangle;
SimpleSpritePtr * = POINTER TO SimpleSprite;
TextAttrPtr * = POINTER TO TextAttr;
TextFontPtr * = POINTER TO TextFont;
TmpRasPtr * = POINTER TO TmpRas;
UCopListPtr * = POINTER TO UCopList;
ViewPtr * = POINTER TO View;
ViewPortPtr * = POINTER TO ViewPort;
VSpritePtr * = POINTER TO VSprite;
Rectangle * = STRUCT
minX * : INTEGER;
minY * : INTEGER;
maxX * : INTEGER;
maxY * : INTEGER;
END;
Layer * = STRUCT
front * : LayerPtr;
back * : LayerPtr;
clipRect * : ClipRectPtr;
rp * : RastPortPtr;
bounds * : Rectangle;
reserved * : ARRAY 4 OF BYTE;
priority * : INTEGER;
flags * : INTEGER;
superBitMap * : BitMapPtr;
superClipRect * : ClipRectPtr;
window * : e.ADDRESS;
scrollX * : INTEGER;
scrollY * : INTEGER;
cr * : ClipRectPtr;
cr2 * : ClipRectPtr;
crnew * : ClipRectPtr;
superSaveClipRects * : ClipRectPtr;
cliprects * : ClipRectPtr;
layerInfo * : LayerInfoPtr;
lock * : e.SignalSemaphore;
reserved3 * : ARRAY 8 OF BYTE;
clipRegion * : RegionPtr;
saveClipRects * : RegionPtr;
reserved2 * : ARRAY 22 OF BYTE;
damageList * : RegionPtr;
END;
ClipRect * = STRUCT
next * : ClipRectPtr;
prev * : ClipRectPtr;
lobs * : LayerPtr;
bitMap * : BitMapPtr;
bounds * : Rectangle;
p1 * : ClipRectPtr;
p2 * : ClipRectPtr;
reserved * : LONGINT;
flags * : LONGINT;
END;
CONST
needsNoConcealedRasters * = 01H;
isLessX * = 1;
isLessY * = 2;
isGrtrX * = 4;
isGrtrY * = 8;
borderHit * = 0;
topHit * = 1;
bottomHit * = 2;
leftHit * = 4;
rightHit * = 8;
CONST
move * = 0;
wait * = 1;
next * = 2;
sht * = 14;
lof * = 15;
TYPE
CopIns * = STRUCT
opCode * : INTEGER;
destAddr * : INTEGER; (* vWaitPos *)
destData * : INTEGER; (* hWaitPos *)
END;
CopInsCLPtr * = STRUCT (* für opCode * = next *)
opCode * : INTEGER;
nxtlist * : CopListPtr;
END;
Cprlist * = STRUCT
next * : CprlistPtr;
start * : e.ADDRESS;
maxCount * : INTEGER;
END;
CopList * = STRUCT
next * : CopListPtr;
copList * : CopListPtr;
viewPort * : ViewPortPtr;
copIns * : CopInsPtr;
copPtr * : CopInsPtr;
copLStart * : e.ADDRESS;
copSStart * : e.ADDRESS;
count * : INTEGER;
maxCount * : INTEGER;
dyOffset * : INTEGER;
END;
UCopList * = STRUCT
next * : UCopListPtr;
firstCopList * : CopListPtr;
copList * : CopListPtr;
END;
Copinit * = STRUCT
diagstrt * : ARRAY 4 OF INTEGER;
sprstrtup * : ARRAY (2*8*2)+2+(2*2)+2 OF INTEGER;
sprstop * : ARRAY 2 OF INTEGER;
END;
CONST
interlace * = 04H;
pf2pri * = 40H;
colorOn * = 200H;
dblpf * = 400H;
holdnmodify * = 800H;
m640 * = 08000H;
plnCntMsk * = 07H;
plnCntShft * = 12;
fineScroll * = 0FH;
fineScrollShift * = 04H;
fineScrollMask * = 0FH;
vrtclPos * = 01FFH;
vrtclPosShift * = 07H;
horizPos * = 07FH;
dftchMask * = 0FFH;
vposrlof * = 08000H;
ringtrigger * = 01H;
anfracsize * = 06H;
animhalf * = 020H;
b2Norm * = 0;
b2Swap * = 1;
b2Bobber * = 2;
CONST
(* VSpriteFlags *)
vsprite * = 0;
saveBack * = 1;
overlay * = 2;
mustDraw * = 3;
backSaved * = 8;
bobUpdate * = 9;
gelGone * = 10;
vsOverflow * = 11;
TYPE
VSprite * = STRUCT
nextVSprite * : VSpritePtr;
prevVSprite * : VSpritePtr;
drawPath * : VSpritePtr;
clearPath * : VSpritePtr;
oldY * : INTEGER;
oldX * : INTEGER;
flags * : SET; (* VSpriteFlags *)
y * : INTEGER;
x * : INTEGER;
height * : INTEGER;
width * : INTEGER;
depth * : INTEGER;
meMask * : SET;
hitMask * : SET;
imageData * : e.ADDRESS;
borderLine * : e.ADDRESS;
collMask * : e.ADDRESS;
sprColors * : e.ADDRESS;
vsBob * : BobPtr;
planePick * : SHORTSET;
planeOnOff * : SHORTSET;
END;
CONST
(* BobFlag *)
saveBob * = 0;
bobIsComp * = 1;
bWaiting * = 8;
bDrawn * = 9;
bobsAway * = 10;
bobNix * = 11;
savePreserve * = 12;
outStep * = 13;
TYPE
Bob * = STRUCT
flags * : SET; (* BobFlags *)
saveBuffer * : e.ADDRESS;
imageShadow * : e.ADDRESS;
before * : BobPtr;
after * : BobPtr;
bobVSprite * : VSpritePtr;
bobComp * : AnimCompPtr;
dBuffer * : DBufPacketPtr;
END;
AnimComp * = STRUCT
flags * : INTEGER;
timer * : INTEGER;
timeSet * : INTEGER;
nextComp * : AnimCompPtr;
prevComp * : AnimCompPtr;
nextSeq * : AnimCompPtr;
prevSeq * : AnimCompPtr;
animCRoutine * : e.ADDRESS;
yTrans * : INTEGER;
xTrans * : INTEGER;
headOb * : AnimObPtr;
animBob * : BobPtr;
END;
AnimOb * = STRUCT
nextOb * : AnimObPtr;
prevOb * : AnimObPtr;
clock * : LONGINT;
anOldY * : INTEGER;
anOldX * : INTEGER;
anY * : INTEGER;
anX * : INTEGER;
yVel * : INTEGER;
xVel * : INTEGER;
yAccel * : INTEGER;
xAccel * : INTEGER;
ringYTrans * : INTEGER;
ringXTrans * : INTEGER;
animORoutine * : e.ADDRESS;
headComp * : AnimCompPtr;
END;
DBufPacket * = STRUCT
bufY * : INTEGER;
bufX * : INTEGER;
bufPath * : VSpritePtr;
bufBuffer * : e.ADDRESS;
END;
CollTable * = STRUCT
collPtrs * : ARRAY 16 OF e.ADDRESS
END;
BitMap * = STRUCT
bytesPerRow * : INTEGER;
rows * : INTEGER;
flags * : BYTE;
depth * : BYTE;
pad * : INTEGER;
planes * : ARRAY 8 OF e.ADDRESS;
END;
CONST
(* DisplayFlags *)
ntsc * = 0;
genloc * = 1;
pal * = 2;
TYPE
GfxBase * = STRUCT
libNode * : e.Library;
actiView * : ViewPtr;
copinit * : CopinitPtr;
cia * : e.ADDRESS;
blitter * : e.ADDRESS;
loFlist * : e.ADDRESS;
shFlist * : e.ADDRESS;
blthd * : h.BltnodePtr;
blttl * : h.BltnodePtr;
bsblthd * : h.BltnodePtr;
bsblttl * : h.BltnodePtr;
vbsrv * : e.Interrupt;
timsrv * : e.Interrupt;
bltsrv * : e.Interrupt;
textFonts * : e.List;
defaultFont * : TextFontPtr;
modes * : SET;
vBlank * : BYTE;
debug * : BYTE;
beamSync * : INTEGER;
bplcon0 * : SET;
spriteReserved * : BYTE;
bytereserved * : BYTE;
flags * : SET;
blitLock * : INTEGER;
blitNest * : INTEGER;
blitWaitQ * : e.List;
blitOwner * : e.TaskPtr;
waitQ * : e.List;
displayFlags * : SHORTSET; (* DisplayFlags *)
simpleSprites * : e.ADDRESS;
maxDisplayRow * : INTEGER;
maxDisplayColumn * : INTEGER;
normalDisplayRows * : INTEGER;
normalDisplayColumns * : INTEGER;
normalDPMX * : INTEGER;
normalDPMY * : INTEGER;
lastChanceMemory * : e.SignalSemaphorePtr;
lcMptr * : e.ADDRESS;
microsPerLine * : INTEGER;
minDisplayColumn * : INTEGER;
reserved * : ARRAY 23 OF LONGINT;
END;
GfxBasePtr * = POINTER TO GfxBase;
CONST
blitMsgFault * = 4;
TYPE
Isrvstr * = STRUCT
node * : e.Node;
iptr * : IsrvstrPtr;
code * : e.ADDRESS;
ccode * : e.ADDRESS;
carg * : LONGINT;
END;
CONST
(* LayerFlags *)
layerSimple * = 0;
layerSmart * = 1;
layerSuper * = 2;
layerUpdating * = 4;
layerBackdrop * = 6;
layerRefresh * = 7;
layerClipRectsLost * = 8;
TYPE
LayerInfo * = STRUCT
layer * : LayerPtr;
lp * : LayerPtr;
obs * : LayerPtr;
freeClipRects * : e.MinList;
lock * : e.SignalSemaphore;
head * : e.List;
longreserved * : LONGINT;
flags * : SET; (* LayerFlags *)
count * : SHORTINT;
lockLayersCount * : SHORTINT;
layerInfoExtraSize * : INTEGER;
blitbuff * : e.ADDRESS;
layerInfoExtra * : e.ADDRESS;
END;
CONST
lmnRegion * = -1;
newLayerInfoCalled * = 01H;
alertLayersNoMem * = MIN(LONGINT) + 3010000H; (* 083010000H *)
TYPE
AreaInfo * = STRUCT
vctrTbl * : e.ADDRESS;
vctrPtr * : e.ADDRESS;
flagTbl * : e.ADDRESS;
flagPtr * : e.ADDRESS;
count * : INTEGER;
maxCount * : INTEGER;
firstX * : INTEGER;
firstY * : INTEGER;
END;
TmpRas * = STRUCT
rasPtr * : e.ADDRESS;
size * : LONGINT;
END;
GelsInfo * = STRUCT
sprRsrvd * : SHORTINT;
flags * : BYTE;
gelHead * : VSpritePtr;
gelTail * : VSpritePtr;
nextLine * : e.ADDRESS;
lastColor * : e.ADDRESS;
collHandler * : CollTablePtr;
leftmost * : INTEGER;
rightmost * : INTEGER;
topmost * : INTEGER;
bottommost * : INTEGER;
firstBlissObj * : e.ADDRESS;
lastBlissObj * : e.ADDRESS;
END;
CONST
(* DrawModes *)
complement * = 1;
inversvid * = 2;
jam1 * = SHORTSET{};
jam2 * = SHORTSET{0};
(* FontStyles *)
underlined * = 0;
bold * = 1;
italic * = 2;
extended * = 3;
normalFont * = SHORTSET{};
(* FontFlags *)
romFont * = 0;
diskFont * = 1;
revPath * = 2;
tallDot * = 3;
wideDot * = 4;
proportional * = 5;
designed * = 6;
removed * = 7;
(* RastPortFlags *)
firstDot * = 0;
oneDot * = 1;
dBuffer * = 2;
areaOutline * = 3;
noCrossFill * = 5;
spriteAttached * = 080H;
TYPE
Point * = STRUCT
x * ,y * : INTEGER;
END;
RastPort * = STRUCT
layer * : LayerPtr;
bitMap * : BitMapPtr;
areaPtrn * : e.ADDRESS;
tmpRas * : TmpRasPtr;
areaInfo * : AreaInfoPtr;
gelsInfo * : GelsInfoPtr;
mask * : SHORTSET;
fgPen * : BYTE;
bgPen * : BYTE;
aOlPen * : BYTE;
drawMode * : SHORTSET; (* DrawModes *)
areaPtSz * : BYTE;
linPatCnt * : BYTE;
dummy * : BYTE;
flags * : SET; (* RastPortFlags *)
linePtrn * : INTEGER;
x * : INTEGER;
y * : INTEGER;
minterms * : ARRAY 8 OF BYTE;
penWidth * : INTEGER;
penHeight * : INTEGER;
font * : TextFontPtr;
algoStyle * : SHORTSET; (* FontStyles *)
txFlags * : SHORTSET; (* FontFlags *)
txHeight * : INTEGER;
txWidth * : INTEGER;
txBaseline * : INTEGER;
txSpacing * : INTEGER;
user * : e.ADDRESS;
longreserved * : ARRAY 2 OF LONGINT;
wordreserved * : ARRAY 7 OF INTEGER;
reserved * : ARRAY 8 OF BYTE;
END;
TYPE
RegionRectangle * = STRUCT
next * : RegionRectanglePtr;
prev * : RegionRectanglePtr;
bounds * : Rectangle;
END;
Region * = STRUCT
bounds * : Rectangle;
regionRectangle * : RegionRectanglePtr;
END;
SimpleSprite * = STRUCT
posctldata * : e.ADDRESS;
height * : INTEGER;
x * : INTEGER;
y * : INTEGER;
num * : INTEGER;
END;
TextAttr * = STRUCT
name * : e.ADDRESS;
ySize * : INTEGER;
style * : SHORTSET; (* FontStyleSet *)
flags * : SHORTSET; (* FontFlags *)
END;
TextFont * = STRUCT
message * : e.Message;
ySize * : INTEGER;
style * : SHORTSET; (* FontStyles *)
flags * : SHORTSET; (* FontFlags *)
xSize * : INTEGER;
baseline * : INTEGER;
boldSmear * : INTEGER;
accessors * : INTEGER;
loChar * : CHAR;
hiChar * : CHAR;
charData * : e.ADDRESS;
modulo * : INTEGER;
charLoc * : e.ADDRESS;
charSpace * : e.ADDRESS;
charKern * : e.ADDRESS;
END;
ColorMap * = STRUCT
flags * : BYTE;
type * : BYTE ;
count * : INTEGER;
colorTable * : e.ADDRESS;
END;
CONST
(* ViewModes *)
genlocVideo * = 1;
lace * = 2;
pfba * = 6;
extraHalfbrite * = 7;
genlocAudio * = 8;
dualpf * = 10;
ham * = 11;
vpHide * = 13;
sprites * = 14;
hires * = 15;
TYPE
ViewPort * = STRUCT
next * : ViewPortPtr;
colorMap * : ColorMapPtr;
dspIns * : CopListPtr;
sprIns * : CopListPtr;
clrIns * : CopListPtr;
uCopIns * : UCopListPtr;
dWidth * : INTEGER;
dHeight * : INTEGER;
dxOffset * : INTEGER;
dyOffset * : INTEGER;
modes * : SET; (* ViewModes *)
spritePriorities * : BYTE;
reserved * : BYTE;
rasInfo * : RasInfoPtr;
END;
View * = STRUCT
viewPort * : ViewPortPtr;
lofCprList * : CprlistPtr;
shfCprList * : CprlistPtr;
dyOffset * : INTEGER;
dxOffset * : INTEGER;
modes * : SET; (* ViewModes *)
END;
RasInfo * = STRUCT
next * : RasInfoPtr;
bitMap * : BitMapPtr;
rxOffset * : INTEGER;
ryOffset * : INTEGER;
END;
PROC * = PROCEDURE();
VAR
gfx * : GfxBasePtr;
(*-------------------------------------------------------------------------*)
(* $OvflChk- $RangeChk- $StackChk- $NilChk- $ReturnChk- $CaseChk- *)
(*------ graphics.library: ------*)
PROCEDURE AddAnimOb*{gfx,-156}( anOb{8}:AnimObPtr;
VAR anKey{9}:AnimObPtr;
rp{10}:RastPortPtr);
PROCEDURE AddBob*{gfx,- 96}(Bob{8}:BobPtr;
rp{9}:RastPortPtr);
PROCEDURE AddFont*{gfx,-480}(textFont{9}:TextFontPtr);
PROCEDURE AddVSprite*{gfx,-102}(vs{8}:VSpritePtr;
rp{9}:RastPortPtr);
PROCEDURE AllocRaster*{gfx,-492}(width{0}:INTEGER;
height{1}:INTEGER):e.ADDRESS;
PROCEDURE AndRectRegion*{gfx,-504}(region{8}:RegionPtr;
rectang{9}:RectanglePtr);
PROCEDURE AndRegionRegion*{gfx,-624}(region1{8}:RegionPtr;
region2{9}:RegionPtr):BOOLEAN;
PROCEDURE Animate*{gfx,-162}(VAR anKey{8}:AnimObPtr; rp{9}:RastPortPtr);
PROCEDURE AreaDraw*{gfx,-258}(rp{9}:RastPortPtr;
x{0}:INTEGER;
y{1}:INTEGER):BOOLEAN;
PROCEDURE AreaEllipse*{gfx,-186}(rp{9}:RastPortPtr;
cX{0}:INTEGER;
cY{1}:INTEGER;
a{2}:INTEGER;
b{3}:INTEGER):BOOLEAN;
PROCEDURE AreaEnd*{gfx,-264}(rp{9}:RastPortPtr):BOOLEAN;
PROCEDURE AreaMove*{gfx,-252}(rp{9}:RastPortPtr;
x{0}:INTEGER;
y{1}:INTEGER):BOOLEAN;
PROCEDURE AskFont*{gfx,-474}(rp{9}:RastPortPtr;
textAttr{8}:TextAttrPtr);
PROCEDURE AskSoftStyle*{gfx,- 84}(rp{9}:RastPortPtr):SHORTSET; (* FontStyleSet *)
PROCEDURE AttemptLockLayerRom*{gfx,-654}(layer{13}:LayerPtr):BOOLEAN;
PROCEDURE BltBitMap*{gfx,- 30}(srcBitMap{8}:BitMapPtr;
srcX{0}:INTEGER;
srcY{1}:INTEGER;
dstBitMap{9}:BitMapPtr;
dstX{2}:INTEGER;
dstY{3}:INTEGER;
sizeX{4}:INTEGER;
sizeY{5}:INTEGER;
minterm{6}:BYTE;
mask{7}:SHORTSET;
tempA{10}:e.ADDRESS):LONGINT;
PROCEDURE BltBitMapRastPort*{gfx,-606}(srcbm{8}:BitMapPtr;
srcX{0}:INTEGER;
srcY{1}:INTEGER;
destRp{9}:RastPortPtr;
destX{2}:INTEGER;
destY{3}:INTEGER;
sizeX{4}:INTEGER;
sizeY{5}:INTEGER;
minterm{6}:BYTE);
PROCEDURE BltClear*{gfx,-300}(memBlock{9}:e.ADDRESS;
bytecount{0}:LONGINT;
flags{1}:LONGSET);
PROCEDURE BltMaskBitMapRastPort*{gfx,-636}(srcbm{8}:BitMapPtr;
srcX{0}:INTEGER;
srcY{1}:INTEGER;
destRp{9}:RastPortPtr;
destX{2}:INTEGER;
destY{3}:INTEGER;
sizeX{4}:INTEGER;
sizeY{5}:INTEGER;
minterm{6}:BYTE;
bltmask{10}:e.ADDRESS);
PROCEDURE BltPattern*{gfx,-312}(rp{9}:RastPortPtr;
mask{8}:e.ADDRESS;
xl{0}:INTEGER;
yl{1}:INTEGER;
maxX{2}:INTEGER;
maxY{3}:INTEGER;
bytecnt{4}:INTEGER);
PROCEDURE BltTemplate*{gfx,- 36}(srcTemplate{8}:e.ADDRESS;
srcX{0}:INTEGER;
srcMod{1}:INTEGER;
rp{9}:RastPortPtr;
dstX{2}:INTEGER;
dstY{3}:INTEGER;
sizeX{4}:INTEGER;
sizeY{5}:INTEGER);
PROCEDURE CBump*{gfx,-366}(c{9}:UCopListPtr);
PROCEDURE ChangeSprite*{gfx,-420}(vp{8}:ViewPortPtr;
s{9}:SimpleSpritePtr;
newdata{10}:e.ADDRESS);
PROCEDURE ClearEOL*{gfx,- 42}(rp{9}:RastPortPtr);
PROCEDURE ClearRectRegion*{gfx,-522}(region{8}:RegionPtr;
rectangle{9}:RectanglePtr):BOOLEAN;
PROCEDURE ClearRegion*{gfx,-528}(region{8}:RegionPtr);
PROCEDURE ClearScreen*{gfx,- 48}(rp{9}:RastPortPtr);
PROCEDURE ClipBlit*{gfx,-552}(src{8}:RastPortPtr;
srcX{0}:INTEGER;
srcY{1}:INTEGER;
dest{9}:RastPortPtr;
destX{2}:INTEGER;
destY{3}:INTEGER;
xSize{4}:INTEGER;
ySize{5}:INTEGER;
minterm{6}:BYTE);
PROCEDURE CloseFont*{gfx,- 78}(font{9}:TextFontPtr);
PROCEDURE CMove*{gfx,-372}(c{9}:UCopListPtr;
a{0}:e.ADDRESS;
v{1}:INTEGER);
PROCEDURE CopySBitMap*{gfx,-450}(layer{8}:LayerPtr);
PROCEDURE CWait*{gfx,-378}(c{9}:UCopListPtr;
v{0}:INTEGER;
h{1}:INTEGER);
PROCEDURE DisownBlitter*{gfx,-462}();
PROCEDURE DisposeRegion*{gfx,-534}(region{8}:RegionPtr);
PROCEDURE DoCollision*{gfx,-108}(rp{9}:RastPortPtr);
PROCEDURE Draw*{gfx,-246}(rp{9}:RastPortPtr;
x{0}:INTEGER;
y{1}:INTEGER);
PROCEDURE DrawEllipse*{gfx,-180}(rp{9}:RastPortPtr;
cX{0}:INTEGER;
cY{1}:INTEGER;
a{2}:INTEGER;
b{3}:INTEGER);
PROCEDURE DrawGList*{gfx,-114}(rp{9}:RastPortPtr;
vp{8}:ViewPortPtr);
PROCEDURE Flood*{gfx,-330}(rp{9}:RastPortPtr;
mode{2}:LONGINT;
x{0}:INTEGER;
y{1}:INTEGER):BOOLEAN;
PROCEDURE FreeColorMap*{gfx,-576}(colorMap{8}:ColorMapPtr);
PROCEDURE FreeCopList*{gfx,-546}(coplist{8}:CopListPtr);
PROCEDURE FreeCprList*{gfx,-564}(cprlist{8}:CprlistPtr);
PROCEDURE FreeGBuffers*{gfx,-600}(anOb{8}:AnimObPtr;
rp{9}:RastPortPtr;
db{0}:BOOLEAN);
PROCEDURE FreeRaster*{gfx,-498}(p{8}:e.ADDRESS;
width{0}:INTEGER;
height{1}:INTEGER);
PROCEDURE FreeSprite*{gfx,-414}(pick{0}:INTEGER);
PROCEDURE FreeVPortCopLists*{gfx,-540}(vp{8}:ViewPortPtr);
PROCEDURE GetColorMap*{gfx,-570}(entries{0}:LONGINT):ColorMapPtr;
PROCEDURE GetGBuffers*{gfx,-168}(anOb{8}:AnimObPtr;
rp{9}:RastPortPtr;
db{0}:BOOLEAN):BOOLEAN;
PROCEDURE GetRGB4*{gfx,-582}(colorMap{8}:ColorMapPtr;
entry{0}:LONGINT):LONGINT;
PROCEDURE GetSprite*{gfx,-408}(sprite{8}:SimpleSpritePtr;
pick{0}:INTEGER):INTEGER;
PROCEDURE GraphicsReserved1*{gfx,-642}():LONGINT;
PROCEDURE GraphicsReserved2*{gfx,-648}():LONGINT;
PROCEDURE InitArea*{gfx,-282}(VAR areainfo{8}:AreaInfo;
buffer{9}:e.ADDRESS;
maxvectors{0}:INTEGER);
PROCEDURE InitBitMap*{gfx,-390}(VAR bm{8}:BitMap;
depth{0}:INTEGER;
width{1}:INTEGER;
height{2}:INTEGER);
PROCEDURE InitGels*{gfx,-120}(head{8}:VSpritePtr;
tail{9}:VSpritePtr;
gInfo{10}:GelsInfoPtr);
PROCEDURE InitGMasks*{gfx,-174}(anOb{8}:AnimObPtr);
PROCEDURE InitMasks*{gfx,-126}(vs{8}:VSpritePtr);
PROCEDURE InitRastPort*{gfx,-198}(VAR rp{9}:RastPort);
PROCEDURE InitTmpRas*{gfx,-468}(VAR tmpras{8}:TmpRas;
buffer{9}:e.ADDRESS;
size{0}:LONGINT);
PROCEDURE InitView*{gfx,-360}(VAR view{9}:View);
PROCEDURE InitVPort*{gfx,-204}(VAR vp{8}:ViewPort);
PROCEDURE LoadRGB4*{gfx,-192}(vp{8}:ViewPortPtr;
colors{9}:ARRAY OF INTEGER;
count{0}:INTEGER);
PROCEDURE LoadView*{gfx,-222}(view{9}:ViewPtr);
PROCEDURE LockLayerRom*{gfx,-432}(layer{13}:LayerPtr);
PROCEDURE MakeVPort*{gfx,-216}(view{8}:ViewPtr;
viewport{9}:ViewPortPtr);
PROCEDURE Move*{gfx,-240}(rp{9}:RastPortPtr;
x{0}:INTEGER;
y{1}:INTEGER);
PROCEDURE MoveSprite*{gfx,-426}(vp{8}:ViewPortPtr;
sprite{9}:SimpleSpritePtr;
x{0}:INTEGER;
y{1}:INTEGER);
PROCEDURE MrgCop*{gfx,-210}(view{9}:ViewPtr);
PROCEDURE NewRegion*{gfx,-516}():RegionPtr;
PROCEDURE OpenFont*{gfx,- 72}(textAttr{8}:TextAttrPtr):TextFontPtr;
PROCEDURE OrRectRegion*{gfx,-510}(region{8}:RegionPtr;
rectangle{9}:RectanglePtr):BOOLEAN;
PROCEDURE OrRegionRegion*{gfx,-612}(region1{8}:RegionPtr;
region2{9}:RegionPtr):BOOLEAN;
PROCEDURE OwnBlitter*{gfx,-456}();
PROCEDURE PolyDraw*{gfx,-336}(rp{9}:RastPortPtr;
count{0}:INTEGER;
array{8}:ARRAY OF Point);
PROCEDURE QBlit*{gfx,-276}(bp{9}:h.BltnodePtr);
PROCEDURE QBSBlit*{gfx,-294}(bsp{9}:h.BltnodePtr);
PROCEDURE ReadPixel*{gfx,-318}(rp{9}:RastPortPtr;
x{0}:INTEGER;
y{1}:INTEGER):LONGINT;
PROCEDURE RectFill*{gfx,-306}(rp{9}:RastPortPtr;
xMin{0}:INTEGER;
yMin{1}:INTEGER;
xMax{2}:INTEGER;
yMax{3}:INTEGER);
PROCEDURE RemFont*{gfx,-486}(textFont{9}:TextFontPtr);
PROCEDURE RemIBob*{gfx,-132}(bob{8}:BobPtr;
rp{9}:RastPortPtr;
vp{10}:ViewPortPtr);
PROCEDURE RemVSprite*{gfx,-138}(vs{8}:VSpritePtr);
PROCEDURE ScrollRaster*{gfx,-396}(rp{9}:RastPortPtr;
dx{0}:INTEGER;
dy{1}:INTEGER;
xMin{2}:INTEGER;
yMin{3}:INTEGER;
xMax{4}:INTEGER;
yMax{5}:INTEGER);
PROCEDURE ScrollVPort*{gfx,-588}(vp{8}:ViewPortPtr);
PROCEDURE SetAPen*{gfx,-342}(rp{9}:RastPortPtr;
pen{0}:INTEGER);
PROCEDURE SetBPen*{gfx,-348}(rp{9}:RastPortPtr;
pen{0}:INTEGER);
PROCEDURE SetCollision*{gfx,-144}(num{0}:LONGINT;
routine{8}:PROC;
gInfo{9}:GelsInfoPtr);
PROCEDURE SetDrMd*{gfx,-354}(rp{9}:RastPortPtr;
mode{0}:SHORTSET (* DrawModes *));
PROCEDURE SetFont*{gfx,- 66}(rp{9}:RastPortPtr;
font{8}:TextFontPtr);
PROCEDURE SetRast*{gfx,-234}(rp{9}:RastPortPtr;
pen{0}:INTEGER);
PROCEDURE SetRGB4*{gfx,-288}(vp{8}:ViewPortPtr;
n{0}:INTEGER;
r{1}:INTEGER;
g{2}:INTEGER;
b{3}:INTEGER);
PROCEDURE SetRGB4CM*{gfx,-630}(cm{8}:ColorMapPtr;
n{0}:INTEGER;
r{1}:INTEGER;
g{2}:INTEGER;
b{3}:INTEGER);
PROCEDURE SetSoftStyle*{gfx,- 90}(
rp{9}:RastPortPtr;
style{0}:SHORTSET; (* FontStyles *)
enable{1}:SHORTSET (* FontStyles *)):SHORTSET; (* FontStyles *)
PROCEDURE SortGList*{gfx,-150}(rp{9}:RastPortPtr);
PROCEDURE SyncSBitMap*{gfx,-444}(layer{8}:LayerPtr);
PROCEDURE Text*{gfx,- 60}(rp{9}:RastPortPtr;
string{8}:ARRAY OF CHAR;
count{0}:LONGINT);
PROCEDURE TextLength*{gfx,- 54}(rp{9}:RastPortPtr;
string{8}:ARRAY OF CHAR;
count{0}:LONGINT):INTEGER;
PROCEDURE UCopperListInit*{gfx,-594}(copperList{8}:UCopListPtr;
num{0}:LONGINT):UCopListPtr;
PROCEDURE UnlockLayerRom*{gfx,-438}(layer{13}:LayerPtr);
PROCEDURE VBeamPos*{gfx,-384}():LONGINT;
PROCEDURE WaitBlit*{gfx,-228}();
PROCEDURE WaitBOVP*{gfx,-402}(vp{8}:ViewPortPtr);
PROCEDURE WaitTOF*{gfx,-270}();
PROCEDURE WritePixel*{gfx,-324}(rp{9}:RastPortPtr;
x{0}:INTEGER;
y{1}:INTEGER):BOOLEAN;
PROCEDURE XorRectRegion*{gfx,-558}(region{8}:RegionPtr;
rectangle{9}:RectanglePtr):BOOLEAN;
PROCEDURE XorRegionRegion*{gfx,-618}(region1{8}:RegionPtr;
region2{9}:RegionPtr):BOOLEAN;
(*-------------------------------------------------------------------------*)
(*------ GfxMacros: ------*)
PROCEDURE OnDisplay*;
BEGIN h.custom.dmacon := h.bitSet + {h.raster} END OnDisplay;
PROCEDURE OffDisplay*;
BEGIN h.custom.dmacon := h.bitClr + {h.raster} END OffDisplay;
PROCEDURE OnSprite*;
BEGIN h.custom.dmacon := h.bitSet + {h.sprite} END OnSprite;
PROCEDURE OffSprite*;
BEGIN h.custom.dmacon := h.bitClr + {h.sprite} END OffSprite;
PROCEDURE OnVBlank*;
BEGIN h.custom.intena := h.bitSet + {e.vertb} END OnVBlank;
PROCEDURE OffVBlank*;
BEGIN h.custom.intena := h.bitClr + {e.vertb} END OffVBlank;
PROCEDURE SetOPen*(w: RastPortPtr; c: BYTE);
BEGIN
w.aOlPen := c;
INCL(w.flags,areaOutline);
END SetOPen;
PROCEDURE SetDrPt*(w: RastPortPtr; p: INTEGER);
BEGIN
w.linePtrn := p;
INCL(w.flags,firstDot);
END SetDrPt;
PROCEDURE SetWrMsk*(w: RastPortPtr; m: SHORTSET);
BEGIN w.mask := m END SetWrMsk;
PROCEDURE SetAfPt*(w: RastPortPtr; p: e.ADDRESS; n: BYTE);
BEGIN
w.areaPtrn := p;
w.areaPtSz := n;
END SetAfPt;
PROCEDURE BndryOff*(w: RastPortPtr);
BEGIN EXCL(w.flags,areaOutline) END BndryOff;
PROCEDURE CINIT*(c: UCopListPtr; n: LONGINT);
BEGIN IF UCopperListInit(c,n)=NIL THEN END END CINIT;
PROCEDURE CMOVE*(c: UCopListPtr; a: e.ADDRESS; b: INTEGER);
BEGIN CMove(c,a,b); CBump(c) END CMOVE;
PROCEDURE CWAIT*(c: UCopListPtr; a,b: INTEGER);
BEGIN CWait(c,a,b); CBump(c) END CWAIT;
PROCEDURE CEND*(c: UCopListPtr);
BEGIN CWAIT(c,10000,255) END CEND;
(*-------------------------------------------------------------------------*)
BEGIN
gfx := s.VAL(GfxBasePtr,e.OpenLibrary("graphics.library",33));
IF gfx = NIL THEN HALT(0) END;
CLOSE
IF gfx#NIL THEN e.CloseLibrary(s.VAL(e.LibraryPtr,gfx)) END;
END Graphics.