home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Equalizer BBS
/
equalizer-bbs-collection_2004.zip
/
equalizer-bbs-collection
/
DEMOSCENE-STUFF
/
PHRO.ZIP
/
VECPHIRE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-12-30
|
1KB
|
55 lines
{ More PCX Shit Source file }
{ PHRO! }
{ Phred/OTM }
{ achalfin@uceng.uc.edu }
{ DO NOT DISTRIBUTE THIS SOURCE FILE }
Unit PCX;
Interface
Procedure DeCompressPCX(Var Buffer, Orig);
Implementation
{$L FirePcx.Obj}
Procedure PhirePcx; External;
Procedure DeCompressPCX(Var Buffer, Orig);
Var
Size : Word;
TextureOffset : Word;
RunLen : Byte;
Value : Byte;
PCXOffset : Word;
PCXSeg : Word;
Begin
PCXSeg := Seg(Orig);
PCXOffset := Ofs(Orig);
TextureOffset := 0;
Size := 65535;
While TextureOffset < Size do
Begin
RunLen := Mem[PcxSeg:PcxOffset];
Inc(PcxOffset);
If (RunLen and $C0) = $C0
Then Begin
RunLen := RunLen And $3f;
Value := Mem[PCXSeg:PcxOffset];
Inc(PcxOffset);
End
Else Begin
Value := RunLen;
RunLen := 1;
End;
While (RunLen >= 1) and (TextureOffset < Size) do
Begin
Mem[Seg(Buffer):Ofs(Buffer)+TextureOffset] := Value;
TextureOffset := TextureOffset + 1;
RunLen := RunLen - 1;
End;
End;
End;
End.