picasso96api.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  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) 2001-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. First version of unit Picasso96Api
  15. 27 Feb. 2001.
  16. Updated to fpc 1.0.7
  17. 08 Jan 2003
  18. Added the defines use_amiga_smartlink and
  19. use_auto_openlib.
  20. 12 Jan 2003.
  21. Changed cardinal > longword.
  22. Changed startcode for unit.
  23. 11 Feb 2003.
  24. [email protected]
  25. }
  26. UNIT PICASSO96API;
  27. INTERFACE
  28. USES Exec, utility, agraphics, intuition;
  29. { Picasso96.h -- include File
  30. (C) Copyright 1996-98 Alexander Kneer & Tobias Abt
  31. All Rights Reserved.
  32. }
  33. const
  34. PICASSO96APINAME : PAnsiChar = 'Picasso96API.library';
  35. {************************************************************************}
  36. { Types for RGBFormat used
  37. }
  38. type
  39. RGBFTYPE = (
  40. RGBFB_NONE,
  41. RGBFB_CLUT,
  42. RGBFB_R8G8B8,
  43. RGBFB_B8G8R8,
  44. RGBFB_R5G6B5PC,
  45. RGBFB_R5G5B5PC,
  46. RGBFB_A8R8G8B8,
  47. RGBFB_A8B8G8R8,
  48. RGBFB_R8G8B8A8,
  49. RGBFB_B8G8R8A8,
  50. RGBFB_R5G6B5,
  51. RGBFB_R5G5B5,
  52. RGBFB_B5G6R5PC,
  53. RGBFB_B5G5R5PC,
  54. RGBFB_Y4U2V2,
  55. RGBFB_Y4U1V1,
  56. RGBFB_MaxFormats);
  57. const
  58. RGBFF_NONE = 1 shl 0;
  59. RGBFF_CLUT = 1 shl 1;
  60. RGBFF_R8G8B8 = 1 shl 2;
  61. RGBFF_B8G8R8 = 1 shl 3;
  62. RGBFF_R5G6B5PC = 1 shl 4;
  63. RGBFF_R5G5B5PC = 1 shl 5;
  64. RGBFF_A8R8G8B8 = 1 shl 6;
  65. RGBFF_A8B8G8R8 = 1 shl 7;
  66. RGBFF_R8G8B8A8 = 1 shl 8;
  67. RGBFF_B8G8R8A8 = 1 shl 9;
  68. RGBFF_R5G6B5 = 1 shl 10;
  69. RGBFF_R5G5B5 = 1 shl 11;
  70. RGBFF_B5G6R5PC = 1 shl 12;
  71. RGBFF_B5G5R5PC = 1 shl 13;
  72. RGBFF_Y4U2V2 = 1 shl 14;
  73. RGBFF_Y4U1V1 = 1 shl 15;
  74. RGBFF_HICOLOR = ((((RGBFF_R5G6B5PC or RGBFF_R5G5B5PC) or RGBFF_R5G6B5) or RGBFF_R5G5B5) or RGBFF_B5G6R5PC) or RGBFF_B5G5R5PC;
  75. RGBFF_TRUECOLOR = RGBFF_R8G8B8 or RGBFF_B8G8R8;
  76. RGBFF_TRUEALPHA = ((RGBFF_A8R8G8B8 or RGBFF_A8B8G8R8) or RGBFF_R8G8B8A8) or RGBFF_B8G8R8A8;
  77. { }
  78. { Flags for p96AllocBitMap
  79. }
  80. BMF_USERPRIVATE = $8000;
  81. { private user bitmap that will never
  82. be put to a board, but may be used as a temporary render buffer and accessed
  83. with OS blit functions, too. Bitmaps allocated with this flag do not need to
  84. be locked. }
  85. { }
  86. { Attributes for p96GetBitMapAttr
  87. }
  88. P96BMA_WIDTH = 0;
  89. P96BMA_HEIGHT = 1;
  90. P96BMA_DEPTH = 2;
  91. P96BMA_MEMORY = 3;
  92. P96BMA_BYTESPERROW = 4;
  93. P96BMA_BYTESPERPIXEL = 5;
  94. P96BMA_BITSPERPIXEL = 6;
  95. P96BMA_RGBFORMAT = 7;
  96. P96BMA_ISP96 = 8;
  97. P96BMA_ISONBOARD = 9;
  98. P96BMA_BOARDMEMBASE = 10;
  99. P96BMA_BOARDIOBASE = 11;
  100. P96BMA_BOARDMEMIOBASE = 12;
  101. { }
  102. { Attributes for p96GetModeIDAttr
  103. }
  104. P96IDA_WIDTH = 0;
  105. P96IDA_HEIGHT = 1;
  106. P96IDA_DEPTH = 2;
  107. P96IDA_BYTESPERPIXEL = 3;
  108. P96IDA_BITSPERPIXEL = 4;
  109. P96IDA_RGBFORMAT = 5;
  110. P96IDA_ISP96 = 6;
  111. P96IDA_BOARDNUMBER = 7;
  112. P96IDA_STDBYTESPERROW = 8;
  113. P96IDA_BOARDNAME = 9;
  114. P96IDA_COMPATIBLEFORMATS = 10;
  115. P96IDA_VIDEOCOMPATIBLE = 11;
  116. P96IDA_PABLOIVCOMPATIBLE = 12;
  117. P96IDA_PALOMAIVCOMPATIBLE = 13;
  118. { }
  119. { Tags for p96BestModeIDTagList
  120. }
  121. P96BIDTAG_Dummy = TAG_USER + 96;
  122. P96BIDTAG_FormatsAllowed = P96BIDTAG_Dummy + $0001;
  123. P96BIDTAG_FormatsForbidden = P96BIDTAG_Dummy + $0002;
  124. P96BIDTAG_NominalWidth = P96BIDTAG_Dummy + $0003;
  125. P96BIDTAG_NominalHeight = P96BIDTAG_Dummy + $0004;
  126. P96BIDTAG_Depth = P96BIDTAG_Dummy + $0005;
  127. P96BIDTAG_VideoCompatible = P96BIDTAG_Dummy + $0006;
  128. P96BIDTAG_PabloIVCompatible = P96BIDTAG_Dummy + $0007;
  129. P96BIDTAG_PalomaIVCompatible = P96BIDTAG_Dummy + $0008;
  130. { }
  131. { Tags for p96RequestModeIDTagList
  132. }
  133. P96MA_Dummy = (TAG_USER + $10000) + 96;
  134. P96MA_MinWidth = P96MA_Dummy + $0001;
  135. P96MA_MinHeight = P96MA_Dummy + $0002;
  136. P96MA_MinDepth = P96MA_Dummy + $0003;
  137. P96MA_MaxWidth = P96MA_Dummy + $0004;
  138. P96MA_MaxHeight = P96MA_Dummy + $0005;
  139. P96MA_MaxDepth = P96MA_Dummy + $0006;
  140. P96MA_DisplayID = P96MA_Dummy + $0007;
  141. P96MA_FormatsAllowed = P96MA_Dummy + $0008;
  142. P96MA_FormatsForbidden = P96MA_Dummy + $0009;
  143. P96MA_WindowTitle = P96MA_Dummy + $000a;
  144. P96MA_OKText = P96MA_Dummy + $000b;
  145. P96MA_CancelText = P96MA_Dummy + $000c;
  146. P96MA_Window = P96MA_Dummy + $000d;
  147. P96MA_PubScreenName = P96MA_Dummy + $000e;
  148. P96MA_Screen = P96MA_Dummy + $000f;
  149. P96MA_VideoCompatible = P96MA_Dummy + $0010;
  150. P96MA_PabloIVCompatible = P96MA_Dummy + $0011;
  151. P96MA_PalomaIVCompatible = P96MA_Dummy + $0012;
  152. { }
  153. { Tags for p96OpenScreenTagList
  154. }
  155. P96SA_Dummy = (TAG_USER + $20000) + 96;
  156. P96SA_Left = P96SA_Dummy + $0001;
  157. P96SA_Top = P96SA_Dummy + $0002;
  158. P96SA_Width = P96SA_Dummy + $0003;
  159. P96SA_Height = P96SA_Dummy + $0004;
  160. P96SA_Depth = P96SA_Dummy + $0005;
  161. P96SA_DetailPen = P96SA_Dummy + $0006;
  162. P96SA_BlockPen = P96SA_Dummy + $0007;
  163. P96SA_Title = P96SA_Dummy + $0008;
  164. P96SA_Colors = P96SA_Dummy + $0009;
  165. P96SA_ErrorCode = P96SA_Dummy + $000a;
  166. P96SA_Font = P96SA_Dummy + $000b;
  167. P96SA_SysFont = P96SA_Dummy + $000c;
  168. P96SA_Type = P96SA_Dummy + $000d;
  169. P96SA_BitMap = P96SA_Dummy + $000e;
  170. P96SA_PubName = P96SA_Dummy + $000f;
  171. P96SA_PubSig = P96SA_Dummy + $0010;
  172. P96SA_PubTask = P96SA_Dummy + $0011;
  173. P96SA_DisplayID = P96SA_Dummy + $0012;
  174. P96SA_DClip = P96SA_Dummy + $0013;
  175. P96SA_ShowTitle = P96SA_Dummy + $0014;
  176. P96SA_Behind = P96SA_Dummy + $0015;
  177. P96SA_Quiet = P96SA_Dummy + $0016;
  178. P96SA_AutoScroll = P96SA_Dummy + $0017;
  179. P96SA_Pens = P96SA_Dummy + $0018;
  180. P96SA_SharePens = P96SA_Dummy + $0019;
  181. P96SA_BackFill = P96SA_Dummy + $001a;
  182. P96SA_Colors32 = P96SA_Dummy + $001b;
  183. P96SA_VideoControl = P96SA_Dummy + $001c;
  184. P96SA_RGBFormat = P96SA_Dummy + $001d;
  185. P96SA_NoSprite = P96SA_Dummy + $001e;
  186. P96SA_NoMemory = P96SA_Dummy + $001f;
  187. P96SA_RenderFunc = P96SA_Dummy + $0020;
  188. P96SA_SaveFunc = P96SA_Dummy + $0021;
  189. P96SA_UserData = P96SA_Dummy + $0022;
  190. P96SA_Alignment = P96SA_Dummy + $0023;
  191. P96SA_FixedScreen = P96SA_Dummy + $0024;
  192. P96SA_Exclusive = P96SA_Dummy + $0025;
  193. P96SA_ConstantBytesPerRow = P96SA_Dummy + $0026;
  194. { }
  195. {
  196. }
  197. MODENAMELENGTH = 48;
  198. type
  199. pubyte = ^ubyte;
  200. PP96Mode = ^TP96Mode;
  201. TP96Mode = record
  202. Node : tNode;
  203. Description : array[0..(MODENAMELENGTH)-1] of AnsiChar;
  204. Width : UWORD;
  205. Height : UWORD;
  206. Depth : UWORD;
  207. DisplayID : ULONG;
  208. end;
  209. { }
  210. { Structure to describe graphics data
  211. short description of the entries:
  212. Memory: pointer to graphics data
  213. BytesPerRow: distance in bytes between one pixel and its neighbour up
  214. or down.
  215. pad: private, not used.
  216. RGBFormat: RGBFormat of the data.
  217. }
  218. PRenderInfo = ^TRenderInfo;
  219. TRenderInfo = record
  220. Memory : APTR;
  221. BytesPerRow : WORD;
  222. pad : WORD;
  223. RGBFormat : RGBFTYPE;
  224. end;
  225. { }
  226. { Structure for p96WriteTrueColorData() and p96ReadTrueColorData()
  227. short description of the entries:
  228. PixelDistance: distance in bytes between the red (must be the same as
  229. for the green or blue) component of one pixel and its
  230. next neighbour to the left or right.
  231. BytesPerRow: distance in bytes between the red (must be the same as
  232. for the green or blue) component of one pixel and its
  233. next neighbour up or down.
  234. RedData: pointer to the red component of the upper left pixel.
  235. GreenData, BlueData: the same as above.
  236. examples (for an array width of 640 pixels):
  237. a) separate arrays for each color:
  238. (1, 640, red, green, blue );
  239. b) plain 24 bit RGB data:
  240. (3, 640 3, array, array+1, array+2 );
  241. c) 24 bit data, arranged as ARGB:
  242. (4, 640 4, array+1, array+2, array+3 );
  243. }
  244. PTrueColorInfo = ^TTrueColorInfo;
  245. TTrueColorInfo = record
  246. PixelDistance : ULONG;
  247. BytesPerRow : ULONG;
  248. RedData : PUBYTE;
  249. GreenData : PUBYTE;
  250. BlueData : PUBYTE;
  251. end;
  252. { }
  253. { Tags for PIPs
  254. }
  255. const
  256. P96PIP_Dummy = (TAG_USER + $30000) + 96;
  257. { RGBFTYPE (I) }
  258. P96PIP_SourceFormat = P96PIP_Dummy + 1;
  259. { struct BitMap (G) }
  260. P96PIP_SourceBitMap = P96PIP_Dummy + 2;
  261. { struct RastPort (G) }
  262. P96PIP_SourceRPort = P96PIP_Dummy + 3;
  263. { ULONG (I) }
  264. P96PIP_SourceWidth = P96PIP_Dummy + 4;
  265. { ULONG (I) }
  266. P96PIP_SourceHeight = P96PIP_Dummy + 5;
  267. { ULONG (I) default: PIPT_MemoryWindow }
  268. P96PIP_Type = P96PIP_Dummy + 6;
  269. { LONG (I) }
  270. P96PIP_ErrorCode = P96PIP_Dummy + 7;
  271. { ULONG (IGS) default: 0 }
  272. P96PIP_Brightness = P96PIP_Dummy + 8;
  273. { ULONG (I) default: 0 }
  274. P96PIP_Left = P96PIP_Dummy + 9;
  275. { ULONG (I) default: 0 }
  276. P96PIP_Top = P96PIP_Dummy + 10;
  277. { ULONG (I) default: inner width of window }
  278. P96PIP_Width = P96PIP_Dummy + 11;
  279. { ULONG (I) default: inner height of window }
  280. P96PIP_Height = P96PIP_Dummy + 12;
  281. { ULONG (I) default: PIPRel_Width|PIPRel_Height }
  282. P96PIP_Relativity = P96PIP_Dummy + 13;
  283. { struct ColorSpec (IS)
  284. ti_Data is an array of struct ColorSpec,
  285. terminated by ColorIndex = -1. Specifies
  286. initial screen palette colors.
  287. Also see P96PIP_Colors32.
  288. This only works with CLUT PIPs on non-CLUT
  289. screens. For CLUT PIPs on CLUT screens the
  290. PIP colors share the screen palette.
  291. }
  292. P96PIP_Colors = P96PIP_Dummy + 14;
  293. { ULONG (IS)
  294. Tag to set the palette colors at 32 bits-per-gun.
  295. ti_Data is a pointer to a table to be passed to
  296. the graphics.library/LoadRGB32() function.
  297. This format supports both runs of color
  298. registers and sparse registers. See the
  299. autodoc for that function for full details.
  300. Any color set here has precedence over
  301. the same register set by P96PIP_Colors.
  302. This only works with CLUT PIPs on non-CLUT
  303. screens. For CLUT PIPs on CLUT screens the
  304. PIP colors share the screen palette.
  305. }
  306. P96PIP_Colors32 = P96PIP_Dummy + 15;
  307. P96PIP_NoMemory = P96PIP_Dummy + 16;
  308. P96PIP_RenderFunc = P96PIP_Dummy + 17;
  309. P96PIP_SaveFunc = P96PIP_Dummy + 18;
  310. P96PIP_UserData = P96PIP_Dummy + 19;
  311. P96PIP_Alignment = P96PIP_Dummy + 20;
  312. P96PIP_ConstantBytesPerRow = P96PIP_Dummy + 21;
  313. P96PIP_AllowCropping = P96PIP_Dummy + 22;
  314. P96PIP_InitialIntScaling = P96PIP_Dummy + 23;
  315. PIPT_MemoryWindow = 0;
  316. PIPT_VideoWindow = 1;
  317. PIPT_NUMTYPES = 2;
  318. P96PIPT_MemoryWindow = PIPT_MemoryWindow;
  319. P96PIPT_VideoWindow = PIPT_VideoWindow;
  320. { P96PIP_Left is relative to the right side (negative value) }
  321. PIPRel_Right = 1;
  322. { P96PIP_Top is relative to the bottom (negative value) }
  323. PIPRel_Bottom = 2;
  324. { P96PIP_Width is amount of pixels not used by PIP at the
  325. right side of the window (negative value) }
  326. PIPRel_Width = 4;
  327. { P96PIP_Height is amount of pixels not used by PIP at the
  328. window bottom (negative value) }
  329. PIPRel_Height = 8;
  330. { couldn't get normal memory }
  331. PIPERR_NOMEMORY = 1;
  332. { Failed to attach to a screen }
  333. PIPERR_ATTACHFAIL = 2;
  334. { PIP not available for other reason }
  335. PIPERR_NOTAVAILABLE = 3;
  336. { couldn't get a free pen for occlusion }
  337. PIPERR_OUTOFPENS = 4;
  338. { type, width, height or format invalid }
  339. PIPERR_BADDIMENSIONS = 5;
  340. { couldn't open window }
  341. PIPERR_NOWINDOW = 6;
  342. { specified alignment is not ok }
  343. PIPERR_BADALIGNMENT = 7;
  344. { pip would be cropped, but isn't allowed to }
  345. PIPERR_CROPPED = 8;
  346. { }
  347. { Tags for P96GetRTGDataTagList
  348. }
  349. P96RD_Dummy = (TAG_USER + $40000) + 96;
  350. P96RD_NumberOfBoards = P96RD_Dummy + 1;
  351. { }
  352. { Tags for P96GetBoardDataTagList
  353. }
  354. P96BD_Dummy = (TAG_USER + $50000) + 96;
  355. P96BD_BoardName = P96BD_Dummy + 1;
  356. P96BD_ChipName = P96BD_Dummy + 2;
  357. P96BD_TotalMemory = P96BD_Dummy + 4;
  358. P96BD_FreeMemory = P96BD_Dummy + 5;
  359. P96BD_LargestFreeMemory = P96BD_Dummy + 6;
  360. P96BD_MonitorSwitch = P96BD_Dummy + 7;
  361. P96BD_RGBFormats = P96BD_Dummy + 8;
  362. P96BD_MemoryClock = P96BD_Dummy + 9;
  363. { }
  364. { }
  365. VAR P96Base : pLibrary = nil;
  366. FUNCTION p96AllocBitMap(SizeX : Ulong location 'd0'; SizeY : Ulong location 'd1'; Depth : Ulong location 'd2'; Flags : Ulong location 'd3'; Friend : pBitMap location 'a0'; RGBFormat : RGBFTYPE location 'd7') : pBitMap; syscall P96Base 030;
  367. PROCEDURE p96FreeBitMap(BitMap : pBitMap location 'a0'); syscall P96Base 036;
  368. FUNCTION p96GetBitMapAttr(BitMap : pBitMap location 'a0'; Attribute : Ulong location 'd0') : Ulong; syscall P96Base 042;
  369. FUNCTION p96LockBitMap(BitMap : pBitMap location 'a0'; Buffer : PAnsiChar location 'a1'; Size : Ulong location 'd0') : LONGINT; syscall P96Base 048;
  370. PROCEDURE p96UnlockBitMap(BitMap : pBitMap location 'a0'; Lock : LONGINT location 'd0'); syscall P96Base 054;
  371. FUNCTION p96BestModeIDTagList(Tags : pTagItem location 'a0') : Ulong; syscall P96Base 060;
  372. FUNCTION p96RequestModeIDTagList(Tags : pTagItem location 'a0') : Ulong; syscall P96Base 066;
  373. FUNCTION p96AllocModeListTagList(Tags : pTagItem location 'a0') : pList; syscall P96Base 072;
  374. PROCEDURE p96FreeModeList(List : pList location 'a0'); syscall P96Base 078;
  375. FUNCTION p96GetModeIDAttr(Mode : Ulong location 'd0'; Attribute : Ulong location 'd1') : Ulong; syscall P96Base 084;
  376. FUNCTION p96OpenScreenTagList(Tags : pTagItem location 'a0') : pScreen; syscall P96Base 090;
  377. FUNCTION p96CloseScreen(Screen : pScreen location 'a0') : wordbool; syscall P96Base 096;
  378. PROCEDURE p96WritePixelArray(ri : pRenderInfo location 'a0'; SrcX : WORD location 'd0'; SrcY : WORD location 'd1'; rp : pRastPort location 'a1'; DestX : WORD location 'd2'; DestY : WORD location 'd3'; SizeX : WORD location 'd4'; SizeY : WORD location 'd5'); syscall P96Base 102;
  379. PROCEDURE p96ReadPixelArray(ri : pRenderInfo location 'a0'; DestX : WORD location 'd0'; DestY : WORD location 'd1'; rp : pRastPort location 'a1'; SrcX : WORD location 'd2'; SrcY : WORD location 'd3'; SizeX : WORD location 'd4'; SizeY : WORD location 'd5'); syscall P96Base 108;
  380. FUNCTION p96WritePixel(rp : pRastPort location 'a1'; x : WORD location 'd0'; y : WORD location 'd1'; color : Ulong location 'd2') : Ulong; syscall P96Base 114;
  381. FUNCTION p96ReadPixel(rp : pRastPort location 'a1'; x : WORD location 'd0'; y : WORD location 'd1') : Ulong; syscall P96Base 120;
  382. PROCEDURE p96RectFill(rp : pRastPort location 'a1'; MinX : WORD location 'd0'; MinY : WORD location 'd1'; MaxX : WORD location 'd2'; MaxY : WORD location 'd3'; color : Ulong location 'd4'); syscall P96Base 126;
  383. PROCEDURE p96WriteTrueColorData(tci : pTrueColorInfo location 'a0'; SrcX : WORD location 'd0'; SrcY : WORD location 'd1'; rp : pRastPort location 'a1'; DestX : WORD location 'd2'; DestY : WORD location 'd3'; SizeX : WORD location 'd4'; SizeY : WORD location 'd5'); syscall P96Base 132;
  384. PROCEDURE p96ReadTrueColorData(tci : pTrueColorInfo location 'a0'; DestX : WORD location 'd0'; DestY : WORD location 'd1'; rp : pRastPort location 'a1'; SrcX : WORD location 'd2'; SrcY : WORD location 'd3'; SizeX : WORD location 'd4'; SizeY : WORD location 'd5'); syscall P96Base 138;
  385. FUNCTION p96PIP_OpenTagList(Tags : pTagItem location 'a0') : pWindow; syscall P96Base 144;
  386. FUNCTION p96PIP_Close(Window : pWindow location 'a0') : wordbool; syscall P96Base 150;
  387. FUNCTION p96PIP_SetTagList(Window : pWindow location 'a0'; Tags : pTagItem location 'a1') : LONGINT; syscall P96Base 156;
  388. FUNCTION p96PIP_GetTagList(Window : pWindow location 'a0'; Tags : pTagItem location 'a1') : LONGINT; syscall P96Base 162;
  389. FUNCTION p96GetRTGDataTagList(Tags : pTagItem location 'a0') : LONGINT; syscall P96Base 180;
  390. FUNCTION p96GetBoardDataTagList(Board : Ulong location 'd0'; Tags : pTagItem location 'a0') : LONGINT; syscall P96Base 186;
  391. FUNCTION p96EncodeColor(RGBFormat : RGBFTYPE location 'd0'; Color : Ulong location 'd1') : Ulong; syscall P96Base 192;
  392. {
  393. Functions and procedures with array of PtrUInt go here
  394. }
  395. FUNCTION p96BestModeIDTags(const Tags : array of PtrUInt) : longword;
  396. FUNCTION p96RequestModeIDTags(const Tags : array of PtrUInt) : longword;
  397. FUNCTION p96AllocModeListTags(const Tags : array of PtrUInt) : pList;
  398. FUNCTION p96OpenScreenTags(const Tags : array of PtrUInt) : pScreen;
  399. FUNCTION p96PIP_OpenTags(const Tags : array of PtrUInt) : pWindow;
  400. FUNCTION p96PIP_SetTags(Window : pWindow; const Tags : array of PtrUInt) : LONGINT;
  401. FUNCTION p96PIP_GetTags(Window : pWindow; const Tags : array of PtrUInt) : LONGINT;
  402. FUNCTION p96GetRTGDataTags(const Tags : array of PtrUInt) : LONGINT;
  403. FUNCTION p96GetBoardDataTags(Board : longword; const Tags : array of PtrUInt) : LONGINT;
  404. IMPLEMENTATION
  405. {
  406. Functions and procedures with array of PtrUInt go here
  407. }
  408. FUNCTION p96BestModeIDTags(const Tags : array of PtrUInt) : longword;
  409. begin
  410. p96BestModeIDTags := p96BestModeIDTagList(@Tags);
  411. end;
  412. FUNCTION p96RequestModeIDTags(const Tags : array of PtrUInt) : longword;
  413. begin
  414. p96RequestModeIDTags := p96RequestModeIDTagList(@Tags);
  415. end;
  416. FUNCTION p96AllocModeListTags(const Tags : array of PtrUInt) : pList;
  417. begin
  418. p96AllocModeListTags := p96AllocModeListTagList(@Tags);
  419. end;
  420. FUNCTION p96OpenScreenTags(const Tags : array of PtrUInt) : pScreen;
  421. begin
  422. p96OpenScreenTags := p96OpenScreenTagList(@Tags);
  423. end;
  424. FUNCTION p96PIP_OpenTags(const Tags : array of PtrUInt) : pWindow;
  425. begin
  426. p96PIP_OpenTags := p96PIP_OpenTagList(@Tags);
  427. end;
  428. FUNCTION p96PIP_SetTags(Window : pWindow; const Tags : array of PtrUInt) : LONGINT;
  429. begin
  430. p96PIP_SetTags := p96PIP_SetTagList(Window , @Tags);
  431. end;
  432. FUNCTION p96PIP_GetTags(Window : pWindow; const Tags : array of PtrUInt) : LONGINT;
  433. begin
  434. p96PIP_GetTags := p96PIP_GetTagList(Window , @Tags);
  435. end;
  436. FUNCTION p96GetRTGDataTags(const Tags : array of PtrUInt) : LONGINT;
  437. begin
  438. p96GetRTGDataTags := p96GetRTGDataTagList(@Tags);
  439. end;
  440. FUNCTION p96GetBoardDataTags(Board : longword; const Tags : array of PtrUInt) : LONGINT;
  441. begin
  442. p96GetBoardDataTags := p96GetBoardDataTagList(Board , @Tags);
  443. end;
  444. const
  445. { Change VERSION and LIBVERSION to proper values }
  446. VERSION : string[2] = '0';
  447. LIBVERSION : longword = 0;
  448. initialization
  449. P96Base := OpenLibrary(PICASSO96APINAME,LIBVERSION);
  450. finalization
  451. if Assigned(P96Base) then
  452. CloseLibrary(P96Base);
  453. END. (* UNIT PICASSO96API *)