Added ability to extract all TIMs to PNG; Now PNG's name includes CLUT index.

This commit is contained in:
meffi@lab313.ru
2014-04-10 23:22:23 +00:00
parent 1d63ac1b95
commit 90c0e78a66
9 changed files with 278 additions and 169 deletions

View File

@@ -78,12 +78,15 @@ begin
Exit;
pFile := GetMemory(cSectorHeaderSize);
tmp := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite);
tmp.Read(pFile^[0], cSectorHeaderSize);
Result := ((Sz mod cSectorSize) = 0) and
(CompareMem(@cSectorHeader, pFile, cSectorHeaderSize));
tmp.free;
FreeMemory(pFile);
try
tmp := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite);
tmp.Read(pFile^[0], cSectorHeaderSize);
Result := ((Sz mod cSectorSize) = 0) and (CompareMem(@cSectorHeader, pFile, cSectorHeaderSize));
finally
tmp.free;
FreeMemory(pFile);
end;
end;
procedure ReplaceTimInFileFromMemory(const FileName: string; TIM: PTIM;