Fixed numerous bugs with non ANSI strings; Added Image background changing; Added few usability improvements.

This commit is contained in:
meffi@lab313.ru
2014-04-17 13:00:26 +00:00
parent 548bd2cb0d
commit 6c32010405
10 changed files with 226 additions and 1304 deletions

View File

@@ -4,10 +4,15 @@
<Version Value="9"/> <Version Value="9"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<General> <General>
<Flags>
<SaveClosedFiles Value="False"/>
<LRSInOutputDirectory Value="False"/>
<SaveJumpHistory Value="False"/>
<SaveFoldState Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<Title Value="tim2view"/> <Title Value="tim2view"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
<Icon Value="0"/> <Icon Value="0"/>
</General> </General>
@@ -110,7 +115,7 @@
<Version Value="11"/> <Version Value="11"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Target> <Target>
<Filename Value="output\tim2view_$(TargetOS)_$(TargetCPU)"/> <Filename Value="output\tim2view_$(TargetOS)"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir);bgrabitmap"/> <IncludeFiles Value="$(ProjOutDir);bgrabitmap"/>
@@ -118,6 +123,11 @@
<OtherUnitFiles Value="bgrabitmap"/> <OtherUnitFiles Value="bgrabitmap"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration> <CodeGeneration>
<SmartLinkUnit Value="True"/> <SmartLinkUnit Value="True"/>
<RelocatableUnit Value="True"/> <RelocatableUnit Value="True"/>

View File

@@ -4,15 +4,12 @@
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Version Value="9"/> <Version Value="9"/>
<BuildModes Active="Default"/> <BuildModes Active="Default"/>
<Units Count="37"> <Units Count="13">
<Unit0> <Unit0>
<Filename Value="tim2view.lpr"/> <Filename Value="tim2view.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="tim2view"/> <UnitName Value="tim2view"/>
<WindowIndex Value="0"/> <UsageCount Value="23"/>
<TopLine Value="1"/>
<CursorPos X="37" Y="11"/>
<UsageCount Value="48"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="umain.pas"/> <Filename Value="umain.pas"/>
@@ -23,9 +20,9 @@
<UnitName Value="umain"/> <UnitName Value="umain"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="10"/> <TopLine Value="568"/>
<CursorPos X="91" Y="29"/> <CursorPos X="49" Y="578"/>
<UsageCount Value="48"/> <UsageCount Value="23"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
</Unit1> </Unit1>
@@ -33,458 +30,98 @@
<Filename Value="edc.pas"/> <Filename Value="edc.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="edc"/> <UnitName Value="edc"/>
<WindowIndex Value="0"/> <UsageCount Value="23"/>
<TopLine Value="42"/>
<CursorPos X="88" Y="20"/>
<UsageCount Value="48"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
<Filename Value="ecc.pas"/> <Filename Value="ecc.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ecc"/> <UnitName Value="ecc"/>
<WindowIndex Value="0"/> <UsageCount Value="23"/>
<TopLine Value="1"/>
<CursorPos X="6" Y="11"/>
<UsageCount Value="48"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="ucommon.pas"/> <Filename Value="ucommon.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ucommon"/> <UnitName Value="ucommon"/>
<IsVisibleTab Value="True"/> <IsVisibleTab Value="True"/>
<EditorIndex Value="5"/> <EditorIndex Value="1"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="79" Y="18"/> <CursorPos X="35" Y="6"/>
<UsageCount Value="48"/> <UsageCount Value="23"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
<Filename Value="utim.pas"/> <Filename Value="utim.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="utim"/> <UnitName Value="utim"/>
<EditorIndex Value="2"/> <EditorIndex Value="5"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="442"/> <TopLine Value="259"/>
<CursorPos X="3" Y="456"/> <CursorPos X="28" Y="283"/>
<UsageCount Value="48"/> <UsageCount Value="23"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
<Filename Value="ucdimage.pas"/> <Filename Value="ucdimage.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ucdimage"/> <UnitName Value="ucdimage"/>
<EditorIndex Value="3"/> <EditorIndex Value="2"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="70"/> <TopLine Value="81"/>
<CursorPos X="65" Y="78"/> <CursorPos X="95" Y="89"/>
<UsageCount Value="48"/> <UsageCount Value="23"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
<Filename Value="usettings.pas"/> <Filename Value="usettings.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="usettings"/> <UnitName Value="usettings"/>
<EditorIndex Value="4"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="52"/> <TopLine Value="17"/>
<CursorPos X="87" Y="71"/> <CursorPos X="76" Y="31"/>
<UsageCount Value="48"/> <UsageCount Value="23"/>
<Loaded Value="True"/>
</Unit7> </Unit7>
<Unit8> <Unit8>
<Filename Value="uscanresult.pas"/> <Filename Value="uscanresult.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="uscanresult"/> <UnitName Value="uscanresult"/>
<WindowIndex Value="0"/> <UsageCount Value="23"/>
<TopLine Value="26"/>
<CursorPos X="1" Y="66"/>
<UsageCount Value="47"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
<Filename Value="uscanthread.pas"/> <Filename Value="uscanthread.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="uscanthread"/> <UnitName Value="uscanthread"/>
<EditorIndex Value="4"/> <EditorIndex Value="3"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="192"/>
<CursorPos X="78" Y="20"/> <CursorPos X="78" Y="212"/>
<UsageCount Value="47"/> <UsageCount Value="23"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="ucpucount.pas"/> <Filename Value="ucpucount.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ucpucount"/> <UnitName Value="ucpucount"/>
<EditorIndex Value="6"/> <UsageCount Value="23"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="23" Y="8"/>
<UsageCount Value="46"/>
<Loaded Value="True"/>
</Unit10> </Unit10>
<Unit11> <Unit11>
<Filename Value="udrawtim.pas"/> <Filename Value="udrawtim.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="udrawtim"/> <UnitName Value="udrawtim"/>
<EditorIndex Value="1"/> <UsageCount Value="23"/>
<WindowIndex Value="0"/>
<TopLine Value="110"/>
<CursorPos X="1" Y="127"/>
<UsageCount Value="33"/>
<Loaded Value="True"/>
</Unit11> </Unit11>
<Unit12> <Unit12>
<Filename Value="bgrabitmap\bgrabitmap.pas"/> <Filename Value="bgrabitmap\bgrabitmap.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="BGRABitmap"/> <UnitName Value="BGRABitmap"/>
<WindowIndex Value="0"/>
<TopLine Value="55"/>
<CursorPos X="3" Y="69"/>
<UsageCount Value="23"/> <UsageCount Value="23"/>
</Unit12> </Unit12>
<Unit13>
<Filename Value="l2sq_table.pas"/>
<UnitName Value="l2sq_table"/>
<WindowIndex Value="0"/>
<TopLine Value="70"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="19"/>
</Unit13>
<Unit14>
<Filename Value="umain.lfm"/>
<ComponentName Value="frmMain"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<ExtraEditorCount Value="4"/>
<ExtraEditor1>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
</ExtraEditor1>
<ExtraEditor2>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
</ExtraEditor2>
<ExtraEditor3>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
</ExtraEditor3>
<ExtraEditor4>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
</ExtraEditor4>
<UsageCount Value="9"/>
<DefaultSyntaxHighlighter Value="LFM"/>
</Unit14>
<Unit15>
<Filename Value="C:\codetyphon\fpcsrc\rtl\unix\cthreads.pp"/>
<UnitName Value="cthreads"/>
<WindowIndex Value="0"/>
<TopLine Value="10"/>
<CursorPos X="29" Y="24"/>
<UsageCount Value="9"/>
</Unit15>
<Unit16>
<Filename Value="C:\codetyphon\typhon\components\pl_Synapse\source\synamisc.pas"/>
<UnitName Value="synamisc"/>
<WindowIndex Value="0"/>
<TopLine Value="151"/>
<CursorPos X="25" Y="165"/>
<UsageCount Value="9"/>
</Unit16>
<Unit17>
<Filename Value="C:\codetyphon\typhon\lcl\forms.pp"/>
<UnitName Value="Forms"/>
<WindowIndex Value="0"/>
<TopLine Value="50"/>
<CursorPos X="3" Y="64"/>
<UsageCount Value="10"/>
</Unit17>
<Unit18>
<Filename Value="C:\codetyphon\fpcsrc\rtl\objpas\fgl.pp"/>
<UnitName Value="fgl"/>
<WindowIndex Value="0"/>
<TopLine Value="138"/>
<CursorPos X="7" Y="152"/>
<UsageCount Value="10"/>
</Unit18>
<Unit19>
<Filename Value="C:\codetyphon\typhon\lcl\comctrls.pp"/>
<UnitName Value="ComCtrls"/>
<WindowIndex Value="0"/>
<TopLine Value="1203"/>
<CursorPos X="3" Y="1217"/>
<UsageCount Value="11"/>
</Unit19>
<Unit20>
<Filename Value="Graphics32\Packages\GR32_L.pas"/>
<UnitName Value="GR32_L"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="18" Y="13"/>
<UsageCount Value="10"/>
</Unit20>
<Unit21>
<Filename Value="Graphics32\GR32.pas"/>
<UnitName Value="GR32"/>
<WindowIndex Value="0"/>
<TopLine Value="432"/>
<CursorPos X="58" Y="447"/>
<UsageCount Value="10"/>
</Unit21>
<Unit22>
<Filename Value="Graphics32\GR32_Png.pas"/>
<UnitName Value="GR32_PNG"/>
<WindowIndex Value="0"/>
<TopLine Value="904"/>
<CursorPos X="1" Y="918"/>
<UsageCount Value="10"/>
</Unit22>
<Unit23>
<Filename Value="Graphics32\GR32_PortableNetworkGraphic.pas"/>
<UnitName Value="GR32_PortableNetworkGraphic"/>
<WindowIndex Value="0"/>
<TopLine Value="4696"/>
<CursorPos X="3" Y="4700"/>
<UsageCount Value="10"/>
</Unit23>
<Unit24>
<Filename Value="C:\lazarus\fpc\2.6.2\source\rtl\inc\objpash.inc"/>
<WindowIndex Value="0"/>
<TopLine Value="178"/>
<CursorPos X="23" Y="192"/>
<UsageCount Value="10"/>
</Unit24>
<Unit25>
<Filename Value="C:\lazarus\lcl\graphics.pp"/>
<UnitName Value="Graphics"/>
<WindowIndex Value="0"/>
<TopLine Value="1369"/>
<CursorPos X="14" Y="1383"/>
<UsageCount Value="10"/>
</Unit25>
<Unit26>
<Filename Value="C:\lazarus\lcl\graphtype.pp"/>
<UnitName Value="GraphType"/>
<WindowIndex Value="0"/>
<TopLine Value="193"/>
<CursorPos X="3" Y="195"/>
<UsageCount Value="10"/>
</Unit26>
<Unit27>
<Filename Value="bgra-controls\bgragraphiccontrol.pas"/>
<UnitName Value="BGRAGraphicControl"/>
<WindowIndex Value="0"/>
<TopLine Value="35"/>
<CursorPos X="14" Y="49"/>
<UsageCount Value="10"/>
</Unit27>
<Unit28>
<Filename Value="bgrabitmap\bgrawinbitmap.pas"/>
<UnitName Value="BGRAWinBitmap"/>
<WindowIndex Value="0"/>
<TopLine Value="33"/>
<CursorPos X="32" Y="47"/>
<UsageCount Value="10"/>
</Unit28>
<Unit29>
<Filename Value="C:\lazarus\packager\registration\fcllaz.pas"/>
<UnitName Value="fcllaz"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="10"/>
</Unit29>
<Unit30>
<Filename Value="AggPasMod\Examples\Simple\AlphaMask.dpr"/>
<UnitName Value="AlphaMask"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="26" Y="11"/>
<UsageCount Value="10"/>
</Unit30>
<Unit31>
<Filename Value="bgrabitmap\bgrabitmaptypes.pas"/>
<UnitName Value="BGRABitmapTypes"/>
<WindowIndex Value="0"/>
<TopLine Value="356"/>
<CursorPos X="16" Y="370"/>
<UsageCount Value="10"/>
</Unit31>
<Unit32>
<Filename Value="bgrabitmap\bgradefaultbitmap.pas"/>
<UnitName Value="BGRADefaultBitmap"/>
<WindowIndex Value="0"/>
<TopLine Value="895"/>
<CursorPos X="1" Y="919"/>
<UsageCount Value="10"/>
</Unit32>
<Unit33>
<Filename Value="C:\codetyphon\typhon\packager\registration\fcllaz.pas"/>
<UnitName Value="fcllaz"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="10"/>
</Unit33>
<Unit34>
<Filename Value="C:\codetyphon\fpcsrc\rtl\linux\system.pp"/>
<UnitName Value="System"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="10"/>
</Unit34>
<Unit35>
<Filename Value="C:\codetyphon\typhon\packager\registration\lazaruspackageintf.pas"/>
<UnitName Value="LazarusPackageIntf"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="10"/>
</Unit35>
<Unit36>
<Filename Value="C:\codetyphon\typhon\packager\registration\registerfcl.pas"/>
<UnitName Value="RegisterFCL"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="59" Y="15"/>
<UsageCount Value="10"/>
</Unit36>
</Units> </Units>
<CustomDefines Count="1">
<Define0 Value="UseCThreads"/>
</CustomDefines>
<General> <General>
<ActiveWindowIndexAtStart Value="0"/> <ActiveWindowIndexAtStart Value="0"/>
</General> </General>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="umain.pas"/>
<Caret Line="394" Column="1" TopLine="377"/>
</Position1>
<Position2>
<Filename Value="umain.pas"/>
<Caret Line="395" Column="1" TopLine="377"/>
</Position2>
<Position3>
<Filename Value="umain.pas"/>
<Caret Line="396" Column="1" TopLine="377"/>
</Position3>
<Position4>
<Filename Value="umain.pas"/>
<Caret Line="398" Column="1" TopLine="383"/>
</Position4>
<Position5>
<Filename Value="umain.pas"/>
<Caret Line="399" Column="1" TopLine="383"/>
</Position5>
<Position6>
<Filename Value="umain.pas"/>
<Caret Line="400" Column="1" TopLine="383"/>
</Position6>
<Position7>
<Filename Value="umain.pas"/>
<Caret Line="401" Column="1" TopLine="383"/>
</Position7>
<Position8>
<Filename Value="umain.pas"/>
<Caret Line="403" Column="75" TopLine="383"/>
</Position8>
<Position9>
<Filename Value="umain.pas"/>
<Caret Line="404" Column="9" TopLine="383"/>
</Position9>
<Position10>
<Filename Value="umain.pas"/>
<Caret Line="382" Column="1" TopLine="367"/>
</Position10>
<Position11>
<Filename Value="umain.pas"/>
<Caret Line="404" Column="1" TopLine="391"/>
</Position11>
<Position12>
<Filename Value="udrawtim.pas"/>
<Caret Line="122" Column="1" TopLine="107"/>
</Position12>
<Position13>
<Filename Value="udrawtim.pas"/>
<Caret Line="123" Column="1" TopLine="107"/>
</Position13>
<Position14>
<Filename Value="umain.pas"/>
<Caret Line="404" Column="1" TopLine="385"/>
</Position14>
<Position15>
<Filename Value="udrawtim.pas"/>
<Caret Line="125" Column="1" TopLine="110"/>
</Position15>
<Position16>
<Filename Value="udrawtim.pas"/>
<Caret Line="127" Column="1" TopLine="110"/>
</Position16>
<Position17>
<Filename Value="umain.pas"/>
<Caret Line="396" Column="73" TopLine="385"/>
</Position17>
<Position18>
<Filename Value="umain.pas"/>
<Caret Line="404" Column="1" TopLine="385"/>
</Position18>
<Position19>
<Filename Value="udrawtim.pas"/>
<Caret Line="122" Column="1" TopLine="110"/>
</Position19>
<Position20>
<Filename Value="udrawtim.pas"/>
<Caret Line="123" Column="1" TopLine="110"/>
</Position20>
<Position21>
<Filename Value="umain.pas"/>
<Caret Line="388" Column="17" TopLine="385"/>
</Position21>
<Position22>
<Filename Value="umain.pas"/>
<Caret Line="405" Column="1" TopLine="385"/>
</Position22>
<Position23>
<Filename Value="udrawtim.pas"/>
<Caret Line="122" Column="1" TopLine="110"/>
</Position23>
<Position24>
<Filename Value="udrawtim.pas"/>
<Caret Line="123" Column="1" TopLine="110"/>
</Position24>
<Position25>
<Filename Value="udrawtim.pas"/>
<Caret Line="125" Column="1" TopLine="110"/>
</Position25>
<Position26>
<Filename Value="udrawtim.pas"/>
<Caret Line="127" Column="1" TopLine="110"/>
</Position26>
<Position27>
<Filename Value="umain.pas"/>
<Caret Line="394" Column="94" TopLine="385"/>
</Position27>
<Position28>
<Filename Value="umain.pas"/>
<Caret Line="949" Column="91" TopLine="941"/>
</Position28>
<Position29>
<Filename Value="umain.pas"/>
<Caret Line="954" Column="54" TopLine="940"/>
</Position29>
<Position30>
<Filename Value="umain.pas"/>
<Caret Line="960" Column="54" TopLine="940"/>
</Position30>
</JumpHistory>
</ProjectSession> </ProjectSession>
<EditorMacros Count="0"/> <EditorMacros Count="0"/>
</CONFIG> </CONFIG>

View File

@@ -40,7 +40,7 @@ procedure ReplaceTimInFileFromMemory(const FileName: string; TIM: PTIM;
implementation implementation
uses uses
ucommon, ecc, edc, classes, FileUtil, sysutils, lazutf8classes; ucommon, ecc, edc, classes, FileUtil, sysutils;
function bin2bcd(P: Integer): byte; function bin2bcd(P: Integer): byte;
begin begin
@@ -69,18 +69,17 @@ const
var var
Sz: cardinal; Sz: cardinal;
pFile: PBytesArray; pFile: PBytesArray;
tmp: TFileStreamUTF8; tmp: TFileStream;
begin begin
Result := False; Result := False;
Sz := FileSize(FileName); Sz := FileSize(FileName);
if (Sz > cMaxFileSize) or (Sz = 0) then if (Sz > cMaxFileSize) or (Sz = 0) then Exit;
Exit;
pFile := GetMemory(cSectorHeaderSize); pFile := GetMemory(cSectorHeaderSize);
try try
tmp := TFileStreamUTF8.Create(FileName, fmOpenRead or fmShareDenyWrite); tmp := TFileStream.Create(Utf8ToSys(FileName), fmOpenRead or fmShareDenyWrite);
tmp.Read(pFile^[0], cSectorHeaderSize); tmp.Read(pFile^[0], cSectorHeaderSize);
Result := ((Sz mod cSectorSize) = 0) and (CompareMem(@cSectorHeader, pFile, cSectorHeaderSize)); Result := ((Sz mod cSectorSize) = 0) and (CompareMem(@cSectorHeader, pFile, cSectorHeaderSize));
finally finally
@@ -94,7 +93,7 @@ procedure ReplaceTimInFileFromMemory(const FileName: string; TIM: PTIM;
type type
TSecAddrAndMode = array [0 .. cSectorAddressSize + cSectorModeSize - 1] of byte; TSecAddrAndMode = array [0 .. cSectorAddressSize + cSectorModeSize - 1] of byte;
var var
sImageStream: TFileStreamUTF8; sImageStream: TFileStream;
TimOffsetInSector, FirstPartSize, LastPartSize: Integer; TimOffsetInSector, FirstPartSize, LastPartSize: Integer;
TimSectorNumber, TimStartSectorPos: Integer; TimSectorNumber, TimStartSectorPos: Integer;
Sector: TCDSector; Sector: TCDSector;
@@ -102,7 +101,7 @@ var
P, TIM_FULL_SECTORS: Integer; P, TIM_FULL_SECTORS: Integer;
SecAddrAndMode: TSecAddrAndMode; SecAddrAndMode: TSecAddrAndMode;
begin begin
sImageStream := TFileStreamUTF8.Create(FileName, fmOpenReadWrite or fmShareDenyWrite); sImageStream := TFileStream.Create(UTF8ToSys(FileName), fmOpenReadWrite or fmShareDenyWrite);
if not ImageScan then if not ImageScan then
begin begin

View File

@@ -3,7 +3,7 @@ unit ucommon;
interface interface
const const
cProgramName = 'Tim2View SVN.r63 by [Lab 313] (for ' + cProgramName = 'Tim2View SVN.r65 by [Lab 313] (for ' +
{$IFDEF Linux}'Linux' + {$IFEND} {$IFDEF Linux}'Linux' + {$IFEND}
{$IFDEF Darwin}'Mac OS X' + {$IFEND} {$IFDEF Darwin}'Mac OS X' + {$IFEND}
{$IFDEF Windows}'Windows' + {$IFEND} {$IFDEF Windows}'Windows' + {$IFEND}

127
umain.lfm
View File

@@ -508,17 +508,17 @@ object frmMain: TfrmMain
Left = 76 Left = 76
Height = 28 Height = 28
Top = 1 Top = 1
Width = 164 Width = 182
Align = alClient Align = alClient
Alignment = taRightJustify Alignment = taRightJustify
Layout = tlCenter Layout = tlCenter
ParentColor = False ParentColor = False
end end
object pbProgress: TProgressBar object pbProgress: TProgressBar
Left = 240 Left = 258
Height = 28 Height = 28
Top = 1 Top = 1
Width = 539 Width = 521
Align = alRight Align = alRight
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
Smooth = True Smooth = True
@@ -529,9 +529,8 @@ object frmMain: TfrmMain
Height = 28 Height = 28
Top = 1 Top = 1
Width = 75 Width = 75
Action = actStopScan
Align = alLeft Align = alLeft
Caption = 'Stop Scan'
Enabled = False
TabOrder = 0 TabOrder = 0
end end
end end
@@ -560,7 +559,7 @@ object frmMain: TfrmMain
ClientWidth = 780 ClientWidth = 780
TabOrder = 1 TabOrder = 1
object splMain: TSplitter object splMain: TSplitter
Left = 240 Left = 253
Height = 519 Height = 519
Top = 0 Top = 0
Width = 5 Width = 5
@@ -569,17 +568,17 @@ object frmMain: TfrmMain
Left = 0 Left = 0
Height = 519 Height = 519
Top = 0 Top = 0
Width = 240 Width = 253
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 519 ClientHeight = 519
ClientWidth = 240 ClientWidth = 253
TabOrder = 0 TabOrder = 0
object lvList: TListView object lvList: TListView
Left = 0 Left = 0
Height = 491 Height = 491
Top = 28 Top = 28
Width = 240 Width = 253
Align = alClient Align = alClient
Columns = < Columns = <
item item
@@ -602,7 +601,6 @@ object frmMain: TfrmMain
Width = 57 Width = 57
end> end>
ColumnClick = False ColumnClick = False
Enabled = False
GridLines = True GridLines = True
HideSelection = False HideSelection = False
OwnerData = True OwnerData = True
@@ -618,14 +616,14 @@ object frmMain: TfrmMain
Left = 0 Left = 0
Height = 28 Height = 28
Top = 0 Top = 0
Width = 240 Width = 253
Align = alTop Align = alTop
BevelOuter = bvLowered BevelOuter = bvLowered
ClientHeight = 28 ClientHeight = 28
ClientWidth = 240 ClientWidth = 253
TabOrder = 1 TabOrder = 1
object btnExtractAllTims: TButton object btnExtractAllTims: TButton
Left = 139 Left = 152
Height = 26 Height = 26
Top = 1 Top = 1
Width = 100 Width = 100
@@ -645,30 +643,34 @@ object frmMain: TfrmMain
end end
end end
object pnlImage: TPanel object pnlImage: TPanel
Left = 245 Left = 258
Height = 519 Height = 519
Top = 0 Top = 0
Width = 535 Width = 522
Align = alClient Align = alClient
BevelOuter = bvLowered BevelOuter = bvLowered
ClientHeight = 519 ClientHeight = 519
ClientWidth = 535 ClientWidth = 522
Color = clBtnFace
ParentColor = False
TabOrder = 1 TabOrder = 1
object splImageClut: TSplitter object splImageClut: TSplitter
Cursor = crVSplit Cursor = crVSplit
Left = 1 Left = 1
Height = 3 Height = 3
Top = 1 Top = 1
Width = 533 Width = 520
Align = alTop Align = alTop
Beveled = True Beveled = True
Color = clBtnFace
ParentColor = False
ResizeAnchor = akTop ResizeAnchor = akTop
end end
object grdCurrClut: TDrawGrid object grdCurrClut: TDrawGrid
Left = 1 Left = 1
Height = 150 Height = 150
Top = 345 Top = 343
Width = 533 Width = 520
Align = alBottom Align = alBottom
ColCount = 1 ColCount = 1
DefaultColWidth = 14 DefaultColWidth = 14
@@ -691,33 +693,35 @@ object frmMain: TfrmMain
end end
object pnlImageOptions: TPanel object pnlImageOptions: TPanel
Left = 1 Left = 1
Height = 23 Height = 25
Top = 495 Top = 493
Width = 533 Width = 520
Align = alBottom Align = alBottom
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 23 ClientHeight = 25
ClientWidth = 533 ClientWidth = 520
Color = clBtnFace
ParentColor = False
TabOrder = 1 TabOrder = 1
object btnShowClut: TButton object btnShowClut: TButton
Left = 481 Left = 467
Height = 23 Height = 23
Top = 0 Top = 1
Width = 52 Width = 52
Align = alRight Align = alRight
BorderSpacing.Around = 1
Caption = 'CLUT' Caption = 'CLUT'
Enabled = False
OnClick = btnShowClutClick OnClick = btnShowClutClick
TabOrder = 0 TabOrder = 0
end end
object cbbBitMode: TComboBox object cbbBitMode: TComboBox
Left = 0 Left = 1
Height = 21 Height = 21
Top = 0 Top = 1
Width = 90 Width = 90
Align = alLeft Align = alLeft
Enabled = False BorderSpacing.Around = 1
ItemHeight = 13 ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
@@ -734,12 +738,12 @@ object frmMain: TfrmMain
Text = 'Real' Text = 'Real'
end end
object cbbTranspMode: TComboBox object cbbTranspMode: TComboBox
Left = 90 Left = 92
Height = 21 Height = 21
Top = 0 Top = 1
Width = 136 Width = 136
Align = alLeft Align = alLeft
Enabled = False BorderSpacing.Around = 1
ItemHeight = 13 ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
@@ -755,13 +759,13 @@ object frmMain: TfrmMain
Text = 'Full transparence' Text = 'Full transparence'
end end
object cbbCLUT: TComboBox object cbbCLUT: TComboBox
Left = 372 Left = 357
Height = 21 Height = 21
Top = 0 Top = 1
Width = 109 Width = 109
Align = alRight Align = alRight
BorderSpacing.Around = 1
DropDownCount = 16 DropDownCount = 16
Enabled = False
ItemHeight = 13 ItemHeight = 13
OnChange = actChangeClutIdxExecute OnChange = actChangeClutIdxExecute
Style = csDropDownList Style = csDropDownList
@@ -770,9 +774,9 @@ object frmMain: TfrmMain
end end
object imgTim: TImage object imgTim: TImage
Left = 1 Left = 1
Height = 341 Height = 339
Top = 4 Top = 4
Width = 533 Width = 520
AntialiasingMode = amOff AntialiasingMode = amOff
Align = alClient Align = alClient
Center = True Center = True
@@ -814,6 +818,15 @@ object frmMain: TfrmMain
end end
object mnTIM: TMenuItem object mnTIM: TMenuItem
Caption = '&TIM' Caption = '&TIM'
object mnExtractAllTims: TMenuItem
Action = actExtractTIMs
end
object mnExtractAllPngs: TMenuItem
Action = actExtractPNGs
end
object N6: TMenuItem
Caption = '-'
end
object mnSaveTIM: TMenuItem object mnSaveTIM: TMenuItem
Action = actExtractTim Action = actExtractTim
end end
@@ -835,6 +848,16 @@ object frmMain: TfrmMain
object mnAssociate: TMenuItem object mnAssociate: TMenuItem
Action = actAssocTims Action = actAssocTims
end end
object N8: TMenuItem
Caption = '-'
end
object mnStretchImage: TMenuItem
Action = actStretch
AutoCheck = True
end
object mnChangeBackColor2: TMenuItem
Action = actChangeBackColor
end
end end
object mnHelp: TMenuItem object mnHelp: TMenuItem
Caption = '&Help' Caption = '&Help'
@@ -956,7 +979,7 @@ object frmMain: TfrmMain
OnExecute = actStretchExecute OnExecute = actStretchExecute
end end
object actTimInfo: TAction object actTimInfo: TAction
Caption = '&TIM Info' Caption = '&TIM Info...'
Enabled = False Enabled = False
OnExecute = actTimInfoExecute OnExecute = actTimInfoExecute
end end
@@ -966,13 +989,11 @@ object frmMain: TfrmMain
end end
object actExtractTIMs: TAction object actExtractTIMs: TAction
Caption = 'Extract all &TIMs' Caption = 'Extract all &TIMs'
Enabled = False
OnExecute = actExtractTIMsExecute OnExecute = actExtractTIMsExecute
ShortCut = 8305 ShortCut = 8305
end end
object actExtractPNGs: TAction object actExtractPNGs: TAction
Caption = '&Extract all PNGs' Caption = '&Extract all PNGs'
Enabled = False
OnExecute = actExtractPNGsExecute OnExecute = actExtractPNGsExecute
ShortCut = 8307 ShortCut = 8307
end end
@@ -985,6 +1006,15 @@ object frmMain: TfrmMain
object actChangeFile: TAction object actChangeFile: TAction
OnExecute = actChangeFileExecute OnExecute = actChangeFileExecute
end end
object actStopScan: TAction
Caption = '&Stop Scan'
Enabled = False
OnExecute = actStopScanExecute
end
object actChangeBackColor: TAction
Caption = '&Background Color'
OnExecute = actChangeBackColorExecute
end
end end
object pmList: TPopupMenu object pmList: TPopupMenu
left = 632 left = 632
@@ -998,6 +1028,15 @@ object frmMain: TfrmMain
object SaveasPNG1: TMenuItem object SaveasPNG1: TMenuItem
Action = actTim2Png Action = actTim2Png
end end
object N7: TMenuItem
Caption = '-'
end
object mnExtractAllTims2: TMenuItem
Action = actExtractTIMs
end
object mnExtractAllPngs2: TMenuItem
Action = actExtractPNGs
end
object N2: TMenuItem object N2: TMenuItem
Caption = '-' Caption = '-'
end end
@@ -1011,6 +1050,9 @@ object frmMain: TfrmMain
object mnSaveAsPng: TMenuItem object mnSaveAsPng: TMenuItem
Action = actTim2Png Action = actTim2Png
end end
object mnSaveAsTim: TMenuItem
Action = actExtractTim
end
object N5: TMenuItem object N5: TMenuItem
Caption = '-' Caption = '-'
end end
@@ -1018,6 +1060,9 @@ object frmMain: TfrmMain
Action = actStretch Action = actStretch
AutoCheck = True AutoCheck = True
end end
object mnChangeBackColor: TMenuItem
Action = actChangeBackColor
end
end end
object dlgSelectDir: TSelectDirectoryDialog object dlgSelectDir: TSelectDirectoryDialog
Options = [ofNoChangeDir, ofPathMustExist, ofNoNetworkButton, ofEnableSizing, ofViewDetail] Options = [ofNoChangeDir, ofPathMustExist, ofNoNetworkButton, ofEnableSizing, ofViewDetail]

821
umain.lrs
View File

@@ -1,821 +0,0 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmMain','FORMDATA',[
'TPF0'#8'TfrmMain'#7'frmMain'#4'Left'#3#207#1#6'Height'#3'N'#2#3'Top'#3#134#0
+#5'Width'#3#12#3#18'HorzScrollBar.Page'#3#12#3#18'VertScrollBar.Page'#3':'#2
+#13'ActiveControl'#7#7'pnlList'#10'AutoScroll'#9#12'ClientHeight'#3':'#2#11
+'ClientWidth'#3#12#3#5'Color'#7#9'clBtnFace'#10'Font.Color'#7#12'clWindowTex'
+'t'#11'Font.Height'#2#245#9'Font.Name'#6#6'Tahoma'#9'Icon.Data'#10#242':'#0#0
+#238':'#0#0#0#0#1#0#3#0'00'#0#0#0#0#0#0#168'%'#0#0'6'#0#0#0' '#0#0#0#0#0#0
+#168#16#0#0#222'%'#0#0#16#16#0#0#0#0#0#0'h'#4#0#0#134'6'#0#0'('#0#0#0'0'#0#0
+#0'`'#0#0#0#1#0' '#0#0#0#0#0#128'%'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255
+'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('
+#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#252'('
+#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#230#0#255#255#255
+#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255
+#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#230#0#255
+#255#230#0#255#255#230#0#255#255#230#0#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('
+#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0
+#255#255#230#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255
+#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4
+#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#230#0#255#255
+#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4
+#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
,#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252
+'('#4#255#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#252'('
+#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#230#0#255#255#230
+#0#255#255#230#0#255#255#230#0#255#255#255#255#255#0#255#255#255#0#255#255
+#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255
+#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4
+#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#230#0
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255
+#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4
+#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255
+#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4
+#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#252
+'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#230#0#255#255
+#230#0#255#255#230#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0
+#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4
+#255#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252
+'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255
+#230#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('
+#4#255#252'('#4#255#252'('#4#255#255#255#255#0#252'('#4#255#252'('#4#255#252
+'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0
+#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4
+#255#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('
+#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#252'('#4#255#252
+'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#230#0#255#255
+#230#0#255#255#230#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255
+#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4
,#255#252'('#4#255#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252
+'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255
+#230#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('
+#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255
+#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255
+#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#230#0#255#255#255#255
+#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252
+'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0
+#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4
+#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#230
+#0#255#255#230#0#255#255#230#0#255#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252
+'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4
+#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255
+#230#0#255#255#230#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#252'('
+#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4
+#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#230#0#255
+#255#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252
+'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4
+#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#230
+#0#255#255#230#0#255#255#230#0#255#255#230#0#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252
+'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('
+#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255
+#230#0#255#255#230#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#252'('
+#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
,'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#230#0#255
+#255#230#0#255#255#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252
+'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#252'('
+#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#230#0#255#255#230#0#255#255#230#0#255#255#230#0#255#255#255#255
+#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#252
+'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('
+#4#255#252'('#4#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#230#0#255#255
+#230#0#255#255#230#0#255#255#230#0#255#255#255#255#255#0#255#255#255#0#255
+#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#252'('#4#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255#230
+#0#255#255#230#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#252'('#4#255#252'('#4#255#255#255#255#0#255#255#255#0#6#6#255#255#6#6
+#255#255#6#6#255#255#0#175#231#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#252'('#4#255#252'('#4#255#252'('#4#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#230#0#255#255#230#0#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255
+#0#175#231#255#0#175#231#255#141#157'5'#255#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#0#175#231#255#0#175#231#255#0#175#231#255
+#0#175#231#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#0#175#231#255
+#141#157'5'#255#141#157'5'#255#141#157'5'#255#141#157'5'#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#175#231
+#255#0#175#231#255#0#175#231#255#0#175#231#255#0#175#231#255#0#175#231#255#6
+#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#141#157'5'#255
+#141#157'5'#255#141#157'5'#255#141#157'5'#255#141#157'5'#255#155'^:'#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
,#255#0#255#255#255#0#255#255#255#0#0#175#231#255#0#175#231#255#0#175#231#255
+#0#175#231#255#0#175#231#255#255#255#255#0#141#157'5'#255#6#6#255#255#6#6#255
+#255#6#6#255#255#6#6#255#255#141#157'5'#255#255#255#255#0#255#255#255#0#141
+#157'5'#255#141#157'5'#255#155'^:'#255#155'^:'#255#155'^:'#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#0#175#231#255#0#175#231#255#0#175#231#255#141#157'5'
+#255#141#157'5'#255#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255
+#255#141#157'5'#255#141#157'5'#255#155'^:'#255#155'^:'#255#155'^:'#255#155'^'
+':'#255#155'^:'#255#155'^:'#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#141#157'5'#255#141#157'5'#255#141#157'5'#255#141#157'5'
+#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#155'^:'#255#155'^:'#255
+#155'^:'#255#155'^:'#255#155'^:'#255#155'^:'#255#155'^:'#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#155'^:'#255#155'^:'#255#6#6#255#255#6#6#255#255#6#6#255
+#255#6#6#255#255#255#255#255#0#255#255#255#0#155'^:'#255#155'^:'#255#155'^:'
+#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255
+#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6#255
+#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#6#6#255#255#6#6#255
+#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6
+#6#255#255#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#6#6#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#6#6#255
+#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255
,#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6
+#255#255#6#6#255#255#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255
+#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255
+#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6#255
+#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#6#6#255#255#6#6#255
+#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6
+#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255
+#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6
+#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
,#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#199#255#255#255#207#0#0#255#129#241#243#255#135#0#0
+#255#0#240#225#255#131#0#0#255#0#240#225#255#131#0#0#255#0#240#225#255#135#0
+#0#255#0#240#225#255#199#0#0#255#0#248#240#199#199#0#0#255#0#248'p'#195#195#0
+#0#255#128#248'x'#193#227#0#0#255#128#252'x'#193#227#0#0#255#128#252'x@'#227
+#0#0#255#128#252'8@c'#0#0#255#128#254'<@c'#0#0#255#192#254'<'#6'1'#0#0#255
+#192#254#28#7#17#0#0#255#192#254#28#7#1#0#0#255#192#255#30#7#129#0#0#255#192
+#255#14#7#193#0#0#255#224#255#14#7#193#0#0#255#224#255#14#15#224#0#0#255#224
+#255#14#15#224#0#0#255#224#255#6#15#240#0#0#255#224#255#134#15#240#0#0#255
+#240#127#135#15#240#0#0#255#240#127#135#152'x'#0#0#255#240#127#159#240#31#0#0
+#255#240#127#255#0#7#0#0#255#240'?'#252#0#129#0#0#255#248'?'#248' `'#0#0#255
+#248'?'#252#16#0#0#0#255#248#31#255#0#1#0#0#255#248#31#255#192#199#0#0#255
+#248#31#255#240#135#0#0#255#252#15#255#240#131#0#0#255#252#15#255#240#129#0#0
+#255#252#15#255#240#129#0#0#255#252#7#255#240#129#0#0#255#252#7#255#240#129#0
+#0#255#252#7#255#240#129#0#0#255#252#3#255#240#131#0#0#135#248#3#199#240#3#0
+#0#0#0#0#0#240#7#0#0#0#0#0#0'0?'#0#0#0#0#0#0#31#255#0#0#0#0#0#0#15#255#0#0#0
+#0#0#0#15#255#0#0#0#0#0#0#15#255#0#0#135#255#255#0#31#255#0#0'('#0#0#0' '#0#0
+#0'@'#0#0#0#1#0' '#0#0#0#0#0#128#16#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#220#0#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#220#0#255#255#220#0#255#255#220#0#255#255#255#255#255#0#255
,#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'
+#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#220#0
+#255#255#220#0#255#255#220#0#255#255#255#255#255#0#255#255#255#0#255'&'#0#255
+#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255
+'&'#0#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255#255#255#255#0#255#255#255#0#220#0#255#255#220#0#255#255#220
+#0#255#255#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255
+#255#255#0#255#255#255#0#255#255#255#0#220#0#255#255#220#0#255#255#255#255
+#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255
+#255#255#0#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#220#0#255#255#220#0#255#255#220#0#255#255#255#255#255#0
+#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255'&'#0
+#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255'&'#0#255#255
+'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0
+#220#0#255#255#220#0#255#255#220#0#255#255#255#255#255#0#255#255#255#0#255'&'
+#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255'&'#0#255#255'&'#0#255#255
+'&'#0#255#255'&'#0#255#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#220#0
+#255#255#220#0#255#255#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255
+#255'&'#0#255#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0
+#255#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#220#0#255#255#220#0#255
+#255#220#0#255#255#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255
+#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0#255
+#255#255#255#0#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#220#0#255#255#220#0#255#255#220#0#255#255
+#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0
+#255#255'&'#0#255#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'
+#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#220#0#255#255#220#0#255#255#220#0#255#255#255#255#255#0#255#255
+#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0#255#255
+#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0#255
+#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#220#0#255#255#220#0#255#255#220#0#255#255#255#255#255#0#255'&'#0#255
+#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#220#0#255
+#255#220#0#255#255#220#0#255#255#255#255#255#0#255'&'#0#255#255'&'#0#255#255
,'&'#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#220#0#255#255#220#0#255#255
+#220#0#255#255#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0
+#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255'&'#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#220#0#255#255#220#0#255#255#220#0#255#255
+#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255'&'#0#255#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255'&'#0#255
+#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255
+'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#220#0#255#255#220#0#255#255#220#0#255#255#255#255#255#0
+#255#255#255#0#255'&'#0#255#255'&'#0#255#255'&'#0#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255
+#255'&'#0#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'
+#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#220#0#255#255#220#0#255#255#220#0#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255
+#255#0#175#231#255#255#255#255#0#255#255#255#0#255'&'#0#255#255'&'#0#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#175#231#255#0#175#231#255
+#0#175#231#255#0#175#231#255#6#6#255#255#6#6#255#255#6#6#255#255#0#175#231
+#255#141#157'5'#255#141#157'5'#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#0#175#231#255#0#175#231#255#0#175#231#255#0#175#231
+#255#0#175#231#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#141#157
+'5'#255#141#157'5'#255#141#157'5'#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#0#175#231#255#0#175#231#255#141#157'5'#255#255#255
+#255#0#6#6#255#255#6#6#255#255#6#6#255#255#141#157'5'#255#255#255#255#0#155
+'^:'#255#155'^:'#255#155'^:'#255#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#141#157'5'#255#141#157'5'#255#141#157'5'#255#6#6#255
+#255#6#6#255#255#6#6#255#255#155'^:'#255#155'^:'#255#155'^:'#255#155'^:'#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#155'^:'#255#6#6#255#255#6#6#255#255#6#6
+#255#255#255#255#255#0#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#255
+#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
,#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#6#6#255#255
+#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6
+#255#255#6#6#255#255#6#6#255#255#255#255#255#0#6#6#255#255#6#6#255#255#6#6
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255
+#6#6#255#255#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0
+#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#6#6#255#255#6#6#255#255#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#6#6#255#255#6#6
+#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255
+#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#255#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0
+#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'
+#0#255#255'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'w'#0#255#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'w'#0#255#255'w'#0#255#255'w'#0#255#255
+'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255#255'w'#0#255
+#255'w'#0#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#252'='#255#243#248#24
+#199#225#248#24#199#225#248#24#199#243#248#28#198'q'#252#28'b1'#252#28'b'#17
+#252#30'b'#25#252#30'2'#9#252#30'0A'#252#30'0`'#254#31#16'p'#254#31#16'p'#254
+#31#24#248#254#31#16#248#255#31#24#248#255#31#31#140#255#15#240#3#255#15#224
+#17#255#15#241#8#255#7#248#1#255#135#254#19#255#135#255#17#255#131#255#17#255
+#131#255#17#255#131#255#17#143#129#255#1#0#0#3#3#0#0#1#7#0#0#0#255#0#0#0#255
+#159#252#0#255'('#0#0#0#16#0#0#0' '#0#0#0#1#0' '#0#0#0#0#0'@'#4#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255
+#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#0
+#175#231#255#0#175#231#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#0#175#231#255#0#175#231#255#0#175#231#255#0#175#231#255
+#0#175#231#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#141#157'5'#255
+#141#157'5'#255#141#157'5'#255#141#157'5'#255#255#255#255#0#255#255#255#0#0
+#175#231#255#0#175#231#255#0#175#231#255#0#175#231#255#0#175#231#255#0#175
+#231#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#141
,#157'5'#255#141#157'5'#255#141#157'5'#255#155'^:'#255#255#255#255#0#0#175#231
+#255#0#175#231#255#0#175#231#255#0#175#231#255#141#157'5'#255#255#255#255#0#6
+#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#141#157'5'#255#255#255#255#0
+#155'^:'#255#155'^:'#255#155'^:'#255#155'^:'#255#255#255#255#0#255#255#255#0
+#141#157'5'#255#141#157'5'#255#141#157'5'#255#141#157'5'#255#6#6#255#255#6#6
+#255#255#6#6#255#255#6#6#255#255#155'^:'#255#155'^:'#255#155'^:'#255#155'^:'
+#255#155'^:'#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#141#157'5'#255#155'^:'#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#255#255#255#0#155'^:'#255#155'^:'#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255
+#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#6#6
+#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6#255
+#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#6#6#255#255#6#6#255
+#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255
+#6#6#255#255#6#6#255#255#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6
+#6#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255
+#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6
+#255#255#6#6#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255
+#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#6#6#255#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#6#6#255#255#6#6#255#255#6#6#255#255#6
+#6#255#255#6#6#255#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#254'?'#0#0#252#15#0#0#128#3#0#0#0'!'#0#0#4#16#0#0#192#1#0#0
+#240''''#0#0#252'#'#0#0#252'!'#0#0#252'!'#0#0#252'!'#0#0#252'!'#0#0#252#1#0#0
+#252#3#0#0#252#7#0#0#252#31#0#0#4'Menu'#7#6'mmMain'#7'OnClose'#7#9'FormClose'
+#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'
+#6#3'1.3'#0#6'TPanel'#9'pnlStatus'#4'Left'#2#0#6'Height'#2#30#3'Top'#3#28#2#5
+'Width'#3#12#3#5'Align'#7#8'alBottom'#10'BevelOuter'#7#9'bvLowered'#12'Clien'
+'tHeight'#2#30#11'ClientWidth'#3#12#3#8'TabOrder'#2#2#0#6'TLabel'#9'lblStatu'
+'s'#4'Left'#2'L'#6'Height'#2#28#3'Top'#2#1#5'Width'#3#164#0#5'Align'#7#8'alC'
+'lient'#9'Alignment'#7#14'taRightJustify'#6'Layout'#7#8'tlCenter'#11'ParentC'
+'olor'#8#0#0#12'TProgressBar'#10'pbProgress'#4'Left'#3#240#0#6'Height'#2#28#3
+'Top'#2#1#5'Width'#3#27#2#5'Align'#7#7'alRight'#7'Anchors'#11#5'akTop'#6'akL'
+'eft'#7'akRight'#8'akBottom'#0#6'Smooth'#9#8'TabOrder'#2#1#0#0#7'TButton'#11
+'btnStopScan'#4'Left'#2#1#6'Height'#2#28#3'Top'#2#1#5'Width'#2'K'#5'Align'#7
+#6'alLeft'#7'Caption'#6#9'Stop Scan'#7'Enabled'#8#7'OnClick'#7#16'btnStopSca'
+'nClick'#8'TabOrder'#2#0#0#0#0#9'TComboBox'#8'cbbFiles'#4'Left'#2#0#6'Height'
+#2#21#3'Top'#2#0#5'Width'#3#12#3#5'Align'#7#5'alTop'#13'DropDownCount'#2#30#7
+'Enabled'#8#10'ItemHeight'#2#13#8'OnChange'#7#14'cbbFilesChange'#9'OnCloseUp'
+#7#21'actReturnFocusExecute'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#0
+#0#6'TPanel'#7'pnlMain'#4'Left'#2#0#6'Height'#3#7#2#3'Top'#2#21#5'Width'#3#12
+#3#5'Align'#7#8'alClient'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3#7#2
+#11'ClientWidth'#3#12#3#8'TabOrder'#2#1#0#9'TSplitter'#7'splMain'#4'Left'#3
+#240#0#6'Height'#3#7#2#3'Top'#2#0#5'Width'#2#5#0#0#6'TPanel'#7'pnlList'#4'Le'
+'ft'#2#0#6'Height'#3#7#2#3'Top'#2#0#5'Width'#3#240#0#5'Align'#7#6'alLeft'#10
+'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3#7#2#11'ClientWidth'#3#240#0#8'Ta'
+'bOrder'#2#0#0#9'TListView'#6'lvList'#4'Left'#2#0#6'Height'#3#230#1#3'Top'#2
+'!'#5'Width'#3#240#0#5'Align'#7#8'alClient'#7'Columns'#14#1#7'Caption'#6#5'#'
+' / 0'#5'Width'#2'<'#0#1#9'Alignment'#7#8'taCenter'#7'Caption'#6#5'W x H'#5
+'Width'#2'F'#0#1#9'Alignment'#7#8'taCenter'#7'Caption'#6#3'BPP'#5'Width'#2'#'
+#0#1#9'Alignment'#7#8'taCenter'#7'Caption'#6#5'CLUTs'#0#0#11'ColumnClick'#8#7
+'Enabled'#8#9'GridLines'#9#13'HideSelection'#8#9'OwnerData'#9#9'PopupMenu'#7
,#6'pmList'#8'ReadOnly'#9#9'RowSelect'#9#8'TabOrder'#2#0#9'ViewStyle'#7#8'vsR'
+'eport'#0#0#6'TPanel'#13'pnlExtractAll'#4'Left'#2#0#6'Height'#2'!'#3'Top'#2#0
+#5'Width'#3#240#0#5'Align'#7#5'alTop'#10'BevelOuter'#7#9'bvLowered'#12'Clien'
+'tHeight'#2'!'#11'ClientWidth'#3#240#0#8'TabOrder'#2#1#0#7'TButton'#17'btnEx'
+'tractAllTims'#4'Left'#3#139#0#6'Height'#2#31#3'Top'#2#1#5'Width'#2'd'#6'Act'
+'ion'#7#14'actExtractPNGs'#5'Align'#7#7'alRight'#8'TabOrder'#2#0#0#0#7'TButt'
+'on'#14'btnExtractPNGs'#4'Left'#2#1#6'Height'#2#31#3'Top'#2#1#5'Width'#2'd'#6
+'Action'#7#14'actExtractTIMs'#5'Align'#7#6'alLeft'#8'TabOrder'#2#1#0#0#0#0#6
+'TPanel'#8'pnlImage'#4'Left'#3#245#0#6'Height'#3#7#2#3'Top'#2#0#5'Width'#3#23
+#2#5'Align'#7#8'alClient'#10'BevelOuter'#7#9'bvLowered'#12'ClientHeight'#3#7
+#2#11'ClientWidth'#3#23#2#8'TabOrder'#2#1#0#9'TSplitter'#12'splImageClut'#6
+'Cursor'#7#8'crVSplit'#4'Left'#2#1#6'Height'#2#3#3'Top'#2#1#5'Width'#3#21#2#5
+'Align'#7#5'alTop'#7'Beveled'#9#12'ResizeAnchor'#7#5'akTop'#0#0#6'TImage'#5
+'pbTim'#4'Left'#2#1#6'Height'#3'U'#1#3'Top'#2#4#5'Width'#3#21#2#5'Align'#7#8
+'alClient'#6'Center'#9#9'PopupMenu'#7#7'pmImage'#12'Proportional'#9#0#0#9'TD'
+'rawGrid'#11'grdCurrClut'#4'Left'#2#1#6'Height'#3#150#0#3'Top'#3'Y'#1#5'Widt'
+'h'#3#21#2#5'Align'#7#8'alBottom'#8'ColCount'#2#1#15'DefaultColWidth'#2#14#16
+'DefaultRowHeight'#2#14#7'Enabled'#8#14'ExtendedSelect'#8#9'FixedCols'#2#0#9
+'FixedRows'#2#0#7'Options'#11#15'goFixedVertLine'#15'goFixedHorzLine'#10'goV'
+'ertLine'#10'goHorzLine'#19'goDrawFocusSelected'#0#8'RowCount'#2#1#10'Scroll'
+'Bars'#7#6'ssNone'#8'TabOrder'#2#0#15'TitleFont.Color'#7#12'clWindowText'#16
+'TitleFont.Height'#2#245#14'TitleFont.Name'#6#6'Tahoma'#7'Visible'#8#10'OnDb'
+'lClick'#7#19'grdCurrClutDblClick'#10'OnDrawCell'#7#19'grdCurrClutDrawCell'#0
+#0#6'TPanel'#15'pnlImageOptions'#4'Left'#2#1#6'Height'#2#23#3'Top'#3#239#1#5
+'Width'#3#21#2#5'Align'#7#8'alBottom'#8'AutoSize'#9#10'BevelOuter'#7#6'bvNon'
+'e'#12'ClientHeight'#2#23#11'ClientWidth'#3#21#2#8'TabOrder'#2#1#0#7'TButton'
+#11'btnShowClut'#4'Left'#3#225#1#6'Height'#2#23#3'Top'#2#0#5'Width'#2'4'#5'A'
+'lign'#7#7'alRight'#7'Caption'#6#4'CLUT'#7'OnClick'#7#16'btnShowClutClick'#8
+'TabOrder'#2#0#0#0#9'TComboBox'#10'cbbBitMode'#4'Left'#2#0#6'Height'#2#21#3
+'Top'#2#0#5'Width'#2'J'#5'Align'#7#6'alLeft'#7'Enabled'#8#10'ItemHeight'#2#13
+#9'ItemIndex'#2#0#13'Items.Strings'#1#6#4'Real'#6#5'4 BPP'#6#5'8 BPP'#6#6'16'
+' BPP'#6#6'24 BPP'#0#8'OnChange'#7#25'actDrawSelectedTimExecute'#9'OnCloseUp'
+#7#21'actReturnFocusExecute'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#1#4
+'Text'#6#4'Real'#0#0#9'TComboBox'#13'cbbTranspMode'#4'Left'#2'J'#6'Height'#2
+#21#3'Top'#2#0#5'Width'#2'z'#5'Align'#7#6'alLeft'#7'Enabled'#8#10'ItemHeight'
+#2#13#9'ItemIndex'#2#0#13'Items.Strings'#1#6#17'Full transparence'#6#18'Blac'
+'k Transparence'#6#17'Semi Transparence'#6#15'No Transparence'#0#8'OnChange'
+#7#19'cbbTranspModeChange'#9'OnCloseUp'#7#21'actReturnFocusExecute'#5'Style'
+#7#14'csDropDownList'#8'TabOrder'#2#2#4'Text'#6#17'Full transparence'#0#0#9
+'TComboBox'#7'cbbCLUT'#4'Left'#3't'#1#6'Height'#2#21#3'Top'#2#0#5'Width'#2'm'
+#5'Align'#7#7'alRight'#13'DropDownCount'#2#16#10'ItemHeight'#2#13#8'OnChange'
+#7#13'cbbCLUTChange'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#3#0#0#0#0#0
+#11'TOpenDialog'#11'dlgOpenFile'#5'Title'#6#22'Please, select File...'#10'De'
+'faultExt'#6#4'.bin'#6'Filter'#6#19'All Files (*.*)|*.*'#7'Options'#11#14'of'
+'HideReadOnly'#13'ofNoChangeDir'#18'ofAllowMultiSelect'#15'ofFileMustExist'
+#17'ofNoNetworkButton'#14'ofEnableSizing'#17'ofForceShowHidden'#0#4'left'#3
+#156#2#3'top'#3#246#1#0#0#9'TMainMenu'#6'mmMain'#4'left'#3'`'#2#3'top'#3#248
+#1#0#9'TMenuItem'#6'mnFile'#7'Caption'#6#5'&File'#0#9'TMenuItem'#10'mnScanFi'
+'le'#6'Action'#7#11'actScanFile'#0#0#9'TMenuItem'#9'mnScanDir'#6'Action'#7#10
+'actScanDir'#0#0#9'TMenuItem'#2'N1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#11'mn'
+'CloseFile'#6'Action'#7#12'actCloseFile'#0#0#9'TMenuItem'#15'mnCloseAllFiles'
+#6'Action'#7#13'actCloseFiles'#0#0#9'TMenuItem'#6'mnExit'#6'Action'#7#7'actE'
+'xit'#0#0#0#9'TMenuItem'#5'mnTIM'#7'Caption'#6#4'&TIM'#0#9'TMenuItem'#9'mnSa'
+'veTIM'#6'Action'#7#13'actExtractTim'#0#0#9'TMenuItem'#11'mnReplaceIn'#6'Act'
+'ion'#7#13'actReplaceTim'#0#0#9'TMenuItem'#11'mnSaveToPNG'#6'Action'#7#10'ac'
+'tTim2Png'#0#0#9'TMenuItem'#2'N4'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#13'mnTi'
+'mInfoMain'#6'Action'#7#10'actTimInfo'#0#0#0#9'TMenuItem'#9'mnOptions'#7'Cap'
+'tion'#6#8'&Options'#0#9'TMenuItem'#11'mnAssociate'#6'Action'#7#12'actAssocT'
+'ims'#0#0#0#9'TMenuItem'#6'mnHelp'#7'Caption'#6#5'&Help'#0#9'TMenuItem'#5'mn'
+'SVN'#6'Action'#7#11'actOpenRepo'#0#0#9'TMenuItem'#6'mnSite'#6'Action'#7#10
+'actOpenLab'#0#0#9'TMenuItem'#2'N3'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#7'mnA'
+'bout'#6'Action'#7#8'actAbout'#0#0#0#0#18'TSavePictureDialog'#10'dlgSavePNG'
+#5'Title'#6'"Please, select filename for PNG...'#10'DefaultExt'#6#4'.png'#6
+'Filter'#6'''Portable Network Graphics (*.png)|*.png'#7'Options'#11#14'ofHid'
,'eReadOnly'#13'ofNoChangeDir'#17'ofNoNetworkButton'#14'ofEnableSizing'#0#4'l'
+'eft'#3#192#2#3'top'#3#248#1#0#0#11'TSaveDialog'#10'dlgSaveTIM'#5'Title'#6'('
+'Please, select where to save TIM file...'#10'DefaultExt'#6#4'.tim'#6'Filter'
+#6'/PSX TIM Files (*.tim)|*.tim|All Files (*.*)|*.*'#7'Options'#11#17'ofOver'
+'writePrompt'#14'ofHideReadOnly'#13'ofNoChangeDir'#17'ofNoNetworkButton'#14
+'ofEnableSizing'#0#4'left'#3'@'#2#3'top'#3#248#1#0#0#12'TColorDialog'#8'dlgC'
+'olor'#5'Color'#7#7'clBlack'#20'CustomColors.Strings'#1#6#13'ColorA=000000'#6
+#13'ColorB=000080'#6#13'ColorC=008000'#6#13'ColorD=008080'#6#13'ColorE=80000'
+'0'#6#13'ColorF=800080'#6#13'ColorG=808000'#6#13'ColorH=808080'#6#13'ColorI='
+'C0C0C0'#6#13'ColorJ=0000FF'#6#13'ColorK=00FF00'#6#13'ColorL=00FFFF'#6#13'Co'
+'lorM=FF0000'#6#13'ColorN=FF00FF'#6#13'ColorO=FFFF00'#6#13'ColorP=FFFFFF'#6
+#13'ColorQ=C0DCC0'#6#13'ColorR=F0CAA6'#6#13'ColorS=F0FBFF'#6#13'ColorT=A4A0A'
+'0'#0#4'left'#3' '#2#3'top'#3#246#1#0#0#11'TActionList'#7'actList'#4'left'#3
+#0#2#3'top'#3#246#1#0#7'TAction'#11'actScanFile'#7'Caption'#6#13'Scan &File.'
+'..'#9'OnExecute'#7#18'actScanFileExecute'#8'ShortCut'#2't'#0#0#7'TAction'#10
+'actScanDir'#7'Caption'#6#18'Scan &Directory...'#9'OnExecute'#7#17'actScanDi'
+'rExecute'#8'ShortCut'#2'u'#0#0#7'TAction'#12'actCloseFile'#7'Caption'#6#16
+'Close &this File'#9'OnExecute'#7#19'actCloseFileExecute'#8'ShortCut'#2'w'#0
+#0#7'TAction'#13'actCloseFiles'#7'Caption'#6#16'Close &all Files'#9'OnExecut'
+'e'#7#20'actCloseFilesExecute'#8'ShortCut'#2'x'#0#0#7'TAction'#7'actExit'#7
+'Caption'#6#8'&Exit...'#9'OnExecute'#7#14'actExitExecute'#8'ShortCut'#2'y'#0
+#0#7'TAction'#13'actExtractTim'#7'Caption'#6#15'&Extract TIM...'#9'OnExecute'
+#7#20'actExtractTimExecute'#8'ShortCut'#2'q'#0#0#7'TAction'#13'actReplaceTim'
+#7'Caption'#6#15'&Replace TIM...'#9'OnExecute'#7#20'actReplaceTimExecute'#8
+'ShortCut'#2'r'#0#0#7'TAction'#10'actTim2Png'#7'Caption'#6#15'Save as &PNG..'
+'.'#9'OnExecute'#7#17'actTim2PngExecute'#8'ShortCut'#2's'#0#0#7'TAction'#11
+'actOpenRepo'#7'Caption'#6#17'Tim2Vew &SVN Repo'#9'OnExecute'#7#18'actOpenRe'
+'poExecute'#0#0#7'TAction'#10'actOpenLab'#7'Caption'#6#15'[&Lab313] Forum'#9
+'OnExecute'#7#17'actOpenLabExecute'#0#0#7'TAction'#8'actAbout'#7'Caption'#6#9
+'&About...'#9'OnExecute'#7#15'actAboutExecute'#0#0#7'TAction'#10'actStretch'
+#9'AutoCheck'#9#7'Caption'#6#14'&Stretch Image'#9'OnExecute'#7#17'actStretch'
+'Execute'#0#0#7'TAction'#10'actTimInfo'#7'Caption'#6#9'&TIM Info'#7'Enabled'
+#8#9'OnExecute'#7#17'actTimInfoExecute'#0#0#7'TAction'#12'actAssocTims'#7'Ca'
+'ption'#6#19'&Open TIMs with T2V'#9'OnExecute'#7#19'actAssocTimsExecute'#0#0
+#7'TAction'#14'actExtractTIMs'#7'Caption'#6#17'Extract all &TIMs'#7'Enabled'
+#8#9'OnExecute'#7#21'actExtractTIMsExecute'#8'ShortCut'#3'q '#0#0#7'TAction'
+#14'actExtractPNGs'#7'Caption'#6#19'&Extract all PNGs'#13#10#7'Enabled'#8#9
+'OnExecute'#7#21'actExtractPNGsExecute'#8'ShortCut'#3's '#0#0#7'TAction'#16
+'actChangeClutIdx'#0#0#7'TAction'#14'actReturnFocus'#9'OnExecute'#7#21'actRe'
+'turnFocusExecute'#0#0#7'TAction'#18'actDrawSelectedTim'#9'OnExecute'#7#25'a'
+'ctDrawSelectedTimExecute'#0#0#0#10'TPopupMenu'#6'pmList'#4'left'#3#128#2#3
+'top'#3#246#1#0#9'TMenuItem'#11'ExtractTIM1'#6'Action'#7#13'actExtractTim'#0
+#0#9'TMenuItem'#11'ReplaceTIM1'#6'Action'#7#13'actReplaceTim'#0#0#9'TMenuIte'
+'m'#10'SaveasPNG1'#6'Action'#7#10'actTim2Png'#0#0#9'TMenuItem'#2'N2'#7'Capti'
+'on'#6#1'-'#0#0#9'TMenuItem'#9'mnTIMInfo'#6'Action'#7#10'actTimInfo'#0#0#0#10
+'TPopupMenu'#7'pmImage'#4'left'#3#224#1#3'top'#3#246#1#0#9'TMenuItem'#11'mnS'
+'aveAsPng'#6'Action'#7#10'actTim2Png'#0#0#9'TMenuItem'#2'N5'#7'Caption'#6#1
+'-'#0#0#9'TMenuItem'#9'mnStretch'#6'Action'#7#10'actStretch'#9'AutoCheck'#9#0
+#0#0#0
]);

View File

@@ -25,6 +25,8 @@ type
actExtractTim: TAction; actExtractTim: TAction;
actExtractTIMs: TAction; actExtractTIMs: TAction;
actChangeFile: TAction; actChangeFile: TAction;
actChangeBackColor: TAction;
actStopScan: TAction;
actOpenLab: TAction; actOpenLab: TAction;
actOpenRepo: TAction; actOpenRepo: TAction;
actReplaceTim: TAction; actReplaceTim: TAction;
@@ -52,6 +54,17 @@ type
imgTim: TImage; imgTim: TImage;
lblStatus: TLabel; lblStatus: TLabel;
lvList: TListView; lvList: TListView;
mnChangeBackColor2: TMenuItem;
N8: TMenuItem;
mnChangeBackColor: TMenuItem;
mnSaveAsTim: TMenuItem;
mnExtractAllPngs2: TMenuItem;
mnExtractAllTims2: TMenuItem;
N7: TMenuItem;
mnStretchImage: TMenuItem;
mnExtractAllPngs: TMenuItem;
mnExtractAllTims: TMenuItem;
N6: TMenuItem;
mnSaveAsPng: TMenuItem; mnSaveAsPng: TMenuItem;
mnAbout: TMenuItem; mnAbout: TMenuItem;
mnAssociate: TMenuItem; mnAssociate: TMenuItem;
@@ -94,6 +107,7 @@ type
splMain: TSplitter; splMain: TSplitter;
procedure actAboutExecute(Sender: TObject); procedure actAboutExecute(Sender: TObject);
procedure actAssocTimsExecute(Sender: TObject); procedure actAssocTimsExecute(Sender: TObject);
procedure actChangeBackColorExecute(Sender: TObject);
procedure actChangeClutIdxExecute(Sender: TObject); procedure actChangeClutIdxExecute(Sender: TObject);
procedure actChangeFileExecute(Sender: TObject); procedure actChangeFileExecute(Sender: TObject);
procedure actCloseFileExecute(Sender: TObject); procedure actCloseFileExecute(Sender: TObject);
@@ -108,6 +122,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 actStopScanExecute(Sender: TObject);
procedure actStretchExecute(Sender: TObject); procedure actStretchExecute(Sender: TObject);
procedure actTim2PngExecute(Sender: TObject); procedure actTim2PngExecute(Sender: TObject);
procedure actTimInfoExecute(Sender: TObject); procedure actTimInfoExecute(Sender: TObject);
@@ -116,7 +131,7 @@ type
procedure cbbTranspModeChange(Sender: TObject); procedure cbbTranspModeChange(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormDropFiles(Sender: TObject; const FileNames: array of String); procedure FormDropFiles(Sender: TObject; const FileNames: array of string);
procedure grdCurrClutDblClick(Sender: TObject); procedure grdCurrClutDblClick(Sender: TObject);
procedure grdCurrClutDrawCell(Sender: TObject; aCol, aRow: Integer; procedure grdCurrClutDrawCell(Sender: TObject; aCol, aRow: Integer;
aRect: TRect; aState: TGridDrawState); aRect: TRect; aState: TGridDrawState);
@@ -192,6 +207,24 @@ begin
ScanPath(dlgOpenFile.Files.Strings[I - 1]); ScanPath(dlgOpenFile.Files.Strings[I - 1]);
end; end;
procedure TfrmMain.actStopScanExecute(Sender: TObject);
var
I: Integer;
begin
if ScanThreads.Count = 0 then Exit;
for I := 1 to ScanThreads.Count do
ScanThreads[I - 1].StopScan := True;
ScanThreads.Clear;
StartedScans := 0;
actStopScan.Tag := NativeInt(True);
ScanFinished(nil);
actReturnFocus.Execute;
end;
procedure TfrmMain.actStretchExecute(Sender: TObject); procedure TfrmMain.actStretchExecute(Sender: TObject);
begin begin
Settings.StretchMode := actStretch.Checked; Settings.StretchMode := actStretch.Checked;
@@ -204,7 +237,7 @@ begin
if not dlgSavePNG.Execute then Exit; if not dlgSavePNG.Execute then Exit;
Surf^.SaveToFileUTF8(dlgSavePNG.FileName); Surf^.SaveToFile(UTF8ToSys(dlgSavePNG.FileName));
end; end;
procedure TfrmMain.actTimInfoExecute(Sender: TObject); procedure TfrmMain.actTimInfoExecute(Sender: TObject);
@@ -327,6 +360,14 @@ begin
{$ENDIF} {$ENDIF}
end; end;
procedure TfrmMain.actChangeBackColorExecute(Sender: TObject);
begin
if not dlgColor.Execute then Exit;
pnlImage.Color := dlgColor.Color;
Settings.BackColor := dlgColor.Color;
end;
procedure TfrmMain.actChangeClutIdxExecute(Sender: TObject); procedure TfrmMain.actChangeClutIdxExecute(Sender: TObject);
begin begin
DrawSelTim; DrawSelTim;
@@ -396,7 +437,7 @@ begin
SIZE := ScanTim.Size; SIZE := ScanTim.Size;
BIT_MODE := ScanTim.BitMode; BIT_MODE := ScanTim.BitMode;
Path := IncludeTrailingPathDelimiter(ExtractFilePath(ParamStrUTF8(0)) + cExtractedPngsDir); Path := SysToUTF8(IncludeTrailingPathDelimiter(ExtractFilePath(ParamStrUTF8(0)) + cExtractedPngsDir));
CreateDirUTF8(Path); CreateDirUTF8(Path);
Path := IncludeTrailingPathDelimiter(Path + ExtractFileName(FName)); Path := IncludeTrailingPathDelimiter(Path + ExtractFileName(FName));
CreateDirUTF8(Path); CreateDirUTF8(Path);
@@ -404,7 +445,7 @@ begin
TIM := LoadTimFromFile(FName, OFFSET, IsImage, SIZE); TIM := LoadTimFromFile(FName, OFFSET, IsImage, SIZE);
TimToPNG(TIM, cbbCLUT.ItemIndex, Surf_, cbbTranspMode.ItemIndex); TimToPNG(TIM, cbbCLUT.ItemIndex, Surf_, cbbTranspMode.ItemIndex);
Surf_^.SaveToFileUTF8(Path + FormatPngName(FName, I - 1, BIT_MODE, 0)); Surf_^.SaveToFile(UTF8ToSys(Path + FormatPngName(FName, I - 1, BIT_MODE, 0)));
Surf_^.Free; Surf_^.Free;
Surf_^ := nil; Surf_^ := nil;
@@ -453,7 +494,7 @@ begin
SIZE := ScanTim.Size; SIZE := ScanTim.Size;
BIT_MODE := ScanTim.BitMode; BIT_MODE := ScanTim.BitMode;
Path := IncludeTrailingPathDelimiter(ExtractFilePath(ParamStrUTF8(0)) + cExtractedTimsDir); Path := SysToUTF8(IncludeTrailingPathDelimiter(ExtractFilePath(ParamStrUTF8(0)) + cExtractedTimsDir));
CreateDirUTF8(Path); CreateDirUTF8(Path);
Path := IncludeTrailingPathDelimiter(Path + ExtractFileName(FName)); Path := IncludeTrailingPathDelimiter(Path + ExtractFileName(FName));
CreateDirUTF8(Path); CreateDirUTF8(Path);
@@ -491,7 +532,7 @@ end;
procedure TfrmMain.actReturnFocusExecute(Sender: TObject); procedure TfrmMain.actReturnFocusExecute(Sender: TObject);
begin begin
if lvList.Enabled then lvList.SetFocus; if pnlList.Enabled then lvList.SetFocus;
end; end;
procedure TfrmMain.actScanDirExecute(Sender: TObject); procedure TfrmMain.actScanDirExecute(Sender: TObject);
@@ -504,7 +545,7 @@ begin
if not dlgSelectDir.Execute then Exit; if not dlgSelectDir.Execute then Exit;
SelectedDir := dlgSelectDir.FileName; SelectedDir := dlgSelectDir.FileName;
if DirectoryExists(SelectedDir) then if DirectoryExistsUTF8(SelectedDir) then
begin begin
ScanPath(SelectedDir); ScanPath(SelectedDir);
LastDir := SelectedDir; LastDir := SelectedDir;
@@ -535,6 +576,7 @@ begin
actStretch.Checked := Settings.StretchMode; actStretch.Checked := Settings.StretchMode;
cbbTranspMode.ItemIndex := Settings.TranspMode; cbbTranspMode.ItemIndex := Settings.TranspMode;
LastDir := Settings.LastDir; LastDir := Settings.LastDir;
pnlImage.Color := Settings.BackColor;
hGridRect.Top := -1; hGridRect.Top := -1;
hGridRect.Left := -1; hGridRect.Left := -1;
@@ -558,7 +600,7 @@ begin
end; end;
procedure TfrmMain.FormDropFiles(Sender: TObject; procedure TfrmMain.FormDropFiles(Sender: TObject;
const FileNames: array of String); const FileNames: array of string);
var var
i: Integer; i: Integer;
begin begin
@@ -721,8 +763,8 @@ procedure TfrmMain.ScanPath(const Path: string);
begin begin
if Path = '' then Exit; if Path = '' then Exit;
btnStopScan.Enabled := True; actStopScan.Enabled := True;
btnStopScan.Tag := NativeInt(False); actStopScan.Tag := NativeInt(False);
if FileExistsUTF8(Path) then if FileExistsUTF8(Path) then
ScanFile(Path) ScanFile(Path)
@@ -732,17 +774,20 @@ end;
procedure TfrmMain.ScanFile(const FileName: string); procedure TfrmMain.ScanFile(const FileName: string);
begin begin
LastDir := ExtractFilePath(FileName);
Settings.LastDir := LastDir;
if CheckForFileOpened(FileName) then if CheckForFileOpened(FileName) then
begin begin
cbbFiles.ItemIndex := cbbFiles.Items.IndexOf(FileName); cbbFiles.ItemIndex := cbbFiles.Items.IndexOf(FileName);
actChangeFile.Execute; actChangeFile.Execute;
btnStopScan.Enabled := False; actStopScan.Enabled := False;
btnStopScan.Tag := NativeInt(True); actStopScan.Tag := NativeInt(True);
CheckButtonsAndMainMenu; CheckButtonsAndMainMenu;
Exit; Exit;
end; end;
if not Boolean(btnStopScan.Tag) then if not Boolean(actStopScan.Tag) then
begin begin
ScanThreads.Add(TScanThread.Create(FileName, GetImageScan(FileName))); ScanThreads.Add(TScanThread.Create(FileName, GetImageScan(FileName)));
ScanThreads.Last.FreeOnTerminate := True; ScanThreads.Last.FreeOnTerminate := True;
@@ -784,9 +829,7 @@ procedure TfrmMain.CheckButtonsAndMainMenu;
begin begin
cbbFiles.Enabled := (cbbFiles.Items.Count <> 0); cbbFiles.Enabled := (cbbFiles.Items.Count <> 0);
lvList.Enabled := cbbFiles.Enabled; pnlList.Enabled := cbbFiles.Enabled;
actExtractTIMs.Enabled := cbbFiles.Enabled;
actExtractPNGs.Enabled := cbbFiles.Enabled;
actCloseFile.Enabled := cbbFiles.Enabled; actCloseFile.Enabled := cbbFiles.Enabled;
actCloseFiles.Enabled := cbbFiles.Enabled; actCloseFiles.Enabled := cbbFiles.Enabled;
actReplaceTim.Enabled := (lvList.Selected <> nil) and (lvList.Selected.Index <> -1); actReplaceTim.Enabled := (lvList.Selected <> nil) and (lvList.Selected.Index <> -1);
@@ -794,10 +837,7 @@ begin
actTim2Png.Enabled := (Surf^ <> nil) and actReplaceTim.Enabled; actTim2Png.Enabled := (Surf^ <> nil) and actReplaceTim.Enabled;
actExtractTim.Enabled := actReplaceTim.Enabled; actExtractTim.Enabled := actReplaceTim.Enabled;
cbbCLUT.Enabled := actReplaceTim.Enabled; pnlImageOptions.Enabled := actReplaceTim.Enabled;
btnShowClut.Enabled := actReplaceTim.Enabled;
cbbTranspMode.Enabled := actReplaceTim.Enabled;
cbbBitMode.Enabled := actReplaceTim.Enabled;
end; end;
procedure TfrmMain.ScanFinished(Sender: TObject); procedure TfrmMain.ScanFinished(Sender: TObject);
@@ -830,8 +870,8 @@ begin
actChangeFile.Execute; actChangeFile.Execute;
end; end;
btnStopScan.Enabled := False; actStopScan.Enabled := False;
btnStopScan.Tag := NativeInt(True); actStopScan.Tag := NativeInt(True);
end; end;
procedure TfrmMain.SetTimsListCount(Count: Integer); procedure TfrmMain.SetTimsListCount(Count: Integer);
@@ -971,7 +1011,6 @@ begin
DrawSelTim; DrawSelTim;
DrawSelClut; DrawSelClut;
actTimInfo.Caption := Format('[OFFSET: 0x%x | SIZE: 0x%x]', [SelectedTimInfo.Position, SelectedTimInfo.Size]);
actTimInfo.Enabled := True; actTimInfo.Enabled := True;
CheckButtonsAndMainMenu; CheckButtonsAndMainMenu;

View File

@@ -3,7 +3,7 @@ unit uscanthread;
interface interface
uses uses
ucommon, utim, uscanresult, classes, fgl, lazutf8classes; ucommon, utim, uscanresult, classes, fgl;
type type
TScanThread = class(TThread) TScanThread = class(TThread)
@@ -16,7 +16,7 @@ type
pClearBufferPosition: Integer; pClearBufferPosition: Integer;
pClearBufferSize: Integer; pClearBufferSize: Integer;
pSectorBufferSize: Integer; pSectorBufferSize: Integer;
pSrcFileStream: TFileStreamUTF8; pSrcFileStream: TFileStream;
pStopScan: boolean; pStopScan: boolean;
procedure SetStatusText; procedure SetStatusText;
procedure StartScan; procedure StartScan;
@@ -100,7 +100,7 @@ begin
SectorBuffer := GetMemory(pSectorBufferSize); SectorBuffer := GetMemory(pSectorBufferSize);
ClearBuffer := GetMemory(pClearBufferSize); ClearBuffer := GetMemory(pClearBufferSize);
pSrcFileStream := TFileStreamUTF8.Create(pScanResult.ScanFile, fmOpenRead or fmShareDenyWrite); pSrcFileStream := TFileStream.Create(UTF8ToSys(pScanResult.ScanFile), fmOpenRead or fmShareDenyWrite);
pSrcFileStream.Position := 0; pSrcFileStream.Position := 0;
@@ -203,9 +203,7 @@ end;
procedure TScanThread.StartScan; procedure TScanThread.StartScan;
begin begin
frmMain.cbbFiles.Enabled := False; frmMain.cbbFiles.Enabled := False;
frmMain.lvList.Enabled := False; frmMain.pnlList.Enabled := False;
frmMain.actExtractTIMs.Enabled := False;
frmMain.actExtractPNGs.Enabled := False;
frmMain.pbProgress.Max := FileSize(pScanResult.ScanFile); frmMain.pbProgress.Max := FileSize(pScanResult.ScanFile);
frmMain.pbProgress.Position := 0; frmMain.pbProgress.Position := 0;

View File

@@ -5,7 +5,7 @@ unit usettings;
interface interface
uses uses
Classes, SysUtils, IniFiles; Classes, SysUtils, IniFiles, Graphics;
type type
@@ -20,16 +20,21 @@ type
function FStretchModeRead(): Boolean; function FStretchModeRead(): Boolean;
procedure FLastDirWrite(const Value: string); procedure FLastDirWrite(const Value: string);
function FLastDirRead(): string; function FLastDirRead(): string;
procedure FBackColorWrite(Color: TColor);
function FBackColorRead(): TColor;
public public
constructor Create(const DirPath: string); constructor Create(const DirPath: string);
destructor Destroy; override; destructor Destroy; override;
property TranspMode: Integer read FTranspModeRead write FTranspModeWrite; property TranspMode: Integer read FTranspModeRead write FTranspModeWrite;
property StretchMode: Boolean read FStretchModeRead write FStretchModeWrite; property StretchMode: Boolean read FStretchModeRead write FStretchModeWrite;
property LastDir: string read FLastDirRead write FLastDirWrite; property LastDir: string read FLastDirRead write FLastDirWrite;
property BackColor: TColor read FBackColorRead write FBackColorWrite;
end; end;
implementation implementation
uses FileUtil;
const sMain = 'main'; const sMain = 'main';
{ TSettings } { TSettings }
@@ -56,12 +61,22 @@ end;
procedure TSettings.FLastDirWrite(const Value: string); procedure TSettings.FLastDirWrite(const Value: string);
begin begin
FIniFile.WriteString(sMain, 'LastDir', Value); FIniFile.WriteString(sMain, 'LastDir', UTF8ToSys(Value));
end; end;
function TSettings.FLastDirRead: string; function TSettings.FLastDirRead: string;
begin begin
Result := FIniFile.ReadString(sMain, 'LastDir', ''); Result := SysToUtf8(FIniFile.ReadString(sMain, 'LastDir', ''));
end;
procedure TSettings.FBackColorWrite(Color: TColor);
begin
FIniFile.WriteInteger(sMain, 'BackColor', Color);
end;
function TSettings.FBackColorRead: TColor;
begin
Result := FIniFile.ReadInteger(sMain, 'BackColor', clBtnFace);
end; end;
constructor TSettings.Create(const DirPath: string); constructor TSettings.Create(const DirPath: string);

View File

@@ -145,7 +145,7 @@ function ConvertCLUTColor(COLOR: TCLUT_COLOR): word;
implementation implementation
uses uses
ucdimage, classes, sysutils, lazutf8classes; ucdimage, classes, sysutils, FileUtil;
function ConvertTIMColor(COLOR: word): TCLUT_COLOR; function ConvertTIMColor(COLOR: word): TCLUT_COLOR;
begin begin
@@ -366,12 +366,12 @@ var
TimOffsetInSector, FirstPartSize, LastPartSize: Integer; TimOffsetInSector, FirstPartSize, LastPartSize: Integer;
TimSectorNumber, TimStartSectorPos: Integer; TimSectorNumber, TimStartSectorPos: Integer;
TIM_BUF: PTIMDataArray; TIM_BUF: PTIMDataArray;
sImageStream: TFileStreamUTF8; sImageStream: TFileStream;
Sector: TCDSector; Sector: TCDSector;
P, TIM_FULL_SECTORS: Integer; P, TIM_FULL_SECTORS: Integer;
begin begin
try try
sImageStream := TFileStreamUTF8.Create(FileName, fmOpenRead or fmShareDenyWrite); sImageStream := TFileStream.Create(UTF8ToSys(FileName), fmOpenRead or fmShareDenyWrite);
TimSectorNumber := Position div cSectorSize + 1; TimSectorNumber := Position div cSectorSize + 1;
TimOffsetInSector := Position mod cSectorSize - cSectorInfoSize; TimOffsetInSector := Position mod cSectorSize - cSectorInfoSize;
@@ -451,12 +451,12 @@ end;
function LoadTimFromFile(const FileName: string; var Position: Integer; function LoadTimFromFile(const FileName: string; var Position: Integer;
ImageScan: Boolean; dwSize: Integer): PTIM; ImageScan: Boolean; dwSize: Integer): PTIM;
var var
sTIM: TFileStreamUTF8; sTIM: TFileStream;
begin begin
if not ImageScan then if not ImageScan then
begin begin
try try
sTIM := TFileStreamUTF8.Create(FileName, fmOpenRead or fmShareDenyWrite); sTIM := TFileStream.Create(UTF8ToSys(FileName), fmOpenRead or fmShareDenyWrite);
Result := LoadTimFromStream(sTIM, Position, dwSize); Result := LoadTimFromStream(sTIM, Position, dwSize);
finally finally
sTIM.Free; sTIM.Free;
@@ -469,11 +469,11 @@ end;
procedure SaveTimToFile(const FileName: string; TIM: PTIM); procedure SaveTimToFile(const FileName: string; TIM: PTIM);
var var
tmp: TFileStreamUTF8; tmp: TFileStream;
begin begin
if TIM = nil then Exit; if TIM = nil then Exit;
tmp := TFileStreamUTF8.Create(FileName, fmOpenWrite or fmCreate, fmShareDenyRead); tmp := TFileStream.Create(UTF8ToSys(FileName), fmOpenWrite or fmCreate, fmShareDenyRead);
tmp.Write(TIM^.DATA^[0], TIM^.dwSize); tmp.Write(TIM^.DATA^[0], TIM^.dwSize);
tmp.Free; tmp.Free;
end; end;