amunits: syscallified bullet, colorwheel and zlib

git-svn-id: trunk@28685 -
This commit is contained in:
Károly Balogh 2014-09-17 21:57:11 +00:00
parent 8ec15cb6ba
commit c0620d8ce0
4 changed files with 19 additions and 268 deletions

View File

@ -31,11 +31,7 @@
nils.sjoholm@mailbox.swipnet.se Nils Sjoholm
}
{$I useamigasmartlink.inc}
{$ifdef use_amiga_smartlink}
{$smartlink on}
{$endif use_amiga_smartlink}
{$PACKRECORDS 2}
unit bullet;
@ -378,11 +374,11 @@ const
BULLETNAME : PChar = 'bullet.library';
PROCEDURE CloseEngine(glyphEngine : pGlyphEngine);
FUNCTION ObtainInfoA(glyphEngine : pGlyphEngine; tagList : pTagItem) : ULONG;
FUNCTION OpenEngine : pGlyphEngine;
FUNCTION ReleaseInfoA(glyphEngine : pGlyphEngine; tagList : pTagItem) : ULONG;
FUNCTION SetInfoA(glyphEngine : pGlyphEngine; tagList : pTagItem) : ULONG;
PROCEDURE CloseEngine(glyphEngine : pGlyphEngine location 'a0'); syscall BulletBase 036;
FUNCTION ObtainInfoA(glyphEngine : pGlyphEngine location 'a0'; tagList : pTagItem location 'a1') : ULONG; syscall BulletBase 048;
FUNCTION OpenEngine : pGlyphEngine; syscall BulletBase 030;
FUNCTION ReleaseInfoA(glyphEngine : pGlyphEngine location 'a0'; tagList : pTagItem location 'a1') : ULONG; syscall BulletBase 054;
FUNCTION SetInfoA(glyphEngine : pGlyphEngine location 'a0'; tagList : pTagItem location 'a1') : ULONG; syscall BulletBase 042;
{Here we read how to compile this unit}
{You can remove this include and use a define instead}
@ -405,68 +401,6 @@ uses
amsgbox;
{$endif dont_use_openlib}
PROCEDURE CloseEngine(glyphEngine : pGlyphEngine);
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L glyphEngine,A0
MOVEA.L BulletBase,A6
JSR -036(A6)
MOVEA.L (A7)+,A6
END;
END;
FUNCTION ObtainInfoA(glyphEngine : pGlyphEngine; tagList : pTagItem) : ULONG;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L glyphEngine,A0
MOVEA.L tagList,A1
MOVEA.L BulletBase,A6
JSR -048(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION OpenEngine : pGlyphEngine;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L BulletBase,A6
JSR -030(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION ReleaseInfoA(glyphEngine : pGlyphEngine; tagList : pTagItem) : ULONG;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L glyphEngine,A0
MOVEA.L tagList,A1
MOVEA.L BulletBase,A6
JSR -054(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION SetInfoA(glyphEngine : pGlyphEngine; tagList : pTagItem) : ULONG;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L glyphEngine,A0
MOVEA.L tagList,A1
MOVEA.L BulletBase,A6
JSR -042(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
const
{ Change VERSION and LIBVERSION to proper values }
@ -550,6 +484,3 @@ begin
END. (* UNIT BULLET *)

View File

@ -26,11 +26,7 @@
nils.sjoholm@mailbox.swipnet.se Nils Sjoholm
}
{$I useamigasmartlink.inc}
{$ifdef use_amiga_smartlink}
{$smartlink on}
{$endif use_amiga_smartlink}
{$PACKRECORDS 2}
UNIT colorwheel;
@ -84,36 +80,13 @@ VAR ColorWheelBase : pLibrary;
const
COLORWHEELNAME : Pchar = 'colorwheel.library';
PROCEDURE ConvertHSBToRGB(hsb : pColorWheelHSB; rgb : pColorWheelRGB);
PROCEDURE ConvertRGBToHSB(rgb : pColorWheelRGB; hsb : pColorWheelHSB);
PROCEDURE ConvertHSBToRGB(hsb : pColorWheelHSB location 'a0'; rgb : pColorWheelRGB location 'a1'); syscall ColorWheelBase 030;
PROCEDURE ConvertRGBToHSB(rgb : pColorWheelRGB location 'a0'; hsb : pColorWheelHSB location 'a1'); syscall ColorWheelBase 036;
IMPLEMENTATION
uses amsgbox;
PROCEDURE ConvertHSBToRGB(hsb : pColorWheelHSB; rgb : pColorWheelRGB);
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L hsb,A0
MOVEA.L rgb,A1
MOVEA.L ColorWheelBase,A6
JSR -030(A6)
MOVEA.L (A7)+,A6
END;
END;
PROCEDURE ConvertRGBToHSB(rgb : pColorWheelRGB; hsb : pColorWheelHSB);
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L rgb,A0
MOVEA.L hsb,A1
MOVEA.L ColorWheelBase,A6
JSR -036(A6)
MOVEA.L (A7)+,A6
END;
END;
{$I useautoopenlib.inc}
{$ifdef use_auto_openlib}

View File

@ -24,12 +24,6 @@
nils.sjoholm@mailbox.swipnet.se Nils Sjoholm
}
{$I useamigasmartlink.inc}
{$ifdef use_amiga_smartlink}
{$smartlink on}
{$endif use_amiga_smartlink}
unit console;
INTERFACE

View File

@ -28,12 +28,6 @@
nils.sjoholm@mailbox.swipnet.se
}
{$I useamigasmartlink.inc}
{$ifdef use_amiga_smartlink}
{$smartlink on}
{$endif use_amiga_smartlink}
UNIT ZLIB;
INTERFACE
@ -56,16 +50,16 @@ const
GZ_COMPRESS_BEST = 9;
FUNCTION GZ_Close(handle : POINTER) : LONGINT;
FUNCTION GZ_CompressMem(srcbuf : POINTER; srclen : longword; destbuf : POINTER; destlen : longword; strategy : longword; level : longword; VAR poutlen : longword) : LONGINT;
FUNCTION GZ_DecompressMem(srcbuf : POINTER; srclen : longword; destbuf : POINTER; destlen : longword) : LONGINT;
FUNCTION GZ_FGetC(handle : POINTER) : pLONGINT;
FUNCTION GZ_FGetS(handle : POINTER; buf : pCHAR; len : longword) : pCHAR;
FUNCTION GZ_FileLength(handle : POINTER) : longword;
FUNCTION GZ_Open(filename : pCHAR; openmode : longword; strategy : longword; level : longword) : POINTER;
FUNCTION GZ_OpenFromFH(fh : LONGINT; openmode : longword; strategy : longword; level : longword) : POINTER;
FUNCTION GZ_Read(handle : POINTER; buf : POINTER; len : longword) : LONGINT;
FUNCTION GZ_Write(handle : POINTER; buf : POINTER; len : longword) : LONGINT;
FUNCTION GZ_Close(handle : POINTER location 'a0') : LONGINT; syscall ZLibBase 042;
FUNCTION GZ_CompressMem(srcbuf : POINTER location 'a0'; srclen : longword location 'd0'; destbuf : POINTER location 'a1'; destlen : longword location 'd1'; strategy : longword location 'd2'; level : longword location 'd3'; VAR poutlen : longword location 'a2') : LONGINT; syscall ZLibBase 114;
FUNCTION GZ_DecompressMem(srcbuf : POINTER location 'a0'; srclen : longword location 'd0'; destbuf : POINTER location 'a1'; destlen : longword location 'd1') : LONGINT; syscall ZLibBase 120;
FUNCTION GZ_FGetC(handle : POINTER location 'a0') : pLONGINT; syscall ZLibBase 060;
FUNCTION GZ_FGetS(handle : POINTER location 'a0'; buf : pCHAR location 'a1'; len : longword location 'd0') : pCHAR; syscall ZLibBase 054;
FUNCTION GZ_FileLength(handle : POINTER location 'a0') : longword; syscall ZLibBase 138;
FUNCTION GZ_Open(filename : pCHAR location 'a0'; openmode : longword location 'd0'; strategy : longword location 'd1'; level : longword location 'd2') : POINTER; syscall ZLibBase 030;
FUNCTION GZ_OpenFromFH(fh : LONGINT location 'a0'; openmode : longword location 'd0'; strategy : longword location 'd1'; level : longword location 'd2') : POINTER; syscall ZLibBase 036;
FUNCTION GZ_Read(handle : POINTER location 'a0'; buf : POINTER location 'a1'; len : longword location 'd0') : LONGINT; syscall ZLibBase 048;
FUNCTION GZ_Write(handle : POINTER location 'a0'; buf : POINTER location 'a1'; len : longword location 'd0') : LONGINT; syscall ZLibBase 066;
{You can remove this include and use a define instead}
{$I useautoopenlib.inc}
@ -83,147 +77,6 @@ IMPLEMENTATION
uses amsgbox;
{$endif dont_use_openlib}
FUNCTION GZ_Close(handle : POINTER) : LONGINT;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L handle,A0
MOVEA.L ZLibBase,A6
JSR -042(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION GZ_CompressMem(srcbuf : POINTER; srclen : longword; destbuf : POINTER; destlen : longword; strategy : longword; level : longword; VAR poutlen : longword) : LONGINT;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L srcbuf,A0
MOVE.L srclen,D0
MOVEA.L destbuf,A1
MOVE.L destlen,D1
MOVE.L strategy,D2
MOVE.L level,D3
MOVEA.L poutlen,A2
MOVEA.L ZLibBase,A6
JSR -114(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION GZ_DecompressMem(srcbuf : POINTER; srclen : longword; destbuf : POINTER; destlen : longword) : LONGINT;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L srcbuf,A0
MOVE.L srclen,D0
MOVEA.L destbuf,A1
MOVE.L destlen,D1
MOVEA.L ZLibBase,A6
JSR -120(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION GZ_FGetC(handle : POINTER) : pLONGINT;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L handle,A0
MOVEA.L ZLibBase,A6
JSR -060(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION GZ_FGetS(handle : POINTER; buf : pCHAR; len : longword) : pCHAR;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L handle,A0
MOVEA.L buf,A1
MOVE.L len,D0
MOVEA.L ZLibBase,A6
JSR -054(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION GZ_FileLength(handle : POINTER) : longword;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L handle,A0
MOVEA.L ZLibBase,A6
JSR -138(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION GZ_Open(filename : pCHAR; openmode : longword; strategy : longword; level : longword) : POINTER;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L filename,A0
MOVE.L openmode,D0
MOVE.L strategy,D1
MOVE.L level,D2
MOVEA.L ZLibBase,A6
JSR -030(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION GZ_OpenFromFH(fh : LONGINT; openmode : longword; strategy : longword; level : longword) : POINTER;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L fh,A0
MOVE.L openmode,D0
MOVE.L strategy,D1
MOVE.L level,D2
MOVEA.L ZLibBase,A6
JSR -036(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION GZ_Read(handle : POINTER; buf : POINTER; len : longword) : LONGINT;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L handle,A0
MOVEA.L buf,A1
MOVE.L len,D0
MOVEA.L ZLibBase,A6
JSR -048(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION GZ_Write(handle : POINTER; buf : POINTER; len : longword) : LONGINT;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L handle,A0
MOVEA.L buf,A1
MOVE.L len,D0
MOVEA.L ZLibBase,A6
JSR -066(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
const
{ Change VERSION and LIBVERSION to proper values }