agraphics.pas 120 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868
  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 PAnsiChar,
  21. should be pointer, fixed.
  22. 20 Aug 2000.
  23. InitTmpRas had wrong define for the buffer arg.
  24. Changed from PAnsiChar 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. {$PACKRECORDS 2}
  45. {$IFNDEF FPC_DOTTEDUNITS}
  46. unit agraphics;
  47. {$ENDIF FPC_DOTTEDUNITS}
  48. INTERFACE
  49. {$IFDEF FPC_DOTTEDUNITS}
  50. uses Amiga.Core.Exec, Amiga.Core.Hardware, Amiga.Core.Utility;
  51. {$ELSE FPC_DOTTEDUNITS}
  52. uses exec, hardware, utility;
  53. {$ENDIF FPC_DOTTEDUNITS}
  54. const
  55. BITSET = $8000;
  56. BITCLR = 0;
  57. type
  58. pRectangle = ^tRectangle;
  59. tRectangle = record
  60. MinX,MinY : Word;
  61. MaxX,MaxY : Word;
  62. end;
  63. pRect32 = ^tRect32;
  64. tRect32 = record
  65. MinX,MinY : Longint;
  66. MaxX,MaxY : Longint;
  67. end;
  68. pPoint = ^tPoint;
  69. tPoint = record
  70. x,y : Word;
  71. end;
  72. TPLANEPTR = PByte;
  73. pBitMap = ^tBitMap;
  74. tBitMap = record
  75. BytesPerRow : Word;
  76. Rows : Word;
  77. Flags : Byte;
  78. Depth : Byte;
  79. pad : Word;
  80. Planes : Array [0..7] of TPLANEPTR;
  81. end;
  82. {* flags for AllocBitMap, etc. *}
  83. const
  84. BMB_CLEAR = 0;
  85. BMB_DISPLAYABLE = 1;
  86. BMB_INTERLEAVED = 2;
  87. BMB_STANDARD = 3;
  88. BMB_MINPLANES = 4;
  89. BMF_CLEAR = (1 shl BMB_CLEAR);
  90. BMF_DISPLAYABLE = (1 shl BMB_DISPLAYABLE);
  91. BMF_INTERLEAVED = (1 shl BMB_INTERLEAVED);
  92. BMF_STANDARD = (1 shl BMB_STANDARD);
  93. BMF_MINPLANES = (1 shl BMB_MINPLANES);
  94. {* the following are for GetBitMapAttr() *}
  95. BMA_HEIGHT = 0;
  96. BMA_DEPTH = 4;
  97. BMA_WIDTH = 8;
  98. BMA_FLAGS = 12;
  99. { structures used by and constructed by windowlib.a }
  100. { understood by rom software }
  101. type
  102. pClipRect = ^tClipRect;
  103. tClipRect = record
  104. Next : pClipRect; { roms used to find next ClipRect }
  105. prev : pClipRect; { ignored by roms, used by windowlib }
  106. lobs : Pointer; { ignored by roms, used by windowlib (LayerPtr)}
  107. BitMap : pBitMap;
  108. bounds : tRectangle; { set up by windowlib, used by roms }
  109. _p1,
  110. _p2 : Pointer; { system reserved }
  111. reserved : Longint; { system use }
  112. end;
  113. pLayer = ^tLayer;
  114. tLayer = record
  115. front,
  116. back : pLayer; { ignored by roms }
  117. ClipRect : pClipRect; { read by roms to find first cliprect }
  118. rp : Pointer; { (RastPortPtr) ignored by roms, I hope }
  119. bounds : tRectangle; { ignored by roms }
  120. reserved : Array [0..3] of Byte;
  121. priority : Word; { system use only }
  122. Flags : Word; { obscured ?, Virtual BitMap? }
  123. SuperBitMap : pBitMap;
  124. SuperClipRect : pClipRect; { super bitmap cliprects if
  125. VBitMap != 0}
  126. { else damage cliprect list for refresh }
  127. Window : Pointer; { reserved for user interface use }
  128. Scroll_X,
  129. Scroll_Y : Word;
  130. cr,
  131. cr2,
  132. crnew : pClipRect; { used by dedice }
  133. SuperSaveClipRects : pClipRect; { preallocated cr's }
  134. _cliprects : pClipRect; { system use during refresh }
  135. LayerInfo : Pointer; { points to head of the list }
  136. Lock : tSignalSemaphore;
  137. BackFill : pHook;
  138. reserved1 : ULONG;
  139. ClipRegion : Pointer;
  140. saveClipRects : Pointer; { used to back out when in trouble}
  141. Width,
  142. Height : smallint;
  143. reserved2 : Array [0..17] of Byte;
  144. { this must stay here }
  145. DamageList : Pointer; { list of rectangles to refresh
  146. through }
  147. end;
  148. const
  149. { internal cliprect flags }
  150. CR_NEEDS_NO_CONCEALED_RASTERS = 1;
  151. CR_NEEDS_NO_LAYERBLIT_DAMAGE = 2;
  152. { defines for code values for getcode }
  153. ISLESSX = 1;
  154. ISLESSY = 2;
  155. ISGRTRX = 4;
  156. ISGRTRY = 8;
  157. {------ Font Styles ------------------------------------------------}
  158. FS_NORMAL = 0; { normal text (no style bits set) }
  159. FSB_EXTENDED = 3; { extended face (wider than normal) }
  160. FSF_EXTENDED = 8;
  161. FSB_ITALIC = 2; { italic (slanted 1:2 right) }
  162. FSF_ITALIC = 4;
  163. FSB_BOLD = 1; { bold face text (ORed w/ shifted) }
  164. FSF_BOLD = 2;
  165. FSB_UNDERLINED = 0; { underlined (under baseline) }
  166. FSF_UNDERLINED = 1;
  167. FSB_COLORFONT = 6; { this uses ColorTextFont structure }
  168. FSF_COLORFONT = $40;
  169. FSB_TAGGED = 7; { the TextAttr is really an TTextAttr, }
  170. FSF_TAGGED = $80;
  171. {------ Font Flags -------------------------------------------------}
  172. FPB_ROMFONT = 0; { font is in rom }
  173. FPF_ROMFONT = 1;
  174. FPB_DISKFONT = 1; { font is from diskfont.library }
  175. FPF_DISKFONT = 2;
  176. FPB_REVPATH = 2; { designed path is reversed (e.g. left) }
  177. FPF_REVPATH = 4;
  178. FPB_TALLDOT = 3; { designed for hires non-interlaced }
  179. FPF_TALLDOT = 8;
  180. FPB_WIDEDOT = 4; { designed for lores interlaced }
  181. FPF_WIDEDOT = 16;
  182. FPB_PROPORTIONAL = 5; { character sizes can vary from nominal }
  183. FPF_PROPORTIONAL = 32;
  184. FPB_DESIGNED = 6; { size is "designed", not constructed }
  185. FPF_DESIGNED = 64;
  186. FPB_REMOVED = 7; { the font has been removed }
  187. FPF_REMOVED = 128;
  188. {***** TextAttr node, matches text attributes in RastPort *********}
  189. type
  190. pTextAttr = ^tTextAttr;
  191. tTextAttr = record
  192. ta_Name : STRPTR; { name of the font }
  193. ta_YSize : Word; { height of the font }
  194. ta_Style : Byte; { intrinsic font style }
  195. ta_Flags : Byte; { font preferences and flags }
  196. end;
  197. pTTextAttr = ^tTTextAttr;
  198. tTTextAttr = record
  199. tta_Name : STRPTR; { name of the font }
  200. tta_YSize : Word; { height of the font }
  201. tta_Style : Byte; { intrinsic font style }
  202. tta_Flags : Byte; { font preferences AND flags }
  203. tta_Tags : pTagItem; { extended attributes }
  204. end;
  205. {***** Text Tags **************************************************}
  206. CONST
  207. TA_DeviceDPI = (1+TAG_USER); { Tag value is Point union: }
  208. { Hi Longint XDPI, Lo Longint YDPI }
  209. MAXFONTMATCHWEIGHT = 32767; { perfect match from WeighTAMatch }
  210. {***** TextFonts node *********************************************}
  211. Type
  212. pTextFont = ^tTextFont;
  213. tTextFont = record
  214. tf_Message : tMessage; { reply message for font removal }
  215. { font name in LN \ used in this }
  216. tf_YSize : Word; { font height | order to best }
  217. tf_Style : Byte; { font style | match a font }
  218. tf_Flags : Byte; { preferences and flags / request. }
  219. tf_XSize : Word; { nominal font width }
  220. tf_Baseline : Word; { distance from the top of AnsiChar to baseline }
  221. tf_BoldSmear : Word; { smear to affect a bold enhancement }
  222. tf_Accessors : Word; { access count }
  223. tf_LoChar : Byte; { the first character described here }
  224. tf_HiChar : Byte; { the last character described here }
  225. tf_CharData : Pointer; { the bit character data }
  226. tf_Modulo : Word; { the row modulo for the strike font data }
  227. tf_CharLoc : Pointer; { ptr to location data for the strike font }
  228. { 2 words: bit offset then size }
  229. tf_CharSpace : Pointer; { ptr to words of proportional spacing data }
  230. tf_CharKern : Pointer; { ptr to words of kerning data }
  231. end;
  232. {----- tfe_Flags0 (partial definition) ----------------------------}
  233. CONST
  234. TE0B_NOREMFONT = 0; { disallow RemFont for this font }
  235. TE0F_NOREMFONT = $01;
  236. Type
  237. pTextFontExtension = ^tTextFontExtension;
  238. tTextFontExtension = record { this structure is read-only }
  239. tfe_MatchWord : Word; { a magic cookie for the extension }
  240. tfe_Flags0 : Byte; { (system private flags) }
  241. tfe_Flags1 : Byte; { (system private flags) }
  242. tfe_BackPtr : pTextFont; { validation of compilation }
  243. tfe_OrigReplyPort : pMsgPort; { original value in tf_Extension }
  244. tfe_Tags : pTagItem; { Text Tags for the font }
  245. tfe_OFontPatchS, { (system private use) }
  246. tfe_OFontPatchK : Pointer; { (system private use) }
  247. { this space is reserved for future expansion }
  248. END;
  249. {***** ColorTextFont node *****************************************}
  250. {----- ctf_Flags --------------------------------------------------}
  251. CONST
  252. CT_COLORMASK = $000F; { mask to get to following color styles }
  253. CT_COLORFONT = $0001; { color map contains designer's colors }
  254. CT_GREYFONT = $0002; { color map describes even-stepped }
  255. { brightnesses from low to high }
  256. CT_ANTIALIAS = $0004; { zero background thru fully saturated AnsiChar }
  257. CTB_MAPCOLOR = 0; { map ctf_FgColor to the rp_FgPen IF it's }
  258. CTF_MAPCOLOR = $0001; { is a valid color within ctf_Low..ctf_High }
  259. {----- ColorFontColors --------------------------------------------}
  260. Type
  261. pColorFontColors = ^tColorFontColors;
  262. tColorFontColors = record
  263. cfc_Reserved, { *must* be zero }
  264. cfc_Count : Word; { number of entries in cfc_ColorTable }
  265. cfc_ColorTable : Pointer; { 4 bit per component color map packed xRGB }
  266. END;
  267. {----- ColorTextFont ----------------------------------------------}
  268. pColorTextFont = ^tColorTextFont;
  269. tColorTextFont = record
  270. ctf_TF : tTextFont;
  271. ctf_Flags : Word; { extended flags }
  272. ctf_Depth, { number of bit planes }
  273. ctf_FgColor, { color that is remapped to FgPen }
  274. ctf_Low, { lowest color represented here }
  275. ctf_High, { highest color represented here }
  276. ctf_PlanePick, { PlanePick ala Images }
  277. ctf_PlaneOnOff : Byte; { PlaneOnOff ala Images }
  278. ctf_ColorFontColors : pColorFontColors; { colors for font }
  279. ctf_CharData : Array[0..7] of APTR; {pointers to bit planes ala tf_CharData }
  280. END;
  281. {***** TextExtent node ********************************************}
  282. pTextExtent = ^tTextExtent;
  283. tTextExtent = record
  284. te_Width, { same as TextLength }
  285. te_Height : Word; { same as tf_YSize }
  286. te_Extent : tRectangle; { relative to CP }
  287. END;
  288. const
  289. COPPER_MOVE = 0; { pseude opcode for move #XXXX,dir }
  290. COPPER_WAIT = 1; { pseudo opcode for wait y,x }
  291. CPRNXTBUF = 2; { continue processing with next buffer }
  292. CPR_NT_LOF = $8000; { copper instruction only for Longint frames }
  293. CPR_NT_SHT = $4000; { copper instruction only for long frames }
  294. CPR_NT_SYS = $2000; { copper user instruction only }
  295. type
  296. { Note: The combination VWaitAddr and HWaitAddr replace a three way
  297. union in C. The three possibilities are:
  298. nxtList : CopListPtr; or
  299. VWaitPos : Longint;
  300. HWaitPos : Longint; or
  301. DestAddr : Longint;
  302. DestData : Longint;
  303. }
  304. PCopList = ^TCopList;
  305. // Copper structures
  306. PCopIns = ^TCopIns;
  307. TCopIns = record
  308. OpCode: smallint; // 0 = move, 1 = wait
  309. case SmallInt of
  310. 0:(
  311. NxtList: PCopList;
  312. );
  313. 1:(
  314. DestAddr: SmallInt; // destination Pointer
  315. DestData: SmallInt; // data to send
  316. );
  317. 2:(
  318. VWaitPos: SmallInt; // vertical wait position
  319. HWaitPos: SmallInt; // horizontal wait position
  320. );
  321. end;
  322. { structure of cprlist that points to list that hardware actually executes }
  323. pcprlist = ^tcprlist;
  324. tcprlist = record
  325. Next : pcprlist;
  326. start : psmallint; { start of copper list }
  327. MaxCount : smallint; { number of long instructions }
  328. end;
  329. tCopList = record
  330. Next : pCopList; { next block for this copper list }
  331. _CopList : pCopList; { system use }
  332. _ViewPort : Pointer; { system use }
  333. CopIns : pCopIns; { start of this block }
  334. CopPtr : pCopIns; { intermediate ptr }
  335. CopLStart : psmallint; { mrgcop fills this in for Long Frame}
  336. CopSStart : psmallint; { mrgcop fills this in for Longint Frame}
  337. Count : smallint; { intermediate counter }
  338. MaxCount : smallint; { max # of copins for this block }
  339. DyOffset : smallint; { offset this copper list vertical waits }
  340. SLRepeat : Word;
  341. Flags : Word;
  342. end;
  343. pUCopList = ^tUCopList;
  344. tUCopList = record
  345. Next : pUCopList;
  346. FirstCopList : pCopList; { head node of this copper list }
  347. CopList : pCopList; { node in use }
  348. end;
  349. pcopinit = ^tcopinit;
  350. tcopinit = record
  351. vsync_hblank : array [0..1] of word;
  352. diagstrt : Array [0..11] of word;
  353. fm0 : array [0..1] of word;
  354. diwstart : array [0..9] of word;
  355. bplcon2 : array [0..1] of word;
  356. sprfix : array [0..(2*8-1)] of word;
  357. sprstrtup : Array [0..(2*8*2-1)] of Word;
  358. wait14 : array [0..1] of word;
  359. norm_hblank : array [0..1] of word;
  360. jump : array [0..1] of word;
  361. wait_forever : array [0..5] of word;
  362. sprstop : Array [0..7] of Word;
  363. end;
  364. pAreaInfo = ^tAreaInfo;
  365. tAreaInfo = record
  366. VctrTbl : Pointer; { ptr to start of vector table }
  367. VctrPtr : Pointer; { ptr to current vertex }
  368. FlagTbl : Pointer; { ptr to start of vector flag table }
  369. FlagPtr : Pointer; { ptrs to areafill flags }
  370. Count : smallint; { number of vertices in list }
  371. MaxCount : smallint; { AreaMove/Draw will not allow Count>MaxCount}
  372. FirstX,
  373. FirstY : smallint; { first point for this polygon }
  374. end;
  375. pTmpRas = ^tTmpRas;
  376. tTmpRas = record
  377. RasPtr : Pointer;
  378. Size : Longint;
  379. end;
  380. { unoptimized for 32bit alignment of pointers }
  381. pGelsInfo = ^tGelsInfo;
  382. tGelsInfo = record
  383. sprRsrvd : Shortint; { flag of which sprites to reserve from
  384. vsprite system }
  385. Flags : Byte; { system use }
  386. gelHead,
  387. gelTail : Pointer; { (VSpritePtr) dummy vSprites for list management}
  388. { pointer to array of 8 WORDS for sprite available lines }
  389. nextLine : Pointer;
  390. { pointer to array of 8 pointers for color-last-assigned to vSprites }
  391. lastColor : Pointer;
  392. collHandler : Pointer; { (collTablePtr) Pointeres of collision routines }
  393. leftmost,
  394. rightmost,
  395. topmost,
  396. bottommost : smallint;
  397. firstBlissObj,
  398. lastBlissObj : Pointer; { system use only }
  399. end;
  400. pRastPort = ^tRastPort;
  401. tRastPort = record
  402. Layer : pLayer; { LayerPtr }
  403. BitMap : pBitMap; { BitMapPtr }
  404. AreaPtrn : Pointer; { ptr to areafill pattern }
  405. TmpRas : pTmpRas;
  406. AreaInfo : pAreaInfo;
  407. GelsInfo : pGelsInfo;
  408. Mask : Byte; { write mask for this raster }
  409. FgPen : Shortint; { foreground pen for this raster }
  410. BgPen : Shortint; { background pen }
  411. AOlPen : Shortint; { areafill outline pen }
  412. DrawMode : Shortint; { drawing mode for fill, lines, and text }
  413. AreaPtSz : Shortint; { 2^n words for areafill pattern }
  414. linpatcnt : Shortint; { current line drawing pattern preshift }
  415. dummy : Shortint;
  416. Flags : Word; { miscellaneous control bits }
  417. LinePtrn : Word; { 16 bits for textured lines }
  418. cp_x,
  419. cp_y : smallint; { current pen position }
  420. minterms : Array [0..7] of Byte;
  421. PenWidth : smallint;
  422. PenHeight : smallint;
  423. Font : pTextFont; { (TextFontPtr) current font Pointer }
  424. AlgoStyle : Byte; { the algorithmically generated style }
  425. TxFlags : Byte; { text specific flags }
  426. TxHeight : Word; { text height }
  427. TxWidth : Word; { text nominal width }
  428. TxBaseline : Word; { text baseline }
  429. TxSpacing : smallint; { text spacing (per character) }
  430. RP_User : Pointer;
  431. longreserved : Array [0..1] of ULONG;
  432. wordreserved : Array [0..6] of Word; { used to be a node }
  433. reserved : Array [0..7] of Byte; { for future use }
  434. end;
  435. const
  436. { drawing modes }
  437. JAM1 = 0; { jam 1 color into raster }
  438. JAM2 = 1; { jam 2 colors into raster }
  439. COMPLEMENT = 2; { XOR bits into raster }
  440. INVERSVID = 4; { inverse video for drawing modes }
  441. { these are the flag bits for RastPort flags }
  442. FRST_DOT = $01; { draw the first dot of this line ? }
  443. ONE_DOT = $02; { use one dot mode for drawing lines }
  444. DBUFFER = $04; { flag set when RastPorts are double-buffered }
  445. { only used for bobs }
  446. AREAOUTLINE = $08; { used by areafiller }
  447. NOCROSSFILL = $20; { areafills have no crossovers }
  448. { there is only one style of clipping: raster clipping }
  449. { this preserves the continuity of jaggies regardless of clip window }
  450. { When drawing into a RastPort, if the ptr to ClipRect is nil then there }
  451. { is no clipping done, this is dangerous but useful for speed }
  452. Const
  453. CleanUp = $40;
  454. CleanMe = CleanUp;
  455. BltClearWait = 1; { Waits for blit to finish }
  456. BltClearXY = 2; { Use Row/Bytes per row method }
  457. { Useful minterms }
  458. StraightCopy = $C0; { Vanilla copy }
  459. InvertAndCopy = $30; { Invert the source before copy }
  460. InvertDest = $50; { Forget source, invert dest }
  461. { mode coercion definitions }
  462. const
  463. { These flags are passed (in combination) to CoerceMode() to determine the
  464. * type of coercion required.
  465. }
  466. { Ensure that the mode coerced to can display just as many colours as the
  467. * ViewPort being coerced.
  468. }
  469. PRESERVE_COLORS = 1;
  470. { Ensure that the mode coerced to is not interlaced. }
  471. AVOID_FLICKER = 2;
  472. { Coercion should ignore monitor compatibility issues. }
  473. IGNORE_MCOMPAT = 4;
  474. BIDTAG_COERCE = 1; { Private }
  475. const
  476. { VSprite flags }
  477. { user-set VSprite flags: }
  478. SUSERFLAGS = $00FF; { mask of all user-settable VSprite-flags }
  479. VSPRITE_f = $0001; { set if VSprite, clear if Bob }
  480. { VSPRITE had to be changed for name conflict }
  481. SAVEBACK = $0002; { set if background is to be saved/restored }
  482. OVERLAY = $0004; { set to mask image of Bob onto background }
  483. MUSTDRAW = $0008; { set if VSprite absolutely must be drawn }
  484. { system-set VSprite flags: }
  485. BACKSAVED = $0100; { this Bob's background has been saved }
  486. BOBUPDATE = $0200; { temporary flag, useless to outside world }
  487. GELGONE = $0400; { set if gel is completely clipped (offscreen) }
  488. VSOVERFLOW = $0800; { VSprite overflow (if MUSTDRAW set we draw!) }
  489. { Bob flags }
  490. { these are the user flag bits }
  491. BUSERFLAGS = $00FF; { mask of all user-settable Bob-flags }
  492. SAVEBOB = $0001; { set to not erase Bob }
  493. BOBISCOMP = $0002; { set to identify Bob as AnimComp }
  494. { these are the system flag bits }
  495. BWAITING = $0100; { set while Bob is waiting on 'after' }
  496. BDRAWN = $0200; { set when Bob is drawn this DrawG pass}
  497. BOBSAWAY = $0400; { set to initiate removal of Bob }
  498. BOBNIX = $0800; { set when Bob is completely removed }
  499. SAVEPRESERVE = $1000; { for back-restore during double-buffer}
  500. OUTSTEP = $2000; { for double-clearing if double-buffer }
  501. { defines for the animation procedures }
  502. ANFRACSIZE = 6;
  503. ANIMHALF = $0020;
  504. RINGTRIGGER = $0001;
  505. { UserStuff definitions
  506. * the user can define these to be a single variable or a sub-structure
  507. * if undefined by the user, the system turns these into innocuous variables
  508. * see the manual for a thorough definition of the UserStuff definitions
  509. *
  510. }
  511. type
  512. VUserStuff = smallint; { Sprite user stuff }
  513. BUserStuff = smallint; { Bob user stuff }
  514. AUserStuff = smallint; { AnimOb user stuff }
  515. {********************** GEL STRUCTURES **********************************}
  516. pVSprite = ^tVSprite;
  517. tVSprite = record
  518. { --------------------- SYSTEM VARIABLES ------------------------------- }
  519. { GEL linked list forward/backward pointers sorted by y,x value }
  520. NextVSprite : pVSprite;
  521. PrevVSprite : pVSprite;
  522. { GEL draw list constructed in the order the Bobs are actually drawn, then
  523. * list is copied to clear list
  524. * must be here in VSprite for system boundary detection
  525. }
  526. DrawPath : pVSprite; { pointer of overlay drawing }
  527. ClearPath : pVSprite; { pointer for overlay clearing }
  528. { the VSprite positions are defined in (y,x) order to make sorting
  529. * sorting easier, since (y,x) as a long Longint
  530. }
  531. OldY, OldX : smallint; { previous position }
  532. { --------------------- COMMON VARIABLES --------------------------------- }
  533. Flags : smallint; { VSprite flags }
  534. { --------------------- USER VARIABLES ----------------------------------- }
  535. { the VSprite positions are defined in (y,x) order to make sorting
  536. * sorting easier, since (y,x) as a long Longint
  537. }
  538. Y, X : smallint; { screen position }
  539. Height : smallint;
  540. Width : smallint; { number of words per row of image data }
  541. Depth : smallint; { number of planes of data }
  542. MeMask : smallint; { which types can collide with this VSprite}
  543. HitMask : smallint; { which types this VSprite can collide with}
  544. ImageData : Pointer; { pointer to VSprite image }
  545. { borderLine is the one-dimensional logical OR of all
  546. * the VSprite bits, used for fast collision detection of edge
  547. }
  548. BorderLine : Pointer; { logical OR of all VSprite bits }
  549. CollMask : Pointer; { similar to above except this is a matrix }
  550. { pointer to this VSprite's color definitions (not used by Bobs) }
  551. SprColors : Pointer;
  552. VSBob : Pointer; { (BobPtr) points home if this VSprite
  553. is part of a Bob }
  554. { planePick flag: set bit selects a plane from image, clear bit selects
  555. * use of shadow mask for that plane
  556. * OnOff flag: if using shadow mask to fill plane, this bit (corresponding
  557. * to bit in planePick) describes whether to fill with 0's or 1's
  558. * There are two uses for these flags:
  559. * - if this is the VSprite of a Bob, these flags describe how the Bob
  560. * is to be drawn into memory
  561. * - if this is a simple VSprite and the user intends on setting the
  562. * MUSTDRAW flag of the VSprite, these flags must be set too to describe
  563. * which color registers the user wants for the image
  564. }
  565. PlanePick : Shortint;
  566. PlaneOnOff : Shortint;
  567. VUserExt : VUserStuff; { user definable: see note above }
  568. end;
  569. { dBufPacket defines the values needed to be saved across buffer to buffer
  570. * when in double-buffer mode
  571. }
  572. pDBufPacket = ^tDBufPacket;
  573. tDBufPacket = record
  574. BufY,
  575. BufX : Word; { save other buffers screen coordinates }
  576. BufPath : pVSprite; { carry the draw path over the gap }
  577. { these pointers must be filled in by the user }
  578. { pointer to other buffer's background save buffer }
  579. BufBuffer : Pointer;
  580. end;
  581. pBob = ^tBob;
  582. tBob = record
  583. { blitter-objects }
  584. { --------------------- SYSTEM VARIABLES --------------------------------- }
  585. { --------------------- COMMON VARIABLES --------------------------------- }
  586. Flags : smallint; { general purpose flags (see definitions below) }
  587. { --------------------- USER VARIABLES ----------------------------------- }
  588. SaveBuffer : Pointer; { pointer to the buffer for background save }
  589. { used by Bobs for "cookie-cutting" and multi-plane masking }
  590. ImageShadow : Pointer;
  591. { pointer to BOBs for sequenced drawing of Bobs
  592. * for correct overlaying of multiple component animations
  593. }
  594. Before : pBob; { draw this Bob before Bob pointed to by before }
  595. After : pBob; { draw this Bob after Bob pointed to by after }
  596. BobVSprite : pVSprite; { this Bob's VSprite definition }
  597. BobComp : Pointer; { (AnimCompPtr) pointer to this Bob's AnimComp def }
  598. DBuffer : Pointer; { pointer to this Bob's dBuf packet }
  599. BUserExt : BUserStuff; { Bob user extension }
  600. end;
  601. pAnimComp = ^tAnimComp;
  602. tAnimComp = record
  603. { --------------------- SYSTEM VARIABLES --------------------------------- }
  604. { --------------------- COMMON VARIABLES --------------------------------- }
  605. Flags : smallint; { AnimComp flags for system & user }
  606. { timer defines how long to keep this component active:
  607. * if set non-zero, timer decrements to zero then switches to nextSeq
  608. * if set to zero, AnimComp never switches
  609. }
  610. Timer : smallint;
  611. { --------------------- USER VARIABLES ----------------------------------- }
  612. { initial value for timer when the AnimComp is activated by the system }
  613. TimeSet : smallint;
  614. { pointer to next and previous components of animation object }
  615. NextComp : pAnimComp;
  616. PrevComp : pAnimComp;
  617. { pointer to component component definition of next image in sequence }
  618. NextSeq : pAnimComp;
  619. PrevSeq : pAnimComp;
  620. AnimCRoutine : Pointer; { Pointer of special animation procedure }
  621. YTrans : smallint; { initial y translation (if this is a component) }
  622. XTrans : smallint; { initial x translation (if this is a component) }
  623. HeadOb : Pointer; { AnimObPtr }
  624. AnimBob : pBob;
  625. end;
  626. pAnimOb = ^tAnimOb;
  627. tAnimOb = record
  628. { --------------------- SYSTEM VARIABLES --------------------------------- }
  629. NextOb,
  630. PrevOb : pAnimOb;
  631. { number of calls to Animate this AnimOb has endured }
  632. Clock : Longint;
  633. AnOldY,
  634. AnOldX : smallint; { old y,x coordinates }
  635. { --------------------- COMMON VARIABLES --------------------------------- }
  636. AnY,
  637. AnX : smallint; { y,x coordinates of the AnimOb }
  638. { --------------------- USER VARIABLES ----------------------------------- }
  639. YVel,
  640. XVel : smallint; { velocities of this object }
  641. YAccel,
  642. XAccel : smallint; { accelerations of this object }
  643. RingYTrans,
  644. RingXTrans : smallint; { ring translation values }
  645. AnimORoutine : Pointer; { Pointer of special animation
  646. procedure }
  647. HeadComp : pAnimComp; { pointer to first component }
  648. AUserExt : AUserStuff; { AnimOb user extension }
  649. end;
  650. ppAnimOb = ^pAnimOb;
  651. { ************************************************************************ }
  652. const
  653. B2NORM = 0;
  654. B2SWAP = 1;
  655. B2BOBBER = 2;
  656. { ************************************************************************ }
  657. type
  658. { a structure to contain the 16 collision procedure addresses }
  659. collTable = Array [0..15] of Pointer;
  660. pcollTable = ^collTable;
  661. const
  662. { These bit descriptors are used by the GEL collide routines.
  663. * These bits are set in the hitMask and meMask variables of
  664. * a GEL to describe whether or not these types of collisions
  665. * can affect the GEL. BNDRY_HIT is described further below;
  666. * this bit is permanently assigned as the boundary-hit flag.
  667. * The other bit GEL_HIT is meant only as a default to cover
  668. * any GEL hitting any other; the user may redefine this bit.
  669. }
  670. BORDERHIT = 0;
  671. { These bit descriptors are used by the GEL boundry hit routines.
  672. * When the user's boundry-hit routine is called (via the argument
  673. * set by a call to SetCollision) the first argument passed to
  674. * the user's routine is the Pointer of the GEL involved in the
  675. * boundry-hit, and the second argument has the appropriate bit(s)
  676. * set to describe which boundry was surpassed
  677. }
  678. TOPHIT = 1;
  679. BOTTOMHIT = 2;
  680. LEFTHIT = 4;
  681. RIGHTHIT = 8;
  682. Type
  683. pExtendedNode = ^tExtendedNode;
  684. tExtendedNode = record
  685. xln_Succ,
  686. xln_Pred : pNode;
  687. xln_Type : Byte;
  688. xln_Pri : Shortint;
  689. xln_Name : STRPTR;
  690. xln_Subsystem : Byte;
  691. xln_Subtype : Byte;
  692. xln_Library : Longint;
  693. xln_Init : Pointer;
  694. END;
  695. CONST
  696. SS_GRAPHICS = $02;
  697. VIEW_EXTRA_TYPE = 1;
  698. VIEWPORT_EXTRA_TYPE = 2;
  699. SPECIAL_MONITOR_TYPE = 3;
  700. MONITOR_SPEC_TYPE = 4;
  701. type
  702. { structure used by AddTOFTask }
  703. pIsrvstr = ^tIsrvstr;
  704. tIsrvstr = record
  705. is_Node : tNode;
  706. Iptr : pIsrvstr; { passed to srvr by os }
  707. code : Pointer;
  708. ccode : Pointer;
  709. Carg : Pointer;
  710. end;
  711. Type
  712. pAnalogSignalInterval = ^tAnalogSignalInterval;
  713. tAnalogSignalInterval = record
  714. asi_Start,
  715. asi_Stop : Word;
  716. END;
  717. pSpecialMonitor = ^tSpecialMonitor;
  718. tSpecialMonitor = record
  719. spm_Node : tExtendedNode;
  720. spm_Flags : Word;
  721. do_monitor,
  722. reserved1,
  723. reserved2,
  724. reserved3 : Pointer;
  725. hblank,
  726. vblank,
  727. hsync,
  728. vsync : tAnalogSignalInterval;
  729. END;
  730. pMonitorSpec = ^tMonitorSpec;
  731. tMonitorSpec = record
  732. ms_Node : tExtendedNode;
  733. ms_Flags : Word;
  734. ratioh,
  735. ratiov : Longint;
  736. total_rows,
  737. total_colorclocks,
  738. DeniseMaxDisplayColumn,
  739. BeamCon0,
  740. min_row : Word;
  741. ms_Special : pSpecialMonitor;
  742. ms_OpenCount : Word;
  743. ms_transform,
  744. ms_translate,
  745. ms_scale : Pointer;
  746. ms_xoffset,
  747. ms_yoffset : Word;
  748. ms_LegalView : tRectangle;
  749. ms_maxoscan, { maximum legal overscan }
  750. ms_videoscan : Pointer; { video display overscan }
  751. DeniseMinDisplayColumn : Word;
  752. DisplayCompatible : ULONG;
  753. DisplayInfoDataBase : tList;
  754. DisplayInfoDataBaseSemaphore : tSignalSemaphore;
  755. ms_MrgCop,
  756. ms_LoadView,
  757. ms_KillView : Longint;
  758. END;
  759. const
  760. TO_MONITOR = 0;
  761. FROM_MONITOR = 1;
  762. STANDARD_XOFFSET = 9;
  763. STANDARD_YOFFSET = 0;
  764. MSB_REQUEST_NTSC = 0;
  765. MSB_REQUEST_PAL = 1;
  766. MSB_REQUEST_SPECIAL = 2;
  767. MSB_REQUEST_A2024 = 3;
  768. MSB_DOUBLE_SPRITES = 4;
  769. MSF_REQUEST_NTSC = 1;
  770. MSF_REQUEST_PAL = 2;
  771. MSF_REQUEST_SPECIAL = 4;
  772. MSF_REQUEST_A2024 = 8;
  773. MSF_DOUBLE_SPRITES = 16;
  774. { obsolete, v37 compatible definitions follow }
  775. REQUEST_NTSC = 1;
  776. REQUEST_PAL = 2;
  777. REQUEST_SPECIAL = 4;
  778. REQUEST_A2024 = 8;
  779. DEFAULT_MONITOR_NAME : PAnsiChar = 'default.monitor';
  780. NTSC_MONITOR_NAME : PAnsiChar = 'ntsc.monitor';
  781. PAL_MONITOR_NAME : PAnsiChar = 'pal.monitor';
  782. STANDARD_MONITOR_MASK = ( REQUEST_NTSC OR REQUEST_PAL ) ;
  783. STANDARD_NTSC_ROWS = 262;
  784. STANDARD_PAL_ROWS = 312;
  785. STANDARD_COLORCLOCKS = 226;
  786. STANDARD_DENISE_MAX = 455;
  787. STANDARD_DENISE_MIN = 93 ;
  788. STANDARD_NTSC_BEAMCON = $0000;
  789. STANDARD_PAL_BEAMCON = DISPLAYPAL ;
  790. SPECIAL_BEAMCON = ( VARVBLANK OR LOLDIS OR VARVSYNC OR VARHSYNC OR VARBEAM OR CSBLANK OR VSYNCTRUE);
  791. MIN_NTSC_ROW = 21 ;
  792. MIN_PAL_ROW = 29 ;
  793. STANDARD_VIEW_X = $81 ;
  794. STANDARD_VIEW_Y = $2C ;
  795. STANDARD_HBSTRT = $06 ;
  796. STANDARD_HSSTRT = $0B ;
  797. STANDARD_HSSTOP = $1C ;
  798. STANDARD_HBSTOP = $2C ;
  799. STANDARD_VBSTRT = $0122;
  800. STANDARD_VSSTRT = $02A6;
  801. STANDARD_VSSTOP = $03AA;
  802. STANDARD_VBSTOP = $1066;
  803. VGA_COLORCLOCKS = (STANDARD_COLORCLOCKS/2);
  804. VGA_TOTAL_ROWS = (STANDARD_NTSC_ROWS*2);
  805. VGA_DENISE_MIN = 59 ;
  806. MIN_VGA_ROW = 29 ;
  807. VGA_HBSTRT = $08 ;
  808. VGA_HSSTRT = $0E ;
  809. VGA_HSSTOP = $1C ;
  810. VGA_HBSTOP = $1E ;
  811. VGA_VBSTRT = $0000;
  812. VGA_VSSTRT = $0153;
  813. VGA_VSSTOP = $0235;
  814. VGA_VBSTOP = $0CCD;
  815. VGA_MONITOR_NAME : PAnsiChar = 'vga.monitor';
  816. { NOTE: VGA70 definitions are obsolete - a VGA70 monitor has never been
  817. * implemented.
  818. }
  819. VGA70_COLORCLOCKS = (STANDARD_COLORCLOCKS/2) ;
  820. VGA70_TOTAL_ROWS = 449;
  821. VGA70_DENISE_MIN = 59;
  822. MIN_VGA70_ROW = 35 ;
  823. VGA70_HBSTRT = $08 ;
  824. VGA70_HSSTRT = $0E ;
  825. VGA70_HSSTOP = $1C ;
  826. VGA70_HBSTOP = $1E ;
  827. VGA70_VBSTRT = $0000;
  828. VGA70_VSSTRT = $02A6;
  829. VGA70_VSSTOP = $0388;
  830. VGA70_VBSTOP = $0F73;
  831. VGA70_BEAMCON = (SPECIAL_BEAMCON XOR VSYNCTRUE);
  832. VGA70_MONITOR_NAME : PAnsiChar = 'vga70.monitor';
  833. BROADCAST_HBSTRT = $01 ;
  834. BROADCAST_HSSTRT = $06 ;
  835. BROADCAST_HSSTOP = $17 ;
  836. BROADCAST_HBSTOP = $27 ;
  837. BROADCAST_VBSTRT = $0000;
  838. BROADCAST_VSSTRT = $02A6;
  839. BROADCAST_VSSTOP = $054C;
  840. BROADCAST_VBSTOP = $1C40;
  841. BROADCAST_BEAMCON = ( LOLDIS OR CSBLANK );
  842. RATIO_FIXEDPART = 4;
  843. RATIO_UNITY = 16;
  844. Type
  845. pRasInfo = ^tRasInfo;
  846. tRasInfo = record { used by callers to and InitDspC() }
  847. Next : pRasInfo; { used for dualpf }
  848. BitMap : pBitMap;
  849. RxOffset,
  850. RyOffset : smallint; { scroll offsets in this BitMap }
  851. end;
  852. pView = ^tView;
  853. tView = record
  854. ViewPort : Pointer; { ViewPortPtr }
  855. LOFCprList : pcprlist; { used for interlaced and noninterlaced }
  856. SHFCprList : pcprlist; { only used during interlace }
  857. DyOffset,
  858. DxOffset : smallint; { for complete View positioning }
  859. { offsets are +- adjustments to standard #s }
  860. Modes : WORD; { such as INTERLACE, GENLOC }
  861. end;
  862. { these structures are obtained via GfxNew }
  863. { and disposed by GfxFree }
  864. Type
  865. pViewExtra = ^tViewExtra;
  866. tViewExtra = record
  867. n : tExtendedNode;
  868. View : pView; { backwards link } { view in C-Includes }
  869. Monitor : pMonitorSpec; { monitors for this view }
  870. TopLine : Word;
  871. END;
  872. pViewPort = ^tViewPort;
  873. tViewPort = record
  874. Next : pViewPort;
  875. ColorMap : Pointer; { table of colors for this viewport } { ColorMapPtr }
  876. { if this is nil, MakeVPort assumes default values }
  877. DspIns : pCopList; { user by MakeView() }
  878. SprIns : pCopList; { used by sprite stuff }
  879. ClrIns : pCopList; { used by sprite stuff }
  880. UCopIns : pUCopList; { User copper list }
  881. DWidth,
  882. DHeight : smallint;
  883. DxOffset,
  884. DyOffset : smallint;
  885. Modes : Word;
  886. SpritePriorities : Byte; { used by makevp }
  887. reserved : Byte;
  888. RasInfo : pRasInfo;
  889. end;
  890. { this structure is obtained via GfxNew }
  891. { and disposed by GfxFree }
  892. pViewPortExtra = ^tViewPortExtra;
  893. tViewPortExtra = record
  894. n : tExtendedNode;
  895. ViewPort : pViewPort; { backwards link } { ViewPort in C-Includes }
  896. DisplayClip : tRectangle; { makevp display clipping information }
  897. { These are added for V39 }
  898. VecTable : Pointer; { Private }
  899. DriverData : Array[0..1] of Pointer;
  900. Flags : WORD;
  901. Origin : Array[0..1] of tPoint; { First visible point relative to the DClip.
  902. * One for each possible playfield.
  903. }
  904. cop1ptr, { private }
  905. cop2ptr : ULONG; { private }
  906. END;
  907. pColorMap = ^tColorMap;
  908. tColorMap = record
  909. Flags : Byte;
  910. Type_ : Byte; { This is "Type" in C includes }
  911. Count : Word;
  912. ColorTable : Pointer;
  913. cm_vpe : pViewPortExtra;
  914. LowColorBits : Pointer;
  915. TransparencyPlane,
  916. SpriteResolution,
  917. SpriteResDefault,
  918. AuxFlags : Byte;
  919. cm_vp : pViewPort; { ViewPortPtr }
  920. NormalDisplayInfo,
  921. CoerceDisplayInfo : Pointer;
  922. cm_batch_items : pTagItem;
  923. VPModeID : ULONG;
  924. PalExtra : Pointer;
  925. SpriteBase_Even,
  926. SpriteBase_Odd,
  927. Bp_0_base,
  928. Bp_1_base : Word;
  929. end;
  930. { if Type == 0 then ColorMap is V1.2/V1.3 compatible }
  931. { if Type != 0 then ColorMap is V36 compatible }
  932. { the system will never create other than V39 type colormaps when running V39 }
  933. CONST
  934. COLORMAP_TYPE_V1_2 = $00;
  935. COLORMAP_TYPE_V1_4 = $01;
  936. COLORMAP_TYPE_V36 = COLORMAP_TYPE_V1_4; { use this definition }
  937. COLORMAP_TYPE_V39 = $02;
  938. { Flags variable }
  939. COLORMAP_TRANSPARENCY = $01;
  940. COLORPLANE_TRANSPARENCY = $02;
  941. BORDER_BLANKING = $04;
  942. BORDER_NOTRANSPARENCY = $08;
  943. VIDEOCONTROL_BATCH = $10;
  944. USER_COPPER_CLIP = $20;
  945. CONST
  946. EXTEND_VSTRUCT = $1000; { unused bit in Modes field of View }
  947. { defines used for Modes in IVPargs }
  948. CONST
  949. GENLOCK_VIDEO = $0002;
  950. LACE = $0004;
  951. SUPERHIRES = $0020;
  952. PFBA = $0040;
  953. EXTRA_HALFBRITE= $0080;
  954. GENLOCK_AUDIO = $0100;
  955. DUALPF = $0400;
  956. HAM = $0800;
  957. EXTENDED_MODE = $1000;
  958. VP_HIDE = $2000;
  959. SPRITES = $4000;
  960. HIRES = $8000;
  961. VPF_A2024 = $40;
  962. VPF_AGNUS = $20;
  963. VPF_TENHZ = $20;
  964. BORDERSPRITES = $40;
  965. CMF_CMTRANS = 0;
  966. CMF_CPTRANS = 1;
  967. CMF_BRDRBLNK = 2;
  968. CMF_BRDNTRAN = 3;
  969. CMF_BRDRSPRT = 6;
  970. SPRITERESN_ECS = 0;
  971. { ^140ns, except in 35ns viewport, where it is 70ns. }
  972. SPRITERESN_140NS = 1;
  973. SPRITERESN_70NS = 2;
  974. SPRITERESN_35NS = 3;
  975. SPRITERESN_DEFAULT = -1;
  976. { AuxFlags : }
  977. CMAB_FULLPALETTE = 0;
  978. CMAF_FULLPALETTE = 1;
  979. CMAB_NO_INTERMED_UPDATE = 1;
  980. CMAF_NO_INTERMED_UPDATE = 2;
  981. CMAB_NO_COLOR_LOAD = 2;
  982. CMAF_NO_COLOR_LOAD = 4;
  983. CMAB_DUALPF_DISABLE = 3;
  984. CMAF_DUALPF_DISABLE = 8;
  985. Type
  986. pPaletteExtra = ^tPaletteExtra;
  987. tPaletteExtra = record { structure may be extended so watch out! }
  988. pe_Semaphore : tSignalSemaphore; { shared semaphore for arbitration }
  989. pe_FirstFree, { *private* }
  990. pe_NFree, { number of free colors }
  991. pe_FirstShared, { *private* }
  992. pe_NShared : WORD; { *private* }
  993. pe_RefCnt : Pointer; { *private* }
  994. pe_AllocList : Pointer; { *private* }
  995. pe_ViewPort : pViewPort; { back pointer to viewport }
  996. pe_SharableColors : WORD; { the number of sharable colors. }
  997. end;
  998. { flags values for ObtainPen }
  999. Const
  1000. PENB_EXCLUSIVE = 0;
  1001. PENB_NO_SETCOLOR = 1;
  1002. PENF_EXCLUSIVE = 1;
  1003. PENF_NO_SETCOLOR = 2;
  1004. { obsolete names for PENF_xxx flags: }
  1005. PEN_EXCLUSIVE = PENF_EXCLUSIVE;
  1006. PEN_NO_SETCOLOR = PENF_NO_SETCOLOR;
  1007. { precision values for ObtainBestPen : }
  1008. PRECISION_EXACT = -1;
  1009. PRECISION_IMAGE = 0;
  1010. PRECISION_ICON = 16;
  1011. PRECISION_GUI = 32;
  1012. { tags for ObtainBestPen: }
  1013. OBP_Precision = $84000000;
  1014. OBP_FailIfBad = $84000001;
  1015. { From V39, MakeVPort() will return an error if there is not enough memory,
  1016. * or the requested mode cannot be opened with the requested depth with the
  1017. * given bitmap (for higher bandwidth alignments).
  1018. }
  1019. MVP_OK = 0; { you want to see this one }
  1020. MVP_NO_MEM = 1; { insufficient memory for intermediate workspace }
  1021. MVP_NO_VPE = 2; { ViewPort does not have a ViewPortExtra, and
  1022. * insufficient memory to allocate a temporary one.
  1023. }
  1024. MVP_NO_DSPINS = 3; { insufficient memory for intermidiate copper
  1025. * instructions.
  1026. }
  1027. MVP_NO_DISPLAY = 4; { BitMap data is misaligned for this viewport's
  1028. * mode and depth - see AllocBitMap().
  1029. }
  1030. MVP_OFF_BOTTOM = 5; { PRIVATE - you will never see this. }
  1031. { From V39, MrgCop() will return an error if there is not enough memory,
  1032. * or for some reason MrgCop() did not need to make any copper lists.
  1033. }
  1034. MCOP_OK = 0; { you want to see this one }
  1035. MCOP_NO_MEM = 1; { insufficient memory to allocate the system
  1036. * copper lists.
  1037. }
  1038. MCOP_NOP = 2; { MrgCop() did not merge any copper lists
  1039. * (eg, no ViewPorts in the list, or all marked as
  1040. * hidden).
  1041. }
  1042. Type
  1043. pDBufInfo = ^tDBufInfo;
  1044. tDBufInfo = record
  1045. dbi_Link1 : Pointer;
  1046. dbi_Count1 : ULONG;
  1047. dbi_SafeMessage : tMessage; { replied to when safe to write to old bitmap }
  1048. dbi_UserData1 : Pointer; { first user data }
  1049. dbi_Link2 : Pointer;
  1050. dbi_Count2 : ULONG;
  1051. dbi_DispMessage : tMessage; { replied to when new bitmap has been displayed at least
  1052. once }
  1053. dbi_UserData2 : Pointer; { second user data }
  1054. dbi_MatchLong : ULONG;
  1055. dbi_CopPtr1,
  1056. dbi_CopPtr2,
  1057. dbi_CopPtr3 : Pointer;
  1058. dbi_BeamPos1,
  1059. dbi_BeamPos2 : WORD;
  1060. end;
  1061. { include define file for graphics display mode IDs. }
  1062. const
  1063. INVALID_ID = NOT 0;
  1064. { With all the new modes that are available under V38 and V39, it is highly
  1065. * recommended that you use either the asl.library screenmode requester,
  1066. * and/or the V39 graphics.library function BestModeIDA().
  1067. *
  1068. * DO NOT interpret the any of the bits in the ModeID for its meaning. For
  1069. * example, do not interpret bit 3 ($4) as meaning the ModeID is interlaced.
  1070. * Instead, use GetDisplayInfoData() with DTAG_DISP, and examine the DIPF_...
  1071. * flags to determine a ModeID's characteristics. The only exception to
  1072. * this rule is that bit 7 ($80) will always mean the ModeID is
  1073. * ExtraHalfBright, and bit 11 ($800) will always mean the ModeID is HAM.
  1074. }
  1075. { normal identifiers }
  1076. MONITOR_ID_MASK = $FFFF1000;
  1077. DEFAULT_MONITOR_ID = $00000000;
  1078. NTSC_MONITOR_ID = $00011000;
  1079. PAL_MONITOR_ID = $00021000;
  1080. { the following 22 composite keys are for Modes on the default Monitor.
  1081. * NTSC & PAL "flavors" of these particular keys may be made by or'ing
  1082. * the NTSC or PAL MONITOR_ID with the desired MODE_KEY...
  1083. *
  1084. * For example, to specifically open a PAL HAM interlaced ViewPort
  1085. * (or intuition screen), you would use the modeid of
  1086. * (PAL_MONITOR_ID OR HAMLACE_KEY)
  1087. }
  1088. LORES_KEY = $00000000;
  1089. HIRES_KEY = $00008000;
  1090. SUPER_KEY = $00008020;
  1091. HAM_KEY = $00000800;
  1092. LORESLACE_KEY = $00000004;
  1093. HIRESLACE_KEY = $00008004;
  1094. SUPERLACE_KEY = $00008024;
  1095. HAMLACE_KEY = $00000804;
  1096. LORESDPF_KEY = $00000400;
  1097. HIRESDPF_KEY = $00008400;
  1098. SUPERDPF_KEY = $00008420;
  1099. LORESLACEDPF_KEY = $00000404;
  1100. HIRESLACEDPF_KEY = $00008404;
  1101. SUPERLACEDPF_KEY = $00008424;
  1102. LORESDPF2_KEY = $00000440;
  1103. HIRESDPF2_KEY = $00008440;
  1104. SUPERDPF2_KEY = $00008460;
  1105. LORESLACEDPF2_KEY = $00000444;
  1106. HIRESLACEDPF2_KEY = $00008444;
  1107. SUPERLACEDPF2_KEY = $00008464;
  1108. EXTRAHALFBRITE_KEY = $00000080;
  1109. EXTRAHALFBRITELACE_KEY = $00000084;
  1110. { New for AA ChipSet (V39) }
  1111. HIRESHAM_KEY = $00008800;
  1112. SUPERHAM_KEY = $00008820;
  1113. HIRESEHB_KEY = $00008080;
  1114. SUPEREHB_KEY = $000080a0;
  1115. HIRESHAMLACE_KEY = $00008804;
  1116. SUPERHAMLACE_KEY = $00008824;
  1117. HIRESEHBLACE_KEY = $00008084;
  1118. SUPEREHBLACE_KEY = $000080a4;
  1119. { Added for V40 - may be useful modes for some games or animations. }
  1120. LORESSDBL_KEY = $00000008;
  1121. LORESHAMSDBL_KEY = $00000808;
  1122. LORESEHBSDBL_KEY = $00000088;
  1123. HIRESHAMSDBL_KEY = $00008808;
  1124. { VGA identifiers }
  1125. VGA_MONITOR_ID = $00031000;
  1126. VGAEXTRALORES_KEY = $00031004;
  1127. VGALORES_KEY = $00039004;
  1128. VGAPRODUCT_KEY = $00039024;
  1129. VGAHAM_KEY = $00031804;
  1130. VGAEXTRALORESLACE_KEY = $00031005;
  1131. VGALORESLACE_KEY = $00039005;
  1132. VGAPRODUCTLACE_KEY = $00039025;
  1133. VGAHAMLACE_KEY = $00031805;
  1134. VGAEXTRALORESDPF_KEY = $00031404;
  1135. VGALORESDPF_KEY = $00039404;
  1136. VGAPRODUCTDPF_KEY = $00039424;
  1137. VGAEXTRALORESLACEDPF_KEY = $00031405;
  1138. VGALORESLACEDPF_KEY = $00039405;
  1139. VGAPRODUCTLACEDPF_KEY = $00039425;
  1140. VGAEXTRALORESDPF2_KEY = $00031444;
  1141. VGALORESDPF2_KEY = $00039444;
  1142. VGAPRODUCTDPF2_KEY = $00039464;
  1143. VGAEXTRALORESLACEDPF2_KEY = $00031445;
  1144. VGALORESLACEDPF2_KEY = $00039445;
  1145. VGAPRODUCTLACEDPF2_KEY = $00039465;
  1146. VGAEXTRAHALFBRITE_KEY = $00031084;
  1147. VGAEXTRAHALFBRITELACE_KEY = $00031085;
  1148. { New for AA ChipSet (V39) }
  1149. VGAPRODUCTHAM_KEY = $00039824;
  1150. VGALORESHAM_KEY = $00039804;
  1151. VGAEXTRALORESHAM_KEY = VGAHAM_KEY;
  1152. VGAPRODUCTHAMLACE_KEY = $00039825;
  1153. VGALORESHAMLACE_KEY = $00039805;
  1154. VGAEXTRALORESHAMLACE_KEY = VGAHAMLACE_KEY;
  1155. VGAEXTRALORESEHB_KEY = VGAEXTRAHALFBRITE_KEY;
  1156. VGAEXTRALORESEHBLACE_KEY = VGAEXTRAHALFBRITELACE_KEY;
  1157. VGALORESEHB_KEY = $00039084;
  1158. VGALORESEHBLACE_KEY = $00039085;
  1159. VGAEHB_KEY = $000390a4;
  1160. VGAEHBLACE_KEY = $000390a5;
  1161. { These ModeIDs are the scandoubled equivalents of the above, with the
  1162. * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  1163. * dualplayfield.
  1164. }
  1165. VGAEXTRALORESDBL_KEY = $00031000;
  1166. VGALORESDBL_KEY = $00039000;
  1167. VGAPRODUCTDBL_KEY = $00039020;
  1168. VGAEXTRALORESHAMDBL_KEY = $00031800;
  1169. VGALORESHAMDBL_KEY = $00039800;
  1170. VGAPRODUCTHAMDBL_KEY = $00039820;
  1171. VGAEXTRALORESEHBDBL_KEY = $00031080;
  1172. VGALORESEHBDBL_KEY = $00039080;
  1173. VGAPRODUCTEHBDBL_KEY = $000390a0;
  1174. { a2024 identifiers }
  1175. A2024_MONITOR_ID = $00041000;
  1176. A2024TENHERTZ_KEY = $00041000;
  1177. A2024FIFTEENHERTZ_KEY = $00049000;
  1178. { prototype identifiers (private) }
  1179. PROTO_MONITOR_ID = $00051000;
  1180. { These monitors and modes were added for the V38 release. }
  1181. EURO72_MONITOR_ID = $00061000;
  1182. EURO72EXTRALORES_KEY = $00061004;
  1183. EURO72LORES_KEY = $00069004;
  1184. EURO72PRODUCT_KEY = $00069024;
  1185. EURO72HAM_KEY = $00061804;
  1186. EURO72EXTRALORESLACE_KEY = $00061005;
  1187. EURO72LORESLACE_KEY = $00069005;
  1188. EURO72PRODUCTLACE_KEY = $00069025;
  1189. EURO72HAMLACE_KEY = $00061805;
  1190. EURO72EXTRALORESDPF_KEY = $00061404;
  1191. EURO72LORESDPF_KEY = $00069404;
  1192. EURO72PRODUCTDPF_KEY = $00069424;
  1193. EURO72EXTRALORESLACEDPF_KEY = $00061405;
  1194. EURO72LORESLACEDPF_KEY = $00069405;
  1195. EURO72PRODUCTLACEDPF_KEY = $00069425;
  1196. EURO72EXTRALORESDPF2_KEY = $00061444;
  1197. EURO72LORESDPF2_KEY = $00069444;
  1198. EURO72PRODUCTDPF2_KEY = $00069464;
  1199. EURO72EXTRALORESLACEDPF2_KEY = $00061445;
  1200. EURO72LORESLACEDPF2_KEY = $00069445;
  1201. EURO72PRODUCTLACEDPF2_KEY = $00069465;
  1202. EURO72EXTRAHALFBRITE_KEY = $00061084;
  1203. EURO72EXTRAHALFBRITELACE_KEY = $00061085;
  1204. { New AA modes (V39) }
  1205. EURO72PRODUCTHAM_KEY = $00069824;
  1206. EURO72PRODUCTHAMLACE_KEY = $00069825;
  1207. EURO72LORESHAM_KEY = $00069804;
  1208. EURO72LORESHAMLACE_KEY = $00069805;
  1209. EURO72EXTRALORESHAM_KEY = EURO72HAM_KEY;
  1210. EURO72EXTRALORESHAMLACE_KEY = EURO72HAMLACE_KEY ;
  1211. EURO72EXTRALORESEHB_KEY = EURO72EXTRAHALFBRITE_KEY;
  1212. EURO72EXTRALORESEHBLACE_KEY = EURO72EXTRAHALFBRITELACE_KEY;
  1213. EURO72LORESEHB_KEY = $00069084;
  1214. EURO72LORESEHBLACE_KEY = $00069085;
  1215. EURO72EHB_KEY = $000690a4;
  1216. EURO72EHBLACE_KEY = $000690a5;
  1217. { These ModeIDs are the scandoubled equivalents of the above, with the
  1218. * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  1219. * dualplayfield.
  1220. }
  1221. EURO72EXTRALORESDBL_KEY = $00061000;
  1222. EURO72LORESDBL_KEY = $00069000;
  1223. EURO72PRODUCTDBL_KEY = $00069020;
  1224. EURO72EXTRALORESHAMDBL_KEY = $00061800;
  1225. EURO72LORESHAMDBL_KEY = $00069800;
  1226. EURO72PRODUCTHAMDBL_KEY = $00069820;
  1227. EURO72EXTRALORESEHBDBL_KEY = $00061080;
  1228. EURO72LORESEHBDBL_KEY = $00069080;
  1229. EURO72PRODUCTEHBDBL_KEY = $000690a0;
  1230. EURO36_MONITOR_ID = $00071000;
  1231. { Euro36 modeids can be ORed with the default modeids a la NTSC and PAL.
  1232. * For example, Euro36 SuperHires is
  1233. * (EURO36_MONITOR_ID OR SUPER_KEY)
  1234. }
  1235. SUPER72_MONITOR_ID = $00081000;
  1236. { Super72 modeids can be ORed with the default modeids a la NTSC and PAL.
  1237. * For example, Super72 SuperHiresLace (80$600) is
  1238. * (SUPER72_MONITOR_ID OR SUPERLACE_KEY).
  1239. * The following scandoubled Modes are the exception:
  1240. }
  1241. SUPER72LORESDBL_KEY = $00081008;
  1242. SUPER72HIRESDBL_KEY = $00089008;
  1243. SUPER72SUPERDBL_KEY = $00089028;
  1244. SUPER72LORESHAMDBL_KEY = $00081808;
  1245. SUPER72HIRESHAMDBL_KEY = $00089808;
  1246. SUPER72SUPERHAMDBL_KEY = $00089828;
  1247. SUPER72LORESEHBDBL_KEY = $00081088;
  1248. SUPER72HIRESEHBDBL_KEY = $00089088;
  1249. SUPER72SUPEREHBDBL_KEY = $000890a8;
  1250. { These monitors and modes were added for the V39 release. }
  1251. DBLNTSC_MONITOR_ID = $00091000;
  1252. DBLNTSCLORES_KEY = $00091000;
  1253. DBLNTSCLORESFF_KEY = $00091004;
  1254. DBLNTSCLORESHAM_KEY = $00091800;
  1255. DBLNTSCLORESHAMFF_KEY = $00091804;
  1256. DBLNTSCLORESEHB_KEY = $00091080;
  1257. DBLNTSCLORESEHBFF_KEY = $00091084;
  1258. DBLNTSCLORESLACE_KEY = $00091005;
  1259. DBLNTSCLORESHAMLACE_KEY = $00091805;
  1260. DBLNTSCLORESEHBLACE_KEY = $00091085;
  1261. DBLNTSCLORESDPF_KEY = $00091400;
  1262. DBLNTSCLORESDPFFF_KEY = $00091404;
  1263. DBLNTSCLORESDPFLACE_KEY = $00091405;
  1264. DBLNTSCLORESDPF2_KEY = $00091440;
  1265. DBLNTSCLORESDPF2FF_KEY = $00091444;
  1266. DBLNTSCLORESDPF2LACE_KEY = $00091445;
  1267. DBLNTSCHIRES_KEY = $00099000;
  1268. DBLNTSCHIRESFF_KEY = $00099004;
  1269. DBLNTSCHIRESHAM_KEY = $00099800;
  1270. DBLNTSCHIRESHAMFF_KEY = $00099804;
  1271. DBLNTSCHIRESLACE_KEY = $00099005;
  1272. DBLNTSCHIRESHAMLACE_KEY = $00099805;
  1273. DBLNTSCHIRESEHB_KEY = $00099080;
  1274. DBLNTSCHIRESEHBFF_KEY = $00099084;
  1275. DBLNTSCHIRESEHBLACE_KEY = $00099085;
  1276. DBLNTSCHIRESDPF_KEY = $00099400;
  1277. DBLNTSCHIRESDPFFF_KEY = $00099404;
  1278. DBLNTSCHIRESDPFLACE_KEY = $00099405;
  1279. DBLNTSCHIRESDPF2_KEY = $00099440;
  1280. DBLNTSCHIRESDPF2FF_KEY = $00099444;
  1281. DBLNTSCHIRESDPF2LACE_KEY = $00099445;
  1282. DBLNTSCEXTRALORES_KEY = $00091200;
  1283. DBLNTSCEXTRALORESHAM_KEY = $00091a00;
  1284. DBLNTSCEXTRALORESEHB_KEY = $00091280;
  1285. DBLNTSCEXTRALORESDPF_KEY = $00091600;
  1286. DBLNTSCEXTRALORESDPF2_KEY = $00091640;
  1287. DBLNTSCEXTRALORESFF_KEY = $00091204;
  1288. DBLNTSCEXTRALORESHAMFF_KEY = $00091a04;
  1289. DBLNTSCEXTRALORESEHBFF_KEY = $00091284;
  1290. DBLNTSCEXTRALORESDPFFF_KEY = $00091604;
  1291. DBLNTSCEXTRALORESDPF2FF_KEY = $00091644;
  1292. DBLNTSCEXTRALORESLACE_KEY = $00091205;
  1293. DBLNTSCEXTRALORESHAMLACE_KEY = $00091a05;
  1294. DBLNTSCEXTRALORESEHBLACE_KEY = $00091285;
  1295. DBLNTSCEXTRALORESDPFLACE_KEY = $00091605;
  1296. DBLNTSCEXTRALORESDPF2LACE_KEY = $00091645;
  1297. DBLPAL_MONITOR_ID = $000a1000;
  1298. DBLPALLORES_KEY = $000a1000;
  1299. DBLPALLORESFF_KEY = $000a1004;
  1300. DBLPALLORESHAM_KEY = $000a1800;
  1301. DBLPALLORESHAMFF_KEY = $000a1804;
  1302. DBLPALLORESEHB_KEY = $000a1080;
  1303. DBLPALLORESEHBFF_KEY = $000a1084;
  1304. DBLPALLORESLACE_KEY = $000a1005;
  1305. DBLPALLORESHAMLACE_KEY = $000a1805;
  1306. DBLPALLORESEHBLACE_KEY = $000a1085;
  1307. DBLPALLORESDPF_KEY = $000a1400;
  1308. DBLPALLORESDPFFF_KEY = $000a1404;
  1309. DBLPALLORESDPFLACE_KEY = $000a1405;
  1310. DBLPALLORESDPF2_KEY = $000a1440;
  1311. DBLPALLORESDPF2FF_KEY = $000a1444;
  1312. DBLPALLORESDPF2LACE_KEY = $000a1445;
  1313. DBLPALHIRES_KEY = $000a9000;
  1314. DBLPALHIRESFF_KEY = $000a9004;
  1315. DBLPALHIRESHAM_KEY = $000a9800;
  1316. DBLPALHIRESHAMFF_KEY = $000a9804;
  1317. DBLPALHIRESLACE_KEY = $000a9005;
  1318. DBLPALHIRESHAMLACE_KEY = $000a9805;
  1319. DBLPALHIRESEHB_KEY = $000a9080;
  1320. DBLPALHIRESEHBFF_KEY = $000a9084;
  1321. DBLPALHIRESEHBLACE_KEY = $000a9085;
  1322. DBLPALHIRESDPF_KEY = $000a9400;
  1323. DBLPALHIRESDPFFF_KEY = $000a9404;
  1324. DBLPALHIRESDPFLACE_KEY = $000a9405;
  1325. DBLPALHIRESDPF2_KEY = $000a9440;
  1326. DBLPALHIRESDPF2FF_KEY = $000a9444;
  1327. DBLPALHIRESDPF2LACE_KEY = $000a9445;
  1328. DBLPALEXTRALORES_KEY = $000a1200;
  1329. DBLPALEXTRALORESHAM_KEY = $000a1a00;
  1330. DBLPALEXTRALORESEHB_KEY = $000a1280;
  1331. DBLPALEXTRALORESDPF_KEY = $000a1600;
  1332. DBLPALEXTRALORESDPF2_KEY = $000a1640;
  1333. DBLPALEXTRALORESFF_KEY = $000a1204;
  1334. DBLPALEXTRALORESHAMFF_KEY = $000a1a04;
  1335. DBLPALEXTRALORESEHBFF_KEY = $000a1284;
  1336. DBLPALEXTRALORESDPFFF_KEY = $000a1604;
  1337. DBLPALEXTRALORESDPF2FF_KEY = $000a1644;
  1338. DBLPALEXTRALORESLACE_KEY = $000a1205;
  1339. DBLPALEXTRALORESHAMLACE_KEY = $000a1a05;
  1340. DBLPALEXTRALORESEHBLACE_KEY = $000a1285;
  1341. DBLPALEXTRALORESDPFLACE_KEY = $000a1605;
  1342. DBLPALEXTRALORESDPF2LACE_KEY = $000a1645;
  1343. { Use these tags for passing to BestModeID() (V39) }
  1344. SPECIAL_FLAGS = $100E;
  1345. { Original:
  1346. SPECIAL_FLAGS = DIPF_IS_DUALPF OR DIPF_IS_PF2PRI OR DIPF_IS_HAM OR DIPF_IS_EXTRAHALFBRITE;
  1347. ( Mu?te aufgrund eines Fehler in PCQ ge?ndert werden )
  1348. }
  1349. BIDTAG_DIPFMustHave = $80000001; { mask of the DIPF_ flags the ModeID must have }
  1350. { Default - NULL }
  1351. BIDTAG_DIPFMustNotHave = $80000002; { mask of the DIPF_ flags the ModeID must not have }
  1352. { Default - SPECIAL_FLAGS }
  1353. BIDTAG_ViewPort = $80000003; { ViewPort for which a ModeID is sought. }
  1354. { Default - NULL }
  1355. BIDTAG_NominalWidth = $80000004; { \ together make the aspect ratio and }
  1356. BIDTAG_NominalHeight = $80000005; { / override the vp->Width/Height. }
  1357. { Default - SourceID NominalDimensionInfo,
  1358. * or vp->DWidth/Height, or (640 * 200),
  1359. * in that preferred order.
  1360. }
  1361. BIDTAG_DesiredWidth = $80000006; { \ Nominal Width and Height of the }
  1362. BIDTAG_DesiredHeight = $80000007; { / returned ModeID. }
  1363. { Default - same as Nominal }
  1364. BIDTAG_Depth = $80000008; { ModeID must support this depth. }
  1365. { Default - vp->RasInfo->BitMap->Depth or 1 }
  1366. BIDTAG_MonitorID = $80000009; { ModeID must use this monitor. }
  1367. { Default - use best monitor available }
  1368. BIDTAG_SourceID = $8000000a; { instead of a ViewPort. }
  1369. { Default - VPModeID(vp) if BIDTAG_ViewPort is
  1370. * specified, else leave the DIPFMustHave and
  1371. * DIPFMustNotHave values untouched.
  1372. }
  1373. BIDTAG_RedBits = $8000000b; { \ }
  1374. BIDTAG_BlueBits = $8000000c; { > Match up from the database }
  1375. BIDTAG_GreenBits = $8000000d; { / }
  1376. { Default - 4 }
  1377. BIDTAG_GfxPrivate = $8000000e; { Private }
  1378. const
  1379. { bplcon0 defines }
  1380. MODE_640 = $8000;
  1381. PLNCNTMSK = $7; { how many bit planes? }
  1382. { 0 = none, 1->6 = 1->6, 7 = reserved }
  1383. PLNCNTSHFT = 12; { bits to shift for bplcon0 }
  1384. PF2PRI = $40; { bplcon2 bit }
  1385. COLORON = $0200; { disable color burst }
  1386. DBLPF = $400;
  1387. HOLDNMODIFY = $800;
  1388. INTERLACE = 4; { interlace mode for 400 }
  1389. { bplcon1 defines }
  1390. PFA_FINE_SCROLL = $F;
  1391. PFB_FINE_SCROLL_SHIFT = 4;
  1392. PF_FINE_SCROLL_MASK = $F;
  1393. { display window start and stop defines }
  1394. DIW_HORIZ_POS = $7F; { horizontal start/stop }
  1395. DIW_VRTCL_POS = $1FF; { vertical start/stop }
  1396. DIW_VRTCL_POS_SHIFT = $7;
  1397. { Data fetch start/stop horizontal position }
  1398. DFTCH_MASK = $FF;
  1399. { vposr bits }
  1400. VPOSRLOF = $8000;
  1401. { include define file for displayinfo database }
  1402. { the "public" handle to a DisplayInfoRecord }
  1403. Type
  1404. DisplayInfoHandle = APTR;
  1405. { datachunk type identifiers }
  1406. CONST
  1407. DTAG_DISP = $80000000;
  1408. DTAG_DIMS = $80001000;
  1409. DTAG_MNTR = $80002000;
  1410. DTAG_NAME = $80003000;
  1411. DTAG_VEC = $80004000; { internal use only }
  1412. Type
  1413. pQueryHeader = ^tQueryHeader;
  1414. tQueryHeader = record
  1415. StructID, { datachunk type identifier }
  1416. DisplayID, { copy of display record key }
  1417. SkipID, { TAG_SKIP -- see tagitems.h }
  1418. Length : ULONG; { length of local data in double-longwords }
  1419. END;
  1420. pDisplayInfo = ^tDisplayInfo;
  1421. tDisplayInfo = record
  1422. Header : tQueryHeader;
  1423. NotAvailable : Word; { IF NULL available, else see defines }
  1424. PropertyFlags : ULONG; { Properties of this mode see defines }
  1425. Resolution : tPoint; { ticks-per-pixel X/Y }
  1426. PixelSpeed : Word; { aproximation in nanoseconds }
  1427. NumStdSprites : Word; { number of standard amiga sprites }
  1428. PaletteRange : Word; { distinguishable shades available }
  1429. SpriteResolution : tPoint; { std sprite ticks-per-pixel X/Y }
  1430. pad : Array[0..3] of Byte;
  1431. RedBits : Byte;
  1432. GreenBits : Byte;
  1433. BlueBits : Byte;
  1434. pad2 : array [0..4] of Byte;
  1435. reserved : Array[0..1] of ULONG; { terminator }
  1436. END;
  1437. { availability }
  1438. CONST
  1439. DI_AVAIL_NOCHIPS =$0001;
  1440. DI_AVAIL_NOMONITOR =$0002;
  1441. DI_AVAIL_NOTWITHGENLOCK =$0004;
  1442. { mode properties }
  1443. DIPF_IS_LACE = $00000001;
  1444. DIPF_IS_DUALPF = $00000002;
  1445. DIPF_IS_PF2PRI = $00000004;
  1446. DIPF_IS_HAM = $00000008;
  1447. DIPF_IS_ECS = $00000010; { note: ECS modes (SHIRES, VGA, AND **
  1448. PRODUCTIVITY) do not support **
  1449. attached sprites. **
  1450. }
  1451. DIPF_IS_AA = $00010000; { AA modes - may only be available
  1452. ** if machine has correct memory
  1453. ** type to support required
  1454. ** bandwidth - check availability.
  1455. ** (V39)
  1456. }
  1457. DIPF_IS_PAL = $00000020;
  1458. DIPF_IS_SPRITES = $00000040;
  1459. DIPF_IS_GENLOCK = $00000080;
  1460. DIPF_IS_WB = $00000100;
  1461. DIPF_IS_DRAGGABLE = $00000200;
  1462. DIPF_IS_PANELLED = $00000400;
  1463. DIPF_IS_BEAMSYNC = $00000800;
  1464. DIPF_IS_EXTRAHALFBRITE = $00001000;
  1465. { The following DIPF_IS_... flags are new for V39 }
  1466. DIPF_IS_SPRITES_ATT = $00002000; { supports attached sprites }
  1467. DIPF_IS_SPRITES_CHNG_RES = $00004000; { supports variable sprite resolution }
  1468. DIPF_IS_SPRITES_BORDER = $00008000; { sprite can be displayed in the border }
  1469. DIPF_IS_SCANDBL = $00020000; { scan doubled }
  1470. DIPF_IS_SPRITES_CHNG_BASE = $00040000;
  1471. { can change the sprite base colour }
  1472. DIPF_IS_SPRITES_CHNG_PRI = $00080000;
  1473. { can change the sprite priority
  1474. ** with respect to the playfield(s).
  1475. }
  1476. DIPF_IS_DBUFFER = $00100000; { can support double buffering }
  1477. DIPF_IS_PROGBEAM = $00200000; { is a programmed beam-sync mode }
  1478. DIPF_IS_FOREIGN = $80000000; { this mode is not native to the Amiga }
  1479. Type
  1480. pDimensionInfo =^tDimensionInfo;
  1481. tDimensionInfo = record
  1482. Header : tQueryHeader;
  1483. MaxDepth, { log2( max number of colors ) }
  1484. MinRasterWidth, { minimum width in pixels }
  1485. MinRasterHeight, { minimum height in pixels }
  1486. MaxRasterWidth, { maximum width in pixels }
  1487. MaxRasterHeight : Word; { maximum height in pixels }
  1488. Nominal, { "standard" dimensions }
  1489. MaxOScan, { fixed, hardware dependant }
  1490. VideoOScan, { fixed, hardware dependant }
  1491. TxtOScan, { editable via preferences }
  1492. StdOScan : tRectangle; { editable via preferences }
  1493. pad : Array[0..13] of Byte;
  1494. reserved : Array[0..1] of Longint; { terminator }
  1495. END;
  1496. pMonitorInfo = ^tMonitorInfo;
  1497. tMonitorInfo = record
  1498. Header : tQueryHeader;
  1499. Mspc : pMonitorSpec; { pointer to monitor specification }
  1500. ViewPosition, { editable via preferences }
  1501. ViewResolution : tPoint; { standard monitor ticks-per-pixel }
  1502. ViewPositionRange : tRectangle; { fixed, hardware dependant }
  1503. TotalRows, { display height in scanlines }
  1504. TotalColorClocks, { scanline width in 280 ns units }
  1505. MinRow : Word; { absolute minimum active scanline }
  1506. Compatibility : smallint; { how this coexists with others }
  1507. pad : Array[0..31] of Byte;
  1508. MouseTicks : tPoint;
  1509. DefaultViewPosition : tPoint;
  1510. PreferredModeID : ULONG;
  1511. reserved : Array[0..1] of ULONG; { terminator }
  1512. END;
  1513. { monitor compatibility }
  1514. CONST
  1515. MCOMPAT_MIXED = 0; { can share display with other MCOMPAT_MIXED }
  1516. MCOMPAT_SELF = 1; { can share only within same monitor }
  1517. MCOMPAT_NOBODY= -1; { only one viewport at a time }
  1518. DISPLAYNAMELEN = 32;
  1519. Type
  1520. pNameInfo = ^tNameInfo;
  1521. tNameInfo = record
  1522. Header : tQueryHeader;
  1523. Name : Array[0..DISPLAYNAMELEN-1] of AnsiChar;
  1524. reserved : Array[0..1] of ULONG; { terminator }
  1525. END;
  1526. {****************************************************************************}
  1527. { The following VecInfo structure is PRIVATE, for our use only
  1528. * Touch these, and burn! (V39)
  1529. }
  1530. Type
  1531. pVecInfo = ^tVecInfo;
  1532. tVecInfo = record
  1533. Header : tQueryHeader;
  1534. Vec : Pointer;
  1535. Data : Pointer;
  1536. Type_ : WORD; { Type in C Includes }
  1537. pad : Array[0..2] of WORD;
  1538. reserved : Array[0..1] of ULONG;
  1539. end;
  1540. CONST
  1541. VTAG_END_CM = $00000000;
  1542. VTAG_CHROMAKEY_CLR = $80000000;
  1543. VTAG_CHROMAKEY_SET = $80000001;
  1544. VTAG_BITPLANEKEY_CLR = $80000002;
  1545. VTAG_BITPLANEKEY_SET = $80000003;
  1546. VTAG_BORDERBLANK_CLR = $80000004;
  1547. VTAG_BORDERBLANK_SET = $80000005;
  1548. VTAG_BORDERNOTRANS_CLR = $80000006;
  1549. VTAG_BORDERNOTRANS_SET = $80000007;
  1550. VTAG_CHROMA_PEN_CLR = $80000008;
  1551. VTAG_CHROMA_PEN_SET = $80000009;
  1552. VTAG_CHROMA_PLANE_SET = $8000000A;
  1553. VTAG_ATTACH_CM_SET = $8000000B;
  1554. VTAG_NEXTBUF_CM = $8000000C;
  1555. VTAG_BATCH_CM_CLR = $8000000D;
  1556. VTAG_BATCH_CM_SET = $8000000E;
  1557. VTAG_NORMAL_DISP_GET = $8000000F;
  1558. VTAG_NORMAL_DISP_SET = $80000010;
  1559. VTAG_COERCE_DISP_GET = $80000011;
  1560. VTAG_COERCE_DISP_SET = $80000012;
  1561. VTAG_VIEWPORTEXTRA_GET = $80000013;
  1562. VTAG_VIEWPORTEXTRA_SET = $80000014;
  1563. VTAG_CHROMAKEY_GET = $80000015;
  1564. VTAG_BITPLANEKEY_GET = $80000016;
  1565. VTAG_BORDERBLANK_GET = $80000017;
  1566. VTAG_BORDERNOTRANS_GET = $80000018;
  1567. VTAG_CHROMA_PEN_GET = $80000019;
  1568. VTAG_CHROMA_PLANE_GET = $8000001A;
  1569. VTAG_ATTACH_CM_GET = $8000001B;
  1570. VTAG_BATCH_CM_GET = $8000001C;
  1571. VTAG_BATCH_ITEMS_GET = $8000001D;
  1572. VTAG_BATCH_ITEMS_SET = $8000001E;
  1573. VTAG_BATCH_ITEMS_ADD = $8000001F;
  1574. VTAG_VPMODEID_GET = $80000020;
  1575. VTAG_VPMODEID_SET = $80000021;
  1576. VTAG_VPMODEID_CLR = $80000022;
  1577. VTAG_USERCLIP_GET = $80000023;
  1578. VTAG_USERCLIP_SET = $80000024;
  1579. VTAG_USERCLIP_CLR = $80000025;
  1580. { The following tags are V39 specific. They will be ignored (returing error -3) by
  1581. earlier versions }
  1582. VTAG_PF1_BASE_GET = $80000026;
  1583. VTAG_PF2_BASE_GET = $80000027;
  1584. VTAG_SPEVEN_BASE_GET = $80000028;
  1585. VTAG_SPODD_BASE_GET = $80000029;
  1586. VTAG_PF1_BASE_SET = $8000002a;
  1587. VTAG_PF2_BASE_SET = $8000002b;
  1588. VTAG_SPEVEN_BASE_SET = $8000002c;
  1589. VTAG_SPODD_BASE_SET = $8000002d;
  1590. VTAG_BORDERSPRITE_GET = $8000002e;
  1591. VTAG_BORDERSPRITE_SET = $8000002f;
  1592. VTAG_BORDERSPRITE_CLR = $80000030;
  1593. VTAG_SPRITERESN_SET = $80000031;
  1594. VTAG_SPRITERESN_GET = $80000032;
  1595. VTAG_PF1_TO_SPRITEPRI_SET = $80000033;
  1596. VTAG_PF1_TO_SPRITEPRI_GET = $80000034;
  1597. VTAG_PF2_TO_SPRITEPRI_SET = $80000035;
  1598. VTAG_PF2_TO_SPRITEPRI_GET = $80000036;
  1599. VTAG_IMMEDIATE = $80000037;
  1600. VTAG_FULLPALETTE_SET = $80000038;
  1601. VTAG_FULLPALETTE_GET = $80000039;
  1602. VTAG_FULLPALETTE_CLR = $8000003A;
  1603. VTAG_DEFSPRITERESN_SET = $8000003B;
  1604. VTAG_DEFSPRITERESN_GET = $8000003C;
  1605. { all the following tags follow the new, rational standard for videocontrol tags:
  1606. * VC_xxx,state set the state of attribute 'xxx' to value 'state'
  1607. * VC_xxx_QUERY,&var get the state of attribute 'xxx' and store it into the longword
  1608. * pointed to by &var.
  1609. *
  1610. * The following are new for V40:
  1611. }
  1612. VC_IntermediateCLUpdate = $80000080;
  1613. { default=true. When set graphics will update the intermediate copper
  1614. * lists on color changes, etc. When false, it won't, and will be faster.
  1615. }
  1616. VC_IntermediateCLUpdate_Query = $80000081;
  1617. VC_NoColorPaletteLoad = $80000082;
  1618. { default = false. When set, graphics will only load color 0
  1619. * for this ViewPort, and so the ViewPort's colors will come
  1620. * from the previous ViewPort's.
  1621. *
  1622. * NB - Using this tag and VTAG_FULLPALETTE_SET together is undefined.
  1623. }
  1624. VC_NoColorPaletteLoad_Query = $80000083;
  1625. VC_DUALPF_Disable = $80000084;
  1626. { default = false. When this flag is set, the dual-pf bit
  1627. in Dual-Playfield screens will be turned off. Even bitplanes
  1628. will still come from the first BitMap and odd bitplanes
  1629. from the second BitMap, and both R[xy]Offsets will be
  1630. considered. This can be used (with appropriate palette
  1631. selection) for cross-fades between differently scrolling
  1632. images.
  1633. When this flag is turned on, colors will be loaded for
  1634. the viewport as if it were a single viewport of depth
  1635. depth1+depth2 }
  1636. VC_DUALPF_Disable_Query = $80000085;
  1637. const
  1638. SPRITE_ATTACHED = $80;
  1639. type
  1640. pSimpleSprite = ^tSimpleSprite;
  1641. tSimpleSprite = record
  1642. posctldata : Pointer;
  1643. height : Word;
  1644. x,y : Word; { current position }
  1645. num : Word;
  1646. end;
  1647. pExtSprite = ^tExtSprite;
  1648. tExtSprite = record
  1649. es_SimpleSprite : tSimpleSprite; { conventional simple sprite structure }
  1650. es_wordwidth : WORD; { graphics use only, subject to change }
  1651. es_flags : WORD; { graphics use only, subject to change }
  1652. end;
  1653. const
  1654. { tags for AllocSpriteData() }
  1655. SPRITEA_Width = $81000000;
  1656. SPRITEA_XReplication = $81000002;
  1657. SPRITEA_YReplication = $81000004;
  1658. SPRITEA_OutputHeight = $81000006;
  1659. SPRITEA_Attached = $81000008;
  1660. SPRITEA_OldDataFormat = $8100000a; { MUST pass in outputheight if using this tag }
  1661. { tags for GetExtSprite() }
  1662. GSTAG_SPRITE_NUM = $82000020;
  1663. GSTAG_ATTACHED = $82000022;
  1664. GSTAG_SOFTSPRITE = $82000024;
  1665. { tags valid for either GetExtSprite or ChangeExtSprite }
  1666. GSTAG_SCANDOUBLED = $83000000; { request "NTSC-Like" height if possible. }
  1667. Type
  1668. pBitScaleArgs = ^tBitScaleArgs;
  1669. tBitScaleArgs = record
  1670. bsa_SrcX, bsa_SrcY, { source origin }
  1671. bsa_SrcWidth, bsa_SrcHeight, { source size }
  1672. bsa_XSrcFactor, bsa_YSrcFactor, { scale factor denominators }
  1673. bsa_DestX, bsa_DestY, { destination origin }
  1674. bsa_DestWidth, bsa_DestHeight, { destination size result }
  1675. bsa_XDestFactor, bsa_YDestFactor : Word; { scale factor numerators }
  1676. bsa_SrcBitMap, { source BitMap }
  1677. bsa_DestBitMap : pBitMap; { destination BitMap }
  1678. bsa_Flags : ULONG; { reserved. Must be zero! }
  1679. bsa_XDDA, bsa_YDDA : Word; { reserved }
  1680. bsa_Reserved1,
  1681. bsa_Reserved2 : Longint;
  1682. END;
  1683. { tag definitions for GetRPAttr, SetRPAttr }
  1684. const
  1685. RPTAG_Font = $80000000; { get/set font }
  1686. RPTAG_APen = $80000002; { get/set apen }
  1687. RPTAG_BPen = $80000003; { get/set bpen }
  1688. RPTAG_DrMd = $80000004; { get/set draw mode }
  1689. RPTAG_OutlinePen = $80000005; { get/set outline pen. corrected case. }
  1690. RPTAG_WriteMask = $80000006; { get/set WriteMask }
  1691. RPTAG_MaxPen = $80000007; { get/set maxpen }
  1692. RPTAG_DrawBounds = $80000008; { get only rastport draw bounds. pass &rect }
  1693. TYPE
  1694. pRegionRectangle = ^tRegionRectangle;
  1695. tRegionRectangle = record
  1696. Next, Prev : pRegionRectangle;
  1697. bounds : tRectangle;
  1698. END;
  1699. pRegion = ^tRegion;
  1700. tRegion = record
  1701. bounds : tRectangle;
  1702. RegionRectangle : pRegionRectangle;
  1703. END;
  1704. type
  1705. pGfxBase = ^tGfxBase;
  1706. tGfxBase = record
  1707. LibNode : tLibrary;
  1708. ActiView : pView; { ViewPtr }
  1709. copinit : pcopinit; { (copinitptr) ptr to copper start up list }
  1710. cia : Pointer; { for 8520 resource use }
  1711. blitter : Pointer; { for future blitter resource use }
  1712. LOFlist : Pointer;
  1713. SHFlist : Pointer;
  1714. blthd,
  1715. blttl : pbltnode;
  1716. bsblthd,
  1717. bsblttl : pbltnode; { Previous four are (bltnodeptr) }
  1718. vbsrv,
  1719. timsrv,
  1720. bltsrv : tInterrupt;
  1721. TextFonts : tList;
  1722. DefaultFont : pTextFont; { TextFontPtr }
  1723. Modes : Word; { copy of current first bplcon0 }
  1724. VBlank : Shortint;
  1725. Debug : Shortint;
  1726. BeamSync : smallint;
  1727. system_bplcon0 : smallint; { it is ored into each bplcon0 for display }
  1728. SpriteReserved : Byte;
  1729. bytereserved : Byte;
  1730. Flags : Word;
  1731. BlitLock : smallint;
  1732. BlitNest : smallint;
  1733. BlitWaitQ : tList;
  1734. BlitOwner : pTask; { TaskPtr }
  1735. TOF_WaitQ : tList;
  1736. DisplayFlags : Word; { NTSC PAL GENLOC etc}
  1737. { Display flags are determined at power on }
  1738. SimpleSprites : Pointer; { SimpleSpritePtr ptr }
  1739. MaxDisplayRow : Word; { hardware stuff, do not use }
  1740. MaxDisplayColumn : Word; { hardware stuff, do not use }
  1741. NormalDisplayRows : Word;
  1742. NormalDisplayColumns : Word;
  1743. { the following are for standard non interlace, 1/2 wb width }
  1744. NormalDPMX : Word; { Dots per meter on display }
  1745. NormalDPMY : Word; { Dots per meter on display }
  1746. LastChanceMemory : pSignalSemaphore; { SignalSemaphorePtr }
  1747. LCMptr : Pointer;
  1748. MicrosPerLine : Word; { 256 time usec/line }
  1749. MinDisplayColumn : Word;
  1750. ChipRevBits0 : Byte;
  1751. MemType : Byte;
  1752. crb_reserved : Array[0..3] of Byte;
  1753. monitor_id : Word; { normally null }
  1754. hedley : Array[0..7] of ULONG;
  1755. hedley_sprites : Array[0..7] of ULONG; { sprite ptrs for intuition mouse }
  1756. hedley_sprites1 : Array[0..7] of ULONG; { sprite ptrs for intuition mouse }
  1757. hedley_count : smallint;
  1758. hedley_flags : Word;
  1759. hedley_tmp : smallint;
  1760. hash_table : Pointer;
  1761. current_tot_rows : Word;
  1762. current_tot_cclks : Word;
  1763. hedley_hint : Byte;
  1764. hedley_hint2 : Byte;
  1765. nreserved : Array[0..3] of ULONG;
  1766. a2024_sync_raster : Pointer;
  1767. control_delta_pal : Word;
  1768. control_delta_ntsc : Word;
  1769. current_monitor : pMonitorSpec;
  1770. MonitorList : tList;
  1771. default_monitor : pMonitorSpec;
  1772. MonitorListSemaphore : pSignalSemaphore;
  1773. DisplayInfoDataBase : Pointer;
  1774. TopLine : Word;
  1775. ActiViewCprSemaphore : pSignalSemaphore;
  1776. UtilityBase : Pointer; { for hook AND tag utilities }
  1777. ExecBase : Pointer; { to link with rom.lib }
  1778. bwshifts : Pointer;
  1779. StrtFetchMasks,
  1780. StopFetchMasks,
  1781. Overrun,
  1782. RealStops : Pointer;
  1783. SpriteWidth, { current width (in words) of sprites }
  1784. SpriteFMode : WORD; { current sprite fmode bits }
  1785. SoftSprites, { bit mask of size change knowledgeable sprites }
  1786. arraywidth : Shortint;
  1787. DefaultSpriteWidth : WORD; { what width intuition wants }
  1788. SprMoveDisable : Shortint;
  1789. WantChips,
  1790. BoardMemType,
  1791. Bugs : Byte;
  1792. gb_LayersBase : Pointer;
  1793. ColorMask : ULONG;
  1794. IVector,
  1795. IData : Pointer;
  1796. SpecialCounter : ULONG; { special for double buffering }
  1797. DBList : Pointer;
  1798. MonitorFlags : WORD;
  1799. ScanDoubledSprites,
  1800. BP3Bits : Byte;
  1801. MonitorVBlank : tAnalogSignalInterval;
  1802. natural_monitor : pMonitorSpec;
  1803. ProgData : Pointer;
  1804. ExtSprites : Byte;
  1805. pad3 : Byte;
  1806. GfxFlags : WORD;
  1807. VBCounter : ULONG;
  1808. HashTableSemaphore : pSignalSemaphore;
  1809. case boolean of
  1810. true: ( ChunkyToPlanarPtr: PLongWord;); // HWEmul[0];
  1811. false: (HWEmul: array[0..8] of PLongWord;);
  1812. end;
  1813. const
  1814. NTSC = 1;
  1815. GENLOC = 2;
  1816. PAL = 4;
  1817. TODA_SAFE = 8;
  1818. BLITMSG_FAULT = 4;
  1819. { bits defs for ChipRevBits }
  1820. GFXB_BIG_BLITS = 0 ;
  1821. GFXB_HR_AGNUS = 0 ;
  1822. GFXB_HR_DENISE = 1 ;
  1823. GFXB_AA_ALICE = 2 ;
  1824. GFXB_AA_LISA = 3 ;
  1825. GFXB_AA_MLISA = 4 ; { internal use only. }
  1826. GFXF_BIG_BLITS = 1 ;
  1827. GFXF_HR_AGNUS = 1 ;
  1828. GFXF_HR_DENISE = 2 ;
  1829. GFXF_AA_ALICE = 4 ;
  1830. GFXF_AA_LISA = 8 ;
  1831. GFXF_AA_MLISA = 16; { internal use only }
  1832. { Pass ONE of these to SetChipRev() }
  1833. SETCHIPREV_A = GFXF_HR_AGNUS;
  1834. SETCHIPREV_ECS = (GFXF_HR_AGNUS OR GFXF_HR_DENISE);
  1835. SETCHIPREV_AA = (GFXF_AA_ALICE OR GFXF_AA_LISA OR SETCHIPREV_ECS);
  1836. SETCHIPREV_BEST= $ffffffff;
  1837. { memory type }
  1838. BUS_16 = 0;
  1839. NML_CAS = 0;
  1840. BUS_32 = 1;
  1841. DBL_CAS = 2;
  1842. BANDWIDTH_1X = (BUS_16 OR NML_CAS);
  1843. BANDWIDTH_2XNML= BUS_32;
  1844. BANDWIDTH_2XDBL= DBL_CAS;
  1845. BANDWIDTH_4X = (BUS_32 OR DBL_CAS);
  1846. { GfxFlags (private) }
  1847. NEW_DATABASE = 1;
  1848. GRAPHICSNAME : PAnsiChar = 'graphics.library';
  1849. var
  1850. GfxBase : PGfxBase = nil;
  1851. {$if defined(AMIGA_V1_2_ONLY)}
  1852. FUNCTION AllocRaster(width : ULONG location 'd0'; height : ULONG location 'd1') : TPlanePtr; syscall GfxBase 492;
  1853. PROCEDURE FreeRaster(p : TPlanePtr location 'a0'; width : ULONG location 'd0'; height : ULONG location 'd1'); syscall GfxBase 498;
  1854. PROCEDURE InitBitMap(bitMap : pBitMap location 'a0'; depth : LONGINT location 'd0'; width : LONGINT location 'd1'; height : LONGINT location 'd2'); syscall GfxBase 390;
  1855. PROCEDURE InitRastPort(rp : pRastPort location 'a1'); syscall GfxBase 198;
  1856. PROCEDURE SetAPen(rp : pRastPort location 'a1'; pen : ULONG location 'd0'); syscall GfxBase 342;
  1857. PROCEDURE SetBPen(rp : pRastPort location 'a1'; pen : ULONG location 'd0'); syscall GfxBase 348;
  1858. PROCEDURE SetDrMd(rp : pRastPort location 'a1'; drawMode : ULONG location 'd0'); syscall GfxBase 354;
  1859. PROCEDURE SetRast(rp : pRastPort location 'a1'; pen : ULONG location 'd0'); syscall GfxBase 234;
  1860. PROCEDURE ClearEOL(rp : pRastPort location 'a1'); syscall GfxBase 042;
  1861. PROCEDURE ClearScreen(rp : pRastPort location 'a1'); syscall GfxBase 048;
  1862. PROCEDURE Draw(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1'); syscall GfxBase 246;
  1863. PROCEDURE DrawEllipse(rp : pRastPort location 'a1'; xCenter : LONGINT location 'd0'; yCenter : LONGINT location 'd1'; a : LONGINT location 'd2'; b : LONGINT location 'd3'); syscall GfxBase 180;
  1864. PROCEDURE gfxMove(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1'); syscall GfxBase 240;
  1865. PROCEDURE PolyDraw(rp : pRastPort location 'a1'; count : LONGINT location 'd0';const polyTable : PSmallInt location 'a0'); syscall GfxBase 336;
  1866. FUNCTION ReadPixel(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : ULONG; syscall GfxBase 318;
  1867. PROCEDURE ScrollRaster(rp : pRastPort location 'a1'; dx : LONGINT location 'd0'; dy : LONGINT location 'd1'; xMin : LONGINT location 'd2'; yMin : LONGINT location 'd3'; xMax : LONGINT location 'd4'; yMax : LONGINT location 'd5'); syscall GfxBase 396;
  1868. FUNCTION GfxText(rp : pRastPort location 'a1';const string_ : PAnsiChar location 'a0'; count : ULONG location 'd0') : LONGINT; syscall GfxBase 060;
  1869. FUNCTION TextLength(rp : pRastPort location 'a1';const string_ : PAnsiChar location 'a0'; count : ULONG location 'd0') : smallint; syscall GfxBase 054;
  1870. FUNCTION WritePixel(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : LONGINT; syscall GfxBase 324;
  1871. FUNCTION AreaDraw(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : LONGINT; syscall GfxBase 258;
  1872. FUNCTION AreaEllipse(rp : pRastPort location 'a1'; xCenter : LONGINT location 'd0'; yCenter : LONGINT location 'd1'; a : LONGINT location 'd2'; b : LONGINT location 'd3') : LONGINT; syscall GfxBase 186;
  1873. FUNCTION AreaEnd(rp : pRastPort location 'a1') : LONGINT; syscall GfxBase 264;
  1874. FUNCTION AreaMove(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : LONGINT; syscall GfxBase 252;
  1875. FUNCTION Flood(rp : pRastPort location 'a1'; mode : ULONG location 'd2'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : LongBool; syscall GfxBase 330;
  1876. PROCEDURE InitArea(areaInfo : pAreaInfo location 'a0'; vectorBuffer : POINTER location 'a1'; maxVectors : LONGINT location 'd0'); syscall GfxBase 282;
  1877. FUNCTION InitTmpRas(tmpRas : pTmpRas location 'a0'; buffer : Pointer location 'a1'; size : LONGINT location 'd0') : pTmpRas; syscall GfxBase 468;
  1878. PROCEDURE RectFill(rp : pRastPort location 'a1'; xMin : LONGINT location 'd0'; yMin : LONGINT location 'd1'; xMax : LONGINT location 'd2'; yMax : LONGINT location 'd3'); syscall GfxBase 306;
  1879. PROCEDURE FreeColorMap(colorMap : pColorMap location 'a0'); syscall GfxBase 576;
  1880. FUNCTION GetColorMap(entries : LONGINT location 'd0') : pColorMap; syscall GfxBase 570;
  1881. FUNCTION GetRGB4(colorMap : pColorMap location 'a0'; entry : LONGINT location 'd0') : ULONG; syscall GfxBase 582;
  1882. PROCEDURE LoadRGB4(vp : pViewPort location 'a0';const colors : pWord location 'a1'; count : LONGINT location 'd0'); syscall GfxBase 192;
  1883. PROCEDURE SetRGB4(vp : pViewPort location 'a0'; index : LONGINT location 'd0'; red : ULONG location 'd1'; green : ULONG location 'd2'; blue : ULONG location 'd3'); syscall GfxBase 288;
  1884. PROCEDURE SetRGB4CM(colorMap : pColorMap location 'a0'; index : LONGINT location 'd0'; red : ULONG location 'd1'; green : ULONG location 'd2'; blue : ULONG location 'd3'); syscall GfxBase 630;
  1885. FUNCTION BltBitMap(const srcBitMap : pBitMap location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destBitMap : pBitMap location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6'; mask : ULONG location 'd7'; tempA : PAnsiChar location 'a2') : LONGINT; syscall GfxBase 030;
  1886. PROCEDURE BltBitMapRastPort(const srcBitMap : pBitMap location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6'); syscall GfxBase 606;
  1887. PROCEDURE BltClear(memBlock : pointer location 'a1'; byteCount : ULONG location 'd0'; flags : ULONG location 'd1'); syscall GfxBase 300;
  1888. PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6';const bltMask : PAnsiChar location 'a2'); syscall GfxBase 636;
  1889. PROCEDURE BltPattern(rp : pRastPort location 'a1';const mask : PAnsiChar location 'a0'; xMin : LONGINT location 'd0'; yMin : LONGINT location 'd1'; xMax : LONGINT location 'd2'; yMax : LONGINT location 'd3'; maskBPR : ULONG location 'd4'); syscall GfxBase 312;
  1890. PROCEDURE BltTemplate(const source : pWORD location 'a0'; xSrc : LONGINT location 'd0'; srcMod : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'); syscall GfxBase 036;
  1891. PROCEDURE ClipBlit(srcRP : pRastPort location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6'); syscall GfxBase 552;
  1892. PROCEDURE DisownBlitter; syscall GfxBase 462;
  1893. PROCEDURE OwnBlitter; syscall GfxBase 456;
  1894. PROCEDURE QBlit(blit : pbltnode location 'a1'); syscall GfxBase 276;
  1895. PROCEDURE QBSBlit(blit : pbltnode location 'a1'); syscall GfxBase 294;
  1896. PROCEDURE WaitBlit; syscall GfxBase 228;
  1897. PROCEDURE CBump(copList : pUCopList location 'a1'); syscall GfxBase 366;
  1898. PROCEDURE CMove(copList : pUCopList location 'a1'; destination : POINTER location 'a0'; data : LONGINT location 'd1'); syscall GfxBase 372;
  1899. PROCEDURE CWait(copList : pUCopList location 'a1'; v : LONGINT location 'd0'; h : LONGINT location 'd1'); syscall GfxBase 378;
  1900. PROCEDURE FreeCopList(copList : pCopList location 'a0'); syscall GfxBase 546;
  1901. PROCEDURE FreeCprList(cprList : pcprlist location 'a0'); syscall GfxBase 564;
  1902. PROCEDURE FreeVPortCopLists(vp : pViewPort location 'a0'); syscall GfxBase 540;
  1903. PROCEDURE InitView(view : pView location 'a1'); syscall GfxBase 360;
  1904. PROCEDURE InitVPort(vp : pViewPort location 'a0'); syscall GfxBase 204;
  1905. PROCEDURE LoadView(view : pView location 'a1'); syscall GfxBase 222;
  1906. FUNCTION MakeVPort(view : pView location 'a0'; vp : pViewPort location 'a1') : ULONG; syscall GfxBase 216;
  1907. FUNCTION MrgCop(view : pView location 'a1') : ULONG; syscall GfxBase 210;
  1908. PROCEDURE ScrollVPort(vp : pViewPort location 'a0'); syscall GfxBase 588;
  1909. FUNCTION UCopperListInit(uCopList : pUCopList location 'a0'; n : LONGINT location 'd0') : pCopList; syscall GfxBase 594;
  1910. FUNCTION VBeamPos : LONGINT; syscall GfxBase 384;
  1911. PROCEDURE WaitBOVP(vp : pViewPort location 'a0'); syscall GfxBase 402;
  1912. PROCEDURE WaitTOF; syscall GfxBase 270;
  1913. PROCEDURE AndRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1'); syscall GfxBase 504;
  1914. FUNCTION AndRegionRegion(const srcRegion : pRegion location 'a0'; destRegion : pRegion location 'a1') : LongBool; syscall GfxBase 624;
  1915. FUNCTION AttemptLockLayerRom(layer : pLayer location 'a5') : LongBool; syscall GfxBase 654;
  1916. FUNCTION ClearRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1') : LongBool; syscall GfxBase 522;
  1917. PROCEDURE ClearRegion(region : pRegion location 'a0'); syscall GfxBase 528;
  1918. PROCEDURE CopySBitMap(layer : pLayer location 'a0'); syscall GfxBase 450;
  1919. PROCEDURE DisposeRegion(region : pRegion location 'a0'); syscall GfxBase 534;
  1920. PROCEDURE LockLayerRom(layer : pLayer location 'a5'); syscall GfxBase 432;
  1921. FUNCTION NewRegion : pRegion; syscall GfxBase 516;
  1922. FUNCTION OrRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1') : LongBool; syscall GfxBase 510;
  1923. FUNCTION OrRegionRegion(const srcRegion : pRegion location 'a0'; destRegion : pRegion location 'a1') : LongBool; syscall GfxBase 612;
  1924. PROCEDURE SyncSBitMap(layer : pLayer location 'a0'); syscall GfxBase 444;
  1925. PROCEDURE UnlockLayerRom(layer : pLayer location 'a5'); syscall GfxBase 438;
  1926. FUNCTION XorRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1') : LongBool; syscall GfxBase 558;
  1927. FUNCTION XorRegionRegion(const srcRegion : pRegion location 'a0'; destRegion : pRegion location 'a1') : LongBool; syscall GfxBase 618;
  1928. PROCEDURE AddFont(textFont : pTextFont location 'a1'); syscall GfxBase 480;
  1929. PROCEDURE AskFont(rp : pRastPort location 'a1'; textAttr : pTextAttr location 'a0'); syscall GfxBase 474;
  1930. FUNCTION AskSoftStyle(rp : pRastPort location 'a1') : ULONG; syscall GfxBase 084;
  1931. PROCEDURE CloseFont(textFont : pTextFont location 'a1'); syscall GfxBase 078;
  1932. FUNCTION OpenFont(textAttr : pTextAttr location 'a0') : pTextFont; syscall GfxBase 072;
  1933. PROCEDURE RemFont(textFont : pTextFont location 'a1'); syscall GfxBase 486;
  1934. FUNCTION SetFont(rp : pRastPort location 'a1';const textFont : pTextFont location 'a0') : LONGINT; syscall GfxBase 066;
  1935. FUNCTION SetSoftStyle(rp : pRastPort location 'a1'; style : ULONG location 'd0'; enable : ULONG location 'd1') : ULONG; syscall GfxBase 090;
  1936. PROCEDURE AddAnimOb(anOb : pAnimOb location 'a0'; anKey : ppAnimOb location 'a1'; rp : pRastPort location 'a2'); syscall GfxBase 156;
  1937. PROCEDURE AddBob(bob : pBob location 'a0'; rp : pRastPort location 'a1'); syscall GfxBase 096;
  1938. PROCEDURE AddVSprite(vSprite : pVSprite location 'a0'; rp : pRastPort location 'a1'); syscall GfxBase 102;
  1939. PROCEDURE Animate(anKey : ppAnimOb location 'a0'; rp : pRastPort location 'a1'); syscall GfxBase 162;
  1940. PROCEDURE ChangeSprite(vp : pViewPort location 'a0'; sprite : pSimpleSprite location 'a1'; newData : pWORD location 'a2'); syscall GfxBase 420;
  1941. PROCEDURE DoCollision(rp : pRastPort location 'a1'); syscall GfxBase 108;
  1942. PROCEDURE DrawGList(rp : pRastPort location 'a1'; vp : pViewPort location 'a0'); syscall GfxBase 114;
  1943. PROCEDURE FreeGBuffers(anOb : pAnimOb location 'a0'; rp : pRastPort location 'a1'; flag : LONGINT location 'd0'); syscall GfxBase 600;
  1944. PROCEDURE FreeSprite(num : LONGINT location 'd0'); syscall GfxBase 414;
  1945. FUNCTION GetGBuffers(anOb : pAnimOb location 'a0'; rp : pRastPort location 'a1'; flag : LONGINT location 'd0') : LongBool; syscall GfxBase 168;
  1946. FUNCTION GetSprite(sprite : pSimpleSprite location 'a0'; num : LONGINT location 'd0') : smallint; syscall GfxBase 408;
  1947. PROCEDURE InitGels(head : pVSprite location 'a0'; tail : pVSprite location 'a1'; gelsInfo : pGelsInfo location 'a2'); syscall GfxBase 120;
  1948. PROCEDURE InitGMasks(anOb : pAnimOb location 'a0'); syscall GfxBase 174;
  1949. PROCEDURE InitMasks(vSprite : pVSprite location 'a0'); syscall GfxBase 126;
  1950. PROCEDURE MoveSprite(vp : pViewPort location 'a0'; sprite : pSimpleSprite location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1'); syscall GfxBase 426;
  1951. PROCEDURE RemIBob(bob : pBob location 'a0'; rp : pRastPort location 'a1'; vp : pViewPort location 'a2'); syscall GfxBase 132;
  1952. PROCEDURE RemVSprite(vSprite : pVSprite location 'a0'); syscall GfxBase 138;
  1953. PROCEDURE SetCollision(num : ULONG location 'd0'; routine : tPROCEDURE location 'a0'; gelsInfo : pGelsInfo location 'a1'); syscall GfxBase 144;
  1954. PROCEDURE SortGList(rp : pRastPort location 'a1'); syscall GfxBase 150;
  1955. {$else}
  1956. PROCEDURE AddAnimOb(anOb : pAnimOb location 'a0'; anKey : ppAnimOb location 'a1'; rp : pRastPort location 'a2'); syscall GfxBase 156;
  1957. PROCEDURE AddBob(bob : pBob location 'a0'; rp : pRastPort location 'a1'); syscall GfxBase 096;
  1958. PROCEDURE AddFont(textFont : pTextFont location 'a1'); syscall GfxBase 480;
  1959. PROCEDURE AddVSprite(vSprite : pVSprite location 'a0'; rp : pRastPort location 'a1'); syscall GfxBase 102;
  1960. FUNCTION AllocBitMap(sizex : ULONG location 'd0'; sizey : ULONG location 'd1'; depth : ULONG location 'd2'; flags : ULONG location 'd3'; const friend_bitmap : pBitMap location 'a0') : pBitMap; syscall GfxBase 918;
  1961. FUNCTION AllocDBufInfo(vp : pViewPort location 'a0') : pDBufInfo; syscall GfxBase 966;
  1962. FUNCTION AllocRaster(width : ULONG location 'd0'; height : ULONG location 'd1') : TPlanePtr; syscall GfxBase 492;
  1963. FUNCTION AllocSpriteDataA(const bm : pBitMap location 'a2';const tags : pTagItem location 'a1') : pExtSprite; syscall GfxBase 1020;
  1964. PROCEDURE AndRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1'); syscall GfxBase 504;
  1965. FUNCTION AndRegionRegion(const srcRegion : pRegion location 'a0'; destRegion : pRegion location 'a1') : LongBool; syscall GfxBase 624;
  1966. PROCEDURE Animate(anKey : ppAnimOb location 'a0'; rp : pRastPort location 'a1'); syscall GfxBase 162;
  1967. FUNCTION AreaDraw(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : LONGINT; syscall GfxBase 258;
  1968. FUNCTION AreaEllipse(rp : pRastPort location 'a1'; xCenter : LONGINT location 'd0'; yCenter : LONGINT location 'd1'; a : LONGINT location 'd2'; b : LONGINT location 'd3') : LONGINT; syscall GfxBase 186;
  1969. FUNCTION AreaEnd(rp : pRastPort location 'a1') : LONGINT; syscall GfxBase 264;
  1970. FUNCTION AreaMove(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : LONGINT; syscall GfxBase 252;
  1971. PROCEDURE AskFont(rp : pRastPort location 'a1'; textAttr : pTextAttr location 'a0'); syscall GfxBase 474;
  1972. FUNCTION AskSoftStyle(rp : pRastPort location 'a1') : ULONG; syscall GfxBase 084;
  1973. FUNCTION AttachPalExtra(cm : pColorMap location 'a0'; vp : pViewPort location 'a1') : LONGINT; syscall GfxBase 834;
  1974. FUNCTION AttemptLockLayerRom(layer : pLayer location 'a5') : LongBool; syscall GfxBase 654;
  1975. FUNCTION BestModeIDA(const tags : pTagItem location 'a0') : ULONG; syscall GfxBase 1050;
  1976. PROCEDURE BitMapScale(bitScaleArgs : pBitScaleArgs location 'a0'); syscall GfxBase 678;
  1977. FUNCTION BltBitMap(const srcBitMap : pBitMap location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destBitMap : pBitMap location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6'; mask : ULONG location 'd7'; tempA : PAnsiChar location 'a2') : LONGINT; syscall GfxBase 030;
  1978. PROCEDURE BltBitMapRastPort(const srcBitMap : pBitMap location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6'); syscall GfxBase 606;
  1979. PROCEDURE BltClear(memBlock : pointer location 'a1'; byteCount : ULONG location 'd0'; flags : ULONG location 'd1'); syscall GfxBase 300;
  1980. PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6';const bltMask : PAnsiChar location 'a2'); syscall GfxBase 636;
  1981. PROCEDURE BltPattern(rp : pRastPort location 'a1';const mask : PAnsiChar location 'a0'; xMin : LONGINT location 'd0'; yMin : LONGINT location 'd1'; xMax : LONGINT location 'd2'; yMax : LONGINT location 'd3'; maskBPR : ULONG location 'd4'); syscall GfxBase 312;
  1982. PROCEDURE BltTemplate(const source : pWORD location 'a0'; xSrc : LONGINT location 'd0'; srcMod : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'); syscall GfxBase 036;
  1983. FUNCTION CalcIVG(v : pView location 'a0'; vp : pViewPort location 'a1') : WORD; syscall GfxBase 828;
  1984. PROCEDURE CBump(copList : pUCopList location 'a1'); syscall GfxBase 366;
  1985. FUNCTION ChangeExtSpriteA(vp : pViewPort location 'a0'; oldsprite : pExtSprite location 'a1'; newsprite : pExtSprite location 'a2';const tags : pTagItem location 'a3') : LONGINT; syscall GfxBase 1026;
  1986. PROCEDURE ChangeSprite(vp : pViewPort location 'a0'; sprite : pSimpleSprite location 'a1'; newData : pWORD location 'a2'); syscall GfxBase 420;
  1987. PROCEDURE ChangeVPBitMap(vp : pViewPort location 'a0'; bm : pBitMap location 'a1'; db : pDBufInfo location 'a2'); syscall GfxBase 942;
  1988. PROCEDURE ClearEOL(rp : pRastPort location 'a1'); syscall GfxBase 042;
  1989. FUNCTION ClearRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1') : LongBool; syscall GfxBase 522;
  1990. PROCEDURE ClearRegion(region : pRegion location 'a0'); syscall GfxBase 528;
  1991. PROCEDURE ClearScreen(rp : pRastPort location 'a1'); syscall GfxBase 048;
  1992. PROCEDURE ClipBlit(srcRP : pRastPort location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6'); syscall GfxBase 552;
  1993. PROCEDURE CloseFont(textFont : pTextFont location 'a1'); syscall GfxBase 078;
  1994. FUNCTION CloseMonitor(monitorSpec : pMonitorSpec location 'a0') : LongBool; syscall GfxBase 720;
  1995. PROCEDURE CMove(copList : pUCopList location 'a1'; destination : POINTER location 'a0'; data : LONGINT location 'd1'); syscall GfxBase 372;
  1996. FUNCTION CoerceMode(vp : pViewPort location 'a0'; monitorid : ULONG location 'd0'; flags : ULONG location 'd1') : ULONG; syscall GfxBase 936;
  1997. PROCEDURE CopySBitMap(layer : pLayer location 'a0'); syscall GfxBase 450;
  1998. PROCEDURE CWait(copList : pUCopList location 'a1'; v : LONGINT location 'd0'; h : LONGINT location 'd1'); syscall GfxBase 378;
  1999. PROCEDURE DisownBlitter; syscall GfxBase 462;
  2000. PROCEDURE DisposeRegion(region : pRegion location 'a0'); syscall GfxBase 534;
  2001. PROCEDURE DoCollision(rp : pRastPort location 'a1'); syscall GfxBase 108;
  2002. PROCEDURE Draw(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1'); syscall GfxBase 246;
  2003. PROCEDURE DrawEllipse(rp : pRastPort location 'a1'; xCenter : LONGINT location 'd0'; yCenter : LONGINT location 'd1'; a : LONGINT location 'd2'; b : LONGINT location 'd3'); syscall GfxBase 180;
  2004. PROCEDURE DrawGList(rp : pRastPort location 'a1'; vp : pViewPort location 'a0'); syscall GfxBase 114;
  2005. PROCEDURE EraseRect(rp : pRastPort location 'a1'; xMin : LONGINT location 'd0'; yMin : LONGINT location 'd1'; xMax : LONGINT location 'd2'; yMax : LONGINT location 'd3'); syscall GfxBase 810;
  2006. FUNCTION ExtendFont(font : pTextFont location 'a0';const fontTags : pTagItem location 'a1') : ULONG; syscall GfxBase 816;
  2007. FUNCTION FindColor(cm : pColorMap location 'a3'; r : ULONG location 'd1'; g : ULONG location 'd2'; b : ULONG location 'd3'; maxcolor : LONGINT location 'd4') : LONGINT; syscall GfxBase 1008;
  2008. FUNCTION FindDisplayInfo(displayID : ULONG location 'd0') : POINTER; syscall GfxBase 726;
  2009. FUNCTION Flood(rp : pRastPort location 'a1'; mode : ULONG location 'd2'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : LongBool; syscall GfxBase 330;
  2010. PROCEDURE FontExtent(const font : pTextFont location 'a0'; fontExtent : pTextExtent location 'a1'); syscall GfxBase 762;
  2011. PROCEDURE FreeBitMap(bm : pBitMap location 'a0'); syscall GfxBase 924;
  2012. PROCEDURE FreeColorMap(colorMap : pColorMap location 'a0'); syscall GfxBase 576;
  2013. PROCEDURE FreeCopList(copList : pCopList location 'a0'); syscall GfxBase 546;
  2014. PROCEDURE FreeCprList(cprList : pcprlist location 'a0'); syscall GfxBase 564;
  2015. PROCEDURE FreeDBufInfo(dbi : pDBufInfo location 'a1'); syscall GfxBase 972;
  2016. PROCEDURE FreeGBuffers(anOb : pAnimOb location 'a0'; rp : pRastPort location 'a1'; flag : LONGINT location 'd0'); syscall GfxBase 600;
  2017. PROCEDURE FreeRaster(p : TPlanePtr location 'a0'; width : ULONG location 'd0'; height : ULONG location 'd1'); syscall GfxBase 498;
  2018. PROCEDURE FreeSprite(num : LONGINT location 'd0'); syscall GfxBase 414;
  2019. PROCEDURE FreeSpriteData(sp : pExtSprite location 'a2'); syscall GfxBase 1032;
  2020. PROCEDURE FreeVPortCopLists(vp : pViewPort location 'a0'); syscall GfxBase 540;
  2021. FUNCTION GetAPen(rp : pRastPort location 'a0') : ULONG; syscall GfxBase 858;
  2022. FUNCTION GetBitMapAttr(const bm : pBitMap location 'a0'; attrnum : ULONG location 'd1') : ULONG; syscall GfxBase 960;
  2023. FUNCTION GetBPen(rp : pRastPort location 'a0') : ULONG; syscall GfxBase 864;
  2024. FUNCTION GetColorMap(entries : LONGINT location 'd0') : pColorMap; syscall GfxBase 570;
  2025. FUNCTION GetDisplayInfoData(const handle : POINTER location 'a0'; buf : PAnsiChar location 'a1'; size : ULONG location 'd0'; tagID : ULONG location 'd1'; displayID : ULONG location 'd2') : ULONG; syscall GfxBase 756;
  2026. FUNCTION GetDrMd(rp : pRastPort location 'a0') : ULONG; syscall GfxBase 870;
  2027. FUNCTION GetExtSpriteA(ss : pExtSprite location 'a2';const tags : pTagItem location 'a1') : LONGINT; syscall GfxBase 930;
  2028. FUNCTION GetGBuffers(anOb : pAnimOb location 'a0'; rp : pRastPort location 'a1'; flag : LONGINT location 'd0') : LongBool; syscall GfxBase 168;
  2029. FUNCTION GetOutlinePen(rp : pRastPort location 'a0') : ULONG; syscall GfxBase 876;
  2030. PROCEDURE GetRGB32(const cm : pColorMap location 'a0'; firstcolor : ULONG location 'd0'; ncolors : ULONG location 'd1'; table : pulong location 'a1'); syscall GfxBase 900;
  2031. FUNCTION GetRGB4(colorMap : pColorMap location 'a0'; entry : LONGINT location 'd0') : ULONG; syscall GfxBase 582;
  2032. PROCEDURE GetRPAttrsA(const rp : pRastPort location 'a0';const tags : pTagItem location 'a1'); syscall GfxBase 1044;
  2033. FUNCTION GetSprite(sprite : pSimpleSprite location 'a0'; num : LONGINT location 'd0') : smallint; syscall GfxBase 408;
  2034. FUNCTION GetVPModeID(const vp : pViewPort location 'a0') : LONGINT; syscall GfxBase 792;
  2035. PROCEDURE GfxAssociate(const associateNode : POINTER location 'a0'; gfxNodePtr : POINTER location 'a1'); syscall GfxBase 672;
  2036. PROCEDURE GfxFree(gfxNodePtr : POINTER location 'a0'); syscall GfxBase 666;
  2037. FUNCTION GfxLookUp(const associateNode : POINTER location 'a0') : POINTER; syscall GfxBase 702;
  2038. FUNCTION GfxNew(gfxNodeType : ULONG location 'd0') : POINTER; syscall GfxBase 660;
  2039. PROCEDURE InitArea(areaInfo : pAreaInfo location 'a0'; vectorBuffer : POINTER location 'a1'; maxVectors : LONGINT location 'd0'); syscall GfxBase 282;
  2040. PROCEDURE InitBitMap(bitMap : pBitMap location 'a0'; depth : LONGINT location 'd0'; width : LONGINT location 'd1'; height : LONGINT location 'd2'); syscall GfxBase 390;
  2041. PROCEDURE InitGels(head : pVSprite location 'a0'; tail : pVSprite location 'a1'; gelsInfo : pGelsInfo location 'a2'); syscall GfxBase 120;
  2042. PROCEDURE InitGMasks(anOb : pAnimOb location 'a0'); syscall GfxBase 174;
  2043. PROCEDURE InitMasks(vSprite : pVSprite location 'a0'); syscall GfxBase 126;
  2044. PROCEDURE InitRastPort(rp : pRastPort location 'a1'); syscall GfxBase 198;
  2045. FUNCTION InitTmpRas(tmpRas : pTmpRas location 'a0'; buffer : Pointer location 'a1'; size : LONGINT location 'd0') : pTmpRas; syscall GfxBase 468;
  2046. PROCEDURE InitView(view : pView location 'a1'); syscall GfxBase 360;
  2047. PROCEDURE InitVPort(vp : pViewPort location 'a0'); syscall GfxBase 204;
  2048. PROCEDURE LoadRGB32(vp : pViewPort location 'a0';const table : pULONG location 'a1'); syscall GfxBase 882;
  2049. PROCEDURE LoadRGB4(vp : pViewPort location 'a0';const colors : pWord location 'a1'; count : LONGINT location 'd0'); syscall GfxBase 192;
  2050. PROCEDURE LoadView(view : pView location 'a1'); syscall GfxBase 222;
  2051. PROCEDURE LockLayerRom(layer : pLayer location 'a5'); syscall GfxBase 432;
  2052. FUNCTION MakeVPort(view : pView location 'a0'; vp : pViewPort location 'a1') : ULONG; syscall GfxBase 216;
  2053. FUNCTION ModeNotAvailable(modeID : ULONG location 'd0') : LONGINT; syscall GfxBase 798;
  2054. PROCEDURE gfxMove(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1'); syscall GfxBase 240;
  2055. PROCEDURE MoveSprite(vp : pViewPort location 'a0'; sprite : pSimpleSprite location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1'); syscall GfxBase 426;
  2056. FUNCTION MrgCop(view : pView location 'a1') : ULONG; syscall GfxBase 210;
  2057. FUNCTION NewRegion : pRegion; syscall GfxBase 516;
  2058. FUNCTION NextDisplayInfo(displayID : ULONG location 'd0') : ULONG; syscall GfxBase 732;
  2059. FUNCTION ObtainBestPenA(cm : pColorMap location 'a0'; r : ULONG location 'd1'; g : ULONG location 'd2'; b : ULONG location 'd3';const tags : pTagItem location 'a1') : LONGINT; syscall GfxBase 840;
  2060. FUNCTION ObtainPen(cm : pColorMap location 'a0'; n : ULONG location 'd0'; r : ULONG location 'd1'; g : ULONG location 'd2'; b : ULONG location 'd3'; f : LONGINT location 'd4') : ULONG; syscall GfxBase 954;
  2061. FUNCTION OpenFont(textAttr : pTextAttr location 'a0') : pTextFont; syscall GfxBase 072;
  2062. FUNCTION OpenMonitor(const monitorName : PAnsiChar location 'a1'; displayID : ULONG location 'd0') : pMonitorSpec; syscall GfxBase 714;
  2063. FUNCTION OrRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1') : LongBool; syscall GfxBase 510;
  2064. FUNCTION OrRegionRegion(const srcRegion : pRegion location 'a0'; destRegion : pRegion location 'a1') : LongBool; syscall GfxBase 612;
  2065. PROCEDURE OwnBlitter; syscall GfxBase 456;
  2066. PROCEDURE PolyDraw(rp : pRastPort location 'a1'; count : LONGINT location 'd0';const polyTable : PSmallInt location 'a0'); syscall GfxBase 336;
  2067. PROCEDURE QBlit(blit : pbltnode location 'a1'); syscall GfxBase 276;
  2068. PROCEDURE QBSBlit(blit : pbltnode location 'a1'); syscall GfxBase 294;
  2069. FUNCTION ReadPixel(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : ULONG; syscall GfxBase 318;
  2070. FUNCTION ReadPixelArray8(rp : pRastPort location 'a0'; xstart : ULONG location 'd0'; ystart : ULONG location 'd1'; xstop : ULONG location 'd2'; ystop : ULONG location 'd3'; array_ : PByte location 'a2'; temprp : pRastPort location 'a1') : LONGINT; syscall GfxBase 780;
  2071. FUNCTION ReadPixelLine8(rp : pRastPort location 'a0'; xstart : ULONG location 'd0'; ystart : ULONG location 'd1'; width : ULONG location 'd2'; array_ : PByte location 'a2'; tempRP : pRastPort location 'a1') : LONGINT; syscall GfxBase 768;
  2072. PROCEDURE RectFill(rp : pRastPort location 'a1'; xMin : LONGINT location 'd0'; yMin : LONGINT location 'd1'; xMax : LONGINT location 'd2'; yMax : LONGINT location 'd3'); syscall GfxBase 306;
  2073. PROCEDURE ReleasePen(cm : pColorMap location 'a0'; n : ULONG location 'd0'); syscall GfxBase 948;
  2074. PROCEDURE RemFont(textFont : pTextFont location 'a1'); syscall GfxBase 486;
  2075. PROCEDURE RemIBob(bob : pBob location 'a0'; rp : pRastPort location 'a1'; vp : pViewPort location 'a2'); syscall GfxBase 132;
  2076. PROCEDURE RemVSprite(vSprite : pVSprite location 'a0'); syscall GfxBase 138;
  2077. FUNCTION ScalerDiv(factor : ULONG location 'd0'; numerator : ULONG location 'd1'; denominator : ULONG location 'd2') : WORD; syscall GfxBase 684;
  2078. PROCEDURE ScrollRaster(rp : pRastPort location 'a1'; dx : LONGINT location 'd0'; dy : LONGINT location 'd1'; xMin : LONGINT location 'd2'; yMin : LONGINT location 'd3'; xMax : LONGINT location 'd4'; yMax : LONGINT location 'd5'); syscall GfxBase 396;
  2079. PROCEDURE ScrollRasterBF(rp : pRastPort location 'a1'; dx : LONGINT location 'd0'; dy : LONGINT location 'd1'; xMin : LONGINT location 'd2'; yMin : LONGINT location 'd3'; xMax : LONGINT location 'd4'; yMax : LONGINT location 'd5'); syscall GfxBase 1002;
  2080. PROCEDURE ScrollVPort(vp : pViewPort location 'a0'); syscall GfxBase 588;
  2081. PROCEDURE SetABPenDrMd(rp : pRastPort location 'a1'; apen : ULONG location 'd0'; bpen : ULONG location 'd1'; drawmode : ULONG location 'd2'); syscall GfxBase 894;
  2082. PROCEDURE SetAPen(rp : pRastPort location 'a1'; pen : ULONG location 'd0'); syscall GfxBase 342;
  2083. PROCEDURE SetBPen(rp : pRastPort location 'a1'; pen : ULONG location 'd0'); syscall GfxBase 348;
  2084. FUNCTION SetChipRev(want : ULONG location 'd0') : ULONG; syscall GfxBase 888;
  2085. PROCEDURE SetCollision(num : ULONG location 'd0'; routine : tPROCEDURE location 'a0'; gelsInfo : pGelsInfo location 'a1'); syscall GfxBase 144;
  2086. PROCEDURE SetDrMd(rp : pRastPort location 'a1'; drawMode : ULONG location 'd0'); syscall GfxBase 354;
  2087. FUNCTION SetFont(rp : pRastPort location 'a1';const textFont : pTextFont location 'a0') : LONGINT; syscall GfxBase 066;
  2088. PROCEDURE SetMaxPen(rp : pRastPort location 'a0'; maxpen : ULONG location 'd0'); syscall GfxBase 990;
  2089. FUNCTION SetOutlinePen(rp : pRastPort location 'a0'; pen : ULONG location 'd0') : ULONG; syscall GfxBase 978;
  2090. PROCEDURE SetRast(rp : pRastPort location 'a1'; pen : ULONG location 'd0'); syscall GfxBase 234;
  2091. PROCEDURE SetRGB32(vp : pViewPort location 'a0'; n : ULONG location 'd0'; r : ULONG location 'd1'; g : ULONG location 'd2'; b : ULONG location 'd3'); syscall GfxBase 852;
  2092. PROCEDURE SetRGB32CM(cm : pColorMap location 'a0'; n : ULONG location 'd0'; r : ULONG location 'd1'; g : ULONG location 'd2'; b : ULONG location 'd3'); syscall GfxBase 996;
  2093. PROCEDURE SetRGB4(vp : pViewPort location 'a0'; index : LONGINT location 'd0'; red : ULONG location 'd1'; green : ULONG location 'd2'; blue : ULONG location 'd3'); syscall GfxBase 288;
  2094. PROCEDURE SetRGB4CM(colorMap : pColorMap location 'a0'; index : LONGINT location 'd0'; red : ULONG location 'd1'; green : ULONG location 'd2'; blue : ULONG location 'd3'); syscall GfxBase 630;
  2095. PROCEDURE SetRPAttrsA(rp : pRastPort location 'a0';const tags : pTagItem location 'a1'); syscall GfxBase 1038;
  2096. FUNCTION SetSoftStyle(rp : pRastPort location 'a1'; style : ULONG location 'd0'; enable : ULONG location 'd1') : ULONG; syscall GfxBase 090;
  2097. FUNCTION SetWriteMask(rp : pRastPort location 'a0'; msk : ULONG location 'd0') : ULONG; syscall GfxBase 984;
  2098. PROCEDURE SortGList(rp : pRastPort location 'a1'); syscall GfxBase 150;
  2099. PROCEDURE StripFont(font : pTextFont location 'a0'); syscall GfxBase 822;
  2100. PROCEDURE SyncSBitMap(layer : pLayer location 'a0'); syscall GfxBase 444;
  2101. FUNCTION GfxText(rp : pRastPort location 'a1';const string_ : PAnsiChar location 'a0'; count : ULONG location 'd0') : LONGINT; syscall GfxBase 060;
  2102. FUNCTION TextExtent(rp : pRastPort location 'a1';const string_ : PAnsiChar location 'a0'; count : LONGINT location 'd0'; _textExtent : pTextExtent location 'a2') : smallint; syscall GfxBase 690;
  2103. FUNCTION TextFit(rp : pRastPort location 'a1';const string_ : PAnsiChar location 'a0'; strLen : ULONG location 'd0'; textExtent : pTextExtent location 'a2'; constrainingExtent : pTextExtent location 'a3'; strDirection : LONGINT location 'd1'; constrainingBitWidth : ULONG location 'd2'; constrainingBitHeight : ULONG location 'd3') : ULONG; syscall GfxBase 696;
  2104. FUNCTION TextLength(rp : pRastPort location 'a1';const string_ : PAnsiChar location 'a0'; count : ULONG location 'd0') : smallint; syscall GfxBase 054;
  2105. FUNCTION UCopperListInit(uCopList : pUCopList location 'a0'; n : LONGINT location 'd0') : pCopList; syscall GfxBase 594;
  2106. PROCEDURE UnlockLayerRom(layer : pLayer location 'a5'); syscall GfxBase 438;
  2107. FUNCTION VBeamPos : LONGINT; syscall GfxBase 384;
  2108. FUNCTION VideoControl(colorMap : pColorMap location 'a0'; tagarray : pTagItem location 'a1') : LongWord; syscall GfxBase 708;
  2109. PROCEDURE WaitBlit; syscall GfxBase 228;
  2110. PROCEDURE WaitBOVP(vp : pViewPort location 'a0'); syscall GfxBase 402;
  2111. PROCEDURE WaitTOF; syscall GfxBase 270;
  2112. FUNCTION WeighTAMatch(reqTextAttr : pTextAttr location 'a0'; targetTextAttr : pTextAttr location 'a1'; targetTags : pTagItem location 'a2') : smallint; syscall GfxBase 804;
  2113. PROCEDURE WriteChunkyPixels(rp : pRastPort location 'a0'; xstart : ULONG location 'd0'; ystart : ULONG location 'd1'; xstop : ULONG location 'd2'; ystop : ULONG location 'd3'; array_ : PByte location 'a2'; bytesperrow : LONGINT location 'd4'); syscall GfxBase 1056;
  2114. FUNCTION WritePixel(rp : pRastPort location 'a1'; x : LONGINT location 'd0'; y : LONGINT location 'd1') : LONGINT; syscall GfxBase 324;
  2115. FUNCTION WritePixelArray8(rp : pRastPort location 'a0'; xstart : ULONG location 'd0'; ystart : ULONG location 'd1'; xstop : ULONG location 'd2'; ystop : ULONG location 'd3'; array_ : PByte location 'a2'; temprp : pRastPort location 'a1') : LONGINT; syscall GfxBase 786;
  2116. FUNCTION WritePixelLine8(rp : pRastPort location 'a0'; xstart : ULONG location 'd0'; ystart : ULONG location 'd1'; width : ULONG location 'd2'; array_ : PByte location 'a2'; tempRP : pRastPort location 'a1') : LONGINT; syscall GfxBase 774;
  2117. FUNCTION XorRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1') : LongBool; syscall GfxBase 558;
  2118. FUNCTION XorRegionRegion(const srcRegion : pRegion location 'a0'; destRegion : pRegion location 'a1') : LongBool; syscall GfxBase 618;
  2119. function AllocSpriteData(bm : pBitMap; Const argv : array of PtrUInt) : pExtSprite;
  2120. function BestModeID(Const argv : array of PtrUInt) : ULONG;
  2121. function ChangeExtSprite(vp : pViewPort; oldsprite : pExtSprite; newsprite : pExtSprite; Const argv : array of PtrUInt) : LONGINT;
  2122. function ExtendFontTags(font : pTextFont; Const argv : array of PtrUInt) : ULONG;
  2123. function GetExtSprite(ss : pExtSprite; Const argv : array of PtrUInt) : LONGINT;
  2124. procedure GetRPAttrs(rp : pRastPort; Const argv : array of PtrUInt);
  2125. function ObtainBestPen(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG; Const argv : array of PtrUInt) : LONGINT;
  2126. procedure SetRPAttrs(rp : pRastPort; Const argv : array of PtrUInt);
  2127. function VideoControlTags(colorMap : pColorMap; Const argv : array of PtrUInt) : LongWord;
  2128. function WeighTAMatchTags(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; Const argv : array of PtrUInt) : smallint;
  2129. PROCEDURE SafeSetOutlinePen(w : pRastPort; c : byte);
  2130. PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
  2131. {$endif}
  2132. { gfxmacros }
  2133. PROCEDURE BNDRYOFF (w: pRastPort);
  2134. PROCEDURE InitAnimate (animkey: ppAnimOb);
  2135. PROCEDURE SetAfPt(w: pRastPort;p: Pointer; n: Byte);
  2136. PROCEDURE SetDrPt(w: pRastPort;p: Word);
  2137. PROCEDURE SetOPen(w: pRastPort;c: Byte);
  2138. PROCEDURE SetWrMsk(w: pRastPort; m: Byte);
  2139. procedure RemBob(Bob: PBob); inline;
  2140. PROCEDURE OFF_DISPLAY (cust: pCustom);
  2141. PROCEDURE ON_DISPLAY (cust: pCustom);
  2142. PROCEDURE OFF_SPRITE (cust: pCustom);
  2143. PROCEDURE ON_SPRITE (cust: pCustom);
  2144. PROCEDURE OFF_VBLANK (cust: pCustom);
  2145. PROCEDURE ON_VBLANK (cust: pCustom);
  2146. procedure DrawCircle(Rp: PRastPort; xCenter, yCenter, r: LongInt); inline;
  2147. function AreaCircle(Rp: PRastPort; xCenter, yCenter, r: SmallInt): LongWord; inline;
  2148. function RasSize(w, h: Word): Integer;
  2149. function CreateBitMap(Width, Height, Depth: Integer): PBitmap;
  2150. procedure DestroyBitMap(MyBM: PBitmap; Width, Height, Depth: Integer);
  2151. {$if defined(AMIGA_V1_2_ONLY)}
  2152. procedure SetABPenDrMd(Rp: PRastPort; APen, BPen, Drawmode: LongWord); inline;
  2153. function AllocBitMap(SizeX, SizeY, Depth, Flags: LongWord; friend_bitmap: PBitMap): PBitMap;
  2154. procedure FreeBitMap(Bm: PBitMap);
  2155. function GetBitMapAttr(Bm: PBitMap; AttrNum: LongWord): LongWord;
  2156. procedure SetRGB32(Vp: PViewPort; n: LongWord; r, g, b: LongWord); inline;
  2157. procedure SetRGB32CM(Cm: PColorMap; n, r, g, b: LongWord); inline;
  2158. procedure LoadRGB32(Vp: PViewPort ;const table: PLongWord);
  2159. {$endif}
  2160. IMPLEMENTATION
  2161. procedure RemBob(Bob: PBob);
  2162. begin
  2163. Bob^.Flags := Bob^.Flags or BOBSAWAY;
  2164. end;
  2165. function CreateBitMap(Width, Height, Depth: Integer): PBitmap;
  2166. var
  2167. MyBM: PBitmap;
  2168. i: Integer;
  2169. begin
  2170. MyBM := ExecAllocMem(SizeOf(TBitMap), MEMF_CLEAR or MEMF_PUBLIC);
  2171. for i := 0 to Depth - 1 do
  2172. MyBM^.Planes[i] := AllocRaster(Width, Height);
  2173. for i := Depth to 7 do
  2174. MyBM^.Planes[i] := nil;
  2175. MyBM^.Flags := MyBM^.Flags or BMF_STANDARD;
  2176. CreateBitMap := MyBM;
  2177. end;
  2178. procedure DestroyBitMap(MyBM: PBitmap; Width, Height, Depth: Integer);
  2179. var
  2180. i: Integer;
  2181. begin
  2182. if MyBM <> nil then
  2183. begin
  2184. for i := 0 to Depth - 1 do
  2185. if MyBM^.Planes[i] <> nil then
  2186. FreeRaster(MyBM^.Planes[i], Width, Height);
  2187. ExecFreeMem(MyBM, SizeOf(TBitMap));
  2188. end;
  2189. end;
  2190. {$if defined(AMIGA_V1_2_ONLY)}
  2191. procedure SetABPenDrMd(Rp: PRastPort; APen, BPen, Drawmode: LongWord);
  2192. begin
  2193. SetAPen(RP, APen);
  2194. SetBPen(RP, BPen);
  2195. SetDrMd(RP, DrawMode);
  2196. end;
  2197. function AllocBitMap(SizeX, SizeY, Depth, Flags: LongWord; friend_bitmap: PBitMap): PBitMap;
  2198. begin
  2199. AllocBitMap := CreateBitmap(SizeX, SizeY, Depth);
  2200. end;
  2201. procedure FreeBitMap(Bm: PBitMap);
  2202. begin
  2203. if bm <> nil then
  2204. DestroyBitMap(bm, Bm^.BytesPerRow * 8, bm^.Rows, bm^.Depth);
  2205. end;
  2206. function GetBitMapAttr(Bm: PBitMap; AttrNum: LongWord): LongWord;
  2207. begin
  2208. case AttrNum of
  2209. BMA_HEIGHT: GetBitMapAttr := bm^.Rows;
  2210. BMA_WIDTH: GetBitMapAttr := bm^.BytesPerRow * 8;
  2211. BMA_DEPTH: GetBitMapAttr := bm^.Depth;
  2212. BMA_FLAGS: GetBitMapAttr := bm^.Flags and (BMF_DISPLAYABLE or BMF_INTERLEAVED or BMF_STANDARD);
  2213. else
  2214. GetBitMapAttr := 0;
  2215. end;
  2216. end;
  2217. procedure SetRGB32(Vp: PViewPort; n: LongWord; r, g, b: LongWord); inline;
  2218. begin
  2219. SetRGB4(Vp, n, r shr 28, g shr 28, b shr 28);
  2220. end;
  2221. procedure SetRGB32CM(Cm: PColorMap; n, r, g, b: LongWord); inline;
  2222. begin
  2223. SetRGB4CM(Cm, n, r shr 28, g shr 28, b shr 28);
  2224. end;
  2225. procedure LoadRGB32(Vp: PViewPort; const Table: PLongWord);
  2226. var
  2227. Num: LongWord;
  2228. R: PLongWord;
  2229. Red, Green, Blue: LongWord;
  2230. i: Integer;
  2231. begin
  2232. R := Table;
  2233. Num := (R^) shr 16;
  2234. Inc(R);
  2235. //
  2236. for i := 0 to Num - 1 do
  2237. begin
  2238. Red := R^;
  2239. Inc(R);
  2240. Green := R^;
  2241. Inc(R);
  2242. Blue := R^;
  2243. Inc(R);
  2244. SetRGB32(Vp, i, Red, Green, Blue);
  2245. end;
  2246. end;
  2247. {$endif}
  2248. {$if not defined(AMIGA_V1_2_ONLY)}
  2249. function AllocSpriteData(bm : pBitMap; Const argv : array of PtrUInt) : pExtSprite;
  2250. begin
  2251. AllocSpriteData := AllocSpriteDataA(bm,@argv);
  2252. end;
  2253. function BestModeID(Const argv : array of PtrUInt) : ULONG;
  2254. begin
  2255. BestModeID := BestModeIDA(@argv);
  2256. end;
  2257. function ChangeExtSprite(vp : pViewPort; oldsprite : pExtSprite; newsprite : pExtSprite; Const argv : array of PtrUInt) : LONGINT;
  2258. begin
  2259. ChangeExtSprite := ChangeExtSpriteA(vp,oldsprite,newsprite,@argv);
  2260. end;
  2261. function ExtendFontTags(font : pTextFont; Const argv : array of PtrUInt) : ULONG;
  2262. begin
  2263. ExtendFontTags := ExtendFont(font,@argv);
  2264. end;
  2265. function GetExtSprite(ss : pExtSprite; Const argv : array of PtrUInt) : LONGINT;
  2266. begin
  2267. GetExtSprite := GetExtSpriteA(ss,@argv);
  2268. end;
  2269. procedure GetRPAttrs(rp : pRastPort; Const argv : array of PtrUInt);
  2270. begin
  2271. GetRPAttrsA(rp,@argv);
  2272. end;
  2273. function ObtainBestPen(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG; Const argv : array of PtrUInt) : LONGINT;
  2274. begin
  2275. ObtainBestPen := ObtainBestPenA(cm,r,g,b,@argv);
  2276. end;
  2277. procedure SetRPAttrs(rp : pRastPort; Const argv : array of PtrUInt);
  2278. begin
  2279. SetRPAttrsA(rp,@argv);
  2280. end;
  2281. function VideoControlTags(colorMap : pColorMap; Const argv : array of PtrUInt) : LongWord;
  2282. begin
  2283. VideoControlTags := VideoControl(colorMap,@argv);
  2284. end;
  2285. function WeighTAMatchTags(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; Const argv : array of PtrUInt) : smallint;
  2286. begin
  2287. WeighTAMatchTags := WeighTAMatch(reqTextAttr,targetTextAttr,@argv);
  2288. end;
  2289. PROCEDURE SafeSetOutlinePen(w : pRastPort; c : byte);
  2290. begin
  2291. IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN begin
  2292. w^.AOlPen := c;
  2293. w^.Flags := w^.Flags OR AREAOUTLINE;
  2294. END ELSE begin
  2295. c := SetOutlinePen(w,c);
  2296. END;
  2297. END;
  2298. PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
  2299. VAR x : smallint ;
  2300. BEGIN
  2301. IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN w^.Mask := BYTE(m)
  2302. ELSE x := SetWriteMask( w, m );
  2303. END;
  2304. {$endif}
  2305. PROCEDURE BNDRYOFF (w: pRastPort);
  2306. BEGIN
  2307. WITH w^ DO BEGIN
  2308. Flags := Flags AND (NOT AREAOUTLINE);
  2309. END;
  2310. END;
  2311. PROCEDURE InitAnimate (animkey: ppAnimOb);
  2312. BEGIN
  2313. animkey^ := NIL;
  2314. END;
  2315. PROCEDURE SetAfPt(w: pRastPort;p: Pointer; n: Byte);
  2316. BEGIN
  2317. WITH w^ DO
  2318. BEGIN
  2319. AreaPtrn := p;
  2320. AreaPtSz := n;
  2321. END;
  2322. END;
  2323. PROCEDURE SetDrPt(w: pRastPort;p: Word);
  2324. BEGIN
  2325. WITH w^ DO
  2326. BEGIN
  2327. LinePtrn := p;
  2328. Flags := Flags OR FRST_DOT;
  2329. linpatcnt := 15;
  2330. END;
  2331. END;
  2332. PROCEDURE SetOPen(w: pRastPort;c: Byte);
  2333. BEGIN
  2334. WITH w^ DO
  2335. BEGIN
  2336. AOlPen := c;
  2337. Flags := Flags OR AREAOUTLINE;
  2338. END;
  2339. END;
  2340. { This FUNCTION is fine, but FOR OS39 the SetWriteMask() gfx FUNCTION
  2341. should be prefered because it SHOULD operate WITH gfx boards as well.
  2342. At least I hope it does.... }
  2343. PROCEDURE SetWrMsk(w: pRastPort; m: Byte);
  2344. BEGIN
  2345. w^.Mask := m;
  2346. END;
  2347. PROCEDURE OFF_DISPLAY (cust: pCustom);
  2348. BEGIN
  2349. cust^.dmacon := BITCLR OR DMAF_RASTER;
  2350. END;
  2351. PROCEDURE ON_DISPLAY (cust: pCustom);
  2352. BEGIN
  2353. cust^.dmacon := BITSET OR DMAF_RASTER;
  2354. END;
  2355. PROCEDURE OFF_SPRITE (cust: pCustom);
  2356. BEGIN
  2357. cust^.dmacon := BITCLR OR DMAF_SPRITE;
  2358. END;
  2359. PROCEDURE ON_SPRITE (cust: pCustom);
  2360. BEGIN
  2361. cust^.dmacon := BITSET OR DMAF_SPRITE;
  2362. END;
  2363. PROCEDURE OFF_VBLANK (cust: pCustom);
  2364. BEGIN
  2365. cust^.intena := BITCLR OR INTF_VERTB;
  2366. END;
  2367. PROCEDURE ON_VBLANK (cust: pCustom);
  2368. BEGIN
  2369. cust^.intena := BITSET OR INTF_VERTB;
  2370. END;
  2371. function RasSize(w, h: Word): Integer; inline;
  2372. begin
  2373. RasSize := h * (((w + 15) shr 3) and $FFFE);
  2374. end;
  2375. procedure DrawCircle(Rp: PRastPort; xCenter, yCenter, r: LongInt); inline;
  2376. begin
  2377. DrawEllipse(Rp, xCenter, yCenter, r, r);
  2378. end;
  2379. function AreaCircle(Rp: PRastPort; xCenter, yCenter, r: SmallInt): LongWord; inline;
  2380. begin
  2381. AreaCircle := AreaEllipse(Rp, xCenter, yCenter, r, r);
  2382. end;
  2383. const
  2384. { Change VERSION and LIBVERSION to proper values }
  2385. VERSION : string[2] = '0';
  2386. LIBVERSION : longword = 0;
  2387. initialization
  2388. GfxBase := PGFXBase(OpenLibrary(GRAPHICSNAME,LIBVERSION));
  2389. finalization
  2390. if Assigned(GfxBase) then
  2391. CloseLibrary(PLibrary(GfxBase));
  2392. END. (* UNIT GRAPHICS *)