Some reorderings.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -27,7 +27,7 @@
|
|||||||
<AutoIncrementBuild Value="True"/>
|
<AutoIncrementBuild Value="True"/>
|
||||||
<MajorVersionNr Value="1"/>
|
<MajorVersionNr Value="1"/>
|
||||||
<RevisionNr Value="90"/>
|
<RevisionNr Value="90"/>
|
||||||
<BuildNr Value="61"/>
|
<BuildNr Value="68"/>
|
||||||
<StringTable CompanyName="Lab 313" FileDescription="The best TIMs tool ever!:)" ProductVersion=""/>
|
<StringTable CompanyName="Lab 313" FileDescription="The best TIMs tool ever!:)" ProductVersion=""/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<BuildModes Count="6">
|
<BuildModes Count="6">
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ procedure ReplaceTimInFileFromMemory(const FileName: string; TIM: PTIM;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ucommon, ecc, edc, classes, FileUtil, sysutils;
|
ucommon, ecc, edc, classes, LazUTF8, LazFileUtils, sysutils;
|
||||||
|
|
||||||
function bin2bcd(P: Integer): byte;
|
function bin2bcd(P: Integer): byte;
|
||||||
begin
|
begin
|
||||||
@@ -72,7 +72,7 @@ var
|
|||||||
tmp: TFileStream;
|
tmp: TFileStream;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
Sz := FileSize(FileName);
|
Sz := FileSizeUTF8(FileName);
|
||||||
|
|
||||||
if (Sz > cMaxFileSize) or (Sz = 0) then Exit;
|
if (Sz > cMaxFileSize) or (Sz = 0) then Exit;
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
SIZE := FileSize(TimToInsert);
|
SIZE := FileSizeUTF8(TimToInsert);
|
||||||
P := 0;
|
P := 0;
|
||||||
TIM := LoadTimFromFile(TimToInsert, P, False, SIZE);
|
TIM := LoadTimFromFile(TimToInsert, P, False, SIZE);
|
||||||
// SaveTimToFile('test.tim', TIM);
|
// SaveTimToFile('test.tim', TIM);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ function LoadImage(const FileName: string): PDrawSurf;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
FPReadPNG, Classes, BGRABitmap, FileUtil, sysutils, zstream, FPWritePNG;
|
FPReadPNG, Classes, BGRABitmap, LazUTF8, sysutils, zstream, FPWritePNG;
|
||||||
|
|
||||||
procedure SaveImage(const FileName: string; Surf: PDrawSurf; Indexed: Boolean);
|
procedure SaveImage(const FileName: string; Surf: PDrawSurf; Indexed: Boolean);
|
||||||
var
|
var
|
||||||
|
|||||||
10
umain.lfm
10
umain.lfm
@@ -889,15 +889,15 @@ object frmMain: TfrmMain
|
|||||||
object mnImportPng: TMenuItem
|
object mnImportPng: TMenuItem
|
||||||
Action = actPngImport
|
Action = actPngImport
|
||||||
end
|
end
|
||||||
object N21: TMenuItem
|
end
|
||||||
Caption = '-'
|
object mnExport: TMenuItem
|
||||||
|
Caption = '&Export'
|
||||||
|
object mnExtractAllPngs3: TMenuItem
|
||||||
|
Action = actExtractPngs
|
||||||
end
|
end
|
||||||
object mnExtractAllTims3: TMenuItem
|
object mnExtractAllTims3: TMenuItem
|
||||||
Action = actExtractTims
|
Action = actExtractTims
|
||||||
end
|
end
|
||||||
object mnExtractAllPngs3: TMenuItem
|
|
||||||
Action = actExtractPngs
|
|
||||||
end
|
|
||||||
object N22: TMenuItem
|
object N22: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
|
|||||||
12
umain.pas
12
umain.pas
@@ -5,7 +5,7 @@ unit umain;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Dialogs, ActnList,
|
Classes, SysUtils, LazUTF8, LazFileUtils, Forms, Dialogs, ActnList,
|
||||||
Menus, StdCtrls, ExtCtrls, ComCtrls, Grids, ExtDlgs,
|
Menus, StdCtrls, ExtCtrls, ComCtrls, Grids, ExtDlgs,
|
||||||
|
|
||||||
uscanresult, uscanthread, usettings, utim, udrawtim, types, Controls;
|
uscanresult, uscanthread, usettings, utim, udrawtim, types, Controls;
|
||||||
@@ -52,12 +52,12 @@ type
|
|||||||
dlgOpenFile: TOpenDialog;
|
dlgOpenFile: TOpenDialog;
|
||||||
dlgSavePNG: TSavePictureDialog;
|
dlgSavePNG: TSavePictureDialog;
|
||||||
dlgSaveFile: TSaveDialog;
|
dlgSaveFile: TSaveDialog;
|
||||||
|
mnExport: TMenuItem;
|
||||||
mnExtractAllTimsAll: TMenuItem;
|
mnExtractAllTimsAll: TMenuItem;
|
||||||
mnExtractAllPngsAll: TMenuItem;
|
mnExtractAllPngsAll: TMenuItem;
|
||||||
N22: TMenuItem;
|
N22: TMenuItem;
|
||||||
mnExtractAllPngs3: TMenuItem;
|
mnExtractAllPngs3: TMenuItem;
|
||||||
mnExtractAllTims3: TMenuItem;
|
mnExtractAllTims3: TMenuItem;
|
||||||
N21: TMenuItem;
|
|
||||||
N20: TMenuItem;
|
N20: TMenuItem;
|
||||||
mnSaveTIM1: TMenuItem;
|
mnSaveTIM1: TMenuItem;
|
||||||
grdClut: TDrawGrid;
|
grdClut: TDrawGrid;
|
||||||
@@ -429,9 +429,9 @@ begin
|
|||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
end;
|
end;
|
||||||
Dispose(Image);
|
Dispose(Image);
|
||||||
lblStatus.Caption := sStatusBarExtracted;
|
|
||||||
pbProgress.Position := 0;
|
pbProgress.Position := 0;
|
||||||
end;
|
end;
|
||||||
|
lblStatus.Caption := sStatusBarExtracted;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.actExtractPngsExecute(Sender: TObject);
|
procedure TfrmMain.actExtractPngsExecute(Sender: TObject);
|
||||||
@@ -540,9 +540,9 @@ begin
|
|||||||
pbProgress.Position := I;
|
pbProgress.Position := I;
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
end;
|
end;
|
||||||
lblStatus.Caption := sStatusBarExtracted;
|
|
||||||
pbProgress.Position := 0;
|
pbProgress.Position := 0;
|
||||||
end;
|
end;
|
||||||
|
lblStatus.Caption := sStatusBarExtracted;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.actExtractTimsExecute(Sender: TObject);
|
procedure TfrmMain.actExtractTimsExecute(Sender: TObject);
|
||||||
@@ -622,7 +622,7 @@ var
|
|||||||
ScanRes: TScanResult;
|
ScanRes: TScanResult;
|
||||||
begin
|
begin
|
||||||
if not dlgOpenFile.Execute then Exit;
|
if not dlgOpenFile.Execute then Exit;
|
||||||
if FileSize(dlgOpenFile.FileName) > cTIMMaxSize then Exit;
|
if FileSizeUtf8(dlgOpenFile.FileName) > cTIMMaxSize then Exit;
|
||||||
|
|
||||||
ScanRes := SelectedScanResult;
|
ScanRes := SelectedScanResult;
|
||||||
ReplaceTimInFile(ScanRes.ScanFile, dlgOpenFile.FileName, SelectedTimInfo.Position, ScanRes.IsImage);
|
ReplaceTimInFile(ScanRes.ScanFile, dlgOpenFile.FileName, SelectedTimInfo.Position, ScanRes.IsImage);
|
||||||
@@ -948,7 +948,7 @@ begin
|
|||||||
|
|
||||||
cbbFiles.Enabled := (cbbFiles.Items.Count <> 0);
|
cbbFiles.Enabled := (cbbFiles.Items.Count <> 0);
|
||||||
actExtractTimsAll.Enabled := cbbFiles.Enabled;
|
actExtractTimsAll.Enabled := cbbFiles.Enabled;
|
||||||
|
actExtractPngsAll.Enabled := cbbFiles.Enabled;
|
||||||
|
|
||||||
pnlList.Enabled := cbbFiles.Enabled;
|
pnlList.Enabled := cbbFiles.Enabled;
|
||||||
actCloseFile.Enabled := cbbFiles.Enabled;
|
actCloseFile.Enabled := cbbFiles.Enabled;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
umain, ucdimage, sysutils, FileUtil;
|
umain, ucdimage, sysutils, LazUTF8, LazFileUtils;
|
||||||
|
|
||||||
const
|
const
|
||||||
cClearBufferSize = ((cTIMMaxSize div cSectorDataSize) + 1) * cSectorDataSize * 2;
|
cClearBufferSize = ((cTIMMaxSize div cSectorDataSize) + 1) * cSectorDataSize * 2;
|
||||||
@@ -51,7 +51,7 @@ begin
|
|||||||
FreeOnTerminate := True;
|
FreeOnTerminate := True;
|
||||||
pClearBufferPosition := 0;
|
pClearBufferPosition := 0;
|
||||||
pFilePos := 0;
|
pFilePos := 0;
|
||||||
pFileSize := FileSize(FileToScan);
|
pFileSize := FileSizeUTF8(FileToScan);
|
||||||
pStatusText := '';
|
pStatusText := '';
|
||||||
pStopScan := False;
|
pStopScan := False;
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses FileUtil
|
uses LazUTF8
|
||||||
|
|
||||||
{$IFDEF windows}
|
{$IFDEF windows}
|
||||||
,windows, shlobj {for special folders}, ActiveX, ComObj
|
,windows, shlobj {for special folders}, ActiveX, ComObj
|
||||||
|
|||||||
2
utim.pas
2
utim.pas
@@ -148,7 +148,7 @@ function ConvertCLUTColor(COLOR: TCLUT_COLOR): word;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ucdimage, classes, sysutils, FileUtil;
|
ucdimage, classes, sysutils, LazUTF8;
|
||||||
|
|
||||||
function ConvertTIMColor(COLOR: word): TCLUT_COLOR;
|
function ConvertTIMColor(COLOR: word): TCLUT_COLOR;
|
||||||
begin
|
begin
|
||||||
|
|||||||
Reference in New Issue
Block a user