graphics.pas 133 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782
  1. {
  2. This file is part of the Free Pascal run time library.
  3. A file in Amiga system run time library.
  4. Copyright (c) 1998-2003 by Nils Sjoholm
  5. member of the Amiga RTL development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {
  13. History:
  14. Found bugs in,
  15. WritePixelArray8,
  16. WritePixelLine8,
  17. ReadPixelArray8,
  18. ReadPixelLine8,
  19. WriteChunkyPixels.
  20. They all had one argument(array_) defined as pchar,
  21. should be pointer, fixed.
  22. 20 Aug 2000.
  23. InitTmpRas had wrong define for the buffer arg.
  24. Changed from pchar to PLANEPTR.
  25. 23 Aug 2000.
  26. Compiler had problems with Text, changed to GText.
  27. 24 Aug 2000.
  28. Added functions and procedures with array of const.
  29. For use with fpc 1.0.7. They are in systemvartags.
  30. 11 Nov 2002.
  31. Added the defines use_amiga_smartlink and
  32. use_auto_openlib.
  33. 13 Jan 2003.
  34. Update for AmifaOS 3.9.
  35. Changed start code for unit.
  36. Bugs in ChangeSprite, GetRGB32, LoadRGB32,
  37. LoadRGB4 and PolyDraw, fixed.
  38. 01 Feb 2003.
  39. Changed integer > smallint,
  40. cardinal > longword.
  41. 09 Feb 2003.
  42. [email protected]
  43. }
  44. {$I useamigasmartlink.inc}
  45. {$ifdef use_amiga_smartlink}
  46. {$smartlink on}
  47. {$endif use_amiga_smartlink}
  48. unit graphics;
  49. INTERFACE
  50. uses exec, hardware, utility;
  51. const
  52. BITSET = $8000;
  53. BITCLR = 0;
  54. type
  55. pRectangle = ^tRectangle;
  56. tRectangle = record
  57. MinX,MinY : Word;
  58. MaxX,MaxY : Word;
  59. end;
  60. pRect32 = ^tRect32;
  61. tRect32 = record
  62. MinX,MinY : Longint;
  63. MaxX,MaxY : Longint;
  64. end;
  65. pPoint = ^tPoint;
  66. tPoint = record
  67. x,y : Word;
  68. end;
  69. PLANEPTR = Pointer;
  70. pBitMap = ^tBitMap;
  71. tBitMap = record
  72. BytesPerRow : Word;
  73. Rows : Word;
  74. Flags : Byte;
  75. Depth : Byte;
  76. pad : Word;
  77. Planes : Array [0..7] of PLANEPTR;
  78. end;
  79. {* flags for AllocBitMap, etc. *}
  80. const
  81. BMB_CLEAR = 0;
  82. BMB_DISPLAYABLE = 1;
  83. BMB_INTERLEAVED = 2;
  84. BMB_STANDARD = 3;
  85. BMB_MINPLANES = 4;
  86. BMF_CLEAR = (1 shl BMB_CLEAR);
  87. BMF_DISPLAYABLE = (1 shl BMB_DISPLAYABLE);
  88. BMF_INTERLEAVED = (1 shl BMB_INTERLEAVED);
  89. BMF_STANDARD = (1 shl BMB_STANDARD);
  90. BMF_MINPLANES = (1 shl BMB_MINPLANES);
  91. {* the following are for GetBitMapAttr() *}
  92. BMA_HEIGHT = 0;
  93. BMA_DEPTH = 4;
  94. BMA_WIDTH = 8;
  95. BMA_FLAGS = 12;
  96. { structures used by and constructed by windowlib.a }
  97. { understood by rom software }
  98. type
  99. pClipRect = ^tClipRect;
  100. tClipRect = record
  101. Next : pClipRect; { roms used to find next ClipRect }
  102. prev : pClipRect; { ignored by roms, used by windowlib }
  103. lobs : Pointer; { ignored by roms, used by windowlib (LayerPtr)}
  104. BitMap : pBitMap;
  105. bounds : tRectangle; { set up by windowlib, used by roms }
  106. _p1,
  107. _p2 : Pointer; { system reserved }
  108. reserved : Longint; { system use }
  109. Flags : Longint; { only exists in layer allocation }
  110. end;
  111. pLayer = ^tLayer;
  112. tLayer = record
  113. front,
  114. back : pLayer; { ignored by roms }
  115. ClipRect : pClipRect; { read by roms to find first cliprect }
  116. rp : Pointer; { (RastPortPtr) ignored by roms, I hope }
  117. bounds : tRectangle; { ignored by roms }
  118. reserved : Array [0..3] of Byte;
  119. priority : Word; { system use only }
  120. Flags : Word; { obscured ?, Virtual BitMap? }
  121. SuperBitMap : pBitMap;
  122. SuperClipRect : pClipRect; { super bitmap cliprects if
  123. VBitMap != 0}
  124. { else damage cliprect list for refresh }
  125. Window : Pointer; { reserved for user interface use }
  126. Scroll_X,
  127. Scroll_Y : Word;
  128. cr,
  129. cr2,
  130. crnew : pClipRect; { used by dedice }
  131. SuperSaveClipRects : pClipRect; { preallocated cr's }
  132. cliprects : pClipRect; { system use during refresh }
  133. LayerInfo : Pointer; { points to head of the list }
  134. Lock : tSignalSemaphore;
  135. BackFill : pHook;
  136. reserved1 : ULONG;
  137. ClipRegion : Pointer;
  138. saveClipRects : Pointer; { used to back out when in trouble}
  139. Width,
  140. Height : smallint;
  141. reserved2 : Array [0..17] of Byte;
  142. { this must stay here }
  143. DamageList : Pointer; { list of rectangles to refresh
  144. through }
  145. end;
  146. const
  147. { internal cliprect flags }
  148. CR_NEEDS_NO_CONCEALED_RASTERS = 1;
  149. CR_NEEDS_NO_LAYERBLIT_DAMAGE = 2;
  150. { defines for code values for getcode }
  151. ISLESSX = 1;
  152. ISLESSY = 2;
  153. ISGRTRX = 4;
  154. ISGRTRY = 8;
  155. {------ Font Styles ------------------------------------------------}
  156. FS_NORMAL = 0; { normal text (no style bits set) }
  157. FSB_EXTENDED = 3; { extended face (wider than normal) }
  158. FSF_EXTENDED = 8;
  159. FSB_ITALIC = 2; { italic (slanted 1:2 right) }
  160. FSF_ITALIC = 4;
  161. FSB_BOLD = 1; { bold face text (ORed w/ shifted) }
  162. FSF_BOLD = 2;
  163. FSB_UNDERLINED = 0; { underlined (under baseline) }
  164. FSF_UNDERLINED = 1;
  165. FSB_COLORFONT = 6; { this uses ColorTextFont structure }
  166. FSF_COLORFONT = $40;
  167. FSB_TAGGED = 7; { the TextAttr is really an TTextAttr, }
  168. FSF_TAGGED = $80;
  169. {------ Font Flags -------------------------------------------------}
  170. FPB_ROMFONT = 0; { font is in rom }
  171. FPF_ROMFONT = 1;
  172. FPB_DISKFONT = 1; { font is from diskfont.library }
  173. FPF_DISKFONT = 2;
  174. FPB_REVPATH = 2; { designed path is reversed (e.g. left) }
  175. FPF_REVPATH = 4;
  176. FPB_TALLDOT = 3; { designed for hires non-interlaced }
  177. FPF_TALLDOT = 8;
  178. FPB_WIDEDOT = 4; { designed for lores interlaced }
  179. FPF_WIDEDOT = 16;
  180. FPB_PROPORTIONAL = 5; { character sizes can vary from nominal }
  181. FPF_PROPORTIONAL = 32;
  182. FPB_DESIGNED = 6; { size is "designed", not constructed }
  183. FPF_DESIGNED = 64;
  184. FPB_REMOVED = 7; { the font has been removed }
  185. FPF_REMOVED = 128;
  186. {***** TextAttr node, matches text attributes in RastPort *********}
  187. type
  188. pTextAttr = ^tTextAttr;
  189. tTextAttr = record
  190. ta_Name : STRPTR; { name of the font }
  191. ta_YSize : Word; { height of the font }
  192. ta_Style : Byte; { intrinsic font style }
  193. ta_Flags : Byte; { font preferences and flags }
  194. end;
  195. pTTextAttr = ^tTTextAttr;
  196. tTTextAttr = record
  197. tta_Name : STRPTR; { name of the font }
  198. tta_YSize : Word; { height of the font }
  199. tta_Style : Byte; { intrinsic font style }
  200. tta_Flags : Byte; { font preferences AND flags }
  201. tta_Tags : pTagItem; { extended attributes }
  202. end;
  203. {***** Text Tags **************************************************}
  204. CONST
  205. TA_DeviceDPI = (1+TAG_USER); { Tag value is Point union: }
  206. { Hi Longint XDPI, Lo Longint YDPI }
  207. MAXFONTMATCHWEIGHT = 32767; { perfect match from WeighTAMatch }
  208. {***** TextFonts node *********************************************}
  209. Type
  210. pTextFont = ^tTextFont;
  211. tTextFont = record
  212. tf_Message : tMessage; { reply message for font removal }
  213. { font name in LN \ used in this }
  214. tf_YSize : Word; { font height | order to best }
  215. tf_Style : Byte; { font style | match a font }
  216. tf_Flags : Byte; { preferences and flags / request. }
  217. tf_XSize : Word; { nominal font width }
  218. tf_Baseline : Word; { distance from the top of char to baseline }
  219. tf_BoldSmear : Word; { smear to affect a bold enhancement }
  220. tf_Accessors : Word; { access count }
  221. tf_LoChar : Byte; { the first character described here }
  222. tf_HiChar : Byte; { the last character described here }
  223. tf_CharData : Pointer; { the bit character data }
  224. tf_Modulo : Word; { the row modulo for the strike font data }
  225. tf_CharLoc : Pointer; { ptr to location data for the strike font }
  226. { 2 words: bit offset then size }
  227. tf_CharSpace : Pointer; { ptr to words of proportional spacing data }
  228. tf_CharKern : Pointer; { ptr to words of kerning data }
  229. end;
  230. {----- tfe_Flags0 (partial definition) ----------------------------}
  231. CONST
  232. TE0B_NOREMFONT = 0; { disallow RemFont for this font }
  233. TE0F_NOREMFONT = $01;
  234. Type
  235. pTextFontExtension = ^tTextFontExtension;
  236. tTextFontExtension = record { this structure is read-only }
  237. tfe_MatchWord : Word; { a magic cookie for the extension }
  238. tfe_Flags0 : Byte; { (system private flags) }
  239. tfe_Flags1 : Byte; { (system private flags) }
  240. tfe_BackPtr : pTextFont; { validation of compilation }
  241. tfe_OrigReplyPort : pMsgPort; { original value in tf_Extension }
  242. tfe_Tags : pTagItem; { Text Tags for the font }
  243. tfe_OFontPatchS, { (system private use) }
  244. tfe_OFontPatchK : Pointer; { (system private use) }
  245. { this space is reserved for future expansion }
  246. END;
  247. {***** ColorTextFont node *****************************************}
  248. {----- ctf_Flags --------------------------------------------------}
  249. CONST
  250. CT_COLORMASK = $000F; { mask to get to following color styles }
  251. CT_COLORFONT = $0001; { color map contains designer's colors }
  252. CT_GREYFONT = $0002; { color map describes even-stepped }
  253. { brightnesses from low to high }
  254. CT_ANTIALIAS = $0004; { zero background thru fully saturated char }
  255. CTB_MAPCOLOR = 0; { map ctf_FgColor to the rp_FgPen IF it's }
  256. CTF_MAPCOLOR = $0001; { is a valid color within ctf_Low..ctf_High }
  257. {----- ColorFontColors --------------------------------------------}
  258. Type
  259. pColorFontColors = ^tColorFontColors;
  260. tColorFontColors = record
  261. cfc_Reserved, { *must* be zero }
  262. cfc_Count : Word; { number of entries in cfc_ColorTable }
  263. cfc_ColorTable : Pointer; { 4 bit per component color map packed xRGB }
  264. END;
  265. {----- ColorTextFont ----------------------------------------------}
  266. pColorTextFont = ^tColorTextFont;
  267. tColorTextFont = record
  268. ctf_TF : tTextFont;
  269. ctf_Flags : Word; { extended flags }
  270. ctf_Depth, { number of bit planes }
  271. ctf_FgColor, { color that is remapped to FgPen }
  272. ctf_Low, { lowest color represented here }
  273. ctf_High, { highest color represented here }
  274. ctf_PlanePick, { PlanePick ala Images }
  275. ctf_PlaneOnOff : Byte; { PlaneOnOff ala Images }
  276. ctf_ColorFontColors : pColorFontColors; { colors for font }
  277. ctf_CharData : Array[0..7] of APTR; {pointers to bit planes ala tf_CharData }
  278. END;
  279. {***** TextExtent node ********************************************}
  280. pTextExtent = ^tTextExtent;
  281. tTextExtent = record
  282. te_Width, { same as TextLength }
  283. te_Height : Word; { same as tf_YSize }
  284. te_Extent : tRectangle; { relative to CP }
  285. END;
  286. const
  287. COPPER_MOVE = 0; { pseude opcode for move #XXXX,dir }
  288. COPPER_WAIT = 1; { pseudo opcode for wait y,x }
  289. CPRNXTBUF = 2; { continue processing with next buffer }
  290. CPR_NT_LOF = $8000; { copper instruction only for Longint frames }
  291. CPR_NT_SHT = $4000; { copper instruction only for long frames }
  292. CPR_NT_SYS = $2000; { copper user instruction only }
  293. type
  294. { Note: The combination VWaitAddr and HWaitAddr replace a three way
  295. union in C. The three possibilities are:
  296. nxtList : CopListPtr; or
  297. VWaitPos : Longint;
  298. HWaitPos : Longint; or
  299. DestAddr : Longint;
  300. DestData : Longint;
  301. }
  302. pCopIns = ^tCopIns;
  303. tCopIns = record
  304. OpCode : smallint; { 0 = move, 1 = wait }
  305. VWaitAddr : smallint; { vertical or horizontal wait position }
  306. HWaitData : smallint; { destination Pointer or data to send }
  307. end;
  308. { structure of cprlist that points to list that hardware actually executes }
  309. pcprlist = ^tcprlist;
  310. tcprlist = record
  311. Next : pcprlist;
  312. start : psmallint; { start of copper list }
  313. MaxCount : smallint; { number of long instructions }
  314. end;
  315. pCopList = ^tCopList;
  316. tCopList = record
  317. Next : pCopList; { next block for this copper list }
  318. CopList : pCopList; { system use }
  319. ViewPort : Pointer; { system use }
  320. CopIns : pCopIns; { start of this block }
  321. CopPtr : pCopIns; { intermediate ptr }
  322. CopLStart : psmallint; { mrgcop fills this in for Long Frame}
  323. CopSStart : psmallint; { mrgcop fills this in for Longint Frame}
  324. Count : smallint; { intermediate counter }
  325. MaxCount : smallint; { max # of copins for this block }
  326. DyOffset : smallint; { offset this copper list vertical waits }
  327. SLRepeat : Word;
  328. Flags : Word;
  329. end;
  330. pUCopList = ^tUCopList;
  331. tUCopList = record
  332. Next : pUCopList;
  333. FirstCopList : pCopList; { head node of this copper list }
  334. CopList : pCopList; { node in use }
  335. end;
  336. pcopinit = ^tcopinit;
  337. tcopinit = record
  338. vsync_hblank : array [0..1] of word;
  339. diagstrt : Array [0..11] of word;
  340. fm0 : array [0..1] of word;
  341. diwstart : array [0..9] of word;
  342. bplcon2 : array [0..1] of word;
  343. sprfix : array [0..(2*8)] of word;
  344. sprstrtup : Array [0..(2*8*2)] of Word;
  345. wait14 : array [0..1] of word;
  346. norm_hblank : array [0..1] of word;
  347. jump : array [0..1] of word;
  348. wait_forever : array [0..5] of word;
  349. sprstop : Array [0..7] of Word;
  350. end;
  351. pAreaInfo = ^tAreaInfo;
  352. tAreaInfo = record
  353. VctrTbl : Pointer; { ptr to start of vector table }
  354. VctrPtr : Pointer; { ptr to current vertex }
  355. FlagTbl : Pointer; { ptr to start of vector flag table }
  356. FlagPtr : Pointer; { ptrs to areafill flags }
  357. Count : smallint; { number of vertices in list }
  358. MaxCount : smallint; { AreaMove/Draw will not allow Count>MaxCount}
  359. FirstX,
  360. FirstY : smallint; { first point for this polygon }
  361. end;
  362. pTmpRas = ^tTmpRas;
  363. tTmpRas = record
  364. RasPtr : Pointer;
  365. Size : Longint;
  366. end;
  367. { unoptimized for 32bit alignment of pointers }
  368. pGelsInfo = ^tGelsInfo;
  369. tGelsInfo = record
  370. sprRsrvd : Shortint; { flag of which sprites to reserve from
  371. vsprite system }
  372. Flags : Byte; { system use }
  373. gelHead,
  374. gelTail : Pointer; { (VSpritePtr) dummy vSprites for list management}
  375. { pointer to array of 8 WORDS for sprite available lines }
  376. nextLine : Pointer;
  377. { pointer to array of 8 pointers for color-last-assigned to vSprites }
  378. lastColor : Pointer;
  379. collHandler : Pointer; { (collTablePtr) Pointeres of collision routines }
  380. leftmost,
  381. rightmost,
  382. topmost,
  383. bottommost : smallint;
  384. firstBlissObj,
  385. lastBlissObj : Pointer; { system use only }
  386. end;
  387. pRastPort = ^tRastPort;
  388. tRastPort = record
  389. Layer : pLayer; { LayerPtr }
  390. BitMap : pBitMap; { BitMapPtr }
  391. AreaPtrn : Pointer; { ptr to areafill pattern }
  392. TmpRas : pTmpRas;
  393. AreaInfo : pAreaInfo;
  394. GelsInfo : pGelsInfo;
  395. Mask : Byte; { write mask for this raster }
  396. FgPen : Shortint; { foreground pen for this raster }
  397. BgPen : Shortint; { background pen }
  398. AOlPen : Shortint; { areafill outline pen }
  399. DrawMode : Shortint; { drawing mode for fill, lines, and text }
  400. AreaPtSz : Shortint; { 2^n words for areafill pattern }
  401. linpatcnt : Shortint; { current line drawing pattern preshift }
  402. dummy : Shortint;
  403. Flags : Word; { miscellaneous control bits }
  404. LinePtrn : Word; { 16 bits for textured lines }
  405. cp_x,
  406. cp_y : smallint; { current pen position }
  407. minterms : Array [0..7] of Byte;
  408. PenWidth : smallint;
  409. PenHeight : smallint;
  410. Font : pTextFont; { (TextFontPtr) current font Pointer }
  411. AlgoStyle : Byte; { the algorithmically generated style }
  412. TxFlags : Byte; { text specific flags }
  413. TxHeight : Word; { text height }
  414. TxWidth : Word; { text nominal width }
  415. TxBaseline : Word; { text baseline }
  416. TxSpacing : smallint; { text spacing (per character) }
  417. RP_User : Pointer;
  418. longreserved : Array [0..1] of ULONG;
  419. wordreserved : Array [0..6] of Word; { used to be a node }
  420. reserved : Array [0..7] of Byte; { for future use }
  421. end;
  422. const
  423. { drawing modes }
  424. JAM1 = 0; { jam 1 color into raster }
  425. JAM2 = 1; { jam 2 colors into raster }
  426. COMPLEMENT = 2; { XOR bits into raster }
  427. INVERSVID = 4; { inverse video for drawing modes }
  428. { these are the flag bits for RastPort flags }
  429. FRST_DOT = $01; { draw the first dot of this line ? }
  430. ONE_DOT = $02; { use one dot mode for drawing lines }
  431. DBUFFER = $04; { flag set when RastPorts are double-buffered }
  432. { only used for bobs }
  433. AREAOUTLINE = $08; { used by areafiller }
  434. NOCROSSFILL = $20; { areafills have no crossovers }
  435. { there is only one style of clipping: raster clipping }
  436. { this preserves the continuity of jaggies regardless of clip window }
  437. { When drawing into a RastPort, if the ptr to ClipRect is nil then there }
  438. { is no clipping done, this is dangerous but useful for speed }
  439. Const
  440. CleanUp = $40;
  441. CleanMe = CleanUp;
  442. BltClearWait = 1; { Waits for blit to finish }
  443. BltClearXY = 2; { Use Row/Bytes per row method }
  444. { Useful minterms }
  445. StraightCopy = $C0; { Vanilla copy }
  446. InvertAndCopy = $30; { Invert the source before copy }
  447. InvertDest = $50; { Forget source, invert dest }
  448. { mode coercion definitions }
  449. const
  450. { These flags are passed (in combination) to CoerceMode() to determine the
  451. * type of coercion required.
  452. }
  453. { Ensure that the mode coerced to can display just as many colours as the
  454. * ViewPort being coerced.
  455. }
  456. PRESERVE_COLORS = 1;
  457. { Ensure that the mode coerced to is not interlaced. }
  458. AVOID_FLICKER = 2;
  459. { Coercion should ignore monitor compatibility issues. }
  460. IGNORE_MCOMPAT = 4;
  461. BIDTAG_COERCE = 1; { Private }
  462. const
  463. { VSprite flags }
  464. { user-set VSprite flags: }
  465. SUSERFLAGS = $00FF; { mask of all user-settable VSprite-flags }
  466. VSPRITE_f = $0001; { set if VSprite, clear if Bob }
  467. { VSPRITE had to be changed for name conflict }
  468. SAVEBACK = $0002; { set if background is to be saved/restored }
  469. OVERLAY = $0004; { set to mask image of Bob onto background }
  470. MUSTDRAW = $0008; { set if VSprite absolutely must be drawn }
  471. { system-set VSprite flags: }
  472. BACKSAVED = $0100; { this Bob's background has been saved }
  473. BOBUPDATE = $0200; { temporary flag, useless to outside world }
  474. GELGONE = $0400; { set if gel is completely clipped (offscreen) }
  475. VSOVERFLOW = $0800; { VSprite overflow (if MUSTDRAW set we draw!) }
  476. { Bob flags }
  477. { these are the user flag bits }
  478. BUSERFLAGS = $00FF; { mask of all user-settable Bob-flags }
  479. SAVEBOB = $0001; { set to not erase Bob }
  480. BOBISCOMP = $0002; { set to identify Bob as AnimComp }
  481. { these are the system flag bits }
  482. BWAITING = $0100; { set while Bob is waiting on 'after' }
  483. BDRAWN = $0200; { set when Bob is drawn this DrawG pass}
  484. BOBSAWAY = $0400; { set to initiate removal of Bob }
  485. BOBNIX = $0800; { set when Bob is completely removed }
  486. SAVEPRESERVE = $1000; { for back-restore during double-buffer}
  487. OUTSTEP = $2000; { for double-clearing if double-buffer }
  488. { defines for the animation procedures }
  489. ANFRACSIZE = 6;
  490. ANIMHALF = $0020;
  491. RINGTRIGGER = $0001;
  492. { UserStuff definitions
  493. * the user can define these to be a single variable or a sub-structure
  494. * if undefined by the user, the system turns these into innocuous variables
  495. * see the manual for a thorough definition of the UserStuff definitions
  496. *
  497. }
  498. type
  499. VUserStuff = smallint; { Sprite user stuff }
  500. BUserStuff = smallint; { Bob user stuff }
  501. AUserStuff = smallint; { AnimOb user stuff }
  502. {********************** GEL STRUCTURES **********************************}
  503. pVSprite = ^tVSprite;
  504. tVSprite = record
  505. { --------------------- SYSTEM VARIABLES ------------------------------- }
  506. { GEL linked list forward/backward pointers sorted by y,x value }
  507. NextVSprite : pVSprite;
  508. PrevVSprite : pVSprite;
  509. { GEL draw list constructed in the order the Bobs are actually drawn, then
  510. * list is copied to clear list
  511. * must be here in VSprite for system boundary detection
  512. }
  513. DrawPath : pVSprite; { pointer of overlay drawing }
  514. ClearPath : pVSprite; { pointer for overlay clearing }
  515. { the VSprite positions are defined in (y,x) order to make sorting
  516. * sorting easier, since (y,x) as a long Longint
  517. }
  518. OldY, OldX : smallint; { previous position }
  519. { --------------------- COMMON VARIABLES --------------------------------- }
  520. Flags : smallint; { VSprite flags }
  521. { --------------------- USER VARIABLES ----------------------------------- }
  522. { the VSprite positions are defined in (y,x) order to make sorting
  523. * sorting easier, since (y,x) as a long Longint
  524. }
  525. Y, X : smallint; { screen position }
  526. Height : smallint;
  527. Width : smallint; { number of words per row of image data }
  528. Depth : smallint; { number of planes of data }
  529. MeMask : smallint; { which types can collide with this VSprite}
  530. HitMask : smallint; { which types this VSprite can collide with}
  531. ImageData : Pointer; { pointer to VSprite image }
  532. { borderLine is the one-dimensional logical OR of all
  533. * the VSprite bits, used for fast collision detection of edge
  534. }
  535. BorderLine : Pointer; { logical OR of all VSprite bits }
  536. CollMask : Pointer; { similar to above except this is a matrix }
  537. { pointer to this VSprite's color definitions (not used by Bobs) }
  538. SprColors : Pointer;
  539. VSBob : Pointer; { (BobPtr) points home if this VSprite
  540. is part of a Bob }
  541. { planePick flag: set bit selects a plane from image, clear bit selects
  542. * use of shadow mask for that plane
  543. * OnOff flag: if using shadow mask to fill plane, this bit (corresponding
  544. * to bit in planePick) describes whether to fill with 0's or 1's
  545. * There are two uses for these flags:
  546. * - if this is the VSprite of a Bob, these flags describe how the Bob
  547. * is to be drawn into memory
  548. * - if this is a simple VSprite and the user intends on setting the
  549. * MUSTDRAW flag of the VSprite, these flags must be set too to describe
  550. * which color registers the user wants for the image
  551. }
  552. PlanePick : Shortint;
  553. PlaneOnOff : Shortint;
  554. VUserExt : VUserStuff; { user definable: see note above }
  555. end;
  556. { dBufPacket defines the values needed to be saved across buffer to buffer
  557. * when in double-buffer mode
  558. }
  559. pDBufPacket = ^tDBufPacket;
  560. tDBufPacket = record
  561. BufY,
  562. BufX : Word; { save other buffers screen coordinates }
  563. BufPath : pVSprite; { carry the draw path over the gap }
  564. { these pointers must be filled in by the user }
  565. { pointer to other buffer's background save buffer }
  566. BufBuffer : Pointer;
  567. end;
  568. pBob = ^tBob;
  569. tBob = record
  570. { blitter-objects }
  571. { --------------------- SYSTEM VARIABLES --------------------------------- }
  572. { --------------------- COMMON VARIABLES --------------------------------- }
  573. Flags : smallint; { general purpose flags (see definitions below) }
  574. { --------------------- USER VARIABLES ----------------------------------- }
  575. SaveBuffer : Pointer; { pointer to the buffer for background save }
  576. { used by Bobs for "cookie-cutting" and multi-plane masking }
  577. ImageShadow : Pointer;
  578. { pointer to BOBs for sequenced drawing of Bobs
  579. * for correct overlaying of multiple component animations
  580. }
  581. Before : pBob; { draw this Bob before Bob pointed to by before }
  582. After : pBob; { draw this Bob after Bob pointed to by after }
  583. BobVSprite : pVSprite; { this Bob's VSprite definition }
  584. BobComp : Pointer; { (AnimCompPtr) pointer to this Bob's AnimComp def }
  585. DBuffer : Pointer; { pointer to this Bob's dBuf packet }
  586. BUserExt : BUserStuff; { Bob user extension }
  587. end;
  588. pAnimComp = ^tAnimComp;
  589. tAnimComp = record
  590. { --------------------- SYSTEM VARIABLES --------------------------------- }
  591. { --------------------- COMMON VARIABLES --------------------------------- }
  592. Flags : smallint; { AnimComp flags for system & user }
  593. { timer defines how long to keep this component active:
  594. * if set non-zero, timer decrements to zero then switches to nextSeq
  595. * if set to zero, AnimComp never switches
  596. }
  597. Timer : smallint;
  598. { --------------------- USER VARIABLES ----------------------------------- }
  599. { initial value for timer when the AnimComp is activated by the system }
  600. TimeSet : smallint;
  601. { pointer to next and previous components of animation object }
  602. NextComp : pAnimComp;
  603. PrevComp : pAnimComp;
  604. { pointer to component component definition of next image in sequence }
  605. NextSeq : pAnimComp;
  606. PrevSeq : pAnimComp;
  607. AnimCRoutine : Pointer; { Pointer of special animation procedure }
  608. YTrans : smallint; { initial y translation (if this is a component) }
  609. XTrans : smallint; { initial x translation (if this is a component) }
  610. HeadOb : Pointer; { AnimObPtr }
  611. AnimBob : pBob;
  612. end;
  613. pAnimOb = ^tAnimOb;
  614. tAnimOb = record
  615. { --------------------- SYSTEM VARIABLES --------------------------------- }
  616. NextOb,
  617. PrevOb : pAnimOb;
  618. { number of calls to Animate this AnimOb has endured }
  619. Clock : Longint;
  620. AnOldY,
  621. AnOldX : smallint; { old y,x coordinates }
  622. { --------------------- COMMON VARIABLES --------------------------------- }
  623. AnY,
  624. AnX : smallint; { y,x coordinates of the AnimOb }
  625. { --------------------- USER VARIABLES ----------------------------------- }
  626. YVel,
  627. XVel : smallint; { velocities of this object }
  628. YAccel,
  629. XAccel : smallint; { accelerations of this object }
  630. RingYTrans,
  631. RingXTrans : smallint; { ring translation values }
  632. AnimORoutine : Pointer; { Pointer of special animation
  633. procedure }
  634. HeadComp : pAnimComp; { pointer to first component }
  635. AUserExt : AUserStuff; { AnimOb user extension }
  636. end;
  637. ppAnimOb = ^pAnimOb;
  638. { ************************************************************************ }
  639. const
  640. B2NORM = 0;
  641. B2SWAP = 1;
  642. B2BOBBER = 2;
  643. { ************************************************************************ }
  644. type
  645. { a structure to contain the 16 collision procedure addresses }
  646. collTable = Array [0..15] of Pointer;
  647. pcollTable = ^collTable;
  648. const
  649. { These bit descriptors are used by the GEL collide routines.
  650. * These bits are set in the hitMask and meMask variables of
  651. * a GEL to describe whether or not these types of collisions
  652. * can affect the GEL. BNDRY_HIT is described further below;
  653. * this bit is permanently assigned as the boundary-hit flag.
  654. * The other bit GEL_HIT is meant only as a default to cover
  655. * any GEL hitting any other; the user may redefine this bit.
  656. }
  657. BORDERHIT = 0;
  658. { These bit descriptors are used by the GEL boundry hit routines.
  659. * When the user's boundry-hit routine is called (via the argument
  660. * set by a call to SetCollision) the first argument passed to
  661. * the user's routine is the Pointer of the GEL involved in the
  662. * boundry-hit, and the second argument has the appropriate bit(s)
  663. * set to describe which boundry was surpassed
  664. }
  665. TOPHIT = 1;
  666. BOTTOMHIT = 2;
  667. LEFTHIT = 4;
  668. RIGHTHIT = 8;
  669. Type
  670. pExtendedNode = ^tExtendedNode;
  671. tExtendedNode = record
  672. xln_Succ,
  673. xln_Pred : pNode;
  674. xln_Type : Byte;
  675. xln_Pri : Shortint;
  676. xln_Name : STRPTR;
  677. xln_Subsystem : Byte;
  678. xln_Subtype : Byte;
  679. xln_Library : Longint;
  680. xln_Init : Pointer;
  681. END;
  682. CONST
  683. SS_GRAPHICS = $02;
  684. VIEW_EXTRA_TYPE = 1;
  685. VIEWPORT_EXTRA_TYPE = 2;
  686. SPECIAL_MONITOR_TYPE = 3;
  687. MONITOR_SPEC_TYPE = 4;
  688. type
  689. { structure used by AddTOFTask }
  690. pIsrvstr = ^tIsrvstr;
  691. tIsrvstr = record
  692. is_Node : tNode;
  693. Iptr : pIsrvstr; { passed to srvr by os }
  694. code : Pointer;
  695. ccode : Pointer;
  696. Carg : Pointer;
  697. end;
  698. Type
  699. pAnalogSignalInterval = ^tAnalogSignalInterval;
  700. tAnalogSignalInterval = record
  701. asi_Start,
  702. asi_Stop : Word;
  703. END;
  704. pSpecialMonitor = ^tSpecialMonitor;
  705. tSpecialMonitor = record
  706. spm_Node : tExtendedNode;
  707. spm_Flags : Word;
  708. do_monitor,
  709. reserved1,
  710. reserved2,
  711. reserved3 : Pointer;
  712. hblank,
  713. vblank,
  714. hsync,
  715. vsync : tAnalogSignalInterval;
  716. END;
  717. pMonitorSpec = ^tMonitorSpec;
  718. tMonitorSpec = record
  719. ms_Node : tExtendedNode;
  720. ms_Flags : Word;
  721. ratioh,
  722. ratiov : Longint;
  723. total_rows,
  724. total_colorclocks,
  725. DeniseMaxDisplayColumn,
  726. BeamCon0,
  727. min_row : Word;
  728. ms_Special : pSpecialMonitor;
  729. ms_OpenCount : Word;
  730. ms_transform,
  731. ms_translate,
  732. ms_scale : Pointer;
  733. ms_xoffset,
  734. ms_yoffset : Word;
  735. ms_LegalView : tRectangle;
  736. ms_maxoscan, { maximum legal overscan }
  737. ms_videoscan : Pointer; { video display overscan }
  738. DeniseMinDisplayColumn : Word;
  739. DisplayCompatible : ULONG;
  740. DisplayInfoDataBase : tList;
  741. DisplayInfoDataBaseSemaphore : tSignalSemaphore;
  742. ms_MrgCop,
  743. ms_LoadView,
  744. ms_KillView : Longint;
  745. END;
  746. const
  747. TO_MONITOR = 0;
  748. FROM_MONITOR = 1;
  749. STANDARD_XOFFSET = 9;
  750. STANDARD_YOFFSET = 0;
  751. MSB_REQUEST_NTSC = 0;
  752. MSB_REQUEST_PAL = 1;
  753. MSB_REQUEST_SPECIAL = 2;
  754. MSB_REQUEST_A2024 = 3;
  755. MSB_DOUBLE_SPRITES = 4;
  756. MSF_REQUEST_NTSC = 1;
  757. MSF_REQUEST_PAL = 2;
  758. MSF_REQUEST_SPECIAL = 4;
  759. MSF_REQUEST_A2024 = 8;
  760. MSF_DOUBLE_SPRITES = 16;
  761. { obsolete, v37 compatible definitions follow }
  762. REQUEST_NTSC = 1;
  763. REQUEST_PAL = 2;
  764. REQUEST_SPECIAL = 4;
  765. REQUEST_A2024 = 8;
  766. DEFAULT_MONITOR_NAME : PChar = 'default.monitor';
  767. NTSC_MONITOR_NAME : PChar = 'ntsc.monitor';
  768. PAL_MONITOR_NAME : PChar = 'pal.monitor';
  769. STANDARD_MONITOR_MASK = ( REQUEST_NTSC OR REQUEST_PAL ) ;
  770. STANDARD_NTSC_ROWS = 262;
  771. STANDARD_PAL_ROWS = 312;
  772. STANDARD_COLORCLOCKS = 226;
  773. STANDARD_DENISE_MAX = 455;
  774. STANDARD_DENISE_MIN = 93 ;
  775. STANDARD_NTSC_BEAMCON = $0000;
  776. STANDARD_PAL_BEAMCON = DISPLAYPAL ;
  777. SPECIAL_BEAMCON = ( VARVBLANK OR LOLDIS OR VARVSYNC OR VARHSYNC OR VARBEAM OR CSBLANK OR VSYNCTRUE);
  778. MIN_NTSC_ROW = 21 ;
  779. MIN_PAL_ROW = 29 ;
  780. STANDARD_VIEW_X = $81 ;
  781. STANDARD_VIEW_Y = $2C ;
  782. STANDARD_HBSTRT = $06 ;
  783. STANDARD_HSSTRT = $0B ;
  784. STANDARD_HSSTOP = $1C ;
  785. STANDARD_HBSTOP = $2C ;
  786. STANDARD_VBSTRT = $0122;
  787. STANDARD_VSSTRT = $02A6;
  788. STANDARD_VSSTOP = $03AA;
  789. STANDARD_VBSTOP = $1066;
  790. VGA_COLORCLOCKS = (STANDARD_COLORCLOCKS/2);
  791. VGA_TOTAL_ROWS = (STANDARD_NTSC_ROWS*2);
  792. VGA_DENISE_MIN = 59 ;
  793. MIN_VGA_ROW = 29 ;
  794. VGA_HBSTRT = $08 ;
  795. VGA_HSSTRT = $0E ;
  796. VGA_HSSTOP = $1C ;
  797. VGA_HBSTOP = $1E ;
  798. VGA_VBSTRT = $0000;
  799. VGA_VSSTRT = $0153;
  800. VGA_VSSTOP = $0235;
  801. VGA_VBSTOP = $0CCD;
  802. VGA_MONITOR_NAME : PChar = 'vga.monitor';
  803. { NOTE: VGA70 definitions are obsolete - a VGA70 monitor has never been
  804. * implemented.
  805. }
  806. VGA70_COLORCLOCKS = (STANDARD_COLORCLOCKS/2) ;
  807. VGA70_TOTAL_ROWS = 449;
  808. VGA70_DENISE_MIN = 59;
  809. MIN_VGA70_ROW = 35 ;
  810. VGA70_HBSTRT = $08 ;
  811. VGA70_HSSTRT = $0E ;
  812. VGA70_HSSTOP = $1C ;
  813. VGA70_HBSTOP = $1E ;
  814. VGA70_VBSTRT = $0000;
  815. VGA70_VSSTRT = $02A6;
  816. VGA70_VSSTOP = $0388;
  817. VGA70_VBSTOP = $0F73;
  818. VGA70_BEAMCON = (SPECIAL_BEAMCON XOR VSYNCTRUE);
  819. VGA70_MONITOR_NAME : PChar = 'vga70.monitor';
  820. BROADCAST_HBSTRT = $01 ;
  821. BROADCAST_HSSTRT = $06 ;
  822. BROADCAST_HSSTOP = $17 ;
  823. BROADCAST_HBSTOP = $27 ;
  824. BROADCAST_VBSTRT = $0000;
  825. BROADCAST_VSSTRT = $02A6;
  826. BROADCAST_VSSTOP = $054C;
  827. BROADCAST_VBSTOP = $1C40;
  828. BROADCAST_BEAMCON = ( LOLDIS OR CSBLANK );
  829. RATIO_FIXEDPART = 4;
  830. RATIO_UNITY = 16;
  831. Type
  832. pRasInfo = ^tRasInfo;
  833. tRasInfo = record { used by callers to and InitDspC() }
  834. Next : pRasInfo; { used for dualpf }
  835. BitMap : pBitMap;
  836. RxOffset,
  837. RyOffset : smallint; { scroll offsets in this BitMap }
  838. end;
  839. pView = ^tView;
  840. tView = record
  841. ViewPort : Pointer; { ViewPortPtr }
  842. LOFCprList : pcprlist; { used for interlaced and noninterlaced }
  843. SHFCprList : pcprlist; { only used during interlace }
  844. DyOffset,
  845. DxOffset : smallint; { for complete View positioning }
  846. { offsets are +- adjustments to standard #s }
  847. Modes : WORD; { such as INTERLACE, GENLOC }
  848. end;
  849. { these structures are obtained via GfxNew }
  850. { and disposed by GfxFree }
  851. Type
  852. pViewExtra = ^tViewExtra;
  853. tViewExtra = record
  854. n : tExtendedNode;
  855. View : pView; { backwards link } { view in C-Includes }
  856. Monitor : pMonitorSpec; { monitors for this view }
  857. TopLine : Word;
  858. END;
  859. pViewPort = ^tViewPort;
  860. tViewPort = record
  861. Next : pViewPort;
  862. ColorMap : Pointer; { table of colors for this viewport } { ColorMapPtr }
  863. { if this is nil, MakeVPort assumes default values }
  864. DspIns : pCopList; { user by MakeView() }
  865. SprIns : pCopList; { used by sprite stuff }
  866. ClrIns : pCopList; { used by sprite stuff }
  867. UCopIns : pUCopList; { User copper list }
  868. DWidth,
  869. DHeight : smallint;
  870. DxOffset,
  871. DyOffset : smallint;
  872. Modes : Word;
  873. SpritePriorities : Byte; { used by makevp }
  874. reserved : Byte;
  875. RasInfo : pRasInfo;
  876. end;
  877. { this structure is obtained via GfxNew }
  878. { and disposed by GfxFree }
  879. pViewPortExtra = ^tViewPortExtra;
  880. tViewPortExtra = record
  881. n : tExtendedNode;
  882. ViewPort : pViewPort; { backwards link } { ViewPort in C-Includes }
  883. DisplayClip : tRectangle; { makevp display clipping information }
  884. { These are added for V39 }
  885. VecTable : Pointer; { Private }
  886. DriverData : Array[0..1] of Pointer;
  887. Flags : WORD;
  888. Origin : Array[0..1] of tPoint; { First visible point relative to the DClip.
  889. * One for each possible playfield.
  890. }
  891. cop1ptr, { private }
  892. cop2ptr : ULONG; { private }
  893. END;
  894. pColorMap = ^tColorMap;
  895. tColorMap = record
  896. Flags : Byte;
  897. CType : Byte; { This is "Type" in C includes }
  898. Count : Word;
  899. ColorTable : Pointer;
  900. cm_vpe : pViewPortExtra;
  901. LowColorBits : Pointer;
  902. TransparencyPlane,
  903. SpriteResolution,
  904. SpriteResDefault,
  905. AuxFlags : Byte;
  906. cm_vp : pViewPort; { ViewPortPtr }
  907. NormalDisplayInfo,
  908. CoerceDisplayInfo : Pointer;
  909. cm_batch_items : pTagItem;
  910. VPModeID : ULONG;
  911. PalExtra : Pointer;
  912. SpriteBase_Even,
  913. SpriteBase_Odd,
  914. Bp_0_base,
  915. Bp_1_base : Word;
  916. end;
  917. { if Type == 0 then ColorMap is V1.2/V1.3 compatible }
  918. { if Type != 0 then ColorMap is V36 compatible }
  919. { the system will never create other than V39 type colormaps when running V39 }
  920. CONST
  921. COLORMAP_TYPE_V1_2 = $00;
  922. COLORMAP_TYPE_V1_4 = $01;
  923. COLORMAP_TYPE_V36 = COLORMAP_TYPE_V1_4; { use this definition }
  924. COLORMAP_TYPE_V39 = $02;
  925. { Flags variable }
  926. COLORMAP_TRANSPARENCY = $01;
  927. COLORPLANE_TRANSPARENCY = $02;
  928. BORDER_BLANKING = $04;
  929. BORDER_NOTRANSPARENCY = $08;
  930. VIDEOCONTROL_BATCH = $10;
  931. USER_COPPER_CLIP = $20;
  932. CONST
  933. EXTEND_VSTRUCT = $1000; { unused bit in Modes field of View }
  934. { defines used for Modes in IVPargs }
  935. CONST
  936. GENLOCK_VIDEO = $0002;
  937. LACE = $0004;
  938. SUPERHIRES = $0020;
  939. PFBA = $0040;
  940. EXTRA_HALFBRITE= $0080;
  941. GENLOCK_AUDIO = $0100;
  942. DUALPF = $0400;
  943. HAM = $0800;
  944. EXTENDED_MODE = $1000;
  945. VP_HIDE = $2000;
  946. SPRITES = $4000;
  947. HIRES = $8000;
  948. VPF_A2024 = $40;
  949. VPF_AGNUS = $20;
  950. VPF_TENHZ = $20;
  951. BORDERSPRITES = $40;
  952. CMF_CMTRANS = 0;
  953. CMF_CPTRANS = 1;
  954. CMF_BRDRBLNK = 2;
  955. CMF_BRDNTRAN = 3;
  956. CMF_BRDRSPRT = 6;
  957. SPRITERESN_ECS = 0;
  958. { ^140ns, except in 35ns viewport, where it is 70ns. }
  959. SPRITERESN_140NS = 1;
  960. SPRITERESN_70NS = 2;
  961. SPRITERESN_35NS = 3;
  962. SPRITERESN_DEFAULT = -1;
  963. { AuxFlags : }
  964. CMAB_FULLPALETTE = 0;
  965. CMAF_FULLPALETTE = 1;
  966. CMAB_NO_INTERMED_UPDATE = 1;
  967. CMAF_NO_INTERMED_UPDATE = 2;
  968. CMAB_NO_COLOR_LOAD = 2;
  969. CMAF_NO_COLOR_LOAD = 4;
  970. CMAB_DUALPF_DISABLE = 3;
  971. CMAF_DUALPF_DISABLE = 8;
  972. Type
  973. pPaletteExtra = ^tPaletteExtra;
  974. tPaletteExtra = record { structure may be extended so watch out! }
  975. pe_Semaphore : tSignalSemaphore; { shared semaphore for arbitration }
  976. pe_FirstFree, { *private* }
  977. pe_NFree, { number of free colors }
  978. pe_FirstShared, { *private* }
  979. pe_NShared : WORD; { *private* }
  980. pe_RefCnt : Pointer; { *private* }
  981. pe_AllocList : Pointer; { *private* }
  982. pe_ViewPort : pViewPort; { back pointer to viewport }
  983. pe_SharableColors : WORD; { the number of sharable colors. }
  984. end;
  985. { flags values for ObtainPen }
  986. Const
  987. PENB_EXCLUSIVE = 0;
  988. PENB_NO_SETCOLOR = 1;
  989. PENF_EXCLUSIVE = 1;
  990. PENF_NO_SETCOLOR = 2;
  991. { obsolete names for PENF_xxx flags: }
  992. PEN_EXCLUSIVE = PENF_EXCLUSIVE;
  993. PEN_NO_SETCOLOR = PENF_NO_SETCOLOR;
  994. { precision values for ObtainBestPen : }
  995. PRECISION_EXACT = -1;
  996. PRECISION_IMAGE = 0;
  997. PRECISION_ICON = 16;
  998. PRECISION_GUI = 32;
  999. { tags for ObtainBestPen: }
  1000. OBP_Precision = $84000000;
  1001. OBP_FailIfBad = $84000001;
  1002. { From V39, MakeVPort() will return an error if there is not enough memory,
  1003. * or the requested mode cannot be opened with the requested depth with the
  1004. * given bitmap (for higher bandwidth alignments).
  1005. }
  1006. MVP_OK = 0; { you want to see this one }
  1007. MVP_NO_MEM = 1; { insufficient memory for intermediate workspace }
  1008. MVP_NO_VPE = 2; { ViewPort does not have a ViewPortExtra, and
  1009. * insufficient memory to allocate a temporary one.
  1010. }
  1011. MVP_NO_DSPINS = 3; { insufficient memory for intermidiate copper
  1012. * instructions.
  1013. }
  1014. MVP_NO_DISPLAY = 4; { BitMap data is misaligned for this viewport's
  1015. * mode and depth - see AllocBitMap().
  1016. }
  1017. MVP_OFF_BOTTOM = 5; { PRIVATE - you will never see this. }
  1018. { From V39, MrgCop() will return an error if there is not enough memory,
  1019. * or for some reason MrgCop() did not need to make any copper lists.
  1020. }
  1021. MCOP_OK = 0; { you want to see this one }
  1022. MCOP_NO_MEM = 1; { insufficient memory to allocate the system
  1023. * copper lists.
  1024. }
  1025. MCOP_NOP = 2; { MrgCop() did not merge any copper lists
  1026. * (eg, no ViewPorts in the list, or all marked as
  1027. * hidden).
  1028. }
  1029. Type
  1030. pDBufInfo = ^tDBufInfo;
  1031. tDBufInfo = record
  1032. dbi_Link1 : Pointer;
  1033. dbi_Count1 : ULONG;
  1034. dbi_SafeMessage : tMessage; { replied to when safe to write to old bitmap }
  1035. dbi_UserData1 : Pointer; { first user data }
  1036. dbi_Link2 : Pointer;
  1037. dbi_Count2 : ULONG;
  1038. dbi_DispMessage : tMessage; { replied to when new bitmap has been displayed at least
  1039. once }
  1040. dbi_UserData2 : Pointer; { second user data }
  1041. dbi_MatchLong : ULONG;
  1042. dbi_CopPtr1,
  1043. dbi_CopPtr2,
  1044. dbi_CopPtr3 : Pointer;
  1045. dbi_BeamPos1,
  1046. dbi_BeamPos2 : WORD;
  1047. end;
  1048. { include define file for graphics display mode IDs. }
  1049. const
  1050. INVALID_ID = NOT 0;
  1051. { With all the new modes that are available under V38 and V39, it is highly
  1052. * recommended that you use either the asl.library screenmode requester,
  1053. * and/or the V39 graphics.library function BestModeIDA().
  1054. *
  1055. * DO NOT interpret the any of the bits in the ModeID for its meaning. For
  1056. * example, do not interpret bit 3 ($4) as meaning the ModeID is interlaced.
  1057. * Instead, use GetDisplayInfoData() with DTAG_DISP, and examine the DIPF_...
  1058. * flags to determine a ModeID's characteristics. The only exception to
  1059. * this rule is that bit 7 ($80) will always mean the ModeID is
  1060. * ExtraHalfBright, and bit 11 ($800) will always mean the ModeID is HAM.
  1061. }
  1062. { normal identifiers }
  1063. MONITOR_ID_MASK = $FFFF1000;
  1064. DEFAULT_MONITOR_ID = $00000000;
  1065. NTSC_MONITOR_ID = $00011000;
  1066. PAL_MONITOR_ID = $00021000;
  1067. { the following 22 composite keys are for Modes on the default Monitor.
  1068. * NTSC & PAL "flavors" of these particular keys may be made by or'ing
  1069. * the NTSC or PAL MONITOR_ID with the desired MODE_KEY...
  1070. *
  1071. * For example, to specifically open a PAL HAM interlaced ViewPort
  1072. * (or intuition screen), you would use the modeid of
  1073. * (PAL_MONITOR_ID OR HAMLACE_KEY)
  1074. }
  1075. LORES_KEY = $00000000;
  1076. HIRES_KEY = $00008000;
  1077. SUPER_KEY = $00008020;
  1078. HAM_KEY = $00000800;
  1079. LORESLACE_KEY = $00000004;
  1080. HIRESLACE_KEY = $00008004;
  1081. SUPERLACE_KEY = $00008024;
  1082. HAMLACE_KEY = $00000804;
  1083. LORESDPF_KEY = $00000400;
  1084. HIRESDPF_KEY = $00008400;
  1085. SUPERDPF_KEY = $00008420;
  1086. LORESLACEDPF_KEY = $00000404;
  1087. HIRESLACEDPF_KEY = $00008404;
  1088. SUPERLACEDPF_KEY = $00008424;
  1089. LORESDPF2_KEY = $00000440;
  1090. HIRESDPF2_KEY = $00008440;
  1091. SUPERDPF2_KEY = $00008460;
  1092. LORESLACEDPF2_KEY = $00000444;
  1093. HIRESLACEDPF2_KEY = $00008444;
  1094. SUPERLACEDPF2_KEY = $00008464;
  1095. EXTRAHALFBRITE_KEY = $00000080;
  1096. EXTRAHALFBRITELACE_KEY = $00000084;
  1097. { New for AA ChipSet (V39) }
  1098. HIRESHAM_KEY = $00008800;
  1099. SUPERHAM_KEY = $00008820;
  1100. HIRESEHB_KEY = $00008080;
  1101. SUPEREHB_KEY = $000080a0;
  1102. HIRESHAMLACE_KEY = $00008804;
  1103. SUPERHAMLACE_KEY = $00008824;
  1104. HIRESEHBLACE_KEY = $00008084;
  1105. SUPEREHBLACE_KEY = $000080a4;
  1106. { Added for V40 - may be useful modes for some games or animations. }
  1107. LORESSDBL_KEY = $00000008;
  1108. LORESHAMSDBL_KEY = $00000808;
  1109. LORESEHBSDBL_KEY = $00000088;
  1110. HIRESHAMSDBL_KEY = $00008808;
  1111. { VGA identifiers }
  1112. VGA_MONITOR_ID = $00031000;
  1113. VGAEXTRALORES_KEY = $00031004;
  1114. VGALORES_KEY = $00039004;
  1115. VGAPRODUCT_KEY = $00039024;
  1116. VGAHAM_KEY = $00031804;
  1117. VGAEXTRALORESLACE_KEY = $00031005;
  1118. VGALORESLACE_KEY = $00039005;
  1119. VGAPRODUCTLACE_KEY = $00039025;
  1120. VGAHAMLACE_KEY = $00031805;
  1121. VGAEXTRALORESDPF_KEY = $00031404;
  1122. VGALORESDPF_KEY = $00039404;
  1123. VGAPRODUCTDPF_KEY = $00039424;
  1124. VGAEXTRALORESLACEDPF_KEY = $00031405;
  1125. VGALORESLACEDPF_KEY = $00039405;
  1126. VGAPRODUCTLACEDPF_KEY = $00039425;
  1127. VGAEXTRALORESDPF2_KEY = $00031444;
  1128. VGALORESDPF2_KEY = $00039444;
  1129. VGAPRODUCTDPF2_KEY = $00039464;
  1130. VGAEXTRALORESLACEDPF2_KEY = $00031445;
  1131. VGALORESLACEDPF2_KEY = $00039445;
  1132. VGAPRODUCTLACEDPF2_KEY = $00039465;
  1133. VGAEXTRAHALFBRITE_KEY = $00031084;
  1134. VGAEXTRAHALFBRITELACE_KEY = $00031085;
  1135. { New for AA ChipSet (V39) }
  1136. VGAPRODUCTHAM_KEY = $00039824;
  1137. VGALORESHAM_KEY = $00039804;
  1138. VGAEXTRALORESHAM_KEY = VGAHAM_KEY;
  1139. VGAPRODUCTHAMLACE_KEY = $00039825;
  1140. VGALORESHAMLACE_KEY = $00039805;
  1141. VGAEXTRALORESHAMLACE_KEY = VGAHAMLACE_KEY;
  1142. VGAEXTRALORESEHB_KEY = VGAEXTRAHALFBRITE_KEY;
  1143. VGAEXTRALORESEHBLACE_KEY = VGAEXTRAHALFBRITELACE_KEY;
  1144. VGALORESEHB_KEY = $00039084;
  1145. VGALORESEHBLACE_KEY = $00039085;
  1146. VGAEHB_KEY = $000390a4;
  1147. VGAEHBLACE_KEY = $000390a5;
  1148. { These ModeIDs are the scandoubled equivalents of the above, with the
  1149. * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  1150. * dualplayfield.
  1151. }
  1152. VGAEXTRALORESDBL_KEY = $00031000;
  1153. VGALORESDBL_KEY = $00039000;
  1154. VGAPRODUCTDBL_KEY = $00039020;
  1155. VGAEXTRALORESHAMDBL_KEY = $00031800;
  1156. VGALORESHAMDBL_KEY = $00039800;
  1157. VGAPRODUCTHAMDBL_KEY = $00039820;
  1158. VGAEXTRALORESEHBDBL_KEY = $00031080;
  1159. VGALORESEHBDBL_KEY = $00039080;
  1160. VGAPRODUCTEHBDBL_KEY = $000390a0;
  1161. { a2024 identifiers }
  1162. A2024_MONITOR_ID = $00041000;
  1163. A2024TENHERTZ_KEY = $00041000;
  1164. A2024FIFTEENHERTZ_KEY = $00049000;
  1165. { prototype identifiers (private) }
  1166. PROTO_MONITOR_ID = $00051000;
  1167. { These monitors and modes were added for the V38 release. }
  1168. EURO72_MONITOR_ID = $00061000;
  1169. EURO72EXTRALORES_KEY = $00061004;
  1170. EURO72LORES_KEY = $00069004;
  1171. EURO72PRODUCT_KEY = $00069024;
  1172. EURO72HAM_KEY = $00061804;
  1173. EURO72EXTRALORESLACE_KEY = $00061005;
  1174. EURO72LORESLACE_KEY = $00069005;
  1175. EURO72PRODUCTLACE_KEY = $00069025;
  1176. EURO72HAMLACE_KEY = $00061805;
  1177. EURO72EXTRALORESDPF_KEY = $00061404;
  1178. EURO72LORESDPF_KEY = $00069404;
  1179. EURO72PRODUCTDPF_KEY = $00069424;
  1180. EURO72EXTRALORESLACEDPF_KEY = $00061405;
  1181. EURO72LORESLACEDPF_KEY = $00069405;
  1182. EURO72PRODUCTLACEDPF_KEY = $00069425;
  1183. EURO72EXTRALORESDPF2_KEY = $00061444;
  1184. EURO72LORESDPF2_KEY = $00069444;
  1185. EURO72PRODUCTDPF2_KEY = $00069464;
  1186. EURO72EXTRALORESLACEDPF2_KEY = $00061445;
  1187. EURO72LORESLACEDPF2_KEY = $00069445;
  1188. EURO72PRODUCTLACEDPF2_KEY = $00069465;
  1189. EURO72EXTRAHALFBRITE_KEY = $00061084;
  1190. EURO72EXTRAHALFBRITELACE_KEY = $00061085;
  1191. { New AA modes (V39) }
  1192. EURO72PRODUCTHAM_KEY = $00069824;
  1193. EURO72PRODUCTHAMLACE_KEY = $00069825;
  1194. EURO72LORESHAM_KEY = $00069804;
  1195. EURO72LORESHAMLACE_KEY = $00069805;
  1196. EURO72EXTRALORESHAM_KEY = EURO72HAM_KEY;
  1197. EURO72EXTRALORESHAMLACE_KEY = EURO72HAMLACE_KEY ;
  1198. EURO72EXTRALORESEHB_KEY = EURO72EXTRAHALFBRITE_KEY;
  1199. EURO72EXTRALORESEHBLACE_KEY = EURO72EXTRAHALFBRITELACE_KEY;
  1200. EURO72LORESEHB_KEY = $00069084;
  1201. EURO72LORESEHBLACE_KEY = $00069085;
  1202. EURO72EHB_KEY = $000690a4;
  1203. EURO72EHBLACE_KEY = $000690a5;
  1204. { These ModeIDs are the scandoubled equivalents of the above, with the
  1205. * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  1206. * dualplayfield.
  1207. }
  1208. EURO72EXTRALORESDBL_KEY = $00061000;
  1209. EURO72LORESDBL_KEY = $00069000;
  1210. EURO72PRODUCTDBL_KEY = $00069020;
  1211. EURO72EXTRALORESHAMDBL_KEY = $00061800;
  1212. EURO72LORESHAMDBL_KEY = $00069800;
  1213. EURO72PRODUCTHAMDBL_KEY = $00069820;
  1214. EURO72EXTRALORESEHBDBL_KEY = $00061080;
  1215. EURO72LORESEHBDBL_KEY = $00069080;
  1216. EURO72PRODUCTEHBDBL_KEY = $000690a0;
  1217. EURO36_MONITOR_ID = $00071000;
  1218. { Euro36 modeids can be ORed with the default modeids a la NTSC and PAL.
  1219. * For example, Euro36 SuperHires is
  1220. * (EURO36_MONITOR_ID OR SUPER_KEY)
  1221. }
  1222. SUPER72_MONITOR_ID = $00081000;
  1223. { Super72 modeids can be ORed with the default modeids a la NTSC and PAL.
  1224. * For example, Super72 SuperHiresLace (80$600) is
  1225. * (SUPER72_MONITOR_ID OR SUPERLACE_KEY).
  1226. * The following scandoubled Modes are the exception:
  1227. }
  1228. SUPER72LORESDBL_KEY = $00081008;
  1229. SUPER72HIRESDBL_KEY = $00089008;
  1230. SUPER72SUPERDBL_KEY = $00089028;
  1231. SUPER72LORESHAMDBL_KEY = $00081808;
  1232. SUPER72HIRESHAMDBL_KEY = $00089808;
  1233. SUPER72SUPERHAMDBL_KEY = $00089828;
  1234. SUPER72LORESEHBDBL_KEY = $00081088;
  1235. SUPER72HIRESEHBDBL_KEY = $00089088;
  1236. SUPER72SUPEREHBDBL_KEY = $000890a8;
  1237. { These monitors and modes were added for the V39 release. }
  1238. DBLNTSC_MONITOR_ID = $00091000;
  1239. DBLNTSCLORES_KEY = $00091000;
  1240. DBLNTSCLORESFF_KEY = $00091004;
  1241. DBLNTSCLORESHAM_KEY = $00091800;
  1242. DBLNTSCLORESHAMFF_KEY = $00091804;
  1243. DBLNTSCLORESEHB_KEY = $00091080;
  1244. DBLNTSCLORESEHBFF_KEY = $00091084;
  1245. DBLNTSCLORESLACE_KEY = $00091005;
  1246. DBLNTSCLORESHAMLACE_KEY = $00091805;
  1247. DBLNTSCLORESEHBLACE_KEY = $00091085;
  1248. DBLNTSCLORESDPF_KEY = $00091400;
  1249. DBLNTSCLORESDPFFF_KEY = $00091404;
  1250. DBLNTSCLORESDPFLACE_KEY = $00091405;
  1251. DBLNTSCLORESDPF2_KEY = $00091440;
  1252. DBLNTSCLORESDPF2FF_KEY = $00091444;
  1253. DBLNTSCLORESDPF2LACE_KEY = $00091445;
  1254. DBLNTSCHIRES_KEY = $00099000;
  1255. DBLNTSCHIRESFF_KEY = $00099004;
  1256. DBLNTSCHIRESHAM_KEY = $00099800;
  1257. DBLNTSCHIRESHAMFF_KEY = $00099804;
  1258. DBLNTSCHIRESLACE_KEY = $00099005;
  1259. DBLNTSCHIRESHAMLACE_KEY = $00099805;
  1260. DBLNTSCHIRESEHB_KEY = $00099080;
  1261. DBLNTSCHIRESEHBFF_KEY = $00099084;
  1262. DBLNTSCHIRESEHBLACE_KEY = $00099085;
  1263. DBLNTSCHIRESDPF_KEY = $00099400;
  1264. DBLNTSCHIRESDPFFF_KEY = $00099404;
  1265. DBLNTSCHIRESDPFLACE_KEY = $00099405;
  1266. DBLNTSCHIRESDPF2_KEY = $00099440;
  1267. DBLNTSCHIRESDPF2FF_KEY = $00099444;
  1268. DBLNTSCHIRESDPF2LACE_KEY = $00099445;
  1269. DBLNTSCEXTRALORES_KEY = $00091200;
  1270. DBLNTSCEXTRALORESHAM_KEY = $00091a00;
  1271. DBLNTSCEXTRALORESEHB_KEY = $00091280;
  1272. DBLNTSCEXTRALORESDPF_KEY = $00091600;
  1273. DBLNTSCEXTRALORESDPF2_KEY = $00091640;
  1274. DBLNTSCEXTRALORESFF_KEY = $00091204;
  1275. DBLNTSCEXTRALORESHAMFF_KEY = $00091a04;
  1276. DBLNTSCEXTRALORESEHBFF_KEY = $00091284;
  1277. DBLNTSCEXTRALORESDPFFF_KEY = $00091604;
  1278. DBLNTSCEXTRALORESDPF2FF_KEY = $00091644;
  1279. DBLNTSCEXTRALORESLACE_KEY = $00091205;
  1280. DBLNTSCEXTRALORESHAMLACE_KEY = $00091a05;
  1281. DBLNTSCEXTRALORESEHBLACE_KEY = $00091285;
  1282. DBLNTSCEXTRALORESDPFLACE_KEY = $00091605;
  1283. DBLNTSCEXTRALORESDPF2LACE_KEY = $00091645;
  1284. DBLPAL_MONITOR_ID = $000a1000;
  1285. DBLPALLORES_KEY = $000a1000;
  1286. DBLPALLORESFF_KEY = $000a1004;
  1287. DBLPALLORESHAM_KEY = $000a1800;
  1288. DBLPALLORESHAMFF_KEY = $000a1804;
  1289. DBLPALLORESEHB_KEY = $000a1080;
  1290. DBLPALLORESEHBFF_KEY = $000a1084;
  1291. DBLPALLORESLACE_KEY = $000a1005;
  1292. DBLPALLORESHAMLACE_KEY = $000a1805;
  1293. DBLPALLORESEHBLACE_KEY = $000a1085;
  1294. DBLPALLORESDPF_KEY = $000a1400;
  1295. DBLPALLORESDPFFF_KEY = $000a1404;
  1296. DBLPALLORESDPFLACE_KEY = $000a1405;
  1297. DBLPALLORESDPF2_KEY = $000a1440;
  1298. DBLPALLORESDPF2FF_KEY = $000a1444;
  1299. DBLPALLORESDPF2LACE_KEY = $000a1445;
  1300. DBLPALHIRES_KEY = $000a9000;
  1301. DBLPALHIRESFF_KEY = $000a9004;
  1302. DBLPALHIRESHAM_KEY = $000a9800;
  1303. DBLPALHIRESHAMFF_KEY = $000a9804;
  1304. DBLPALHIRESLACE_KEY = $000a9005;
  1305. DBLPALHIRESHAMLACE_KEY = $000a9805;
  1306. DBLPALHIRESEHB_KEY = $000a9080;
  1307. DBLPALHIRESEHBFF_KEY = $000a9084;
  1308. DBLPALHIRESEHBLACE_KEY = $000a9085;
  1309. DBLPALHIRESDPF_KEY = $000a9400;
  1310. DBLPALHIRESDPFFF_KEY = $000a9404;
  1311. DBLPALHIRESDPFLACE_KEY = $000a9405;
  1312. DBLPALHIRESDPF2_KEY = $000a9440;
  1313. DBLPALHIRESDPF2FF_KEY = $000a9444;
  1314. DBLPALHIRESDPF2LACE_KEY = $000a9445;
  1315. DBLPALEXTRALORES_KEY = $000a1200;
  1316. DBLPALEXTRALORESHAM_KEY = $000a1a00;
  1317. DBLPALEXTRALORESEHB_KEY = $000a1280;
  1318. DBLPALEXTRALORESDPF_KEY = $000a1600;
  1319. DBLPALEXTRALORESDPF2_KEY = $000a1640;
  1320. DBLPALEXTRALORESFF_KEY = $000a1204;
  1321. DBLPALEXTRALORESHAMFF_KEY = $000a1a04;
  1322. DBLPALEXTRALORESEHBFF_KEY = $000a1284;
  1323. DBLPALEXTRALORESDPFFF_KEY = $000a1604;
  1324. DBLPALEXTRALORESDPF2FF_KEY = $000a1644;
  1325. DBLPALEXTRALORESLACE_KEY = $000a1205;
  1326. DBLPALEXTRALORESHAMLACE_KEY = $000a1a05;
  1327. DBLPALEXTRALORESEHBLACE_KEY = $000a1285;
  1328. DBLPALEXTRALORESDPFLACE_KEY = $000a1605;
  1329. DBLPALEXTRALORESDPF2LACE_KEY = $000a1645;
  1330. { Use these tags for passing to BestModeID() (V39) }
  1331. SPECIAL_FLAGS = $100E;
  1332. { Original:
  1333. SPECIAL_FLAGS = DIPF_IS_DUALPF OR DIPF_IS_PF2PRI OR DIPF_IS_HAM OR DIPF_IS_EXTRAHALFBRITE;
  1334. ( Mu?te aufgrund eines Fehler in PCQ ge?ndert werden )
  1335. }
  1336. BIDTAG_DIPFMustHave = $80000001; { mask of the DIPF_ flags the ModeID must have }
  1337. { Default - NULL }
  1338. BIDTAG_DIPFMustNotHave = $80000002; { mask of the DIPF_ flags the ModeID must not have }
  1339. { Default - SPECIAL_FLAGS }
  1340. BIDTAG_ViewPort = $80000003; { ViewPort for which a ModeID is sought. }
  1341. { Default - NULL }
  1342. BIDTAG_NominalWidth = $80000004; { \ together make the aspect ratio and }
  1343. BIDTAG_NominalHeight = $80000005; { / override the vp->Width/Height. }
  1344. { Default - SourceID NominalDimensionInfo,
  1345. * or vp->DWidth/Height, or (640 * 200),
  1346. * in that preferred order.
  1347. }
  1348. BIDTAG_DesiredWidth = $80000006; { \ Nominal Width and Height of the }
  1349. BIDTAG_DesiredHeight = $80000007; { / returned ModeID. }
  1350. { Default - same as Nominal }
  1351. BIDTAG_Depth = $80000008; { ModeID must support this depth. }
  1352. { Default - vp->RasInfo->BitMap->Depth or 1 }
  1353. BIDTAG_MonitorID = $80000009; { ModeID must use this monitor. }
  1354. { Default - use best monitor available }
  1355. BIDTAG_SourceID = $8000000a; { instead of a ViewPort. }
  1356. { Default - VPModeID(vp) if BIDTAG_ViewPort is
  1357. * specified, else leave the DIPFMustHave and
  1358. * DIPFMustNotHave values untouched.
  1359. }
  1360. BIDTAG_RedBits = $8000000b; { \ }
  1361. BIDTAG_BlueBits = $8000000c; { > Match up from the database }
  1362. BIDTAG_GreenBits = $8000000d; { / }
  1363. { Default - 4 }
  1364. BIDTAG_GfxPrivate = $8000000e; { Private }
  1365. const
  1366. { bplcon0 defines }
  1367. MODE_640 = $8000;
  1368. PLNCNTMSK = $7; { how many bit planes? }
  1369. { 0 = none, 1->6 = 1->6, 7 = reserved }
  1370. PLNCNTSHFT = 12; { bits to shift for bplcon0 }
  1371. PF2PRI = $40; { bplcon2 bit }
  1372. COLORON = $0200; { disable color burst }
  1373. DBLPF = $400;
  1374. HOLDNMODIFY = $800;
  1375. INTERLACE = 4; { interlace mode for 400 }
  1376. { bplcon1 defines }
  1377. PFA_FINE_SCROLL = $F;
  1378. PFB_FINE_SCROLL_SHIFT = 4;
  1379. PF_FINE_SCROLL_MASK = $F;
  1380. { display window start and stop defines }
  1381. DIW_HORIZ_POS = $7F; { horizontal start/stop }
  1382. DIW_VRTCL_POS = $1FF; { vertical start/stop }
  1383. DIW_VRTCL_POS_SHIFT = $7;
  1384. { Data fetch start/stop horizontal position }
  1385. DFTCH_MASK = $FF;
  1386. { vposr bits }
  1387. VPOSRLOF = $8000;
  1388. { include define file for displayinfo database }
  1389. { the "public" handle to a DisplayInfoRecord }
  1390. Type
  1391. DisplayInfoHandle = APTR;
  1392. { datachunk type identifiers }
  1393. CONST
  1394. DTAG_DISP = $80000000;
  1395. DTAG_DIMS = $80001000;
  1396. DTAG_MNTR = $80002000;
  1397. DTAG_NAME = $80003000;
  1398. DTAG_VEC = $80004000; { internal use only }
  1399. Type
  1400. pQueryHeader = ^tQueryHeader;
  1401. tQueryHeader = record
  1402. tructID, { datachunk type identifier }
  1403. DisplayID, { copy of display record key }
  1404. SkipID, { TAG_SKIP -- see tagitems.h }
  1405. Length : ULONG; { length of local data in double-longwords }
  1406. END;
  1407. pDisplayInfo = ^tDisplayInfo;
  1408. tDisplayInfo = record
  1409. Header : tQueryHeader;
  1410. NotAvailable : Word; { IF NULL available, else see defines }
  1411. PropertyFlags : ULONG; { Properties of this mode see defines }
  1412. Resolution : tPoint; { ticks-per-pixel X/Y }
  1413. PixelSpeed : Word; { aproximation in nanoseconds }
  1414. NumStdSprites : Word; { number of standard amiga sprites }
  1415. PaletteRange : Word; { distinguishable shades available }
  1416. SpriteResolution : tPoint; { std sprite ticks-per-pixel X/Y }
  1417. pad : Array[0..3] of Byte;
  1418. RedBits : Byte;
  1419. GreenBits : Byte;
  1420. BlueBits : Byte;
  1421. pad2 : array [0..4] of Byte;
  1422. reserved : Array[0..1] of ULONG; { terminator }
  1423. END;
  1424. { availability }
  1425. CONST
  1426. DI_AVAIL_NOCHIPS =$0001;
  1427. DI_AVAIL_NOMONITOR =$0002;
  1428. DI_AVAIL_NOTWITHGENLOCK =$0004;
  1429. { mode properties }
  1430. DIPF_IS_LACE = $00000001;
  1431. DIPF_IS_DUALPF = $00000002;
  1432. DIPF_IS_PF2PRI = $00000004;
  1433. DIPF_IS_HAM = $00000008;
  1434. DIPF_IS_ECS = $00000010; { note: ECS modes (SHIRES, VGA, AND **
  1435. PRODUCTIVITY) do not support **
  1436. attached sprites. **
  1437. }
  1438. DIPF_IS_AA = $00010000; { AA modes - may only be available
  1439. ** if machine has correct memory
  1440. ** type to support required
  1441. ** bandwidth - check availability.
  1442. ** (V39)
  1443. }
  1444. DIPF_IS_PAL = $00000020;
  1445. DIPF_IS_SPRITES = $00000040;
  1446. DIPF_IS_GENLOCK = $00000080;
  1447. DIPF_IS_WB = $00000100;
  1448. DIPF_IS_DRAGGABLE = $00000200;
  1449. DIPF_IS_PANELLED = $00000400;
  1450. DIPF_IS_BEAMSYNC = $00000800;
  1451. DIPF_IS_EXTRAHALFBRITE = $00001000;
  1452. { The following DIPF_IS_... flags are new for V39 }
  1453. DIPF_IS_SPRITES_ATT = $00002000; { supports attached sprites }
  1454. DIPF_IS_SPRITES_CHNG_RES = $00004000; { supports variable sprite resolution }
  1455. DIPF_IS_SPRITES_BORDER = $00008000; { sprite can be displayed in the border }
  1456. DIPF_IS_SCANDBL = $00020000; { scan doubled }
  1457. DIPF_IS_SPRITES_CHNG_BASE = $00040000;
  1458. { can change the sprite base colour }
  1459. DIPF_IS_SPRITES_CHNG_PRI = $00080000;
  1460. { can change the sprite priority
  1461. ** with respect to the playfield(s).
  1462. }
  1463. DIPF_IS_DBUFFER = $00100000; { can support double buffering }
  1464. DIPF_IS_PROGBEAM = $00200000; { is a programmed beam-sync mode }
  1465. DIPF_IS_FOREIGN = $80000000; { this mode is not native to the Amiga }
  1466. Type
  1467. pDimensionInfo =^tDimensionInfo;
  1468. tDimensionInfo = record
  1469. Header : tQueryHeader;
  1470. MaxDepth, { log2( max number of colors ) }
  1471. MinRasterWidth, { minimum width in pixels }
  1472. MinRasterHeight, { minimum height in pixels }
  1473. MaxRasterWidth, { maximum width in pixels }
  1474. MaxRasterHeight : Word; { maximum height in pixels }
  1475. Nominal, { "standard" dimensions }
  1476. MaxOScan, { fixed, hardware dependant }
  1477. VideoOScan, { fixed, hardware dependant }
  1478. TxtOScan, { editable via preferences }
  1479. StdOScan : tRectangle; { editable via preferences }
  1480. pad : Array[0..13] of Byte;
  1481. reserved : Array[0..1] of Longint; { terminator }
  1482. END;
  1483. pMonitorInfo = ^tMonitorInfo;
  1484. tMonitorInfo = record
  1485. Header : tQueryHeader;
  1486. Mspc : pMonitorSpec; { pointer to monitor specification }
  1487. ViewPosition, { editable via preferences }
  1488. ViewResolution : tPoint; { standard monitor ticks-per-pixel }
  1489. ViewPositionRange : tRectangle; { fixed, hardware dependant }
  1490. TotalRows, { display height in scanlines }
  1491. TotalColorClocks, { scanline width in 280 ns units }
  1492. MinRow : Word; { absolute minimum active scanline }
  1493. Compatibility : smallint; { how this coexists with others }
  1494. pad : Array[0..31] of Byte;
  1495. MouseTicks : tPoint;
  1496. DefaultViewPosition : tPoint;
  1497. PreferredModeID : ULONG;
  1498. reserved : Array[0..1] of ULONG; { terminator }
  1499. END;
  1500. { monitor compatibility }
  1501. CONST
  1502. MCOMPAT_MIXED = 0; { can share display with other MCOMPAT_MIXED }
  1503. MCOMPAT_SELF = 1; { can share only within same monitor }
  1504. MCOMPAT_NOBODY= -1; { only one viewport at a time }
  1505. DISPLAYNAMELEN = 32;
  1506. Type
  1507. pNameInfo = ^tNameInfo;
  1508. tNameInfo = record
  1509. Header : tQueryHeader;
  1510. Name : Array[0..DISPLAYNAMELEN-1] of Char;
  1511. reserved : Array[0..1] of ULONG; { terminator }
  1512. END;
  1513. {****************************************************************************}
  1514. { The following VecInfo structure is PRIVATE, for our use only
  1515. * Touch these, and burn! (V39)
  1516. }
  1517. Type
  1518. pVecInfo = ^tVecInfo;
  1519. tVecInfo = record
  1520. Header : tQueryHeader;
  1521. Vec : Pointer;
  1522. Data : Pointer;
  1523. vi_Type : WORD; { Type in C Includes }
  1524. pad : Array[0..2] of WORD;
  1525. reserved : Array[0..1] of ULONG;
  1526. end;
  1527. CONST
  1528. VTAG_END_CM = $00000000;
  1529. VTAG_CHROMAKEY_CLR = $80000000;
  1530. VTAG_CHROMAKEY_SET = $80000001;
  1531. VTAG_BITPLANEKEY_CLR = $80000002;
  1532. VTAG_BITPLANEKEY_SET = $80000003;
  1533. VTAG_BORDERBLANK_CLR = $80000004;
  1534. VTAG_BORDERBLANK_SET = $80000005;
  1535. VTAG_BORDERNOTRANS_CLR = $80000006;
  1536. VTAG_BORDERNOTRANS_SET = $80000007;
  1537. VTAG_CHROMA_PEN_CLR = $80000008;
  1538. VTAG_CHROMA_PEN_SET = $80000009;
  1539. VTAG_CHROMA_PLANE_SET = $8000000A;
  1540. VTAG_ATTACH_CM_SET = $8000000B;
  1541. VTAG_NEXTBUF_CM = $8000000C;
  1542. VTAG_BATCH_CM_CLR = $8000000D;
  1543. VTAG_BATCH_CM_SET = $8000000E;
  1544. VTAG_NORMAL_DISP_GET = $8000000F;
  1545. VTAG_NORMAL_DISP_SET = $80000010;
  1546. VTAG_COERCE_DISP_GET = $80000011;
  1547. VTAG_COERCE_DISP_SET = $80000012;
  1548. VTAG_VIEWPORTEXTRA_GET = $80000013;
  1549. VTAG_VIEWPORTEXTRA_SET = $80000014;
  1550. VTAG_CHROMAKEY_GET = $80000015;
  1551. VTAG_BITPLANEKEY_GET = $80000016;
  1552. VTAG_BORDERBLANK_GET = $80000017;
  1553. VTAG_BORDERNOTRANS_GET = $80000018;
  1554. VTAG_CHROMA_PEN_GET = $80000019;
  1555. VTAG_CHROMA_PLANE_GET = $8000001A;
  1556. VTAG_ATTACH_CM_GET = $8000001B;
  1557. VTAG_BATCH_CM_GET = $8000001C;
  1558. VTAG_BATCH_ITEMS_GET = $8000001D;
  1559. VTAG_BATCH_ITEMS_SET = $8000001E;
  1560. VTAG_BATCH_ITEMS_ADD = $8000001F;
  1561. VTAG_VPMODEID_GET = $80000020;
  1562. VTAG_VPMODEID_SET = $80000021;
  1563. VTAG_VPMODEID_CLR = $80000022;
  1564. VTAG_USERCLIP_GET = $80000023;
  1565. VTAG_USERCLIP_SET = $80000024;
  1566. VTAG_USERCLIP_CLR = $80000025;
  1567. { The following tags are V39 specific. They will be ignored (returing error -3) by
  1568. earlier versions }
  1569. VTAG_PF1_BASE_GET = $80000026;
  1570. VTAG_PF2_BASE_GET = $80000027;
  1571. VTAG_SPEVEN_BASE_GET = $80000028;
  1572. VTAG_SPODD_BASE_GET = $80000029;
  1573. VTAG_PF1_BASE_SET = $8000002a;
  1574. VTAG_PF2_BASE_SET = $8000002b;
  1575. VTAG_SPEVEN_BASE_SET = $8000002c;
  1576. VTAG_SPODD_BASE_SET = $8000002d;
  1577. VTAG_BORDERSPRITE_GET = $8000002e;
  1578. VTAG_BORDERSPRITE_SET = $8000002f;
  1579. VTAG_BORDERSPRITE_CLR = $80000030;
  1580. VTAG_SPRITERESN_SET = $80000031;
  1581. VTAG_SPRITERESN_GET = $80000032;
  1582. VTAG_PF1_TO_SPRITEPRI_SET = $80000033;
  1583. VTAG_PF1_TO_SPRITEPRI_GET = $80000034;
  1584. VTAG_PF2_TO_SPRITEPRI_SET = $80000035;
  1585. VTAG_PF2_TO_SPRITEPRI_GET = $80000036;
  1586. VTAG_IMMEDIATE = $80000037;
  1587. VTAG_FULLPALETTE_SET = $80000038;
  1588. VTAG_FULLPALETTE_GET = $80000039;
  1589. VTAG_FULLPALETTE_CLR = $8000003A;
  1590. VTAG_DEFSPRITERESN_SET = $8000003B;
  1591. VTAG_DEFSPRITERESN_GET = $8000003C;
  1592. { all the following tags follow the new, rational standard for videocontrol tags:
  1593. * VC_xxx,state set the state of attribute 'xxx' to value 'state'
  1594. * VC_xxx_QUERY,&var get the state of attribute 'xxx' and store it into the longword
  1595. * pointed to by &var.
  1596. *
  1597. * The following are new for V40:
  1598. }
  1599. VC_IntermediateCLUpdate = $80000080;
  1600. { default=true. When set graphics will update the intermediate copper
  1601. * lists on color changes, etc. When false, it won't, and will be faster.
  1602. }
  1603. VC_IntermediateCLUpdate_Query = $80000081;
  1604. VC_NoColorPaletteLoad = $80000082;
  1605. { default = false. When set, graphics will only load color 0
  1606. * for this ViewPort, and so the ViewPort's colors will come
  1607. * from the previous ViewPort's.
  1608. *
  1609. * NB - Using this tag and VTAG_FULLPALETTE_SET together is undefined.
  1610. }
  1611. VC_NoColorPaletteLoad_Query = $80000083;
  1612. VC_DUALPF_Disable = $80000084;
  1613. { default = false. When this flag is set, the dual-pf bit
  1614. in Dual-Playfield screens will be turned off. Even bitplanes
  1615. will still come from the first BitMap and odd bitplanes
  1616. from the second BitMap, and both R[xy]Offsets will be
  1617. considered. This can be used (with appropriate palette
  1618. selection) for cross-fades between differently scrolling
  1619. images.
  1620. When this flag is turned on, colors will be loaded for
  1621. the viewport as if it were a single viewport of depth
  1622. depth1+depth2 }
  1623. VC_DUALPF_Disable_Query = $80000085;
  1624. const
  1625. SPRITE_ATTACHED = $80;
  1626. type
  1627. pSimpleSprite = ^tSimpleSprite;
  1628. tSimpleSprite = record
  1629. posctldata : Pointer;
  1630. height : Word;
  1631. x,y : Word; { current position }
  1632. num : Word;
  1633. end;
  1634. pExtSprite = ^tExtSprite;
  1635. tExtSprite = record
  1636. es_SimpleSprite : tSimpleSprite; { conventional simple sprite structure }
  1637. es_wordwidth : WORD; { graphics use only, subject to change }
  1638. es_flags : WORD; { graphics use only, subject to change }
  1639. end;
  1640. const
  1641. { tags for AllocSpriteData() }
  1642. SPRITEA_Width = $81000000;
  1643. SPRITEA_XReplication = $81000002;
  1644. SPRITEA_YReplication = $81000004;
  1645. SPRITEA_OutputHeight = $81000006;
  1646. SPRITEA_Attached = $81000008;
  1647. SPRITEA_OldDataFormat = $8100000a; { MUST pass in outputheight if using this tag }
  1648. { tags for GetExtSprite() }
  1649. GSTAG_SPRITE_NUM = $82000020;
  1650. GSTAG_ATTACHED = $82000022;
  1651. GSTAG_SOFTSPRITE = $82000024;
  1652. { tags valid for either GetExtSprite or ChangeExtSprite }
  1653. GSTAG_SCANDOUBLED = $83000000; { request "NTSC-Like" height if possible. }
  1654. Type
  1655. pBitScaleArgs = ^tBitScaleArgs;
  1656. tBitScaleArgs = record
  1657. bsa_SrcX, bsa_SrcY, { source origin }
  1658. bsa_SrcWidth, bsa_SrcHeight, { source size }
  1659. bsa_XSrcFactor, bsa_YSrcFactor, { scale factor denominators }
  1660. bsa_DestX, bsa_DestY, { destination origin }
  1661. bsa_DestWidth, bsa_DestHeight, { destination size result }
  1662. bsa_XDestFactor, bsa_YDestFactor : Word; { scale factor numerators }
  1663. bsa_SrcBitMap, { source BitMap }
  1664. bsa_DestBitMap : pBitMap; { destination BitMap }
  1665. bsa_Flags : ULONG; { reserved. Must be zero! }
  1666. bsa_XDDA, bsa_YDDA : Word; { reserved }
  1667. bsa_Reserved1,
  1668. bsa_Reserved2 : Longint;
  1669. END;
  1670. { tag definitions for GetRPAttr, SetRPAttr }
  1671. const
  1672. RPTAG_Font = $80000000; { get/set font }
  1673. RPTAG_APen = $80000002; { get/set apen }
  1674. RPTAG_BPen = $80000003; { get/set bpen }
  1675. RPTAG_DrMd = $80000004; { get/set draw mode }
  1676. RPTAG_OutlinePen = $80000005; { get/set outline pen. corrected case. }
  1677. RPTAG_WriteMask = $80000006; { get/set WriteMask }
  1678. RPTAG_MaxPen = $80000007; { get/set maxpen }
  1679. RPTAG_DrawBounds = $80000008; { get only rastport draw bounds. pass &rect }
  1680. TYPE
  1681. pRegionRectangle = ^tRegionRectangle;
  1682. tRegionRectangle = record
  1683. Next, Prev : pRegionRectangle;
  1684. bounds : tRectangle;
  1685. END;
  1686. pRegion = ^tRegion;
  1687. tRegion = record
  1688. bounds : tRectangle;
  1689. RegionRectangle : pRegionRectangle;
  1690. END;
  1691. type
  1692. pGfxBase = ^tGfxBase;
  1693. tGfxBase = record
  1694. LibNode : tLibrary;
  1695. ActiView : pView; { ViewPtr }
  1696. copinit : pcopinit; { (copinitptr) ptr to copper start up list }
  1697. cia : Pointer; { for 8520 resource use }
  1698. blitter : Pointer; { for future blitter resource use }
  1699. LOFlist : Pointer;
  1700. SHFlist : Pointer;
  1701. blthd,
  1702. blttl : pbltnode;
  1703. bsblthd,
  1704. bsblttl : pbltnode; { Previous four are (bltnodeptr) }
  1705. vbsrv,
  1706. timsrv,
  1707. bltsrv : tInterrupt;
  1708. TextFonts : tList;
  1709. DefaultFont : pTextFont; { TextFontPtr }
  1710. Modes : Word; { copy of current first bplcon0 }
  1711. VBlank : Shortint;
  1712. Debug : Shortint;
  1713. BeamSync : smallint;
  1714. system_bplcon0 : smallint; { it is ored into each bplcon0 for display }
  1715. SpriteReserved : Byte;
  1716. bytereserved : Byte;
  1717. Flags : Word;
  1718. BlitLock : smallint;
  1719. BlitNest : smallint;
  1720. BlitWaitQ : tList;
  1721. BlitOwner : pTask; { TaskPtr }
  1722. TOF_WaitQ : tList;
  1723. DisplayFlags : Word; { NTSC PAL GENLOC etc}
  1724. { Display flags are determined at power on }
  1725. SimpleSprites : Pointer; { SimpleSpritePtr ptr }
  1726. MaxDisplayRow : Word; { hardware stuff, do not use }
  1727. MaxDisplayColumn : Word; { hardware stuff, do not use }
  1728. NormalDisplayRows : Word;
  1729. NormalDisplayColumns : Word;
  1730. { the following are for standard non interlace, 1/2 wb width }
  1731. NormalDPMX : Word; { Dots per meter on display }
  1732. NormalDPMY : Word; { Dots per meter on display }
  1733. LastChanceMemory : pSignalSemaphore; { SignalSemaphorePtr }
  1734. LCMptr : Pointer;
  1735. MicrosPerLine : Word; { 256 time usec/line }
  1736. MinDisplayColumn : Word;
  1737. ChipRevBits0 : Byte;
  1738. MemType : Byte;
  1739. crb_reserved : Array[0..3] of Byte;
  1740. monitor_id : Word; { normally null }
  1741. hedley : Array[0..7] of ULONG;
  1742. hedley_sprites : Array[0..7] of ULONG; { sprite ptrs for intuition mouse }
  1743. hedley_sprites1 : Array[0..7] of ULONG; { sprite ptrs for intuition mouse }
  1744. hedley_count : smallint;
  1745. hedley_flags : Word;
  1746. hedley_tmp : smallint;
  1747. hash_table : Pointer;
  1748. current_tot_rows : Word;
  1749. current_tot_cclks : Word;
  1750. hedley_hint : Byte;
  1751. hedley_hint2 : Byte;
  1752. nreserved : Array[0..3] of ULONG;
  1753. a2024_sync_raster : Pointer;
  1754. control_delta_pal : Word;
  1755. control_delta_ntsc : Word;
  1756. current_monitor : pMonitorSpec;
  1757. MonitorList : tList;
  1758. default_monitor : pMonitorSpec;
  1759. MonitorListSemaphore : pSignalSemaphore;
  1760. DisplayInfoDataBase : Pointer;
  1761. TopLine : Word;
  1762. ActiViewCprSemaphore : pSignalSemaphore;
  1763. UtilityBase : Pointer; { for hook AND tag utilities }
  1764. ExecBase : Pointer; { to link with rom.lib }
  1765. bwshifts : Pointer;
  1766. StrtFetchMasks,
  1767. StopFetchMasks,
  1768. Overrun,
  1769. RealStops : Pointer;
  1770. SpriteWidth, { current width (in words) of sprites }
  1771. SpriteFMode : WORD; { current sprite fmode bits }
  1772. SoftSprites, { bit mask of size change knowledgeable sprites }
  1773. arraywidth : Shortint;
  1774. DefaultSpriteWidth : WORD; { what width intuition wants }
  1775. SprMoveDisable : Shortint;
  1776. WantChips,
  1777. BoardMemType,
  1778. Bugs : Byte;
  1779. gb_LayersBase : Pointer;
  1780. ColorMask : ULONG;
  1781. IVector,
  1782. IData : Pointer;
  1783. SpecialCounter : ULONG; { special for double buffering }
  1784. DBList : Pointer;
  1785. MonitorFlags : WORD;
  1786. ScanDoubledSprites,
  1787. BP3Bits : Byte;
  1788. MonitorVBlank : tAnalogSignalInterval;
  1789. natural_monitor : pMonitorSpec;
  1790. ProgData : Pointer;
  1791. ExtSprites : Byte;
  1792. pad3 : Byte;
  1793. GfxFlags : WORD;
  1794. VBCounter : ULONG;
  1795. HashTableSemaphore : pSignalSemaphore;
  1796. HWEmul : Array[0..8] of Pointer;
  1797. end;
  1798. const
  1799. NTSC = 1;
  1800. GENLOC = 2;
  1801. PAL = 4;
  1802. TODA_SAFE = 8;
  1803. BLITMSG_FAULT = 4;
  1804. { bits defs for ChipRevBits }
  1805. GFXB_BIG_BLITS = 0 ;
  1806. GFXB_HR_AGNUS = 0 ;
  1807. GFXB_HR_DENISE = 1 ;
  1808. GFXB_AA_ALICE = 2 ;
  1809. GFXB_AA_LISA = 3 ;
  1810. GFXB_AA_MLISA = 4 ; { internal use only. }
  1811. GFXF_BIG_BLITS = 1 ;
  1812. GFXF_HR_AGNUS = 1 ;
  1813. GFXF_HR_DENISE = 2 ;
  1814. GFXF_AA_ALICE = 4 ;
  1815. GFXF_AA_LISA = 8 ;
  1816. GFXF_AA_MLISA = 16; { internal use only }
  1817. { Pass ONE of these to SetChipRev() }
  1818. SETCHIPREV_A = GFXF_HR_AGNUS;
  1819. SETCHIPREV_ECS = (GFXF_HR_AGNUS OR GFXF_HR_DENISE);
  1820. SETCHIPREV_AA = (GFXF_AA_ALICE OR GFXF_AA_LISA OR SETCHIPREV_ECS);
  1821. SETCHIPREV_BEST= $ffffffff;
  1822. { memory type }
  1823. BUS_16 = 0;
  1824. NML_CAS = 0;
  1825. BUS_32 = 1;
  1826. DBL_CAS = 2;
  1827. BANDWIDTH_1X = (BUS_16 OR NML_CAS);
  1828. BANDWIDTH_2XNML= BUS_32;
  1829. BANDWIDTH_2XDBL= DBL_CAS;
  1830. BANDWIDTH_4X = (BUS_32 OR DBL_CAS);
  1831. { GfxFlags (private) }
  1832. NEW_DATABASE = 1;
  1833. GRAPHICSNAME : PChar = 'graphics.library';
  1834. var
  1835. GfxBase : pLibrary;
  1836. PROCEDURE AddAnimOb(anOb : pAnimOb; anKey : ppAnimOb; rp : pRastPort);
  1837. PROCEDURE AddBob(bob : pBob; rp : pRastPort);
  1838. PROCEDURE AddFont(textFont : pTextFont);
  1839. PROCEDURE AddVSprite(vSprite : pVSprite; rp : pRastPort);
  1840. FUNCTION AllocBitMap(sizex : ULONG; sizey : ULONG; depth : ULONG; flags : ULONG;const friend_bitmap : pBitMap) : pBitMap;
  1841. FUNCTION AllocDBufInfo(vp : pViewPort) : pDBufInfo;
  1842. FUNCTION AllocRaster(width : ULONG; height : ULONG) : pCHAR;
  1843. FUNCTION AllocSpriteDataA(const bm : pBitMap;const tags : pTagItem) : pExtSprite;
  1844. PROCEDURE AndRectRegion(region : pRegion;const rectangle : pRectangle);
  1845. FUNCTION AndRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
  1846. PROCEDURE Animate(anKey : ppAnimOb; rp : pRastPort);
  1847. FUNCTION AreaDraw(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
  1848. FUNCTION AreaEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT) : LONGINT;
  1849. FUNCTION AreaEnd(rp : pRastPort) : LONGINT;
  1850. FUNCTION AreaMove(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
  1851. PROCEDURE AskFont(rp : pRastPort; textAttr : pTextAttr);
  1852. FUNCTION AskSoftStyle(rp : pRastPort) : ULONG;
  1853. FUNCTION AttachPalExtra(cm : pColorMap; vp : pViewPort) : LONGINT;
  1854. FUNCTION AttemptLockLayerRom(layer : pLayer) : BOOLEAN;
  1855. FUNCTION BestModeIDA(const tags : pTagItem) : ULONG;
  1856. PROCEDURE BitMapScale(bitScaleArgs : pBitScaleArgs);
  1857. FUNCTION BltBitMap(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destBitMap : pBitMap; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG; mask : ULONG; tempA : pCHAR) : LONGINT;
  1858. PROCEDURE BltBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
  1859. PROCEDURE BltClear(memBlock : pCHAR; byteCount : ULONG; flags : ULONG);
  1860. PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG;const bltMask : pCHAR);
  1861. PROCEDURE BltPattern(rp : pRastPort;const mask : pCHAR; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT; maskBPR : ULONG);
  1862. PROCEDURE BltTemplate(const source : pCHAR; xSrc : LONGINT; srcMod : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT);
  1863. FUNCTION CalcIVG(v : pView; vp : pViewPort) : WORD;
  1864. PROCEDURE CBump(copList : pUCopList);
  1865. FUNCTION ChangeExtSpriteA(vp : pViewPort; oldsprite : pExtSprite; newsprite : pExtSprite;const tags : pTagItem) : LONGINT;
  1866. PROCEDURE ChangeSprite(vp : pViewPort; sprite : pSimpleSprite; newData : pWORD);
  1867. PROCEDURE ChangeVPBitMap(vp : pViewPort; bm : pBitMap; db : pDBufInfo);
  1868. PROCEDURE ClearEOL(rp : pRastPort);
  1869. FUNCTION ClearRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
  1870. PROCEDURE ClearRegion(region : pRegion);
  1871. PROCEDURE ClearScreen(rp : pRastPort);
  1872. PROCEDURE ClipBlit(srcRP : pRastPort; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
  1873. PROCEDURE CloseFont(textFont : pTextFont);
  1874. FUNCTION CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN;
  1875. PROCEDURE CMove(copList : pUCopList; destination : POINTER; data : LONGINT);
  1876. FUNCTION CoerceMode(vp : pViewPort; monitorid : ULONG; flags : ULONG) : ULONG;
  1877. PROCEDURE CopySBitMap(layer : pLayer);
  1878. PROCEDURE CWait(copList : pUCopList; v : LONGINT; h : LONGINT);
  1879. PROCEDURE DisownBlitter;
  1880. PROCEDURE DisposeRegion(region : pRegion);
  1881. PROCEDURE DoCollision(rp : pRastPort);
  1882. PROCEDURE Draw(rp : pRastPort; x : LONGINT; y : LONGINT);
  1883. PROCEDURE DrawEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT);
  1884. PROCEDURE DrawGList(rp : pRastPort; vp : pViewPort);
  1885. PROCEDURE EraseRect(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  1886. FUNCTION ExtendFont(font : pTextFont;const fontTags : pTagItem) : ULONG;
  1887. FUNCTION FindColor(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG; maxcolor : LONGINT) : LONGINT;
  1888. FUNCTION FindDisplayInfo(displayID : ULONG) : POINTER;
  1889. FUNCTION Flood(rp : pRastPort; mode : ULONG; x : LONGINT; y : LONGINT) : BOOLEAN;
  1890. PROCEDURE FontExtent(const font : pTextFont; fontExtent : pTextExtent);
  1891. PROCEDURE FreeBitMap(bm : pBitMap);
  1892. PROCEDURE FreeColorMap(colorMap : pColorMap);
  1893. PROCEDURE FreeCopList(copList : pCopList);
  1894. PROCEDURE FreeCprList(cprList : pcprlist);
  1895. PROCEDURE FreeDBufInfo(dbi : pDBufInfo);
  1896. PROCEDURE FreeGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT);
  1897. PROCEDURE FreeRaster(p : pCHAR; width : ULONG; height : ULONG);
  1898. PROCEDURE FreeSprite(num : LONGINT);
  1899. PROCEDURE FreeSpriteData(sp : pExtSprite);
  1900. PROCEDURE FreeVPortCopLists(vp : pViewPort);
  1901. FUNCTION GetAPen(rp : pRastPort) : ULONG;
  1902. FUNCTION GetBitMapAttr(const bm : pBitMap; attrnum : ULONG) : ULONG;
  1903. FUNCTION GetBPen(rp : pRastPort) : ULONG;
  1904. FUNCTION GetColorMap(entries : LONGINT) : pColorMap;
  1905. FUNCTION GetDisplayInfoData(const handle : POINTER; buf : pCHAR; size : ULONG; tagID : ULONG; displayID : ULONG) : ULONG;
  1906. FUNCTION GetDrMd(rp : pRastPort) : ULONG;
  1907. FUNCTION GetExtSpriteA(ss : pExtSprite;const tags : pTagItem) : LONGINT;
  1908. FUNCTION GetGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT) : BOOLEAN;
  1909. FUNCTION GetOutlinePen(rp : pRastPort) : ULONG;
  1910. PROCEDURE GetRGB32(const cm : pColorMap; firstcolor : ULONG; ncolors : ULONG; table : pulong);
  1911. FUNCTION GetRGB4(colorMap : pColorMap; entry : LONGINT) : ULONG;
  1912. PROCEDURE GetRPAttrsA(const rp : pRastPort;const tags : pTagItem);
  1913. FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : smallint;
  1914. FUNCTION GetVPModeID(const vp : pViewPort) : LONGINT;
  1915. PROCEDURE GfxAssociate(const associateNode : POINTER; gfxNodePtr : POINTER);
  1916. PROCEDURE GfxFree(gfxNodePtr : POINTER);
  1917. FUNCTION GfxLookUp(const associateNode : POINTER) : POINTER;
  1918. FUNCTION GfxNew(gfxNodeType : ULONG) : POINTER;
  1919. PROCEDURE InitArea(areaInfo : pAreaInfo; vectorBuffer : POINTER; maxVectors : LONGINT);
  1920. PROCEDURE InitBitMap(bitMap : pBitMap; depth : LONGINT; width : LONGINT; height : LONGINT);
  1921. PROCEDURE InitGels(head : pVSprite; tail : pVSprite; gelsInfo : pGelsInfo);
  1922. PROCEDURE InitGMasks(anOb : pAnimOb);
  1923. PROCEDURE InitMasks(vSprite : pVSprite);
  1924. PROCEDURE InitRastPort(rp : pRastPort);
  1925. FUNCTION InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LONGINT) : pTmpRas;
  1926. PROCEDURE InitView(view : pView);
  1927. PROCEDURE InitVPort(vp : pViewPort);
  1928. PROCEDURE LoadRGB32(vp : pViewPort;const table : pULONG);
  1929. PROCEDURE LoadRGB4(vp : pViewPort;const colors : pWord; count : LONGINT);
  1930. PROCEDURE LoadView(view : pView);
  1931. PROCEDURE LockLayerRom(layer : pLayer);
  1932. FUNCTION MakeVPort(view : pView; vp : pViewPort) : ULONG;
  1933. FUNCTION ModeNotAvailable(modeID : ULONG) : LONGINT;
  1934. PROCEDURE Move(rp : pRastPort; x : LONGINT; y : LONGINT);
  1935. PROCEDURE MoveSprite(vp : pViewPort; sprite : pSimpleSprite; x : LONGINT; y : LONGINT);
  1936. FUNCTION MrgCop(view : pView) : ULONG;
  1937. FUNCTION NewRegion : pRegion;
  1938. FUNCTION NextDisplayInfo(displayID : ULONG) : ULONG;
  1939. FUNCTION ObtainBestPenA(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG;const tags : pTagItem) : LONGINT;
  1940. FUNCTION ObtainPen(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG; f : LONGINT) : ULONG;
  1941. FUNCTION OpenFont(textAttr : pTextAttr) : pTextFont;
  1942. FUNCTION OpenMonitor(const monitorName : pCHAR; displayID : ULONG) : pMonitorSpec;
  1943. FUNCTION OrRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
  1944. FUNCTION OrRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
  1945. PROCEDURE OwnBlitter;
  1946. PROCEDURE PolyDraw(rp : pRastPort; count : LONGINT;const polyTable : pLongint);
  1947. PROCEDURE QBlit(blit : pbltnode);
  1948. PROCEDURE QBSBlit(blit : pbltnode);
  1949. FUNCTION ReadPixel(rp : pRastPort; x : LONGINT; y : LONGINT) : ULONG;
  1950. FUNCTION ReadPixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
  1951. FUNCTION ReadPixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
  1952. PROCEDURE RectFill(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  1953. PROCEDURE ReleasePen(cm : pColorMap; n : ULONG);
  1954. PROCEDURE RemFont(textFont : pTextFont);
  1955. PROCEDURE RemIBob(bob : pBob; rp : pRastPort; vp : pViewPort);
  1956. PROCEDURE RemVSprite(vSprite : pVSprite);
  1957. FUNCTION ScalerDiv(factor : ULONG; numerator : ULONG; denominator : ULONG) : WORD;
  1958. PROCEDURE ScrollRaster(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  1959. PROCEDURE ScrollRasterBF(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  1960. PROCEDURE ScrollVPort(vp : pViewPort);
  1961. PROCEDURE SetABPenDrMd(rp : pRastPort; apen : ULONG; bpen : ULONG; drawmode : ULONG);
  1962. PROCEDURE SetAPen(rp : pRastPort; pen : ULONG);
  1963. PROCEDURE SetBPen(rp : pRastPort; pen : ULONG);
  1964. FUNCTION SetChipRev(want : ULONG) : ULONG;
  1965. PROCEDURE SetCollision(num : ULONG; routine : tPROCEDURE; gelsInfo : pGelsInfo);
  1966. PROCEDURE SetDrMd(rp : pRastPort; drawMode : ULONG);
  1967. FUNCTION SetFont(rp : pRastPort;const textFont : pTextFont) : LONGINT;
  1968. PROCEDURE SetMaxPen(rp : pRastPort; maxpen : ULONG);
  1969. FUNCTION SetOutlinePen(rp : pRastPort; pen : ULONG) : ULONG;
  1970. PROCEDURE SetRast(rp : pRastPort; pen : ULONG);
  1971. PROCEDURE SetRGB32(vp : pViewPort; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
  1972. PROCEDURE SetRGB32CM(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
  1973. PROCEDURE SetRGB4(vp : pViewPort; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
  1974. PROCEDURE SetRGB4CM(colorMap : pColorMap; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
  1975. PROCEDURE SetRPAttrsA(rp : pRastPort;const tags : pTagItem);
  1976. FUNCTION SetSoftStyle(rp : pRastPort; style : ULONG; enable : ULONG) : ULONG;
  1977. FUNCTION SetWriteMask(rp : pRastPort; msk : ULONG) : ULONG;
  1978. PROCEDURE SortGList(rp : pRastPort);
  1979. PROCEDURE StripFont(font : pTextFont);
  1980. PROCEDURE SyncSBitMap(layer : pLayer);
  1981. FUNCTION GText(rp : pRastPort;const string_ : pCHAR; count : ULONG) : LONGINT;
  1982. FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : smallint;
  1983. FUNCTION TextFit(rp : pRastPort;const string_ : pCHAR; strLen : ULONG; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LONGINT; constrainingBitWidth : ULONG; constrainingBitHeight : ULONG) : ULONG;
  1984. FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : smallint;
  1985. FUNCTION UCopperListInit(uCopList : pUCopList; n : LONGINT) : pCopList;
  1986. PROCEDURE UnlockLayerRom(layer : pLayer);
  1987. FUNCTION VBeamPos : LONGINT;
  1988. FUNCTION VideoControl(colorMap : pColorMap; tagarray : pTagItem) : BOOLEAN;
  1989. PROCEDURE WaitBlit;
  1990. PROCEDURE WaitBOVP(vp : pViewPort);
  1991. PROCEDURE WaitTOF;
  1992. FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : smallint;
  1993. PROCEDURE WriteChunkyPixels(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; bytesperrow : LONGINT);
  1994. FUNCTION WritePixel(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
  1995. FUNCTION WritePixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
  1996. FUNCTION WritePixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
  1997. FUNCTION XorRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
  1998. FUNCTION XorRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
  1999. { gfxmacros }
  2000. PROCEDURE BNDRYOFF (w: pRastPort);
  2001. PROCEDURE InitAnimate (animkey: ppAnimOb);
  2002. PROCEDURE SetAfPt(w: pRastPort;p: Pointer; n: Byte);
  2003. PROCEDURE SetDrPt(w: pRastPort;p: Word);
  2004. PROCEDURE SetOPen(w: pRastPort;c: Byte);
  2005. PROCEDURE SetWrMsk(w: pRastPort; m: Byte);
  2006. PROCEDURE SafeSetOutlinePen(w : pRastPort; c : byte);
  2007. PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
  2008. PROCEDURE OFF_DISPLAY (cust: pCustom);
  2009. PROCEDURE ON_DISPLAY (cust: pCustom);
  2010. PROCEDURE OFF_SPRITE (cust: pCustom);
  2011. PROCEDURE ON_SPRITE (cust: pCustom);
  2012. PROCEDURE OFF_VBLANK (cust: pCustom);
  2013. PROCEDURE ON_VBLANK (cust: pCustom);
  2014. {Here we read how to compile this unit}
  2015. {You can remove this include and use a define instead}
  2016. {$I useautoopenlib.inc}
  2017. {$ifdef use_init_openlib}
  2018. procedure InitGRAPHICSLibrary;
  2019. {$endif use_init_openlib}
  2020. {This is a variable that knows how the unit is compiled}
  2021. var
  2022. GRAPHICSIsCompiledHow : longint;
  2023. IMPLEMENTATION
  2024. uses
  2025. {$ifndef dont_use_openlib}
  2026. msgbox;
  2027. {$endif dont_use_openlib}
  2028. PROCEDURE BNDRYOFF (w: pRastPort);
  2029. BEGIN
  2030. WITH w^ DO BEGIN
  2031. Flags := Flags AND (NOT AREAOUTLINE);
  2032. END;
  2033. END;
  2034. PROCEDURE InitAnimate (animkey: ppAnimOb);
  2035. BEGIN
  2036. animkey^ := NIL;
  2037. END;
  2038. PROCEDURE SetAfPt(w: pRastPort;p: Pointer; n: Byte);
  2039. BEGIN
  2040. WITH w^ DO
  2041. BEGIN
  2042. AreaPtrn := p;
  2043. AreaPtSz := n;
  2044. END;
  2045. END;
  2046. PROCEDURE SetDrPt(w: pRastPort;p: Word);
  2047. BEGIN
  2048. WITH w^ DO
  2049. BEGIN
  2050. LinePtrn := p;
  2051. Flags := Flags OR FRST_DOT;
  2052. linpatcnt := 15;
  2053. END;
  2054. END;
  2055. PROCEDURE SetOPen(w: pRastPort;c: Byte);
  2056. BEGIN
  2057. WITH w^ DO
  2058. BEGIN
  2059. AOlPen := c;
  2060. Flags := Flags OR AREAOUTLINE;
  2061. END;
  2062. END;
  2063. { This FUNCTION is fine, but FOR OS39 the SetWriteMask() gfx FUNCTION
  2064. should be prefered because it SHOULD operate WITH gfx boards as well.
  2065. At least I hope it does.... }
  2066. PROCEDURE SetWrMsk(w: pRastPort; m: Byte);
  2067. BEGIN
  2068. w^.Mask := m;
  2069. END;
  2070. PROCEDURE SafeSetOutlinePen(w : pRastPort; c : byte);
  2071. begin
  2072. IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN begin
  2073. w^.AOlPen := c;
  2074. w^.Flags := w^.Flags OR AREAOUTLINE;
  2075. END ELSE begin
  2076. c := SetOutlinePen(w,c);
  2077. END;
  2078. END;
  2079. PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
  2080. VAR x : smallint ;
  2081. BEGIN
  2082. IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN w^.Mask := BYTE(m)
  2083. ELSE x := SetWriteMask( w, m );
  2084. END;
  2085. PROCEDURE OFF_DISPLAY (cust: pCustom);
  2086. BEGIN
  2087. cust^.dmacon := BITCLR OR DMAF_RASTER;
  2088. END;
  2089. PROCEDURE ON_DISPLAY (cust: pCustom);
  2090. BEGIN
  2091. cust^.dmacon := BITSET OR DMAF_RASTER;
  2092. END;
  2093. PROCEDURE OFF_SPRITE (cust: pCustom);
  2094. BEGIN
  2095. cust^.dmacon := BITCLR OR DMAF_SPRITE;
  2096. END;
  2097. PROCEDURE ON_SPRITE (cust: pCustom);
  2098. BEGIN
  2099. cust^.dmacon := BITSET OR DMAF_SPRITE;
  2100. END;
  2101. PROCEDURE OFF_VBLANK (cust: pCustom);
  2102. BEGIN
  2103. cust^.intena := BITCLR OR INTF_VERTB;
  2104. END;
  2105. PROCEDURE ON_VBLANK (cust: pCustom);
  2106. BEGIN
  2107. cust^.intena := BITSET OR INTF_VERTB;
  2108. END;
  2109. PROCEDURE AddAnimOb(anOb : pAnimOb; anKey : ppAnimOb; rp : pRastPort);
  2110. BEGIN
  2111. ASM
  2112. MOVE.L A6,-(A7)
  2113. MOVEA.L anOb,A0
  2114. MOVEA.L anKey,A1
  2115. MOVEA.L rp,A2
  2116. MOVEA.L GfxBase,A6
  2117. JSR -156(A6)
  2118. MOVEA.L (A7)+,A6
  2119. END;
  2120. END;
  2121. PROCEDURE AddBob(bob : pBob; rp : pRastPort);
  2122. BEGIN
  2123. ASM
  2124. MOVE.L A6,-(A7)
  2125. MOVEA.L bob,A0
  2126. MOVEA.L rp,A1
  2127. MOVEA.L GfxBase,A6
  2128. JSR -096(A6)
  2129. MOVEA.L (A7)+,A6
  2130. END;
  2131. END;
  2132. PROCEDURE AddFont(textFont : pTextFont);
  2133. BEGIN
  2134. ASM
  2135. MOVE.L A6,-(A7)
  2136. MOVEA.L textFont,A1
  2137. MOVEA.L GfxBase,A6
  2138. JSR -480(A6)
  2139. MOVEA.L (A7)+,A6
  2140. END;
  2141. END;
  2142. PROCEDURE AddVSprite(vSprite : pVSprite; rp : pRastPort);
  2143. BEGIN
  2144. ASM
  2145. MOVE.L A6,-(A7)
  2146. MOVEA.L vSprite,A0
  2147. MOVEA.L rp,A1
  2148. MOVEA.L GfxBase,A6
  2149. JSR -102(A6)
  2150. MOVEA.L (A7)+,A6
  2151. END;
  2152. END;
  2153. FUNCTION AllocBitMap(sizex : ULONG; sizey : ULONG; depth : ULONG; flags : ULONG;const friend_bitmap : pBitMap) : pBitMap;
  2154. BEGIN
  2155. ASM
  2156. MOVE.L A6,-(A7)
  2157. MOVE.L sizex,D0
  2158. MOVE.L sizey,D1
  2159. MOVE.L depth,D2
  2160. MOVE.L flags,D3
  2161. MOVEA.L friend_bitmap,A0
  2162. MOVEA.L GfxBase,A6
  2163. JSR -918(A6)
  2164. MOVEA.L (A7)+,A6
  2165. MOVE.L D0,@RESULT
  2166. END;
  2167. END;
  2168. FUNCTION AllocDBufInfo(vp : pViewPort) : pDBufInfo;
  2169. BEGIN
  2170. ASM
  2171. MOVE.L A6,-(A7)
  2172. MOVEA.L vp,A0
  2173. MOVEA.L GfxBase,A6
  2174. JSR -966(A6)
  2175. MOVEA.L (A7)+,A6
  2176. MOVE.L D0,@RESULT
  2177. END;
  2178. END;
  2179. FUNCTION AllocRaster(width : ULONG; height : ULONG) : pCHAR;
  2180. BEGIN
  2181. ASM
  2182. MOVE.L A6,-(A7)
  2183. MOVE.L width,D0
  2184. MOVE.L height,D1
  2185. MOVEA.L GfxBase,A6
  2186. JSR -492(A6)
  2187. MOVEA.L (A7)+,A6
  2188. MOVE.L D0,@RESULT
  2189. END;
  2190. END;
  2191. FUNCTION AllocSpriteDataA(const bm : pBitMap;const tags : pTagItem) : pExtSprite;
  2192. BEGIN
  2193. ASM
  2194. MOVE.L A6,-(A7)
  2195. MOVEA.L bm,A2
  2196. MOVEA.L tags,A1
  2197. MOVEA.L GfxBase,A6
  2198. JSR -1020(A6)
  2199. MOVEA.L (A7)+,A6
  2200. MOVE.L D0,@RESULT
  2201. END;
  2202. END;
  2203. PROCEDURE AndRectRegion(region : pRegion;const rectangle : pRectangle);
  2204. BEGIN
  2205. ASM
  2206. MOVE.L A6,-(A7)
  2207. MOVEA.L region,A0
  2208. MOVEA.L rectangle,A1
  2209. MOVEA.L GfxBase,A6
  2210. JSR -504(A6)
  2211. MOVEA.L (A7)+,A6
  2212. END;
  2213. END;
  2214. FUNCTION AndRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
  2215. BEGIN
  2216. ASM
  2217. MOVE.L A6,-(A7)
  2218. MOVEA.L srcRegion,A0
  2219. MOVEA.L destRegion,A1
  2220. MOVEA.L GfxBase,A6
  2221. JSR -624(A6)
  2222. MOVEA.L (A7)+,A6
  2223. TST.W D0
  2224. BEQ.B @end
  2225. MOVEQ #1,D0
  2226. @end: MOVE.B D0,@RESULT
  2227. END;
  2228. END;
  2229. PROCEDURE Animate(anKey : ppAnimOb; rp : pRastPort);
  2230. BEGIN
  2231. ASM
  2232. MOVE.L A6,-(A7)
  2233. MOVEA.L anKey,A0
  2234. MOVEA.L rp,A1
  2235. MOVEA.L GfxBase,A6
  2236. JSR -162(A6)
  2237. MOVEA.L (A7)+,A6
  2238. END;
  2239. END;
  2240. FUNCTION AreaDraw(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
  2241. BEGIN
  2242. ASM
  2243. MOVE.L A6,-(A7)
  2244. MOVEA.L rp,A1
  2245. MOVE.L x,D0
  2246. MOVE.L y,D1
  2247. MOVEA.L GfxBase,A6
  2248. JSR -258(A6)
  2249. MOVEA.L (A7)+,A6
  2250. MOVE.L D0,@RESULT
  2251. END;
  2252. END;
  2253. FUNCTION AreaEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT) : LONGINT;
  2254. BEGIN
  2255. ASM
  2256. MOVE.L A6,-(A7)
  2257. MOVEA.L rp,A1
  2258. MOVE.L xCenter,D0
  2259. MOVE.L yCenter,D1
  2260. MOVE.L a,D2
  2261. MOVE.L b,D3
  2262. MOVEA.L GfxBase,A6
  2263. JSR -186(A6)
  2264. MOVEA.L (A7)+,A6
  2265. MOVE.L D0,@RESULT
  2266. END;
  2267. END;
  2268. FUNCTION AreaEnd(rp : pRastPort) : LONGINT;
  2269. BEGIN
  2270. ASM
  2271. MOVE.L A6,-(A7)
  2272. MOVEA.L rp,A1
  2273. MOVEA.L GfxBase,A6
  2274. JSR -264(A6)
  2275. MOVEA.L (A7)+,A6
  2276. MOVE.L D0,@RESULT
  2277. END;
  2278. END;
  2279. FUNCTION AreaMove(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
  2280. BEGIN
  2281. ASM
  2282. MOVE.L A6,-(A7)
  2283. MOVEA.L rp,A1
  2284. MOVE.L x,D0
  2285. MOVE.L y,D1
  2286. MOVEA.L GfxBase,A6
  2287. JSR -252(A6)
  2288. MOVEA.L (A7)+,A6
  2289. MOVE.L D0,@RESULT
  2290. END;
  2291. END;
  2292. PROCEDURE AskFont(rp : pRastPort; textAttr : pTextAttr);
  2293. BEGIN
  2294. ASM
  2295. MOVE.L A6,-(A7)
  2296. MOVEA.L rp,A1
  2297. MOVEA.L textAttr,A0
  2298. MOVEA.L GfxBase,A6
  2299. JSR -474(A6)
  2300. MOVEA.L (A7)+,A6
  2301. END;
  2302. END;
  2303. FUNCTION AskSoftStyle(rp : pRastPort) : ULONG;
  2304. BEGIN
  2305. ASM
  2306. MOVE.L A6,-(A7)
  2307. MOVEA.L rp,A1
  2308. MOVEA.L GfxBase,A6
  2309. JSR -084(A6)
  2310. MOVEA.L (A7)+,A6
  2311. MOVE.L D0,@RESULT
  2312. END;
  2313. END;
  2314. FUNCTION AttachPalExtra(cm : pColorMap; vp : pViewPort) : LONGINT;
  2315. BEGIN
  2316. ASM
  2317. MOVE.L A6,-(A7)
  2318. MOVEA.L cm,A0
  2319. MOVEA.L vp,A1
  2320. MOVEA.L GfxBase,A6
  2321. JSR -834(A6)
  2322. MOVEA.L (A7)+,A6
  2323. MOVE.L D0,@RESULT
  2324. END;
  2325. END;
  2326. FUNCTION AttemptLockLayerRom(layer : pLayer) : BOOLEAN;
  2327. BEGIN
  2328. ASM
  2329. MOVE.L A6,-(A7)
  2330. MOVEA.L layer,A5
  2331. MOVEA.L GfxBase,A6
  2332. JSR -654(A6)
  2333. MOVEA.L (A7)+,A6
  2334. TST.W D0
  2335. BEQ.B @end
  2336. MOVEQ #1,D0
  2337. @end: MOVE.B D0,@RESULT
  2338. END;
  2339. END;
  2340. FUNCTION BestModeIDA(const tags : pTagItem) : ULONG;
  2341. BEGIN
  2342. ASM
  2343. MOVE.L A6,-(A7)
  2344. MOVEA.L tags,A0
  2345. MOVEA.L GfxBase,A6
  2346. JSR -1050(A6)
  2347. MOVEA.L (A7)+,A6
  2348. MOVE.L D0,@RESULT
  2349. END;
  2350. END;
  2351. PROCEDURE BitMapScale(bitScaleArgs : pBitScaleArgs);
  2352. BEGIN
  2353. ASM
  2354. MOVE.L A6,-(A7)
  2355. MOVEA.L bitScaleArgs,A0
  2356. MOVEA.L GfxBase,A6
  2357. JSR -678(A6)
  2358. MOVEA.L (A7)+,A6
  2359. END;
  2360. END;
  2361. FUNCTION BltBitMap(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destBitMap : pBitMap; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG; mask : ULONG; tempA : pCHAR) : LONGINT;
  2362. BEGIN
  2363. ASM
  2364. MOVE.L A6,-(A7)
  2365. MOVEA.L srcBitMap,A0
  2366. MOVE.L xSrc,D0
  2367. MOVE.L ySrc,D1
  2368. MOVEA.L destBitMap,A1
  2369. MOVE.L xDest,D2
  2370. MOVE.L yDest,D3
  2371. MOVE.L xSize,D4
  2372. MOVE.L ySize,D5
  2373. MOVE.L minterm,D6
  2374. MOVE.L mask,D7
  2375. MOVEA.L tempA,A2
  2376. MOVEA.L GfxBase,A6
  2377. JSR -030(A6)
  2378. MOVEA.L (A7)+,A6
  2379. MOVE.L D0,@RESULT
  2380. END;
  2381. END;
  2382. PROCEDURE BltBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
  2383. BEGIN
  2384. ASM
  2385. MOVE.L A6,-(A7)
  2386. MOVEA.L srcBitMap,A0
  2387. MOVE.L xSrc,D0
  2388. MOVE.L ySrc,D1
  2389. MOVEA.L destRP,A1
  2390. MOVE.L xDest,D2
  2391. MOVE.L yDest,D3
  2392. MOVE.L xSize,D4
  2393. MOVE.L ySize,D5
  2394. MOVE.L minterm,D6
  2395. MOVEA.L GfxBase,A6
  2396. JSR -606(A6)
  2397. MOVEA.L (A7)+,A6
  2398. END;
  2399. END;
  2400. PROCEDURE BltClear(memBlock : pCHAR; byteCount : ULONG; flags : ULONG);
  2401. BEGIN
  2402. ASM
  2403. MOVE.L A6,-(A7)
  2404. MOVEA.L memBlock,A1
  2405. MOVE.L byteCount,D0
  2406. MOVE.L flags,D1
  2407. MOVEA.L GfxBase,A6
  2408. JSR -300(A6)
  2409. MOVEA.L (A7)+,A6
  2410. END;
  2411. END;
  2412. PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG;const bltMask : pCHAR);
  2413. BEGIN
  2414. ASM
  2415. MOVE.L A6,-(A7)
  2416. MOVEA.L srcBitMap,A0
  2417. MOVE.L xSrc,D0
  2418. MOVE.L ySrc,D1
  2419. MOVEA.L destRP,A1
  2420. MOVE.L xDest,D2
  2421. MOVE.L yDest,D3
  2422. MOVE.L xSize,D4
  2423. MOVE.L ySize,D5
  2424. MOVE.L minterm,D6
  2425. MOVEA.L bltMask,A2
  2426. MOVEA.L GfxBase,A6
  2427. JSR -636(A6)
  2428. MOVEA.L (A7)+,A6
  2429. END;
  2430. END;
  2431. PROCEDURE BltPattern(rp : pRastPort;const mask : pCHAR; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT; maskBPR : ULONG);
  2432. BEGIN
  2433. ASM
  2434. MOVE.L A6,-(A7)
  2435. MOVEA.L rp,A1
  2436. MOVEA.L mask,A0
  2437. MOVE.L xMin,D0
  2438. MOVE.L yMin,D1
  2439. MOVE.L xMax,D2
  2440. MOVE.L yMax,D3
  2441. MOVE.L maskBPR,D4
  2442. MOVEA.L GfxBase,A6
  2443. JSR -312(A6)
  2444. MOVEA.L (A7)+,A6
  2445. END;
  2446. END;
  2447. PROCEDURE BltTemplate(const source : pCHAR; xSrc : LONGINT; srcMod : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT);
  2448. BEGIN
  2449. ASM
  2450. MOVE.L A6,-(A7)
  2451. MOVEA.L source,A0
  2452. MOVE.L xSrc,D0
  2453. MOVE.L srcMod,D1
  2454. MOVEA.L destRP,A1
  2455. MOVE.L xDest,D2
  2456. MOVE.L yDest,D3
  2457. MOVE.L xSize,D4
  2458. MOVE.L ySize,D5
  2459. MOVEA.L GfxBase,A6
  2460. JSR -036(A6)
  2461. MOVEA.L (A7)+,A6
  2462. END;
  2463. END;
  2464. FUNCTION CalcIVG(v : pView; vp : pViewPort) : WORD;
  2465. BEGIN
  2466. ASM
  2467. MOVE.L A6,-(A7)
  2468. MOVEA.L v,A0
  2469. MOVEA.L vp,A1
  2470. MOVEA.L GfxBase,A6
  2471. JSR -828(A6)
  2472. MOVEA.L (A7)+,A6
  2473. MOVE.L D0,@RESULT
  2474. END;
  2475. END;
  2476. PROCEDURE CBump(copList : pUCopList);
  2477. BEGIN
  2478. ASM
  2479. MOVE.L A6,-(A7)
  2480. MOVEA.L copList,A1
  2481. MOVEA.L GfxBase,A6
  2482. JSR -366(A6)
  2483. MOVEA.L (A7)+,A6
  2484. END;
  2485. END;
  2486. FUNCTION ChangeExtSpriteA(vp : pViewPort; oldsprite : pExtSprite; newsprite : pExtSprite;const tags : pTagItem) : LONGINT;
  2487. BEGIN
  2488. ASM
  2489. MOVE.L A6,-(A7)
  2490. MOVEA.L vp,A0
  2491. MOVEA.L oldsprite,A1
  2492. MOVEA.L newsprite,A2
  2493. MOVEA.L tags,A3
  2494. MOVEA.L GfxBase,A6
  2495. JSR -1026(A6)
  2496. MOVEA.L (A7)+,A6
  2497. MOVE.L D0,@RESULT
  2498. END;
  2499. END;
  2500. PROCEDURE ChangeSprite(vp : pViewPort; sprite : pSimpleSprite; newData : pWORD);
  2501. BEGIN
  2502. ASM
  2503. MOVE.L A6,-(A7)
  2504. MOVEA.L vp,A0
  2505. MOVEA.L sprite,A1
  2506. MOVEA.L newData,A2
  2507. MOVEA.L GfxBase,A6
  2508. JSR -420(A6)
  2509. MOVEA.L (A7)+,A6
  2510. END;
  2511. END;
  2512. PROCEDURE ChangeVPBitMap(vp : pViewPort; bm : pBitMap; db : pDBufInfo);
  2513. BEGIN
  2514. ASM
  2515. MOVE.L A6,-(A7)
  2516. MOVEA.L vp,A0
  2517. MOVEA.L bm,A1
  2518. MOVEA.L db,A2
  2519. MOVEA.L GfxBase,A6
  2520. JSR -942(A6)
  2521. MOVEA.L (A7)+,A6
  2522. END;
  2523. END;
  2524. PROCEDURE ClearEOL(rp : pRastPort);
  2525. BEGIN
  2526. ASM
  2527. MOVE.L A6,-(A7)
  2528. MOVEA.L rp,A1
  2529. MOVEA.L GfxBase,A6
  2530. JSR -042(A6)
  2531. MOVEA.L (A7)+,A6
  2532. END;
  2533. END;
  2534. FUNCTION ClearRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
  2535. BEGIN
  2536. ASM
  2537. MOVE.L A6,-(A7)
  2538. MOVEA.L region,A0
  2539. MOVEA.L rectangle,A1
  2540. MOVEA.L GfxBase,A6
  2541. JSR -522(A6)
  2542. MOVEA.L (A7)+,A6
  2543. TST.W D0
  2544. BEQ.B @end
  2545. MOVEQ #1,D0
  2546. @end: MOVE.B D0,@RESULT
  2547. END;
  2548. END;
  2549. PROCEDURE ClearRegion(region : pRegion);
  2550. BEGIN
  2551. ASM
  2552. MOVE.L A6,-(A7)
  2553. MOVEA.L region,A0
  2554. MOVEA.L GfxBase,A6
  2555. JSR -528(A6)
  2556. MOVEA.L (A7)+,A6
  2557. END;
  2558. END;
  2559. PROCEDURE ClearScreen(rp : pRastPort);
  2560. BEGIN
  2561. ASM
  2562. MOVE.L A6,-(A7)
  2563. MOVEA.L rp,A1
  2564. MOVEA.L GfxBase,A6
  2565. JSR -048(A6)
  2566. MOVEA.L (A7)+,A6
  2567. END;
  2568. END;
  2569. PROCEDURE ClipBlit(srcRP : pRastPort; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
  2570. BEGIN
  2571. ASM
  2572. MOVE.L A6,-(A7)
  2573. MOVEA.L srcRP,A0
  2574. MOVE.L xSrc,D0
  2575. MOVE.L ySrc,D1
  2576. MOVEA.L destRP,A1
  2577. MOVE.L xDest,D2
  2578. MOVE.L yDest,D3
  2579. MOVE.L xSize,D4
  2580. MOVE.L ySize,D5
  2581. MOVE.L minterm,D6
  2582. MOVEA.L GfxBase,A6
  2583. JSR -552(A6)
  2584. MOVEA.L (A7)+,A6
  2585. END;
  2586. END;
  2587. PROCEDURE CloseFont(textFont : pTextFont);
  2588. BEGIN
  2589. ASM
  2590. MOVE.L A6,-(A7)
  2591. MOVEA.L textFont,A1
  2592. MOVEA.L GfxBase,A6
  2593. JSR -078(A6)
  2594. MOVEA.L (A7)+,A6
  2595. END;
  2596. END;
  2597. FUNCTION CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN;
  2598. BEGIN
  2599. ASM
  2600. MOVE.L A6,-(A7)
  2601. MOVEA.L monitorSpec,A0
  2602. MOVEA.L GfxBase,A6
  2603. JSR -720(A6)
  2604. MOVEA.L (A7)+,A6
  2605. TST.W D0
  2606. BEQ.B @end
  2607. MOVEQ #1,D0
  2608. @end: MOVE.B D0,@RESULT
  2609. END;
  2610. END;
  2611. PROCEDURE CMove(copList : pUCopList; destination : POINTER; data : LONGINT);
  2612. BEGIN
  2613. ASM
  2614. MOVE.L A6,-(A7)
  2615. MOVEA.L copList,A1
  2616. MOVE.L destination,D0
  2617. MOVE.L data,D1
  2618. MOVEA.L GfxBase,A6
  2619. JSR -372(A6)
  2620. MOVEA.L (A7)+,A6
  2621. END;
  2622. END;
  2623. FUNCTION CoerceMode(vp : pViewPort; monitorid : ULONG; flags : ULONG) : ULONG;
  2624. BEGIN
  2625. ASM
  2626. MOVE.L A6,-(A7)
  2627. MOVEA.L vp,A0
  2628. MOVE.L monitorid,D0
  2629. MOVE.L flags,D1
  2630. MOVEA.L GfxBase,A6
  2631. JSR -936(A6)
  2632. MOVEA.L (A7)+,A6
  2633. MOVE.L D0,@RESULT
  2634. END;
  2635. END;
  2636. PROCEDURE CopySBitMap(layer : pLayer);
  2637. BEGIN
  2638. ASM
  2639. MOVE.L A6,-(A7)
  2640. MOVEA.L layer,A0
  2641. MOVEA.L GfxBase,A6
  2642. JSR -450(A6)
  2643. MOVEA.L (A7)+,A6
  2644. END;
  2645. END;
  2646. PROCEDURE CWait(copList : pUCopList; v : LONGINT; h : LONGINT);
  2647. BEGIN
  2648. ASM
  2649. MOVE.L A6,-(A7)
  2650. MOVEA.L copList,A1
  2651. MOVE.L v,D0
  2652. MOVE.L h,D1
  2653. MOVEA.L GfxBase,A6
  2654. JSR -378(A6)
  2655. MOVEA.L (A7)+,A6
  2656. END;
  2657. END;
  2658. PROCEDURE DisownBlitter;
  2659. BEGIN
  2660. ASM
  2661. MOVE.L A6,-(A7)
  2662. MOVEA.L GfxBase,A6
  2663. JSR -462(A6)
  2664. MOVEA.L (A7)+,A6
  2665. END;
  2666. END;
  2667. PROCEDURE DisposeRegion(region : pRegion);
  2668. BEGIN
  2669. ASM
  2670. MOVE.L A6,-(A7)
  2671. MOVEA.L region,A0
  2672. MOVEA.L GfxBase,A6
  2673. JSR -534(A6)
  2674. MOVEA.L (A7)+,A6
  2675. END;
  2676. END;
  2677. PROCEDURE DoCollision(rp : pRastPort);
  2678. BEGIN
  2679. ASM
  2680. MOVE.L A6,-(A7)
  2681. MOVEA.L rp,A1
  2682. MOVEA.L GfxBase,A6
  2683. JSR -108(A6)
  2684. MOVEA.L (A7)+,A6
  2685. END;
  2686. END;
  2687. PROCEDURE Draw(rp : pRastPort; x : LONGINT; y : LONGINT);
  2688. BEGIN
  2689. ASM
  2690. MOVE.L A6,-(A7)
  2691. MOVEA.L rp,A1
  2692. MOVE.L x,D0
  2693. MOVE.L y,D1
  2694. MOVEA.L GfxBase,A6
  2695. JSR -246(A6)
  2696. MOVEA.L (A7)+,A6
  2697. END;
  2698. END;
  2699. PROCEDURE DrawEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT);
  2700. BEGIN
  2701. ASM
  2702. MOVE.L A6,-(A7)
  2703. MOVEA.L rp,A1
  2704. MOVE.L xCenter,D0
  2705. MOVE.L yCenter,D1
  2706. MOVE.L a,D2
  2707. MOVE.L b,D3
  2708. MOVEA.L GfxBase,A6
  2709. JSR -180(A6)
  2710. MOVEA.L (A7)+,A6
  2711. END;
  2712. END;
  2713. PROCEDURE DrawGList(rp : pRastPort; vp : pViewPort);
  2714. BEGIN
  2715. ASM
  2716. MOVE.L A6,-(A7)
  2717. MOVEA.L rp,A1
  2718. MOVEA.L vp,A0
  2719. MOVEA.L GfxBase,A6
  2720. JSR -114(A6)
  2721. MOVEA.L (A7)+,A6
  2722. END;
  2723. END;
  2724. PROCEDURE EraseRect(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  2725. BEGIN
  2726. ASM
  2727. MOVE.L A6,-(A7)
  2728. MOVEA.L rp,A1
  2729. MOVE.L xMin,D0
  2730. MOVE.L yMin,D1
  2731. MOVE.L xMax,D2
  2732. MOVE.L yMax,D3
  2733. MOVEA.L GfxBase,A6
  2734. JSR -810(A6)
  2735. MOVEA.L (A7)+,A6
  2736. END;
  2737. END;
  2738. FUNCTION ExtendFont(font : pTextFont;const fontTags : pTagItem) : ULONG;
  2739. BEGIN
  2740. ASM
  2741. MOVE.L A6,-(A7)
  2742. MOVEA.L font,A0
  2743. MOVEA.L fontTags,A1
  2744. MOVEA.L GfxBase,A6
  2745. JSR -816(A6)
  2746. MOVEA.L (A7)+,A6
  2747. MOVE.L D0,@RESULT
  2748. END;
  2749. END;
  2750. FUNCTION FindColor(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG; maxcolor : LONGINT) : LONGINT;
  2751. BEGIN
  2752. ASM
  2753. MOVE.L A6,-(A7)
  2754. MOVEA.L cm,A3
  2755. MOVE.L r,D1
  2756. MOVE.L g,D2
  2757. MOVE.L b,D3
  2758. MOVE.L maxcolor,D4
  2759. MOVEA.L GfxBase,A6
  2760. JSR -1008(A6)
  2761. MOVEA.L (A7)+,A6
  2762. MOVE.L D0,@RESULT
  2763. END;
  2764. END;
  2765. FUNCTION FindDisplayInfo(displayID : ULONG) : POINTER;
  2766. BEGIN
  2767. ASM
  2768. MOVE.L A6,-(A7)
  2769. MOVE.L displayID,D0
  2770. MOVEA.L GfxBase,A6
  2771. JSR -726(A6)
  2772. MOVEA.L (A7)+,A6
  2773. MOVE.L D0,@RESULT
  2774. END;
  2775. END;
  2776. FUNCTION Flood(rp : pRastPort; mode : ULONG; x : LONGINT; y : LONGINT) : BOOLEAN;
  2777. BEGIN
  2778. ASM
  2779. MOVE.L A6,-(A7)
  2780. MOVEA.L rp,A1
  2781. MOVE.L mode,D2
  2782. MOVE.L x,D0
  2783. MOVE.L y,D1
  2784. MOVEA.L GfxBase,A6
  2785. JSR -330(A6)
  2786. MOVEA.L (A7)+,A6
  2787. TST.W D0
  2788. BEQ.B @end
  2789. MOVEQ #1,D0
  2790. @end: MOVE.B D0,@RESULT
  2791. END;
  2792. END;
  2793. PROCEDURE FontExtent(const font : pTextFont; fontExtent : pTextExtent);
  2794. BEGIN
  2795. ASM
  2796. MOVE.L A6,-(A7)
  2797. MOVEA.L font,A0
  2798. MOVEA.L fontExtent,A1
  2799. MOVEA.L GfxBase,A6
  2800. JSR -762(A6)
  2801. MOVEA.L (A7)+,A6
  2802. END;
  2803. END;
  2804. PROCEDURE FreeBitMap(bm : pBitMap);
  2805. BEGIN
  2806. ASM
  2807. MOVE.L A6,-(A7)
  2808. MOVEA.L bm,A0
  2809. MOVEA.L GfxBase,A6
  2810. JSR -924(A6)
  2811. MOVEA.L (A7)+,A6
  2812. END;
  2813. END;
  2814. PROCEDURE FreeColorMap(colorMap : pColorMap);
  2815. BEGIN
  2816. ASM
  2817. MOVE.L A6,-(A7)
  2818. MOVEA.L colorMap,A0
  2819. MOVEA.L GfxBase,A6
  2820. JSR -576(A6)
  2821. MOVEA.L (A7)+,A6
  2822. END;
  2823. END;
  2824. PROCEDURE FreeCopList(copList : pCopList);
  2825. BEGIN
  2826. ASM
  2827. MOVE.L A6,-(A7)
  2828. MOVEA.L copList,A0
  2829. MOVEA.L GfxBase,A6
  2830. JSR -546(A6)
  2831. MOVEA.L (A7)+,A6
  2832. END;
  2833. END;
  2834. PROCEDURE FreeCprList(cprList : pcprlist);
  2835. BEGIN
  2836. ASM
  2837. MOVE.L A6,-(A7)
  2838. MOVEA.L cprList,A0
  2839. MOVEA.L GfxBase,A6
  2840. JSR -564(A6)
  2841. MOVEA.L (A7)+,A6
  2842. END;
  2843. END;
  2844. PROCEDURE FreeDBufInfo(dbi : pDBufInfo);
  2845. BEGIN
  2846. ASM
  2847. MOVE.L A6,-(A7)
  2848. MOVEA.L dbi,A1
  2849. MOVEA.L GfxBase,A6
  2850. JSR -972(A6)
  2851. MOVEA.L (A7)+,A6
  2852. END;
  2853. END;
  2854. PROCEDURE FreeGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT);
  2855. BEGIN
  2856. ASM
  2857. MOVE.L A6,-(A7)
  2858. MOVEA.L anOb,A0
  2859. MOVEA.L rp,A1
  2860. MOVE.L flag,D0
  2861. MOVEA.L GfxBase,A6
  2862. JSR -600(A6)
  2863. MOVEA.L (A7)+,A6
  2864. END;
  2865. END;
  2866. PROCEDURE FreeRaster(p : pCHAR; width : ULONG; height : ULONG);
  2867. BEGIN
  2868. ASM
  2869. MOVE.L A6,-(A7)
  2870. MOVEA.L p,A0
  2871. MOVE.L width,D0
  2872. MOVE.L height,D1
  2873. MOVEA.L GfxBase,A6
  2874. JSR -498(A6)
  2875. MOVEA.L (A7)+,A6
  2876. END;
  2877. END;
  2878. PROCEDURE FreeSprite(num : LONGINT);
  2879. BEGIN
  2880. ASM
  2881. MOVE.L A6,-(A7)
  2882. MOVE.L num,D0
  2883. MOVEA.L GfxBase,A6
  2884. JSR -414(A6)
  2885. MOVEA.L (A7)+,A6
  2886. END;
  2887. END;
  2888. PROCEDURE FreeSpriteData(sp : pExtSprite);
  2889. BEGIN
  2890. ASM
  2891. MOVE.L A6,-(A7)
  2892. MOVEA.L sp,A2
  2893. MOVEA.L GfxBase,A6
  2894. JSR -1032(A6)
  2895. MOVEA.L (A7)+,A6
  2896. END;
  2897. END;
  2898. PROCEDURE FreeVPortCopLists(vp : pViewPort);
  2899. BEGIN
  2900. ASM
  2901. MOVE.L A6,-(A7)
  2902. MOVEA.L vp,A0
  2903. MOVEA.L GfxBase,A6
  2904. JSR -540(A6)
  2905. MOVEA.L (A7)+,A6
  2906. END;
  2907. END;
  2908. FUNCTION GetAPen(rp : pRastPort) : ULONG;
  2909. BEGIN
  2910. ASM
  2911. MOVE.L A6,-(A7)
  2912. MOVEA.L rp,A0
  2913. MOVEA.L GfxBase,A6
  2914. JSR -858(A6)
  2915. MOVEA.L (A7)+,A6
  2916. MOVE.L D0,@RESULT
  2917. END;
  2918. END;
  2919. FUNCTION GetBitMapAttr(const bm : pBitMap; attrnum : ULONG) : ULONG;
  2920. BEGIN
  2921. ASM
  2922. MOVE.L A6,-(A7)
  2923. MOVEA.L bm,A0
  2924. MOVE.L attrnum,D1
  2925. MOVEA.L GfxBase,A6
  2926. JSR -960(A6)
  2927. MOVEA.L (A7)+,A6
  2928. MOVE.L D0,@RESULT
  2929. END;
  2930. END;
  2931. FUNCTION GetBPen(rp : pRastPort) : ULONG;
  2932. BEGIN
  2933. ASM
  2934. MOVE.L A6,-(A7)
  2935. MOVEA.L rp,A0
  2936. MOVEA.L GfxBase,A6
  2937. JSR -864(A6)
  2938. MOVEA.L (A7)+,A6
  2939. MOVE.L D0,@RESULT
  2940. END;
  2941. END;
  2942. FUNCTION GetColorMap(entries : LONGINT) : pColorMap;
  2943. BEGIN
  2944. ASM
  2945. MOVE.L A6,-(A7)
  2946. MOVE.L entries,D0
  2947. MOVEA.L GfxBase,A6
  2948. JSR -570(A6)
  2949. MOVEA.L (A7)+,A6
  2950. MOVE.L D0,@RESULT
  2951. END;
  2952. END;
  2953. FUNCTION GetDisplayInfoData(const handle : POINTER; buf : pCHAR; size : ULONG; tagID : ULONG; displayID : ULONG) : ULONG;
  2954. BEGIN
  2955. ASM
  2956. MOVE.L A6,-(A7)
  2957. MOVEA.L handle,A0
  2958. MOVEA.L buf,A1
  2959. MOVE.L size,D0
  2960. MOVE.L tagID,D1
  2961. MOVE.L displayID,D2
  2962. MOVEA.L GfxBase,A6
  2963. JSR -756(A6)
  2964. MOVEA.L (A7)+,A6
  2965. MOVE.L D0,@RESULT
  2966. END;
  2967. END;
  2968. FUNCTION GetDrMd(rp : pRastPort) : ULONG;
  2969. BEGIN
  2970. ASM
  2971. MOVE.L A6,-(A7)
  2972. MOVEA.L rp,A0
  2973. MOVEA.L GfxBase,A6
  2974. JSR -870(A6)
  2975. MOVEA.L (A7)+,A6
  2976. MOVE.L D0,@RESULT
  2977. END;
  2978. END;
  2979. FUNCTION GetExtSpriteA(ss : pExtSprite;const tags : pTagItem) : LONGINT;
  2980. BEGIN
  2981. ASM
  2982. MOVE.L A6,-(A7)
  2983. MOVEA.L ss,A2
  2984. MOVEA.L tags,A1
  2985. MOVEA.L GfxBase,A6
  2986. JSR -930(A6)
  2987. MOVEA.L (A7)+,A6
  2988. MOVE.L D0,@RESULT
  2989. END;
  2990. END;
  2991. FUNCTION GetGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT) : BOOLEAN;
  2992. BEGIN
  2993. ASM
  2994. MOVE.L A6,-(A7)
  2995. MOVEA.L anOb,A0
  2996. MOVEA.L rp,A1
  2997. MOVE.L flag,D0
  2998. MOVEA.L GfxBase,A6
  2999. JSR -168(A6)
  3000. MOVEA.L (A7)+,A6
  3001. TST.W D0
  3002. BEQ.B @end
  3003. MOVEQ #1,D0
  3004. @end: MOVE.B D0,@RESULT
  3005. END;
  3006. END;
  3007. FUNCTION GetOutlinePen(rp : pRastPort) : ULONG;
  3008. BEGIN
  3009. ASM
  3010. MOVE.L A6,-(A7)
  3011. MOVEA.L rp,A0
  3012. MOVEA.L GfxBase,A6
  3013. JSR -876(A6)
  3014. MOVEA.L (A7)+,A6
  3015. MOVE.L D0,@RESULT
  3016. END;
  3017. END;
  3018. PROCEDURE GetRGB32(const cm : pColorMap; firstcolor : ULONG; ncolors : ULONG; table : pUlong);
  3019. BEGIN
  3020. ASM
  3021. MOVE.L A6,-(A7)
  3022. MOVEA.L cm,A0
  3023. MOVE.L firstcolor,D0
  3024. MOVE.L ncolors,D1
  3025. MOVEA.L table,A1
  3026. MOVEA.L GfxBase,A6
  3027. JSR -900(A6)
  3028. MOVEA.L (A7)+,A6
  3029. END;
  3030. END;
  3031. FUNCTION GetRGB4(colorMap : pColorMap; entry : LONGINT) : ULONG;
  3032. BEGIN
  3033. ASM
  3034. MOVE.L A6,-(A7)
  3035. MOVEA.L colorMap,A0
  3036. MOVE.L entry,D0
  3037. MOVEA.L GfxBase,A6
  3038. JSR -582(A6)
  3039. MOVEA.L (A7)+,A6
  3040. MOVE.L D0,@RESULT
  3041. END;
  3042. END;
  3043. PROCEDURE GetRPAttrsA(const rp : pRastPort;const tags : pTagItem);
  3044. BEGIN
  3045. ASM
  3046. MOVE.L A6,-(A7)
  3047. MOVEA.L rp,A0
  3048. MOVEA.L tags,A1
  3049. MOVEA.L GfxBase,A6
  3050. JSR -1044(A6)
  3051. MOVEA.L (A7)+,A6
  3052. END;
  3053. END;
  3054. FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : smallint;
  3055. BEGIN
  3056. ASM
  3057. MOVE.L A6,-(A7)
  3058. MOVEA.L sprite,A0
  3059. MOVE.L num,D0
  3060. MOVEA.L GfxBase,A6
  3061. JSR -408(A6)
  3062. MOVEA.L (A7)+,A6
  3063. MOVE.L D0,@RESULT
  3064. END;
  3065. END;
  3066. FUNCTION GetVPModeID(const vp : pViewPort) : LONGINT;
  3067. BEGIN
  3068. ASM
  3069. MOVE.L A6,-(A7)
  3070. MOVEA.L vp,A0
  3071. MOVEA.L GfxBase,A6
  3072. JSR -792(A6)
  3073. MOVEA.L (A7)+,A6
  3074. MOVE.L D0,@RESULT
  3075. END;
  3076. END;
  3077. PROCEDURE GfxAssociate(const associateNode : POINTER; gfxNodePtr : POINTER);
  3078. BEGIN
  3079. ASM
  3080. MOVE.L A6,-(A7)
  3081. MOVEA.L associateNode,A0
  3082. MOVEA.L gfxNodePtr,A1
  3083. MOVEA.L GfxBase,A6
  3084. JSR -672(A6)
  3085. MOVEA.L (A7)+,A6
  3086. END;
  3087. END;
  3088. PROCEDURE GfxFree(gfxNodePtr : POINTER);
  3089. BEGIN
  3090. ASM
  3091. MOVE.L A6,-(A7)
  3092. MOVEA.L gfxNodePtr,A0
  3093. MOVEA.L GfxBase,A6
  3094. JSR -666(A6)
  3095. MOVEA.L (A7)+,A6
  3096. END;
  3097. END;
  3098. FUNCTION GfxLookUp(const associateNode : POINTER) : POINTER;
  3099. BEGIN
  3100. ASM
  3101. MOVE.L A6,-(A7)
  3102. MOVEA.L associateNode,A0
  3103. MOVEA.L GfxBase,A6
  3104. JSR -702(A6)
  3105. MOVEA.L (A7)+,A6
  3106. MOVE.L D0,@RESULT
  3107. END;
  3108. END;
  3109. FUNCTION GfxNew(gfxNodeType : ULONG) : POINTER;
  3110. BEGIN
  3111. ASM
  3112. MOVE.L A6,-(A7)
  3113. MOVE.L gfxNodeType,D0
  3114. MOVEA.L GfxBase,A6
  3115. JSR -660(A6)
  3116. MOVEA.L (A7)+,A6
  3117. MOVE.L D0,@RESULT
  3118. END;
  3119. END;
  3120. PROCEDURE InitArea(areaInfo : pAreaInfo; vectorBuffer : POINTER; maxVectors : LONGINT);
  3121. BEGIN
  3122. ASM
  3123. MOVE.L A6,-(A7)
  3124. MOVEA.L areaInfo,A0
  3125. MOVEA.L vectorBuffer,A1
  3126. MOVE.L maxVectors,D0
  3127. MOVEA.L GfxBase,A6
  3128. JSR -282(A6)
  3129. MOVEA.L (A7)+,A6
  3130. END;
  3131. END;
  3132. PROCEDURE InitBitMap(bitMap : pBitMap; depth : LONGINT; width : LONGINT; height : LONGINT);
  3133. BEGIN
  3134. ASM
  3135. MOVE.L A6,-(A7)
  3136. MOVEA.L bitMap,A0
  3137. MOVE.L depth,D0
  3138. MOVE.L width,D1
  3139. MOVE.L height,D2
  3140. MOVEA.L GfxBase,A6
  3141. JSR -390(A6)
  3142. MOVEA.L (A7)+,A6
  3143. END;
  3144. END;
  3145. PROCEDURE InitGels(head : pVSprite; tail : pVSprite; gelsInfo : pGelsInfo);
  3146. BEGIN
  3147. ASM
  3148. MOVE.L A6,-(A7)
  3149. MOVEA.L head,A0
  3150. MOVEA.L tail,A1
  3151. MOVEA.L gelsInfo,A2
  3152. MOVEA.L GfxBase,A6
  3153. JSR -120(A6)
  3154. MOVEA.L (A7)+,A6
  3155. END;
  3156. END;
  3157. PROCEDURE InitGMasks(anOb : pAnimOb);
  3158. BEGIN
  3159. ASM
  3160. MOVE.L A6,-(A7)
  3161. MOVEA.L anOb,A0
  3162. MOVEA.L GfxBase,A6
  3163. JSR -174(A6)
  3164. MOVEA.L (A7)+,A6
  3165. END;
  3166. END;
  3167. PROCEDURE InitMasks(vSprite : pVSprite);
  3168. BEGIN
  3169. ASM
  3170. MOVE.L A6,-(A7)
  3171. MOVEA.L vSprite,A0
  3172. MOVEA.L GfxBase,A6
  3173. JSR -126(A6)
  3174. MOVEA.L (A7)+,A6
  3175. END;
  3176. END;
  3177. PROCEDURE InitRastPort(rp : pRastPort);
  3178. BEGIN
  3179. ASM
  3180. MOVE.L A6,-(A7)
  3181. MOVEA.L rp,A1
  3182. MOVEA.L GfxBase,A6
  3183. JSR -198(A6)
  3184. MOVEA.L (A7)+,A6
  3185. END;
  3186. END;
  3187. FUNCTION InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LONGINT) : pTmpRas;
  3188. BEGIN
  3189. ASM
  3190. MOVE.L A6,-(A7)
  3191. MOVEA.L tmpRas,A0
  3192. MOVEA.L buffer,A1
  3193. MOVE.L size,D0
  3194. MOVEA.L GfxBase,A6
  3195. JSR -468(A6)
  3196. MOVEA.L (A7)+,A6
  3197. MOVE.L D0,@RESULT
  3198. END;
  3199. END;
  3200. PROCEDURE InitView(view : pView);
  3201. BEGIN
  3202. ASM
  3203. MOVE.L A6,-(A7)
  3204. MOVEA.L view,A1
  3205. MOVEA.L GfxBase,A6
  3206. JSR -360(A6)
  3207. MOVEA.L (A7)+,A6
  3208. END;
  3209. END;
  3210. PROCEDURE InitVPort(vp : pViewPort);
  3211. BEGIN
  3212. ASM
  3213. MOVE.L A6,-(A7)
  3214. MOVEA.L vp,A0
  3215. MOVEA.L GfxBase,A6
  3216. JSR -204(A6)
  3217. MOVEA.L (A7)+,A6
  3218. END;
  3219. END;
  3220. PROCEDURE LoadRGB32(vp : pViewPort;const table : pULONG);
  3221. BEGIN
  3222. ASM
  3223. MOVE.L A6,-(A7)
  3224. MOVEA.L vp,A0
  3225. MOVEA.L table,A1
  3226. MOVEA.L GfxBase,A6
  3227. JSR -882(A6)
  3228. MOVEA.L (A7)+,A6
  3229. END;
  3230. END;
  3231. PROCEDURE LoadRGB4(vp : pViewPort;const colors : pWord; count : LONGINT);
  3232. BEGIN
  3233. ASM
  3234. MOVE.L A6,-(A7)
  3235. MOVEA.L vp,A0
  3236. MOVEA.L colors,A1
  3237. MOVE.L count,D0
  3238. MOVEA.L GfxBase,A6
  3239. JSR -192(A6)
  3240. MOVEA.L (A7)+,A6
  3241. END;
  3242. END;
  3243. PROCEDURE LoadView(view : pView);
  3244. BEGIN
  3245. ASM
  3246. MOVE.L A6,-(A7)
  3247. MOVEA.L view,A1
  3248. MOVEA.L GfxBase,A6
  3249. JSR -222(A6)
  3250. MOVEA.L (A7)+,A6
  3251. END;
  3252. END;
  3253. PROCEDURE LockLayerRom(layer : pLayer);
  3254. BEGIN
  3255. ASM
  3256. MOVE.L A6,-(A7)
  3257. MOVEA.L layer,A5
  3258. MOVEA.L GfxBase,A6
  3259. JSR -432(A6)
  3260. MOVEA.L (A7)+,A6
  3261. END;
  3262. END;
  3263. FUNCTION MakeVPort(view : pView; vp : pViewPort) : ULONG;
  3264. BEGIN
  3265. ASM
  3266. MOVE.L A6,-(A7)
  3267. MOVEA.L view,A0
  3268. MOVEA.L vp,A1
  3269. MOVEA.L GfxBase,A6
  3270. JSR -216(A6)
  3271. MOVEA.L (A7)+,A6
  3272. MOVE.L D0,@RESULT
  3273. END;
  3274. END;
  3275. FUNCTION ModeNotAvailable(modeID : ULONG) : LONGINT;
  3276. BEGIN
  3277. ASM
  3278. MOVE.L A6,-(A7)
  3279. MOVE.L modeID,D0
  3280. MOVEA.L GfxBase,A6
  3281. JSR -798(A6)
  3282. MOVEA.L (A7)+,A6
  3283. MOVE.L D0,@RESULT
  3284. END;
  3285. END;
  3286. PROCEDURE Move(rp : pRastPort; x : LONGINT; y : LONGINT);
  3287. BEGIN
  3288. ASM
  3289. MOVE.L A6,-(A7)
  3290. MOVEA.L rp,A1
  3291. MOVE.L x,D0
  3292. MOVE.L y,D1
  3293. MOVEA.L GfxBase,A6
  3294. JSR -240(A6)
  3295. MOVEA.L (A7)+,A6
  3296. END;
  3297. END;
  3298. PROCEDURE MoveSprite(vp : pViewPort; sprite : pSimpleSprite; x : LONGINT; y : LONGINT);
  3299. BEGIN
  3300. ASM
  3301. MOVE.L A6,-(A7)
  3302. MOVEA.L vp,A0
  3303. MOVEA.L sprite,A1
  3304. MOVE.L x,D0
  3305. MOVE.L y,D1
  3306. MOVEA.L GfxBase,A6
  3307. JSR -426(A6)
  3308. MOVEA.L (A7)+,A6
  3309. END;
  3310. END;
  3311. FUNCTION MrgCop(view : pView) : ULONG;
  3312. BEGIN
  3313. ASM
  3314. MOVE.L A6,-(A7)
  3315. MOVEA.L view,A1
  3316. MOVEA.L GfxBase,A6
  3317. JSR -210(A6)
  3318. MOVEA.L (A7)+,A6
  3319. MOVE.L D0,@RESULT
  3320. END;
  3321. END;
  3322. FUNCTION NewRegion : pRegion;
  3323. BEGIN
  3324. ASM
  3325. MOVE.L A6,-(A7)
  3326. MOVEA.L GfxBase,A6
  3327. JSR -516(A6)
  3328. MOVEA.L (A7)+,A6
  3329. MOVE.L D0,@RESULT
  3330. END;
  3331. END;
  3332. FUNCTION NextDisplayInfo(displayID : ULONG) : ULONG;
  3333. BEGIN
  3334. ASM
  3335. MOVE.L A6,-(A7)
  3336. MOVE.L displayID,D0
  3337. MOVEA.L GfxBase,A6
  3338. JSR -732(A6)
  3339. MOVEA.L (A7)+,A6
  3340. MOVE.L D0,@RESULT
  3341. END;
  3342. END;
  3343. FUNCTION ObtainBestPenA(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG;const tags : pTagItem) : LONGINT;
  3344. BEGIN
  3345. ASM
  3346. MOVE.L A6,-(A7)
  3347. MOVEA.L cm,A0
  3348. MOVE.L r,D1
  3349. MOVE.L g,D2
  3350. MOVE.L b,D3
  3351. MOVEA.L tags,A1
  3352. MOVEA.L GfxBase,A6
  3353. JSR -840(A6)
  3354. MOVEA.L (A7)+,A6
  3355. MOVE.L D0,@RESULT
  3356. END;
  3357. END;
  3358. FUNCTION ObtainPen(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG; f : LONGINT) : ULONG;
  3359. BEGIN
  3360. ASM
  3361. MOVE.L A6,-(A7)
  3362. MOVEA.L cm,A0
  3363. MOVE.L n,D0
  3364. MOVE.L r,D1
  3365. MOVE.L g,D2
  3366. MOVE.L b,D3
  3367. MOVE.L f,D4
  3368. MOVEA.L GfxBase,A6
  3369. JSR -954(A6)
  3370. MOVEA.L (A7)+,A6
  3371. MOVE.L D0,@RESULT
  3372. END;
  3373. END;
  3374. FUNCTION OpenFont(textAttr : pTextAttr) : pTextFont;
  3375. BEGIN
  3376. ASM
  3377. MOVE.L A6,-(A7)
  3378. MOVEA.L textAttr,A0
  3379. MOVEA.L GfxBase,A6
  3380. JSR -072(A6)
  3381. MOVEA.L (A7)+,A6
  3382. MOVE.L D0,@RESULT
  3383. END;
  3384. END;
  3385. FUNCTION OpenMonitor(const monitorName : pCHAR; displayID : ULONG) : pMonitorSpec;
  3386. BEGIN
  3387. ASM
  3388. MOVE.L A6,-(A7)
  3389. MOVEA.L monitorName,A1
  3390. MOVE.L displayID,D0
  3391. MOVEA.L GfxBase,A6
  3392. JSR -714(A6)
  3393. MOVEA.L (A7)+,A6
  3394. MOVE.L D0,@RESULT
  3395. END;
  3396. END;
  3397. FUNCTION OrRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
  3398. BEGIN
  3399. ASM
  3400. MOVE.L A6,-(A7)
  3401. MOVEA.L region,A0
  3402. MOVEA.L rectangle,A1
  3403. MOVEA.L GfxBase,A6
  3404. JSR -510(A6)
  3405. MOVEA.L (A7)+,A6
  3406. TST.W D0
  3407. BEQ.B @end
  3408. MOVEQ #1,D0
  3409. @end: MOVE.B D0,@RESULT
  3410. END;
  3411. END;
  3412. FUNCTION OrRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
  3413. BEGIN
  3414. ASM
  3415. MOVE.L A6,-(A7)
  3416. MOVEA.L srcRegion,A0
  3417. MOVEA.L destRegion,A1
  3418. MOVEA.L GfxBase,A6
  3419. JSR -612(A6)
  3420. MOVEA.L (A7)+,A6
  3421. TST.W D0
  3422. BEQ.B @end
  3423. MOVEQ #1,D0
  3424. @end: MOVE.B D0,@RESULT
  3425. END;
  3426. END;
  3427. PROCEDURE OwnBlitter;
  3428. BEGIN
  3429. ASM
  3430. MOVE.L A6,-(A7)
  3431. MOVEA.L GfxBase,A6
  3432. JSR -456(A6)
  3433. MOVEA.L (A7)+,A6
  3434. END;
  3435. END;
  3436. PROCEDURE PolyDraw(rp : pRastPort; count : LONGINT;const polyTable : pLongint);
  3437. BEGIN
  3438. ASM
  3439. MOVE.L A6,-(A7)
  3440. MOVEA.L rp,A1
  3441. MOVE.L count,D0
  3442. MOVEA.L polyTable,A0
  3443. MOVEA.L GfxBase,A6
  3444. JSR -336(A6)
  3445. MOVEA.L (A7)+,A6
  3446. END;
  3447. END;
  3448. PROCEDURE QBlit(blit : pbltnode);
  3449. BEGIN
  3450. ASM
  3451. MOVE.L A6,-(A7)
  3452. MOVEA.L blit,A1
  3453. MOVEA.L GfxBase,A6
  3454. JSR -276(A6)
  3455. MOVEA.L (A7)+,A6
  3456. END;
  3457. END;
  3458. PROCEDURE QBSBlit(blit : pbltnode);
  3459. BEGIN
  3460. ASM
  3461. MOVE.L A6,-(A7)
  3462. MOVEA.L blit,A1
  3463. MOVEA.L GfxBase,A6
  3464. JSR -294(A6)
  3465. MOVEA.L (A7)+,A6
  3466. END;
  3467. END;
  3468. FUNCTION ReadPixel(rp : pRastPort; x : LONGINT; y : LONGINT) : ULONG;
  3469. BEGIN
  3470. ASM
  3471. MOVE.L A6,-(A7)
  3472. MOVEA.L rp,A1
  3473. MOVE.L x,D0
  3474. MOVE.L y,D1
  3475. MOVEA.L GfxBase,A6
  3476. JSR -318(A6)
  3477. MOVEA.L (A7)+,A6
  3478. MOVE.L D0,@RESULT
  3479. END;
  3480. END;
  3481. FUNCTION ReadPixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
  3482. BEGIN
  3483. ASM
  3484. MOVE.L A6,-(A7)
  3485. MOVEA.L rp,A0
  3486. MOVE.L xstart,D0
  3487. MOVE.L ystart,D1
  3488. MOVE.L xstop,D2
  3489. MOVE.L ystop,D3
  3490. MOVEA.L array_,A2
  3491. MOVEA.L temprp,A1
  3492. MOVEA.L GfxBase,A6
  3493. JSR -780(A6)
  3494. MOVEA.L (A7)+,A6
  3495. MOVE.L D0,@RESULT
  3496. END;
  3497. END;
  3498. FUNCTION ReadPixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
  3499. BEGIN
  3500. ASM
  3501. MOVE.L A6,-(A7)
  3502. MOVEA.L rp,A0
  3503. MOVE.L xstart,D0
  3504. MOVE.L ystart,D1
  3505. MOVE.L width,D2
  3506. MOVEA.L array_,A2
  3507. MOVEA.L tempRP,A1
  3508. MOVEA.L GfxBase,A6
  3509. JSR -768(A6)
  3510. MOVEA.L (A7)+,A6
  3511. MOVE.L D0,@RESULT
  3512. END;
  3513. END;
  3514. PROCEDURE RectFill(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  3515. BEGIN
  3516. ASM
  3517. MOVE.L A6,-(A7)
  3518. MOVEA.L rp,A1
  3519. MOVE.L xMin,D0
  3520. MOVE.L yMin,D1
  3521. MOVE.L xMax,D2
  3522. MOVE.L yMax,D3
  3523. MOVEA.L GfxBase,A6
  3524. JSR -306(A6)
  3525. MOVEA.L (A7)+,A6
  3526. END;
  3527. END;
  3528. PROCEDURE ReleasePen(cm : pColorMap; n : ULONG);
  3529. BEGIN
  3530. ASM
  3531. MOVE.L A6,-(A7)
  3532. MOVEA.L cm,A0
  3533. MOVE.L n,D0
  3534. MOVEA.L GfxBase,A6
  3535. JSR -948(A6)
  3536. MOVEA.L (A7)+,A6
  3537. END;
  3538. END;
  3539. PROCEDURE RemFont(textFont : pTextFont);
  3540. BEGIN
  3541. ASM
  3542. MOVE.L A6,-(A7)
  3543. MOVEA.L textFont,A1
  3544. MOVEA.L GfxBase,A6
  3545. JSR -486(A6)
  3546. MOVEA.L (A7)+,A6
  3547. END;
  3548. END;
  3549. PROCEDURE RemIBob(bob : pBob; rp : pRastPort; vp : pViewPort);
  3550. BEGIN
  3551. ASM
  3552. MOVE.L A6,-(A7)
  3553. MOVEA.L bob,A0
  3554. MOVEA.L rp,A1
  3555. MOVEA.L vp,A2
  3556. MOVEA.L GfxBase,A6
  3557. JSR -132(A6)
  3558. MOVEA.L (A7)+,A6
  3559. END;
  3560. END;
  3561. PROCEDURE RemVSprite(vSprite : pVSprite);
  3562. BEGIN
  3563. ASM
  3564. MOVE.L A6,-(A7)
  3565. MOVEA.L vSprite,A0
  3566. MOVEA.L GfxBase,A6
  3567. JSR -138(A6)
  3568. MOVEA.L (A7)+,A6
  3569. END;
  3570. END;
  3571. FUNCTION ScalerDiv(factor : ULONG; numerator : ULONG; denominator : ULONG) : WORD;
  3572. BEGIN
  3573. ASM
  3574. MOVE.L A6,-(A7)
  3575. MOVE.L factor,D0
  3576. MOVE.L numerator,D1
  3577. MOVE.L denominator,D2
  3578. MOVEA.L GfxBase,A6
  3579. JSR -684(A6)
  3580. MOVEA.L (A7)+,A6
  3581. MOVE.L D0,@RESULT
  3582. END;
  3583. END;
  3584. PROCEDURE ScrollRaster(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  3585. BEGIN
  3586. ASM
  3587. MOVE.L A6,-(A7)
  3588. MOVEA.L rp,A1
  3589. MOVE.L dx,D0
  3590. MOVE.L dy,D1
  3591. MOVE.L xMin,D2
  3592. MOVE.L yMin,D3
  3593. MOVE.L xMax,D4
  3594. MOVE.L yMax,D5
  3595. MOVEA.L GfxBase,A6
  3596. JSR -396(A6)
  3597. MOVEA.L (A7)+,A6
  3598. END;
  3599. END;
  3600. PROCEDURE ScrollRasterBF(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  3601. BEGIN
  3602. ASM
  3603. MOVE.L A6,-(A7)
  3604. MOVEA.L rp,A1
  3605. MOVE.L dx,D0
  3606. MOVE.L dy,D1
  3607. MOVE.L xMin,D2
  3608. MOVE.L yMin,D3
  3609. MOVE.L xMax,D4
  3610. MOVE.L yMax,D5
  3611. MOVEA.L GfxBase,A6
  3612. JSR -1002(A6)
  3613. MOVEA.L (A7)+,A6
  3614. END;
  3615. END;
  3616. PROCEDURE ScrollVPort(vp : pViewPort);
  3617. BEGIN
  3618. ASM
  3619. MOVE.L A6,-(A7)
  3620. MOVEA.L vp,A0
  3621. MOVEA.L GfxBase,A6
  3622. JSR -588(A6)
  3623. MOVEA.L (A7)+,A6
  3624. END;
  3625. END;
  3626. PROCEDURE SetABPenDrMd(rp : pRastPort; apen : ULONG; bpen : ULONG; drawmode : ULONG);
  3627. BEGIN
  3628. ASM
  3629. MOVE.L A6,-(A7)
  3630. MOVEA.L rp,A1
  3631. MOVE.L apen,D0
  3632. MOVE.L bpen,D1
  3633. MOVE.L drawmode,D2
  3634. MOVEA.L GfxBase,A6
  3635. JSR -894(A6)
  3636. MOVEA.L (A7)+,A6
  3637. END;
  3638. END;
  3639. PROCEDURE SetAPen(rp : pRastPort; pen : ULONG);
  3640. BEGIN
  3641. ASM
  3642. MOVE.L A6,-(A7)
  3643. MOVEA.L rp,A1
  3644. MOVE.L pen,D0
  3645. MOVEA.L GfxBase,A6
  3646. JSR -342(A6)
  3647. MOVEA.L (A7)+,A6
  3648. END;
  3649. END;
  3650. PROCEDURE SetBPen(rp : pRastPort; pen : ULONG);
  3651. BEGIN
  3652. ASM
  3653. MOVE.L A6,-(A7)
  3654. MOVEA.L rp,A1
  3655. MOVE.L pen,D0
  3656. MOVEA.L GfxBase,A6
  3657. JSR -348(A6)
  3658. MOVEA.L (A7)+,A6
  3659. END;
  3660. END;
  3661. FUNCTION SetChipRev(want : ULONG) : ULONG;
  3662. BEGIN
  3663. ASM
  3664. MOVE.L A6,-(A7)
  3665. MOVE.L want,D0
  3666. MOVEA.L GfxBase,A6
  3667. JSR -888(A6)
  3668. MOVEA.L (A7)+,A6
  3669. MOVE.L D0,@RESULT
  3670. END;
  3671. END;
  3672. PROCEDURE SetCollision(num : ULONG; routine : tPROCEDURE; gelsInfo : pGelsInfo);
  3673. BEGIN
  3674. ASM
  3675. MOVE.L A6,-(A7)
  3676. MOVE.L num,D0
  3677. MOVEA.L routine,A0
  3678. MOVEA.L gelsInfo,A1
  3679. MOVEA.L GfxBase,A6
  3680. JSR -144(A6)
  3681. MOVEA.L (A7)+,A6
  3682. END;
  3683. END;
  3684. PROCEDURE SetDrMd(rp : pRastPort; drawMode : ULONG);
  3685. BEGIN
  3686. ASM
  3687. MOVE.L A6,-(A7)
  3688. MOVEA.L rp,A1
  3689. MOVE.L drawMode,D0
  3690. MOVEA.L GfxBase,A6
  3691. JSR -354(A6)
  3692. MOVEA.L (A7)+,A6
  3693. END;
  3694. END;
  3695. FUNCTION SetFont(rp : pRastPort;const textFont : pTextFont) : LONGINT;
  3696. BEGIN
  3697. ASM
  3698. MOVE.L A6,-(A7)
  3699. MOVEA.L rp,A1
  3700. MOVEA.L textFont,A0
  3701. MOVEA.L GfxBase,A6
  3702. JSR -066(A6)
  3703. MOVEA.L (A7)+,A6
  3704. MOVE.L D0,@RESULT
  3705. END;
  3706. END;
  3707. PROCEDURE SetMaxPen(rp : pRastPort; maxpen : ULONG);
  3708. BEGIN
  3709. ASM
  3710. MOVE.L A6,-(A7)
  3711. MOVEA.L rp,A0
  3712. MOVE.L maxpen,D0
  3713. MOVEA.L GfxBase,A6
  3714. JSR -990(A6)
  3715. MOVEA.L (A7)+,A6
  3716. END;
  3717. END;
  3718. FUNCTION SetOutlinePen(rp : pRastPort; pen : ULONG) : ULONG;
  3719. BEGIN
  3720. ASM
  3721. MOVE.L A6,-(A7)
  3722. MOVEA.L rp,A0
  3723. MOVE.L pen,D0
  3724. MOVEA.L GfxBase,A6
  3725. JSR -978(A6)
  3726. MOVEA.L (A7)+,A6
  3727. MOVE.L D0,@RESULT
  3728. END;
  3729. END;
  3730. PROCEDURE SetRast(rp : pRastPort; pen : ULONG);
  3731. BEGIN
  3732. ASM
  3733. MOVE.L A6,-(A7)
  3734. MOVEA.L rp,A1
  3735. MOVE.L pen,D0
  3736. MOVEA.L GfxBase,A6
  3737. JSR -234(A6)
  3738. MOVEA.L (A7)+,A6
  3739. END;
  3740. END;
  3741. PROCEDURE SetRGB32(vp : pViewPort; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
  3742. BEGIN
  3743. ASM
  3744. MOVE.L A6,-(A7)
  3745. MOVEA.L vp,A0
  3746. MOVE.L n,D0
  3747. MOVE.L r,D1
  3748. MOVE.L g,D2
  3749. MOVE.L b,D3
  3750. MOVEA.L GfxBase,A6
  3751. JSR -852(A6)
  3752. MOVEA.L (A7)+,A6
  3753. END;
  3754. END;
  3755. PROCEDURE SetRGB32CM(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
  3756. BEGIN
  3757. ASM
  3758. MOVE.L A6,-(A7)
  3759. MOVEA.L cm,A0
  3760. MOVE.L n,D0
  3761. MOVE.L r,D1
  3762. MOVE.L g,D2
  3763. MOVE.L b,D3
  3764. MOVEA.L GfxBase,A6
  3765. JSR -996(A6)
  3766. MOVEA.L (A7)+,A6
  3767. END;
  3768. END;
  3769. PROCEDURE SetRGB4(vp : pViewPort; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
  3770. BEGIN
  3771. ASM
  3772. MOVE.L A6,-(A7)
  3773. MOVEA.L vp,A0
  3774. MOVE.L index,D0
  3775. MOVE.L red,D1
  3776. MOVE.L green,D2
  3777. MOVE.L blue,D3
  3778. MOVEA.L GfxBase,A6
  3779. JSR -288(A6)
  3780. MOVEA.L (A7)+,A6
  3781. END;
  3782. END;
  3783. PROCEDURE SetRGB4CM(colorMap : pColorMap; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
  3784. BEGIN
  3785. ASM
  3786. MOVE.L A6,-(A7)
  3787. MOVEA.L colorMap,A0
  3788. MOVE.L index,D0
  3789. MOVE.L red,D1
  3790. MOVE.L green,D2
  3791. MOVE.L blue,D3
  3792. MOVEA.L GfxBase,A6
  3793. JSR -630(A6)
  3794. MOVEA.L (A7)+,A6
  3795. END;
  3796. END;
  3797. PROCEDURE SetRPAttrsA(rp : pRastPort;const tags : pTagItem);
  3798. BEGIN
  3799. ASM
  3800. MOVE.L A6,-(A7)
  3801. MOVEA.L rp,A0
  3802. MOVEA.L tags,A1
  3803. MOVEA.L GfxBase,A6
  3804. JSR -1038(A6)
  3805. MOVEA.L (A7)+,A6
  3806. END;
  3807. END;
  3808. FUNCTION SetSoftStyle(rp : pRastPort; style : ULONG; enable : ULONG) : ULONG;
  3809. BEGIN
  3810. ASM
  3811. MOVE.L A6,-(A7)
  3812. MOVEA.L rp,A1
  3813. MOVE.L style,D0
  3814. MOVE.L enable,D1
  3815. MOVEA.L GfxBase,A6
  3816. JSR -090(A6)
  3817. MOVEA.L (A7)+,A6
  3818. MOVE.L D0,@RESULT
  3819. END;
  3820. END;
  3821. FUNCTION SetWriteMask(rp : pRastPort; msk : ULONG) : ULONG;
  3822. BEGIN
  3823. ASM
  3824. MOVE.L A6,-(A7)
  3825. MOVEA.L rp,A0
  3826. MOVE.L msk,D0
  3827. MOVEA.L GfxBase,A6
  3828. JSR -984(A6)
  3829. MOVEA.L (A7)+,A6
  3830. MOVE.L D0,@RESULT
  3831. END;
  3832. END;
  3833. PROCEDURE SortGList(rp : pRastPort);
  3834. BEGIN
  3835. ASM
  3836. MOVE.L A6,-(A7)
  3837. MOVEA.L rp,A1
  3838. MOVEA.L GfxBase,A6
  3839. JSR -150(A6)
  3840. MOVEA.L (A7)+,A6
  3841. END;
  3842. END;
  3843. PROCEDURE StripFont(font : pTextFont);
  3844. BEGIN
  3845. ASM
  3846. MOVE.L A6,-(A7)
  3847. MOVEA.L font,A0
  3848. MOVEA.L GfxBase,A6
  3849. JSR -822(A6)
  3850. MOVEA.L (A7)+,A6
  3851. END;
  3852. END;
  3853. PROCEDURE SyncSBitMap(layer : pLayer);
  3854. BEGIN
  3855. ASM
  3856. MOVE.L A6,-(A7)
  3857. MOVEA.L layer,A0
  3858. MOVEA.L GfxBase,A6
  3859. JSR -444(A6)
  3860. MOVEA.L (A7)+,A6
  3861. END;
  3862. END;
  3863. FUNCTION GText(rp : pRastPort;const string_ : pCHAR; count : ULONG) : LONGINT;
  3864. BEGIN
  3865. ASM
  3866. MOVE.L A6,-(A7)
  3867. MOVEA.L rp,A1
  3868. MOVEA.L string_,A0
  3869. MOVE.L count,D0
  3870. MOVEA.L GfxBase,A6
  3871. JSR -060(A6)
  3872. MOVEA.L (A7)+,A6
  3873. MOVE.L D0,@RESULT
  3874. END;
  3875. END;
  3876. FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : smallint;
  3877. BEGIN
  3878. ASM
  3879. MOVE.L A6,-(A7)
  3880. MOVEA.L rp,A1
  3881. MOVEA.L string_,A0
  3882. MOVE.L count,D0
  3883. MOVEA.L _textExtent,A2
  3884. MOVEA.L GfxBase,A6
  3885. JSR -690(A6)
  3886. MOVEA.L (A7)+,A6
  3887. MOVE.L D0,@RESULT
  3888. END;
  3889. END;
  3890. FUNCTION TextFit(rp : pRastPort;const string_ : pCHAR; strLen : ULONG; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LONGINT; constrainingBitWidth : ULONG; constrainingBitHeight : ULONG) : ULONG;
  3891. BEGIN
  3892. ASM
  3893. MOVE.L A6,-(A7)
  3894. MOVEA.L rp,A1
  3895. MOVEA.L string_,A0
  3896. MOVE.L strLen,D0
  3897. MOVEA.L textExtent,A2
  3898. MOVEA.L constrainingExtent,A3
  3899. MOVE.L strDirection,D1
  3900. MOVE.L constrainingBitWidth,D2
  3901. MOVE.L constrainingBitHeight,D3
  3902. MOVEA.L GfxBase,A6
  3903. JSR -696(A6)
  3904. MOVEA.L (A7)+,A6
  3905. MOVE.L D0,@RESULT
  3906. END;
  3907. END;
  3908. FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : smallint;
  3909. BEGIN
  3910. ASM
  3911. MOVE.L A6,-(A7)
  3912. MOVEA.L rp,A1
  3913. MOVEA.L string_,A0
  3914. MOVE.L count,D0
  3915. MOVEA.L GfxBase,A6
  3916. JSR -054(A6)
  3917. MOVEA.L (A7)+,A6
  3918. MOVE.L D0,@RESULT
  3919. END;
  3920. END;
  3921. FUNCTION UCopperListInit(uCopList : pUCopList; n : LONGINT) : pCopList;
  3922. BEGIN
  3923. ASM
  3924. MOVE.L A6,-(A7)
  3925. MOVEA.L uCopList,A0
  3926. MOVE.L n,D0
  3927. MOVEA.L GfxBase,A6
  3928. JSR -594(A6)
  3929. MOVEA.L (A7)+,A6
  3930. MOVE.L D0,@RESULT
  3931. END;
  3932. END;
  3933. PROCEDURE UnlockLayerRom(layer : pLayer);
  3934. BEGIN
  3935. ASM
  3936. MOVE.L A6,-(A7)
  3937. MOVEA.L layer,A5
  3938. MOVEA.L GfxBase,A6
  3939. JSR -438(A6)
  3940. MOVEA.L (A7)+,A6
  3941. END;
  3942. END;
  3943. FUNCTION VBeamPos : LONGINT;
  3944. BEGIN
  3945. ASM
  3946. MOVE.L A6,-(A7)
  3947. MOVEA.L GfxBase,A6
  3948. JSR -384(A6)
  3949. MOVEA.L (A7)+,A6
  3950. MOVE.L D0,@RESULT
  3951. END;
  3952. END;
  3953. FUNCTION VideoControl(colorMap : pColorMap; tagarray : pTagItem) : BOOLEAN;
  3954. BEGIN
  3955. ASM
  3956. MOVE.L A6,-(A7)
  3957. MOVEA.L colorMap,A0
  3958. MOVEA.L tagarray,A1
  3959. MOVEA.L GfxBase,A6
  3960. JSR -708(A6)
  3961. MOVEA.L (A7)+,A6
  3962. TST.W D0
  3963. BEQ.B @end
  3964. MOVEQ #1,D0
  3965. @end: MOVE.B D0,@RESULT
  3966. END;
  3967. END;
  3968. PROCEDURE WaitBlit;
  3969. BEGIN
  3970. ASM
  3971. MOVE.L A6,-(A7)
  3972. MOVEA.L GfxBase,A6
  3973. JSR -228(A6)
  3974. MOVEA.L (A7)+,A6
  3975. END;
  3976. END;
  3977. PROCEDURE WaitBOVP(vp : pViewPort);
  3978. BEGIN
  3979. ASM
  3980. MOVE.L A6,-(A7)
  3981. MOVEA.L vp,A0
  3982. MOVEA.L GfxBase,A6
  3983. JSR -402(A6)
  3984. MOVEA.L (A7)+,A6
  3985. END;
  3986. END;
  3987. PROCEDURE WaitTOF;
  3988. BEGIN
  3989. ASM
  3990. MOVE.L A6,-(A7)
  3991. MOVEA.L GfxBase,A6
  3992. JSR -270(A6)
  3993. MOVEA.L (A7)+,A6
  3994. END;
  3995. END;
  3996. FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : smallint;
  3997. BEGIN
  3998. ASM
  3999. MOVE.L A6,-(A7)
  4000. MOVEA.L reqTextAttr,A0
  4001. MOVEA.L targetTextAttr,A1
  4002. MOVEA.L targetTags,A2
  4003. MOVEA.L GfxBase,A6
  4004. JSR -804(A6)
  4005. MOVEA.L (A7)+,A6
  4006. MOVE.L D0,@RESULT
  4007. END;
  4008. END;
  4009. PROCEDURE WriteChunkyPixels(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; bytesperrow : LONGINT);
  4010. BEGIN
  4011. ASM
  4012. MOVE.L A6,-(A7)
  4013. MOVEA.L rp,A0
  4014. MOVE.L xstart,D0
  4015. MOVE.L ystart,D1
  4016. MOVE.L xstop,D2
  4017. MOVE.L ystop,D3
  4018. MOVEA.L array_,A2
  4019. MOVE.L bytesperrow,D4
  4020. MOVEA.L GfxBase,A6
  4021. JSR -1056(A6)
  4022. MOVEA.L (A7)+,A6
  4023. END;
  4024. END;
  4025. FUNCTION WritePixel(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
  4026. BEGIN
  4027. ASM
  4028. MOVE.L A6,-(A7)
  4029. MOVEA.L rp,A1
  4030. MOVE.L x,D0
  4031. MOVE.L y,D1
  4032. MOVEA.L GfxBase,A6
  4033. JSR -324(A6)
  4034. MOVEA.L (A7)+,A6
  4035. MOVE.L D0,@RESULT
  4036. END;
  4037. END;
  4038. FUNCTION WritePixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
  4039. BEGIN
  4040. ASM
  4041. MOVE.L A6,-(A7)
  4042. MOVEA.L rp,A0
  4043. MOVE.L xstart,D0
  4044. MOVE.L ystart,D1
  4045. MOVE.L xstop,D2
  4046. MOVE.L ystop,D3
  4047. MOVEA.L array_,A2
  4048. MOVEA.L temprp,A1
  4049. MOVEA.L GfxBase,A6
  4050. JSR -786(A6)
  4051. MOVEA.L (A7)+,A6
  4052. MOVE.L D0,@RESULT
  4053. END;
  4054. END;
  4055. FUNCTION WritePixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
  4056. BEGIN
  4057. ASM
  4058. MOVE.L A6,-(A7)
  4059. MOVEA.L rp,A0
  4060. MOVE.L xstart,D0
  4061. MOVE.L ystart,D1
  4062. MOVE.L width,D2
  4063. MOVEA.L array_,A2
  4064. MOVEA.L tempRP,A1
  4065. MOVEA.L GfxBase,A6
  4066. JSR -774(A6)
  4067. MOVEA.L (A7)+,A6
  4068. MOVE.L D0,@RESULT
  4069. END;
  4070. END;
  4071. FUNCTION XorRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
  4072. BEGIN
  4073. ASM
  4074. MOVE.L A6,-(A7)
  4075. MOVEA.L region,A0
  4076. MOVEA.L rectangle,A1
  4077. MOVEA.L GfxBase,A6
  4078. JSR -558(A6)
  4079. MOVEA.L (A7)+,A6
  4080. TST.W D0
  4081. BEQ.B @end
  4082. MOVEQ #1,D0
  4083. @end: MOVE.B D0,@RESULT
  4084. END;
  4085. END;
  4086. FUNCTION XorRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
  4087. BEGIN
  4088. ASM
  4089. MOVE.L A6,-(A7)
  4090. MOVEA.L srcRegion,A0
  4091. MOVEA.L destRegion,A1
  4092. MOVEA.L GfxBase,A6
  4093. JSR -618(A6)
  4094. MOVEA.L (A7)+,A6
  4095. TST.W D0
  4096. BEQ.B @end
  4097. MOVEQ #1,D0
  4098. @end: MOVE.B D0,@RESULT
  4099. END;
  4100. END;
  4101. const
  4102. { Change VERSION and LIBVERSION to proper values }
  4103. VERSION : string[2] = '0';
  4104. LIBVERSION : longword = 0;
  4105. {$ifdef use_init_openlib}
  4106. {$Info Compiling initopening of graphics.library}
  4107. {$Info don't forget to use InitGRAPHICSLibrary in the beginning of your program}
  4108. var
  4109. graphics_exit : Pointer;
  4110. procedure ClosegraphicsLibrary;
  4111. begin
  4112. ExitProc := graphics_exit;
  4113. if GfxBase <> nil then begin
  4114. CloseLibrary(GfxBase);
  4115. GfxBase := nil;
  4116. end;
  4117. end;
  4118. procedure InitGRAPHICSLibrary;
  4119. begin
  4120. GfxBase := nil;
  4121. GfxBase := OpenLibrary(GRAPHICSNAME,LIBVERSION);
  4122. if GfxBase <> nil then begin
  4123. graphics_exit := ExitProc;
  4124. ExitProc := @ClosegraphicsLibrary;
  4125. end else begin
  4126. MessageBox('FPC Pascal Error',
  4127. 'Can''t open graphics.library version ' + VERSION + #10 +
  4128. 'Deallocating resources and closing down',
  4129. 'Oops');
  4130. halt(20);
  4131. end;
  4132. end;
  4133. begin
  4134. GRAPHICSIsCompiledHow := 2;
  4135. {$endif use_init_openlib}
  4136. {$ifdef use_auto_openlib}
  4137. {$Info Compiling autoopening of graphics.library}
  4138. var
  4139. graphics_exit : Pointer;
  4140. procedure ClosegraphicsLibrary;
  4141. begin
  4142. ExitProc := graphics_exit;
  4143. if GfxBase <> nil then begin
  4144. CloseLibrary(GfxBase);
  4145. GfxBase := nil;
  4146. end;
  4147. end;
  4148. begin
  4149. GfxBase := nil;
  4150. GfxBase := OpenLibrary(GRAPHICSNAME,LIBVERSION);
  4151. if GfxBase <> nil then begin
  4152. graphics_exit := ExitProc;
  4153. ExitProc := @ClosegraphicsLibrary;
  4154. GRAPHICSIsCompiledHow := 1;
  4155. end else begin
  4156. MessageBox('FPC Pascal Error',
  4157. 'Can''t open graphics.library version ' + VERSION + #10 +
  4158. 'Deallocating resources and closing down',
  4159. 'Oops');
  4160. halt(20);
  4161. end;
  4162. {$endif use_auto_openlib}
  4163. {$ifdef dont_use_openlib}
  4164. begin
  4165. GRAPHICSIsCompiledHow := 3;
  4166. {$Warning No autoopening of graphics.library compiled}
  4167. {$Warning Make sure you open graphics.library yourself}
  4168. {$endif dont_use_openlib}
  4169. END. (* UNIT GRAPHICS *)