From 5d6c95989042de6526401b2df018b5d748be15aa Mon Sep 17 00:00:00 2001 From: marcus Date: Sun, 27 Sep 2015 17:43:27 +0000 Subject: [PATCH] AROS Amiga, MorphOS: Added PPObject_, RasSize, MIDDLEUP, MIDDLEDOWN, Changed: Text() -> GfxText() unified, ACTION_WRITE, ACTION_READ, ReadArgs, TextLength git-svn-id: trunk@31854 - --- packages/amunits/src/coreunits/agraphics.pas | 7 +++++++ packages/amunits/src/coreunits/intuition.pas | 3 +++ packages/arosunits/src/amigados.pas | 2 +- packages/morphunits/src/agraphics.pas | 10 ++++++++-- packages/morphunits/src/amigados.pas | 4 ++-- packages/morphunits/src/intuition.pas | 3 +++ 6 files changed, 24 insertions(+), 5 deletions(-) diff --git a/packages/amunits/src/coreunits/agraphics.pas b/packages/amunits/src/coreunits/agraphics.pas index da000393d2..67efe18e80 100644 --- a/packages/amunits/src/coreunits/agraphics.pas +++ b/packages/amunits/src/coreunits/agraphics.pas @@ -2419,6 +2419,8 @@ PROCEDURE ON_SPRITE (cust: pCustom); PROCEDURE OFF_VBLANK (cust: pCustom); PROCEDURE ON_VBLANK (cust: pCustom); +function RasSize(w, h: Word): Integer; + {Here we read how to compile this unit} {You can remove this include and use a define instead} {$I useautoopenlib.inc} @@ -2532,6 +2534,11 @@ BEGIN cust^.intena := BITSET OR INTF_VERTB; END; +function RasSize(w, h: Word): Integer; inline; +begin + RasSize := h * (((w + 15) shr 3) and $FFFE); +end; + const { Change VERSION and LIBVERSION to proper values } diff --git a/packages/amunits/src/coreunits/intuition.pas b/packages/amunits/src/coreunits/intuition.pas index 1448b8189e..def5cb1931 100644 --- a/packages/amunits/src/coreunits/intuition.pas +++ b/packages/amunits/src/coreunits/intuition.pas @@ -1725,6 +1725,8 @@ CONST SELECTDOWN = IECODE_LBUTTON; MENUUP = IECODE_RBUTTON + IECODE_UP_PREFIX; MENUDOWN = IECODE_RBUTTON; + MIDDLEUP = IECODE_MBUTTON + IECODE_UP_PREFIX; + MIDDLEDOWN = IECODE_MBUTTON; ALTLEFT = IEQUALIFIER_LALT; ALTRIGHT = IEQUALIFIER_RALT; AMIGALEFT = IEQUALIFIER_LCOMMAND; @@ -2751,6 +2753,7 @@ Type Type Object_ = ULONG; pObject_ = ^Object_; + ppObject_ = ^pObject_; ClassID = ^Byte; { diff --git a/packages/arosunits/src/amigados.pas b/packages/arosunits/src/amigados.pas index 16e70b1f31..ce7c10cf28 100644 --- a/packages/arosunits/src/amigados.pas +++ b/packages/arosunits/src/amigados.pas @@ -2361,7 +2361,7 @@ function PathPart(const Path: STRPTR): STRPTR; syscall AOS_DOSBase 146; function Pipe(const Name: STRPTR; var Reader: BPTR; var Writer: BPTR): LongInt; syscall AOS_DOSBase 160; function PrintFault(Code: LongInt; const Header: STRPTR): LongBool; syscall AOS_DOSBase 79; function PutStr(const String_: STRPTR): LongInt; syscall AOS_DOSBase 158; -function ReadArgs(const Template: STRPTR; var Array_: IPTR; RdArgs: PRDArgs): PRDArgs; syscall AOS_DOSBase 133; +function ReadArgs(const Template: STRPTR; Array_: PIPTR; RdArgs: PRDArgs): PRDArgs; syscall AOS_DOSBase 133; function ReadItem(const Buffer: STRPTR; MaxChars: LongInt; CSource: PCSource): LongInt; syscall AOS_DOSBase 135; function ReadLink(Port: PMsgPort; Lock: LongInt; const Path: STRPTR; Buffer: STRPTR; Size: LongWord): LongInt; syscall AOS_DOSBase 73; function Relabel(const Drive: STRPTR; const NewName: STRPTR): LongInt; syscall AOS_DOSBase 120; diff --git a/packages/morphunits/src/agraphics.pas b/packages/morphunits/src/agraphics.pas index 60f306f2e6..7f9d51843e 100644 --- a/packages/morphunits/src/agraphics.pas +++ b/packages/morphunits/src/agraphics.pas @@ -2208,10 +2208,10 @@ SysCall GfxBase 042; procedure ClearScreen(rp : pRastPort location 'a1'); SysCall GfxBase 048; -function TextLength(rp : pRastPort location 'a1'; string1 : pSHORTINT location 'a0'; count : CARDINAL location 'd0') : INTEGER; +function TextLength(rp : pRastPort location 'a1'; string1 : STRPTR location 'a0'; count : CARDINAL location 'd0') : INTEGER; SysCall GfxBase 054; -function Text(rp : pRastPort location 'a1'; string1: pSHORTINT location 'a0'; count : CARDINAL location 'd0') : LongInt; +function GfxText(rp : pRastPort location 'a1'; string1: STRPTR location 'a0'; count : CARDINAL location 'd0') : LongInt; SysCall GfxBase 060; function SetFont(rp : pRastPort location 'a1'; textFont : pTextFont location 'a0') : LongInt; @@ -2704,6 +2704,8 @@ procedure ON_SPRITE (cust: pCustom); procedure OFF_VBLANK (cust: pCustom); procedure ON_VBLANK (cust: pCustom); +function RasSize(w, h: Word): Integer; + { unit/library initialization } function InitGraphicsLibrary : boolean; @@ -2802,6 +2804,10 @@ begin cust^.intena := BITSET or INTF_VERTB; end; +function RasSize(w, h: Word): Integer; inline; +begin + RasSize := h * (((w + 15) shr 3) and $FFFE); +end; const { Change VERSION and LIBVERSION to proper values } diff --git a/packages/morphunits/src/amigados.pas b/packages/morphunits/src/amigados.pas index 4c5363dfd8..fccd37a227 100644 --- a/packages/morphunits/src/amigados.pas +++ b/packages/morphunits/src/amigados.pas @@ -423,8 +423,8 @@ const ACTION_CURRENT_VOLUME = 7; ACTION_LOCATE_OBJECT = 8; ACTION_RENAME_DISK = 9; - ACTION_WRITE = 'W'; - ACTION_READ = 'R'; + ACTION_WRITE = $57; // 'W' + ACTION_READ = $52; // 'R' ACTION_FREE_LOCK = 15; ACTION_DELETE_OBJECT = 16; ACTION_RENAME_OBJECT = 17; diff --git a/packages/morphunits/src/intuition.pas b/packages/morphunits/src/intuition.pas index 4cd84deaaa..717820f6cc 100644 --- a/packages/morphunits/src/intuition.pas +++ b/packages/morphunits/src/intuition.pas @@ -1699,6 +1699,8 @@ CONST SELECTDOWN = IECODE_LBUTTON; MENUUP = IECODE_RBUTTON + IECODE_UP_PREFIX; MENUDOWN = IECODE_RBUTTON; + MIDDLEUP = IECODE_MBUTTON + IECODE_UP_PREFIX; + MIDDLEDOWN = IECODE_MBUTTON; ALTLEFT = IEQUALIFIER_LALT; ALTRIGHT = IEQUALIFIER_RALT; AMIGALEFT = IEQUALIFIER_LCOMMAND; @@ -2725,6 +2727,7 @@ Type Type Object_ = Cardinal; pObject_ = ^Object_; + ppObject_ = ^pObject_; ClassID = ^Byte; {