What Pascal version?
Here's some Delphi code for the command-line window:
program Test; {$APPTYPE console}
uses Classes, SysUtils;
type DWord = Cardinal;
THeader = packed record
Signature : packed array[0..3] of AnsiChar;
unknown : DWord;
ItemCount : DWord;
end;
// ------------------------------------------------------------------------------------------------
procedure Show(const Stream : TStream);
var Header : THeader;
i : Integer;
tmp : DWord;
begin
Stream.Read(Header, SizeOf(Header));
WriteLn('Signature = ', Header.Signature);
WriteLn('unknown = ', Header.unknown );
WriteLn('ItemCount = ', Header.ItemCount);
WriteLn;
for i := 1 to Header.ItemCount do begin
Stream.Read(tmp, 4);
WriteLn(tmp);
end;
end;
// ------------------------------------------------------------------------------------------------
var Stream : TFileStream;
begin
Stream := TFileStream.Create('file004246.scpk', fmOpenRead + fmShareDenyWrite);
try
Show(Stream);
finally
Stream.Free;
end;
end.
Output:
Signature = SCPK
unknown = 983041
ItemCount = 14
0
232500
24
5000
2376
36596
6176
992
5576
92100
63260
85204
15812
6344