Last fixes for stable version.
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
<UseVersionInfo Value="True"/>
|
||||
<AutoIncrementBuild Value="True"/>
|
||||
<MajorVersionNr Value="1"/>
|
||||
<RevisionNr Value="85"/>
|
||||
<RevisionNr Value="86"/>
|
||||
<BuildNr Value="1"/>
|
||||
<StringTable CompanyName="Lab 313" FileDescription="The best TIMs tool ever!:)" ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="6">
|
||||
@@ -346,7 +347,7 @@
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="руссиш\tim2view_$(TargetOS)"/>
|
||||
<Filename Value="output\tim2view_$(TargetOS)"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir);bgrabitmap"/>
|
||||
|
||||
20
tim2view.lps
20
tim2view.lps
@@ -23,8 +23,8 @@
|
||||
<UnitName Value="umain"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="540"/>
|
||||
<CursorPos X="66" Y="556"/>
|
||||
<TopLine Value="295"/>
|
||||
<CursorPos X="66" Y="308"/>
|
||||
<UsageCount Value="816"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
@@ -48,11 +48,10 @@
|
||||
<Filename Value="ucommon.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ucommon"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="35" Y="6"/>
|
||||
<CursorPos X="70" Y="9"/>
|
||||
<UsageCount Value="816"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
@@ -62,8 +61,8 @@
|
||||
<UnitName Value="utim"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="185"/>
|
||||
<CursorPos X="1" Y="204"/>
|
||||
<TopLine Value="244"/>
|
||||
<CursorPos X="82" Y="311"/>
|
||||
<UsageCount Value="816"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
@@ -126,10 +125,11 @@
|
||||
<Filename Value="udrawtim.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="udrawtim"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="15" Y="6"/>
|
||||
<TopLine Value="92"/>
|
||||
<CursorPos X="58" Y="103"/>
|
||||
<UsageCount Value="816"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit11>
|
||||
@@ -148,7 +148,7 @@
|
||||
<EditorIndex Value="1"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="20" Y="1"/>
|
||||
<CursorPos X="31" Y="3"/>
|
||||
<UsageCount Value="802"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit13>
|
||||
@@ -160,7 +160,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="7"/>
|
||||
<CursorPos X="20" Y="16"/>
|
||||
<UsageCount Value="77"/>
|
||||
<UsageCount Value="83"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit14>
|
||||
</Units>
|
||||
|
||||
BIN
tim2view.res
BIN
tim2view.res
Binary file not shown.
@@ -3,7 +3,7 @@ unit ucommon;
|
||||
interface
|
||||
|
||||
const
|
||||
cProgramName = 'Tim2View SVN.r85 by [Lab 313] (for ' +
|
||||
cProgramName = 'Tim2View SVN.r86 by [Lab 313] (for ' +
|
||||
{$IFDEF Linux}'Linux' + {$IFEND}
|
||||
{$IFDEF Darwin}'Mac OS X' + {$IFEND}
|
||||
{$IFDEF Windows}'Windows' + {$IFEND}
|
||||
|
||||
@@ -381,7 +381,7 @@ begin
|
||||
for Y := 1 to ROWS do
|
||||
for X := 1 to COLS do
|
||||
begin
|
||||
ClearCanvas(@Grid^.Canvas, Grid^.CellRect(X - 1, Y - 1));
|
||||
//ClearCanvas(@Grid^.Canvas, Grid^.CellRect(X - 1, Y - 1));
|
||||
DrawClutCell(TIM, CLUT_NUM, Grid, X - 1, Y - 1);
|
||||
end;
|
||||
end;
|
||||
|
||||
68
umain.lfm
68
umain.lfm
@@ -9,7 +9,7 @@ object frmMain: TfrmMain
|
||||
VertScrollBar.Range = 344
|
||||
ActiveControl = pnlList
|
||||
AllowDropFiles = True
|
||||
ClientHeight = 648
|
||||
ClientHeight = 643
|
||||
ClientWidth = 790
|
||||
Color = clBtnFace
|
||||
Font.Color = clWindowText
|
||||
@@ -498,7 +498,7 @@ object frmMain: TfrmMain
|
||||
object pnlStatus: TPanel
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 618
|
||||
Top = 613
|
||||
Width = 790
|
||||
Align = alBottom
|
||||
BevelOuter = bvLowered
|
||||
@@ -538,13 +538,13 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object cbbFiles: TComboBox
|
||||
Left = 0
|
||||
Height = 21
|
||||
Height = 28
|
||||
Top = 0
|
||||
Width = 790
|
||||
Align = alTop
|
||||
DropDownCount = 30
|
||||
Enabled = False
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
OnChange = actChangeFileExecute
|
||||
OnCloseUp = actReturnFocusExecute
|
||||
Style = csDropDownList
|
||||
@@ -552,33 +552,33 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object pnlMain: TPanel
|
||||
Left = 0
|
||||
Height = 597
|
||||
Top = 21
|
||||
Height = 585
|
||||
Top = 28
|
||||
Width = 790
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 597
|
||||
ClientHeight = 585
|
||||
ClientWidth = 790
|
||||
TabOrder = 1
|
||||
object splMain: TSplitter
|
||||
Left = 253
|
||||
Height = 597
|
||||
Height = 585
|
||||
Top = 0
|
||||
Width = 5
|
||||
end
|
||||
object pnlList: TPanel
|
||||
Left = 0
|
||||
Height = 597
|
||||
Height = 585
|
||||
Top = 0
|
||||
Width = 253
|
||||
Align = alLeft
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 597
|
||||
ClientHeight = 585
|
||||
ClientWidth = 253
|
||||
TabOrder = 0
|
||||
object lvList: TListView
|
||||
Left = 0
|
||||
Height = 384
|
||||
Height = 372
|
||||
Top = 28
|
||||
Width = 253
|
||||
Align = alClient
|
||||
@@ -586,28 +586,27 @@ object frmMain: TfrmMain
|
||||
item
|
||||
AutoSize = True
|
||||
Caption = '# / 0'
|
||||
Width = 249
|
||||
Width = 41
|
||||
end
|
||||
item
|
||||
Alignment = taCenter
|
||||
AutoSize = True
|
||||
Caption = 'BPP'
|
||||
Width = 30
|
||||
Width = 35
|
||||
end
|
||||
item
|
||||
Alignment = taCenter
|
||||
AutoSize = True
|
||||
Caption = 'CLUTs'
|
||||
Width = 42
|
||||
Width = 47
|
||||
end
|
||||
item
|
||||
Alignment = taCenter
|
||||
AutoSize = True
|
||||
Caption = 'W x H'
|
||||
Width = 41
|
||||
Width = 128
|
||||
end>
|
||||
ColumnClick = False
|
||||
GridLines = True
|
||||
OwnerData = True
|
||||
PopupMenu = pmList
|
||||
ReadOnly = True
|
||||
@@ -651,7 +650,7 @@ object frmMain: TfrmMain
|
||||
object tblTimInfo: TStringGrid
|
||||
Left = 0
|
||||
Height = 185
|
||||
Top = 412
|
||||
Top = 400
|
||||
Width = 253
|
||||
Align = alBottom
|
||||
AutoEdit = False
|
||||
@@ -666,7 +665,6 @@ object frmMain: TfrmMain
|
||||
TitleFont.Color = clWindowText
|
||||
TitleFont.Height = -11
|
||||
TitleFont.Name = 'Tahoma'
|
||||
Visible = False
|
||||
ColWidths = (
|
||||
102
|
||||
150
|
||||
@@ -708,32 +706,32 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object pnlImage: TPanel
|
||||
Left = 258
|
||||
Height = 597
|
||||
Height = 585
|
||||
Top = 0
|
||||
Width = 532
|
||||
Align = alClient
|
||||
BevelOuter = bvLowered
|
||||
ClientHeight = 597
|
||||
ClientHeight = 585
|
||||
ClientWidth = 532
|
||||
Color = clBtnFace
|
||||
ParentColor = False
|
||||
TabOrder = 1
|
||||
object pnlImageOptions: TPanel
|
||||
Left = 1
|
||||
Height = 27
|
||||
Top = 569
|
||||
Height = 32
|
||||
Top = 552
|
||||
Width = 530
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
BevelOuter = bvLowered
|
||||
ClientHeight = 27
|
||||
ClientHeight = 32
|
||||
ClientWidth = 530
|
||||
Color = clBtnFace
|
||||
ParentColor = False
|
||||
TabOrder = 0
|
||||
object btnShowClut: TButton
|
||||
Left = 476
|
||||
Height = 23
|
||||
Height = 28
|
||||
Top = 2
|
||||
Width = 52
|
||||
Align = alRight
|
||||
@@ -744,12 +742,12 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object cbbBitMode: TComboBox
|
||||
Left = 2
|
||||
Height = 21
|
||||
Height = 28
|
||||
Top = 2
|
||||
Width = 159
|
||||
Align = alLeft
|
||||
BorderSpacing.Around = 1
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Real'
|
||||
@@ -768,12 +766,12 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object cbbTranspMode: TComboBox
|
||||
Left = 162
|
||||
Height = 21
|
||||
Height = 28
|
||||
Top = 2
|
||||
Width = 150
|
||||
Align = alLeft
|
||||
BorderSpacing.Around = 1
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
ItemIndex = 1
|
||||
Items.Strings = (
|
||||
'Full transparence'
|
||||
@@ -789,13 +787,13 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object cbbCLUT: TComboBox
|
||||
Left = 366
|
||||
Height = 21
|
||||
Height = 28
|
||||
Top = 2
|
||||
Width = 109
|
||||
Align = alRight
|
||||
BorderSpacing.Around = 1
|
||||
DropDownCount = 16
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
OnChange = actChangeClutIdxExecute
|
||||
Style = csDropDownList
|
||||
TabOrder = 3
|
||||
@@ -804,7 +802,7 @@ object frmMain: TfrmMain
|
||||
object pnlClut: TPanel
|
||||
Left = 1
|
||||
Height = 192
|
||||
Top = 377
|
||||
Top = 360
|
||||
Width = 530
|
||||
Align = alBottom
|
||||
BevelOuter = bvLowered
|
||||
@@ -816,7 +814,7 @@ object frmMain: TfrmMain
|
||||
Visible = False
|
||||
object grdClut: TDrawGrid
|
||||
Left = 1
|
||||
Height = 138
|
||||
Height = 125
|
||||
Top = 1
|
||||
Width = 528
|
||||
Align = alClient
|
||||
@@ -841,8 +839,8 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object lblClutHint: TLabel
|
||||
Left = 1
|
||||
Height = 52
|
||||
Top = 139
|
||||
Height = 65
|
||||
Top = 126
|
||||
Width = 528
|
||||
Align = alBottom
|
||||
Alignment = taCenter
|
||||
@@ -854,7 +852,7 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object imgTim: TImage
|
||||
Left = 1
|
||||
Height = 376
|
||||
Height = 359
|
||||
Top = 1
|
||||
Width = 530
|
||||
AntialiasingMode = amOff
|
||||
|
||||
42
utim.pas
42
utim.pas
@@ -238,6 +238,16 @@ begin
|
||||
Result := (TIM^.HEAD^.bBPP in cTIMCLUT);
|
||||
end;
|
||||
|
||||
function CheckCLUTVramX(TIM: PTIM): Boolean;
|
||||
begin
|
||||
Result := (TIM^.CLUT^.wVRAMX + TIM^.CLUT^.wColorsCount) <= cCLUTColorsMax;
|
||||
end;
|
||||
|
||||
function CheckCLUTVramY(TIM: PTIM): Boolean;
|
||||
begin
|
||||
Result := (TIM^.CLUT^.wVRAMY + TIM^.CLUT^.wClutsCount) <= cCLUTCountMax;
|
||||
end;
|
||||
|
||||
function CheckCLUTColors(TIM: PTIM): Boolean;
|
||||
begin
|
||||
Result := (TIM^.CLUT^.wColorsCount >= 1) and (TIM^.CLUT^.wColorsCount <= cCLUTColorsMax);
|
||||
@@ -267,9 +277,7 @@ end;
|
||||
|
||||
function CheckCLUT(TIM: PTIM): Boolean;
|
||||
begin
|
||||
Result := (CheckCLUTColors(TIM) and CheckCLUTCount(TIM)
|
||||
// Need to Check CLUT^.dwSize
|
||||
);
|
||||
Result := CheckCLUTColors(TIM) and CheckCLUTCount(TIM) and CheckCLUTVramX(TIM) and CheckCLUTVramY(TIM);
|
||||
end;
|
||||
|
||||
function CheckTIMSize(TIM: PTIM): Boolean;
|
||||
@@ -282,15 +290,31 @@ begin
|
||||
Result := (TIM^.IMAGE^.dwSize = GetTIMIMAGESize(TIM));
|
||||
end;
|
||||
|
||||
function CheckIMAGEWidth(TIM: PTIM): Boolean;
|
||||
begin
|
||||
Result := (TIM^.IMAGE^.wWidth >= 1) and (TIM^.IMAGE^.wWidth <= cIMAGEWidthMax);
|
||||
end;
|
||||
|
||||
function CheckIMAGEHeight(TIM: PTIM): Boolean;
|
||||
begin
|
||||
Result := (TIM^.IMAGE^.wHeight >= 1) and (TIM^.IMAGE^.wHeight <= cIMAGEHeightMax);
|
||||
end;
|
||||
|
||||
function CheckIMAGEVramX(TIM: PTIM): Boolean;
|
||||
begin
|
||||
Result := (TIM^.IMAGE^.wVRAMX + TIM^.IMAGE^.wWidth) <= cCLUTColorsMax;
|
||||
end;
|
||||
|
||||
function CheckIMAGEVramY(TIM: PTIM): Boolean;
|
||||
begin
|
||||
Result := (TIM^.IMAGE^.wVRAMY + TIM^.IMAGE^.wHeight) <= cCLUTCountMax;
|
||||
end;
|
||||
|
||||
function CheckIMAGE(TIM: PTIM): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
Result := CheckIMAGEWidth(TIM) and CheckIMAGEHeight(TIM) and CheckIMAGEVramX(TIM) and CheckIMAGEVramY(TIM);
|
||||
|
||||
if (TIM^.IMAGE^.wWidth = 0) or (TIM^.IMAGE^.wHeight = 0) then Exit;
|
||||
|
||||
if (TIM^.IMAGE^.wWidth > cIMAGEWidthMax) or (TIM^.IMAGE^.wHeight > cIMAGEHeightMax) then Exit;
|
||||
|
||||
Result := (not(TIM^.HEAD^.bBPP in cTIMWrongBads)) or TIMIsGood(TIM);
|
||||
Result := Result and ((not(TIM^.HEAD^.bBPP in cTIMWrongBads)) or TIMIsGood(TIM));
|
||||
end;
|
||||
|
||||
procedure ClearTIM(TIM: PTIM);
|
||||
|
||||
Reference in New Issue
Block a user