New Tim Info variant.
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
<AutoIncrementBuild Value="True"/>
|
<AutoIncrementBuild Value="True"/>
|
||||||
<MajorVersionNr Value="1"/>
|
<MajorVersionNr Value="1"/>
|
||||||
<RevisionNr Value="80"/>
|
<RevisionNr Value="80"/>
|
||||||
<BuildNr Value="6"/>
|
<BuildNr Value="10"/>
|
||||||
<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">
|
||||||
@@ -365,6 +365,7 @@
|
|||||||
<OverflowChecks Value="True"/>
|
<OverflowChecks Value="True"/>
|
||||||
<StackChecks Value="True"/>
|
<StackChecks Value="True"/>
|
||||||
</Checks>
|
</Checks>
|
||||||
|
<VerifyObjMethodCallValidity Value="True"/>
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
|
|||||||
31
tim2view.lps
31
tim2view.lps
@@ -23,8 +23,8 @@
|
|||||||
<UnitName Value="umain"/>
|
<UnitName Value="umain"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="787"/>
|
<TopLine Value="128"/>
|
||||||
<CursorPos X="42" Y="802"/>
|
<CursorPos X="83" Y="136"/>
|
||||||
<UsageCount Value="816"/>
|
<UsageCount Value="816"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@@ -48,9 +48,10 @@
|
|||||||
<Filename Value="ucommon.pas"/>
|
<Filename Value="ucommon.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="ucommon"/>
|
<UnitName Value="ucommon"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="3"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="17"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="20" Y="35"/>
|
<CursorPos X="20" Y="35"/>
|
||||||
<UsageCount Value="816"/>
|
<UsageCount Value="816"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@@ -83,8 +84,8 @@
|
|||||||
<UnitName Value="usettings"/>
|
<UnitName Value="usettings"/>
|
||||||
<EditorIndex Value="9"/>
|
<EditorIndex Value="9"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="41"/>
|
<TopLine Value="83"/>
|
||||||
<CursorPos X="60" Y="56"/>
|
<CursorPos X="75" Y="99"/>
|
||||||
<UsageCount Value="816"/>
|
<UsageCount Value="816"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
@@ -94,7 +95,7 @@
|
|||||||
<UnitName Value="uscanresult"/>
|
<UnitName Value="uscanresult"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="7"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="35"/>
|
<TopLine Value="54"/>
|
||||||
<CursorPos X="79" Y="80"/>
|
<CursorPos X="79" Y="80"/>
|
||||||
<UsageCount Value="816"/>
|
<UsageCount Value="816"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@@ -105,8 +106,8 @@
|
|||||||
<UnitName Value="uscanthread"/>
|
<UnitName Value="uscanthread"/>
|
||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="8"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="178"/>
|
<TopLine Value="172"/>
|
||||||
<CursorPos X="72" Y="197"/>
|
<CursorPos X="3" Y="187"/>
|
||||||
<UsageCount Value="816"/>
|
<UsageCount Value="816"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit9>
|
</Unit9>
|
||||||
@@ -144,11 +145,10 @@
|
|||||||
<Unit13>
|
<Unit13>
|
||||||
<Filename Value="todos.inc"/>
|
<Filename Value="todos.inc"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="44" Y="3"/>
|
<CursorPos X="20" Y="1"/>
|
||||||
<UsageCount Value="802"/>
|
<UsageCount Value="802"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit13>
|
</Unit13>
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="7"/>
|
<TopLine Value="7"/>
|
||||||
<CursorPos X="20" Y="16"/>
|
<CursorPos X="20" Y="16"/>
|
||||||
<UsageCount Value="72"/>
|
<UsageCount Value="77"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit14>
|
</Unit14>
|
||||||
</Units>
|
</Units>
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
</General>
|
</General>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<BreakPoints Count="3">
|
<BreakPoints Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Kind Value="bpkSource"/>
|
<Kind Value="bpkSource"/>
|
||||||
<WatchScope Value="wpsLocal"/>
|
<WatchScope Value="wpsLocal"/>
|
||||||
@@ -184,13 +184,6 @@
|
|||||||
<Source Value="c:\Lazarus\fpc\2.6.2\source\packages\fcl-image\src\fppalette.inc"/>
|
<Source Value="c:\Lazarus\fpc\2.6.2\source\packages\fcl-image\src\fppalette.inc"/>
|
||||||
<Line Value="159"/>
|
<Line Value="159"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
<Item3>
|
|
||||||
<Kind Value="bpkSource"/>
|
|
||||||
<WatchScope Value="wpsLocal"/>
|
|
||||||
<WatchKind Value="wpkWrite"/>
|
|
||||||
<Source Value="umain.pas"/>
|
|
||||||
<Line Value="797"/>
|
|
||||||
</Item3>
|
|
||||||
</BreakPoints>
|
</BreakPoints>
|
||||||
<Watches Count="3">
|
<Watches Count="3">
|
||||||
<Item1>
|
<Item1>
|
||||||
|
|||||||
BIN
tim2view.res
BIN
tim2view.res
Binary file not shown.
@@ -1,3 +1 @@
|
|||||||
{ TODO : Zooming? }
|
{ TODO : Zooming? }
|
||||||
{ TODO : Add file to filelist }
|
|
||||||
{ TODO : StartScan - remove refs to umain }
|
|
||||||
144
umain.lfm
144
umain.lfm
@@ -1,7 +1,7 @@
|
|||||||
object frmMain: TfrmMain
|
object frmMain: TfrmMain
|
||||||
Left = 919
|
Left = 1092
|
||||||
Height = 647
|
Height = 668
|
||||||
Top = 209
|
Top = 213
|
||||||
Width = 790
|
Width = 790
|
||||||
HorzScrollBar.Page = 780
|
HorzScrollBar.Page = 780
|
||||||
HorzScrollBar.Range = 489
|
HorzScrollBar.Range = 489
|
||||||
@@ -9,7 +9,7 @@ object frmMain: TfrmMain
|
|||||||
VertScrollBar.Range = 344
|
VertScrollBar.Range = 344
|
||||||
ActiveControl = pnlList
|
ActiveControl = pnlList
|
||||||
AllowDropFiles = True
|
AllowDropFiles = True
|
||||||
ClientHeight = 622
|
ClientHeight = 643
|
||||||
ClientWidth = 790
|
ClientWidth = 790
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@@ -498,7 +498,7 @@ object frmMain: TfrmMain
|
|||||||
object pnlStatus: TPanel
|
object pnlStatus: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 30
|
Height = 30
|
||||||
Top = 571
|
Top = 613
|
||||||
Width = 790
|
Width = 790
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
@@ -552,33 +552,33 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object pnlMain: TPanel
|
object pnlMain: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 543
|
Height = 585
|
||||||
Top = 28
|
Top = 28
|
||||||
Width = 790
|
Width = 790
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 543
|
ClientHeight = 585
|
||||||
ClientWidth = 790
|
ClientWidth = 790
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object splMain: TSplitter
|
object splMain: TSplitter
|
||||||
Left = 253
|
Left = 253
|
||||||
Height = 543
|
Height = 585
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
end
|
end
|
||||||
object pnlList: TPanel
|
object pnlList: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 543
|
Height = 585
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 253
|
Width = 253
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 543
|
ClientHeight = 585
|
||||||
ClientWidth = 253
|
ClientWidth = 253
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object lvList: TListView
|
object lvList: TListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 515
|
Height = 372
|
||||||
Top = 28
|
Top = 28
|
||||||
Width = 253
|
Width = 253
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@@ -648,15 +648,72 @@ object frmMain: TfrmMain
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object tblTimInfo: TStringGrid
|
||||||
|
Left = 0
|
||||||
|
Height = 185
|
||||||
|
Top = 400
|
||||||
|
Width = 253
|
||||||
|
Align = alBottom
|
||||||
|
AutoEdit = False
|
||||||
|
AutoFillColumns = True
|
||||||
|
ColCount = 2
|
||||||
|
DefaultRowHeight = 20
|
||||||
|
Enabled = False
|
||||||
|
Flat = True
|
||||||
|
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goSmoothScroll]
|
||||||
|
RowCount = 9
|
||||||
|
TabOrder = 2
|
||||||
|
TitleFont.Color = clWindowText
|
||||||
|
TitleFont.Height = -11
|
||||||
|
TitleFont.Name = 'Tahoma'
|
||||||
|
Visible = False
|
||||||
|
ColWidths = (
|
||||||
|
102
|
||||||
|
150
|
||||||
|
)
|
||||||
|
Cells = (
|
||||||
|
10
|
||||||
|
0
|
||||||
|
0
|
||||||
|
'Field'
|
||||||
|
0
|
||||||
|
1
|
||||||
|
'Position'
|
||||||
|
0
|
||||||
|
2
|
||||||
|
'Version'
|
||||||
|
0
|
||||||
|
3
|
||||||
|
'Good'
|
||||||
|
0
|
||||||
|
5
|
||||||
|
'VRAM (X/Y)'
|
||||||
|
0
|
||||||
|
6
|
||||||
|
'Colors Count'
|
||||||
|
0
|
||||||
|
8
|
||||||
|
'VRAM (X/Y)'
|
||||||
|
1
|
||||||
|
0
|
||||||
|
'Value'
|
||||||
|
1
|
||||||
|
4
|
||||||
|
'CLUT'
|
||||||
|
1
|
||||||
|
7
|
||||||
|
'IMAGE'
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object pnlImage: TPanel
|
object pnlImage: TPanel
|
||||||
Left = 258
|
Left = 258
|
||||||
Height = 543
|
Height = 585
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 532
|
Width = 532
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
ClientHeight = 543
|
ClientHeight = 585
|
||||||
ClientWidth = 532
|
ClientWidth = 532
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@@ -664,7 +721,7 @@ object frmMain: TfrmMain
|
|||||||
object pnlImageOptions: TPanel
|
object pnlImageOptions: TPanel
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 32
|
Height = 32
|
||||||
Top = 510
|
Top = 552
|
||||||
Width = 530
|
Width = 530
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@@ -746,12 +803,12 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object pnlClut: TPanel
|
object pnlClut: TPanel
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 165
|
Height = 192
|
||||||
Top = 345
|
Top = 360
|
||||||
Width = 530
|
Width = 530
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
ClientHeight = 165
|
ClientHeight = 192
|
||||||
ClientWidth = 530
|
ClientWidth = 530
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@@ -759,7 +816,7 @@ object frmMain: TfrmMain
|
|||||||
Visible = False
|
Visible = False
|
||||||
object grdClut: TDrawGrid
|
object grdClut: TDrawGrid
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 115
|
Height = 125
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 528
|
Width = 528
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@@ -784,12 +841,12 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object lblClutHint: TLabel
|
object lblClutHint: TLabel
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 48
|
Height = 65
|
||||||
Top = 116
|
Top = 126
|
||||||
Width = 528
|
Width = 528
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
Alignment = taCenter
|
Alignment = taCenter
|
||||||
Caption = 'Press "Space" key to invert Transparence bit.'#13#10'H-splitted color = black transparent.'#13#10'V-splitted color = non-black transparent.'
|
Caption = 'Double-click to change color.'#10'Press "Space" key to invert Transparence bit.'#13#10'H-splitted color = black transparent.'#13#10'V-splitted color = non-black transparent.'
|
||||||
Layout = tlCenter
|
Layout = tlCenter
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
@@ -797,7 +854,7 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object imgTim: TImage
|
object imgTim: TImage
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 344
|
Height = 359
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 530
|
Width = 530
|
||||||
AntialiasingMode = amOff
|
AntialiasingMode = amOff
|
||||||
@@ -808,39 +865,6 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object sbMain: TStatusBar
|
|
||||||
Left = 0
|
|
||||||
Height = 21
|
|
||||||
Top = 601
|
|
||||||
Width = 790
|
|
||||||
Panels = <
|
|
||||||
item
|
|
||||||
Width = 50
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Width = 50
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Width = 50
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Width = 50
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Width = 50
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Width = 50
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Width = 50
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Width = 50
|
|
||||||
end>
|
|
||||||
SimplePanel = False
|
|
||||||
SizeGrip = False
|
|
||||||
end
|
|
||||||
object dlgOpenFile: TOpenDialog
|
object dlgOpenFile: TOpenDialog
|
||||||
Title = 'Please, select File...'
|
Title = 'Please, select File...'
|
||||||
DefaultExt = '.bin'
|
DefaultExt = '.bin'
|
||||||
@@ -899,6 +923,11 @@ object frmMain: TfrmMain
|
|||||||
object N8: TMenuItem
|
object N8: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
|
object mnShowTimInfo: TMenuItem
|
||||||
|
Action = actShowTimInfo
|
||||||
|
AutoCheck = True
|
||||||
|
ShowAlwaysCheckable = True
|
||||||
|
end
|
||||||
object mnStretchImage: TMenuItem
|
object mnStretchImage: TMenuItem
|
||||||
Action = actStretch
|
Action = actStretch
|
||||||
AutoCheck = True
|
AutoCheck = True
|
||||||
@@ -1063,6 +1092,11 @@ object frmMain: TfrmMain
|
|||||||
Caption = '&Background Color'
|
Caption = '&Background Color'
|
||||||
OnExecute = actChangeBackColorExecute
|
OnExecute = actChangeBackColorExecute
|
||||||
end
|
end
|
||||||
|
object actShowTimInfo: TAction
|
||||||
|
AutoCheck = True
|
||||||
|
Caption = '&Show Tim Info'
|
||||||
|
OnExecute = actShowTimInfoExecute
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object pmList: TPopupMenu
|
object pmList: TPopupMenu
|
||||||
left = 432
|
left = 432
|
||||||
|
|||||||
70
umain.pas
70
umain.pas
@@ -28,6 +28,7 @@ type
|
|||||||
actExtractTIMs: TAction;
|
actExtractTIMs: TAction;
|
||||||
actChangeFile: TAction;
|
actChangeFile: TAction;
|
||||||
actChangeBackColor: TAction;
|
actChangeBackColor: TAction;
|
||||||
|
actShowTimInfo: TAction;
|
||||||
actPngImport: TAction;
|
actPngImport: TAction;
|
||||||
actStopScan: TAction;
|
actStopScan: TAction;
|
||||||
actOpenLab: TAction;
|
actOpenLab: TAction;
|
||||||
@@ -58,6 +59,7 @@ type
|
|||||||
lblStatus: TLabel;
|
lblStatus: TLabel;
|
||||||
lvList: TListView;
|
lvList: TListView;
|
||||||
MenuItem1: TMenuItem;
|
MenuItem1: TMenuItem;
|
||||||
|
mnShowTimInfo: TMenuItem;
|
||||||
mnImportPng: TMenuItem;
|
mnImportPng: TMenuItem;
|
||||||
mnChangeBackColor2: TMenuItem;
|
mnChangeBackColor2: TMenuItem;
|
||||||
N8: TMenuItem;
|
N8: TMenuItem;
|
||||||
@@ -104,7 +106,7 @@ type
|
|||||||
SaveasPNG1: TMenuItem;
|
SaveasPNG1: TMenuItem;
|
||||||
dlgSelectDir: TSelectDirectoryDialog;
|
dlgSelectDir: TSelectDirectoryDialog;
|
||||||
splMain: TSplitter;
|
splMain: TSplitter;
|
||||||
sbMain: TStatusBar;
|
tblTimInfo: TStringGrid;
|
||||||
procedure actAboutExecute(Sender: TObject);
|
procedure actAboutExecute(Sender: TObject);
|
||||||
procedure actAssocTimsExecute(Sender: TObject);
|
procedure actAssocTimsExecute(Sender: TObject);
|
||||||
procedure actChangeBackColorExecute(Sender: TObject);
|
procedure actChangeBackColorExecute(Sender: TObject);
|
||||||
@@ -123,6 +125,7 @@ type
|
|||||||
procedure actReturnFocusExecute(Sender: TObject);
|
procedure actReturnFocusExecute(Sender: TObject);
|
||||||
procedure actScanDirExecute(Sender: TObject);
|
procedure actScanDirExecute(Sender: TObject);
|
||||||
procedure actScanFileExecute(Sender: TObject);
|
procedure actScanFileExecute(Sender: TObject);
|
||||||
|
procedure actShowTimInfoExecute(Sender: TObject);
|
||||||
procedure actStopScanExecute(Sender: TObject);
|
procedure actStopScanExecute(Sender: TObject);
|
||||||
procedure actStretchExecute(Sender: TObject);
|
procedure actStretchExecute(Sender: TObject);
|
||||||
procedure actPngExportExecute(Sender: TObject);
|
procedure actPngExportExecute(Sender: TObject);
|
||||||
@@ -164,6 +167,7 @@ type
|
|||||||
procedure ScanDirectory(const Directory: string);
|
procedure ScanDirectory(const Directory: string);
|
||||||
procedure CheckButtonsAndMainMenu;
|
procedure CheckButtonsAndMainMenu;
|
||||||
procedure ScanFinished(Sender: TObject);
|
procedure ScanFinished(Sender: TObject);
|
||||||
|
procedure BeforeScan(MaxProgress: Integer);
|
||||||
procedure SetTimsListCount(Count: Integer);
|
procedure SetTimsListCount(Count: Integer);
|
||||||
procedure UpdateCLUTInfo;
|
procedure UpdateCLUTInfo;
|
||||||
procedure DrawSelTim;
|
procedure DrawSelTim;
|
||||||
@@ -212,6 +216,12 @@ begin
|
|||||||
ScanPath(dlgOpenFile.Files.Strings[I - 1]);
|
ScanPath(dlgOpenFile.Files.Strings[I - 1]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmMain.actShowTimInfoExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Settings.InfoVisible := (Sender as TAction).Checked;
|
||||||
|
tblTimInfo.Visible := (Sender as TAction).Checked;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.actStopScanExecute(Sender: TObject);
|
procedure TfrmMain.actStopScanExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
I: Integer;
|
I: Integer;
|
||||||
@@ -232,7 +242,7 @@ end;
|
|||||||
|
|
||||||
procedure TfrmMain.actStretchExecute(Sender: TObject);
|
procedure TfrmMain.actStretchExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Settings.StretchMode := actStretch.Checked;
|
Settings.StretchMode := (Sender as TAction).Checked;
|
||||||
UpdateTim(True, False, False);
|
UpdateTim(True, False, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -579,6 +589,7 @@ begin
|
|||||||
LastDir := Settings.LastDir;
|
LastDir := Settings.LastDir;
|
||||||
cbbBitMode.ItemIndex := Settings.BitMode;
|
cbbBitMode.ItemIndex := Settings.BitMode;
|
||||||
pnlImage.Color := Settings.BackColor;
|
pnlImage.Color := Settings.BackColor;
|
||||||
|
actShowTimInfo.Checked := Settings.InfoVisible;
|
||||||
|
|
||||||
ScanThreads := TScanThreadList.Create(False); //False - to able scan thread remove itself from this list
|
ScanThreads := TScanThreadList.Create(False); //False - to able scan thread remove itself from this list
|
||||||
ScanResults := TScanResultList.Create(False);
|
ScanResults := TScanResultList.Create(False);
|
||||||
@@ -810,6 +821,7 @@ begin
|
|||||||
|
|
||||||
if StartedScans < GetLogicalCpuCount then
|
if StartedScans < GetLogicalCpuCount then
|
||||||
begin
|
begin
|
||||||
|
BeforeScan(ScanThreads.Last.FileLength);
|
||||||
ScanThreads.Last.Start;
|
ScanThreads.Last.Start;
|
||||||
Inc(StartedScans);
|
Inc(StartedScans);
|
||||||
end;
|
end;
|
||||||
@@ -848,6 +860,10 @@ begin
|
|||||||
pnlList.Enabled := cbbFiles.Enabled;
|
pnlList.Enabled := cbbFiles.Enabled;
|
||||||
actCloseFile.Enabled := cbbFiles.Enabled;
|
actCloseFile.Enabled := cbbFiles.Enabled;
|
||||||
actCloseFiles.Enabled := cbbFiles.Enabled;
|
actCloseFiles.Enabled := cbbFiles.Enabled;
|
||||||
|
|
||||||
|
actScanFile.Enabled := ScanThreads.Count = 0;
|
||||||
|
actScanDir.Enabled := ScanThreads.Count = 0;
|
||||||
|
|
||||||
actReplaceTim.Enabled := (lvList.Selected <> nil) and (lvList.Selected.Index <> -1);
|
actReplaceTim.Enabled := (lvList.Selected <> nil) and (lvList.Selected.Index <> -1);
|
||||||
|
|
||||||
actPngExport.Enabled := (Surf^ <> nil) and actReplaceTim.Enabled;
|
actPngExport.Enabled := (Surf^ <> nil) and actReplaceTim.Enabled;
|
||||||
@@ -862,7 +878,6 @@ var
|
|||||||
I: Integer;
|
I: Integer;
|
||||||
begin
|
begin
|
||||||
ScanThreads.Remove(Sender as TScanThread);
|
ScanThreads.Remove(Sender as TScanThread);
|
||||||
|
|
||||||
Dec(StartedScans);
|
Dec(StartedScans);
|
||||||
|
|
||||||
if ScanThreads.Count <> 0 then
|
if ScanThreads.Count <> 0 then
|
||||||
@@ -870,6 +885,7 @@ begin
|
|||||||
for I := 1 to ScanThreads.Count do
|
for I := 1 to ScanThreads.Count do
|
||||||
if ScanThreads[I - 1].Suspended and (not ScanThreads[I - 1].StopScan) then
|
if ScanThreads[I - 1].Suspended and (not ScanThreads[I - 1].StopScan) then
|
||||||
begin
|
begin
|
||||||
|
BeforeScan(ScanThreads[I - 1].FileLength);
|
||||||
ScanThreads[I - 1].Start;
|
ScanThreads[I - 1].Start;
|
||||||
Inc(StartedScans);
|
Inc(StartedScans);
|
||||||
Exit;
|
Exit;
|
||||||
@@ -877,7 +893,7 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ScanResults.Count <> 0 then SetTimsListCount(ScanResults.Last.Count);
|
if ScanThreads.Count <> 0 then SetTimsListCount(ScanResults.Last.Count);
|
||||||
|
|
||||||
CheckButtonsAndMainMenu;
|
CheckButtonsAndMainMenu;
|
||||||
|
|
||||||
@@ -891,6 +907,18 @@ begin
|
|||||||
actStopScan.Tag := NativeInt(True);
|
actStopScan.Tag := NativeInt(True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmMain.BeforeScan(MaxProgress: Integer);
|
||||||
|
begin
|
||||||
|
cbbFiles.Enabled := False;
|
||||||
|
pnlList.Enabled := False;
|
||||||
|
|
||||||
|
actScanFile.Enabled := False;
|
||||||
|
actScanDir.Enabled := False;
|
||||||
|
|
||||||
|
pbProgress.Max := MaxProgress;
|
||||||
|
pbProgress.Position := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.SetTimsListCount(Count: Integer);
|
procedure TfrmMain.SetTimsListCount(Count: Integer);
|
||||||
begin
|
begin
|
||||||
lvList.Items.BeginUpdate;
|
lvList.Items.BeginUpdate;
|
||||||
@@ -1004,43 +1032,33 @@ end;
|
|||||||
|
|
||||||
procedure TfrmMain.ShowTimInfo(ShowInfo: Boolean);
|
procedure TfrmMain.ShowTimInfo(ShowInfo: Boolean);
|
||||||
var
|
var
|
||||||
I: Integer;
|
|
||||||
TIM: PTIM;
|
TIM: PTIM;
|
||||||
TimInfo: TTimInfo;
|
TimInfo: TTimInfo;
|
||||||
begin
|
begin
|
||||||
for I := 1 to sbMain.Panels.Count do
|
tblTimInfo.Cells[1, 1] := '';
|
||||||
sbMain.Panels[I - 1].Text := '';
|
tblTimInfo.Cells[1, 2] := '';
|
||||||
|
tblTimInfo.Cells[1, 3] := '';
|
||||||
|
tblTimInfo.Cells[1, 5] := '';
|
||||||
|
tblTimInfo.Cells[1, 6] := '';
|
||||||
|
tblTimInfo.Cells[1, 8] := '';
|
||||||
|
|
||||||
if not ShowInfo then Exit;
|
if not ShowInfo then Exit;
|
||||||
|
|
||||||
TimInfo := SelectedTimInfo;
|
TimInfo := SelectedTimInfo;
|
||||||
TIM := SelectedTimInMode;
|
TIM := SelectedTimInMode;
|
||||||
|
|
||||||
I := 0;
|
tblTimInfo.Cells[1, 1] := Format('0x%x', [TimInfo.Position]);
|
||||||
|
|
||||||
sbMain.Panels[I].Text := Format('Pos: 0x%x', [TimInfo.Position]);
|
tblTimInfo.Cells[1, 2] := Format('%d', [GetTimVersion(TIM)]);
|
||||||
sbMain.Panels[I].Width := Canvas.GetTextWidth(sbMain.Panels[I].Text) + 8; Inc(I);
|
tblTimInfo.Cells[1, 3] := Format('%s', [TIMIsGoodStr(TIM)]);
|
||||||
sbMain.Panels[I].Text := Format('Ver: %d', [GetTimVersion(TIM)]);
|
|
||||||
sbMain.Panels[I].Width := Canvas.GetTextWidth(sbMain.Panels[I].Text) + 8; Inc(I);
|
|
||||||
sbMain.Panels[I].Text := Format('Good: %s', [TIMIsGoodStr(TIM)]);
|
|
||||||
sbMain.Panels[I].Width := Canvas.GetTextWidth(sbMain.Panels[I].Text) + 8; Inc(I);
|
|
||||||
|
|
||||||
if TIMHasCLUT(TIM) then
|
if TIMHasCLUT(TIM) then
|
||||||
begin
|
begin
|
||||||
sbMain.Panels[I].Alignment := taRightJustify;
|
tblTimInfo.Cells[1, 5] := Format('%dx%d', [GetTimClutVRAMX(TIM), GetTimClutVRAMY(TIM)]);
|
||||||
sbMain.Panels[I].Text := 'CLUT:';
|
tblTimInfo.Cells[1, 6] := Format('%d', [GetTimColorsCount(TIM)]);
|
||||||
sbMain.Panels[I].Width := Canvas.GetTextWidth(sbMain.Panels[I].Text) + 20; Inc(I);
|
|
||||||
sbMain.Panels[I].Text := Format('X/Y: %dx%d', [GetTimClutVRAMX(TIM), GetTimClutVRAMY(TIM)]);
|
|
||||||
sbMain.Panels[I].Width := Canvas.GetTextWidth(sbMain.Panels[I].Text) + 8; Inc(I);
|
|
||||||
sbMain.Panels[I].Text := Format('Colors: %d', [GetTimColorsCount(TIM)]);
|
|
||||||
sbMain.Panels[I].Width := Canvas.GetTextWidth(sbMain.Panels[I].Text) + 8; Inc(I);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
sbMain.Panels[I].Alignment := taRightJustify;
|
tblTimInfo.Cells[1, 8] := Format('%dx%d', [GetTimImageVRAMX(TIM), GetTimImageVRAMY(TIM)]);
|
||||||
sbMain.Panels[I].Text := 'IMAGE:';
|
|
||||||
sbMain.Panels[I].Width := Canvas.GetTextWidth(sbMain.Panels[I].Text) + 20; Inc(I);
|
|
||||||
sbMain.Panels[I].Text := Format('X/Y: %dx%d', [GetTimImageVRAMX(TIM), GetTimImageVRAMY(TIM)]);
|
|
||||||
sbMain.Panels[I].Width := Canvas.GetTextWidth(sbMain.Panels[I].Text) + 8; Inc(I);
|
|
||||||
|
|
||||||
FreeTIM(TIM);
|
FreeTIM(TIM);
|
||||||
end;
|
end;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ type
|
|||||||
pSrcFileStream: TFileStream;
|
pSrcFileStream: TFileStream;
|
||||||
pStopScan: boolean;
|
pStopScan: boolean;
|
||||||
procedure SetStatusText;
|
procedure SetStatusText;
|
||||||
procedure StartScan;
|
|
||||||
procedure FinishScan;
|
procedure FinishScan;
|
||||||
procedure UpdateProgressBar;
|
procedure UpdateProgressBar;
|
||||||
procedure AddResult(TIM: PTIM);
|
procedure AddResult(TIM: PTIM);
|
||||||
@@ -31,6 +30,7 @@ type
|
|||||||
constructor Create(const FileToScan: string; ImageScan: boolean; Results: PScanResultList);
|
constructor Create(const FileToScan: string; ImageScan: boolean; Results: PScanResultList);
|
||||||
//property Started: boolean read pStarted write pStarted;
|
//property Started: boolean read pStarted write pStarted;
|
||||||
property StopScan: boolean read pStopScan write pStopScan;
|
property StopScan: boolean read pStopScan write pStopScan;
|
||||||
|
property FileLength: Integer read pFileSize;
|
||||||
end;
|
end;
|
||||||
TScanThreadList = specialize TFPGObjectList<TScanThread>;
|
TScanThreadList = specialize TFPGObjectList<TScanThread>;
|
||||||
|
|
||||||
@@ -89,8 +89,6 @@ var
|
|||||||
pScanFinished: boolean;
|
pScanFinished: boolean;
|
||||||
pRealBufSize, pTimPosition, pTIMNumber: Integer;
|
pRealBufSize, pTimPosition, pTIMNumber: Integer;
|
||||||
begin
|
begin
|
||||||
Synchronize(@StartScan);
|
|
||||||
|
|
||||||
if pScanResult.IsImage then
|
if pScanResult.IsImage then
|
||||||
pSectorBufferSize := cSectorBufferSize
|
pSectorBufferSize := cSectorBufferSize
|
||||||
else
|
else
|
||||||
@@ -187,7 +185,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if not CheckForFileOpened(pResults, pScanResult.ScanFile) then
|
if not CheckForFileOpened(pResults, pScanResult.ScanFile) then
|
||||||
pResults^.Add(pScanResult)
|
begin
|
||||||
|
pResults^.Add(pScanResult);
|
||||||
|
frmMain.cbbFiles.Items.Add(pScanResult.ScanFile);
|
||||||
|
end
|
||||||
else
|
else
|
||||||
pScanResult.Free;
|
pScanResult.Free;
|
||||||
end;
|
end;
|
||||||
@@ -197,15 +198,6 @@ begin
|
|||||||
frmMain.lblStatus.Caption := pStatusText;
|
frmMain.lblStatus.Caption := pStatusText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TScanThread.StartScan;
|
|
||||||
begin
|
|
||||||
frmMain.cbbFiles.Enabled := False;
|
|
||||||
frmMain.pnlList.Enabled := False;
|
|
||||||
|
|
||||||
frmMain.pbProgress.Max := FileSize(pScanResult.ScanFile);
|
|
||||||
frmMain.pbProgress.Position := 0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TScanThread.UpdateProgressBar;
|
procedure TScanThread.UpdateProgressBar;
|
||||||
begin
|
begin
|
||||||
frmMain.pbProgress.Position := pFilePos;
|
frmMain.pbProgress.Position := pFilePos;
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ type
|
|||||||
function FBackColorRead(): TColor;
|
function FBackColorRead(): TColor;
|
||||||
procedure FBitModeWrite(Mode: Integer);
|
procedure FBitModeWrite(Mode: Integer);
|
||||||
function FBitModeRead(): Integer;
|
function FBitModeRead(): Integer;
|
||||||
|
procedure FInfoVisibleWrite(Value: Boolean);
|
||||||
|
function FInfoVisibleRead(): Boolean;
|
||||||
public
|
public
|
||||||
constructor Create(const DirPath: string);
|
constructor Create(const DirPath: string);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@@ -32,6 +34,7 @@ type
|
|||||||
property LastDir: string read FLastDirRead write FLastDirWrite;
|
property LastDir: string read FLastDirRead write FLastDirWrite;
|
||||||
property BackColor: TColor read FBackColorRead write FBackColorWrite;
|
property BackColor: TColor read FBackColorRead write FBackColorWrite;
|
||||||
property BitMode: Integer read FBitModeRead write FBitModeWrite;
|
property BitMode: Integer read FBitModeRead write FBitModeWrite;
|
||||||
|
property InfoVisible: Boolean read FInfoVisibleRead write FInfoVisibleWrite;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@@ -92,6 +95,16 @@ begin
|
|||||||
Result := FIniFile.ReadInteger(sMain, 'BitMode', 0);
|
Result := FIniFile.ReadInteger(sMain, 'BitMode', 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSettings.FInfoVisibleWrite(Value: Boolean);
|
||||||
|
begin
|
||||||
|
FIniFile.WriteBool(sMain, 'InfoVisible', Value);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TSettings.FInfoVisibleRead: Boolean;
|
||||||
|
begin
|
||||||
|
Result := FIniFile.ReadBool(sMain, 'InfoVisible', False);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TSettings.Create(const DirPath: string);
|
constructor TSettings.Create(const DirPath: string);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
@@ -107,4 +120,4 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
Reference in New Issue
Block a user