+ Forgot to commit support for writing targa

This commit is contained in:
michael 2004-03-02 22:41:23 +00:00
parent 9ad8c853fc
commit 67f23651c2

View File

@ -1,9 +1,29 @@
{*****************************************************************************}
{
$Id$
This file is part of the Free Pascal's "Free Components Library".
Copyright (c) 2003 by Michael Van Canneyt of the Free Pascal development team
TARGA common definitions.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
}
{*****************************************************************************}
{$mode objfpc}
{$h+}
unit targacmn;
interface
Const
KeyIdentification = 'ID';
Type
TWordRec = Packed Record
Lo,Hi : byte;
@ -29,6 +49,7 @@ Type
end;
Function ToWord(AWord : TWordRec) : Word;
Function FromWord(AWord : Word) : TWordRec;
implementation
@ -38,4 +59,11 @@ begin
Result:=(AWord.Lo) or (AWord.Hi shl 8);
end;
Function FromWord(AWord : Word) : TWordRec;
begin
Result.Lo:=AWord and $FF;
Result.Hi:=(AWord shr 8) and $FF;
end;
end.