mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 19:50:54 +02:00
+ Forgot to commit support for writing targa
This commit is contained in:
parent
9ad8c853fc
commit
67f23651c2
@ -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.
|
Loading…
Reference in New Issue
Block a user