- Initial import from internal repository
This commit is contained in:
246
Client/CentrED.lpi
Normal file
246
Client/CentrED.lpi
Normal file
@@ -0,0 +1,246 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="/"/>
|
||||
<Version Value="6"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
</VersionInfo>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="4">
|
||||
<Item1>
|
||||
<PackageName Value="virtualtreeview_package"/>
|
||||
<MinVersion Major="4" Minor="5" Release="1" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="lnetvisual"/>
|
||||
<MinVersion Minor="5" Release="3" Valid="True"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="LazOpenGLContext"/>
|
||||
<MinVersion Valid="True"/>
|
||||
</Item4>
|
||||
</RequiredPackages>
|
||||
<Units Count="24">
|
||||
<Unit0>
|
||||
<Filename Value="CentrED.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="CentrED"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="UfrmMain.pas"/>
|
||||
<ComponentName Value="frmMain"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UfrmMain.lrs"/>
|
||||
<UnitName Value="UfrmMain"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="UdmNetwork.pas"/>
|
||||
<ComponentName Value="dmNetwork"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UdmNetwork.lrs"/>
|
||||
<UnitName Value="UdmNetwork"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="UfrmLogin.pas"/>
|
||||
<ComponentName Value="frmLogin"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UfrmLogin.lrs"/>
|
||||
<UnitName Value="UfrmLogin"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="UfrmInitialize.pas"/>
|
||||
<ComponentName Value="frmInitialize"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UfrmInitialize.lrs"/>
|
||||
<UnitName Value="UfrmInitialize"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="UOpenGLUI.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="UOpenGLUI"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="UfrmAccountControl.pas"/>
|
||||
<ComponentName Value="frmAccountControl"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UfrmAccountControl.lrs"/>
|
||||
<UnitName Value="UfrmAccountControl"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="UfrmEditAccount.pas"/>
|
||||
<ComponentName Value="frmEditAccount"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UfrmEditAccount.lrs"/>
|
||||
<UnitName Value="UfrmEditAccount"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="Tools/UfrmDrawSettings.pas"/>
|
||||
<ComponentName Value="frmDrawSettings"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="Tools/UfrmDrawSettings.lrs"/>
|
||||
<UnitName Value="UfrmDrawSettings"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="Tools/UfrmBoundaries.pas"/>
|
||||
<ComponentName Value="frmBoundaries"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="Tools/UfrmBoundaries.lrs"/>
|
||||
<UnitName Value="UfrmBoundaries"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="Tools/UfrmElevateSettings.pas"/>
|
||||
<ComponentName Value="frmElevateSettings"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="Tools/UfrmElevateSettings.lrs"/>
|
||||
<UnitName Value="UfrmElevateSettings"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="UOverlayUI.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="UOverlayUI"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="UResourceManager.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="UResourceManager"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="Tools/UfrmConfirmation.pas"/>
|
||||
<ComponentName Value="frmConfirmation"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="Tools/UfrmConfirmation.lrs"/>
|
||||
<UnitName Value="UfrmConfirmation"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="Tools/UfrmMoveSettings.pas"/>
|
||||
<ComponentName Value="frmMoveSettings"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="Tools/UfrmMoveSettings.lrs"/>
|
||||
<UnitName Value="UfrmMoveSettings"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="UfrmAbout.pas"/>
|
||||
<ComponentName Value="frmAbout"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UfrmAbout.lrs"/>
|
||||
<UnitName Value="UfrmAbout"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="Tools/UfrmHueSettings.pas"/>
|
||||
<ComponentName Value="frmHueSettings"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="Tools/UfrmHueSettings.lrs"/>
|
||||
<UnitName Value="UfrmHueSettings"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="UfrmRadar.pas"/>
|
||||
<ComponentName Value="frmRadarMap"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UfrmRadar.lrs"/>
|
||||
<UnitName Value="UfrmRadar"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="UfrmLargeScaleCommand.pas"/>
|
||||
<ComponentName Value="frmLargeScaleCommand"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UfrmLargeScaleCommand.lrs"/>
|
||||
<UnitName Value="UfrmLargeScaleCommand"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="Tools/UfrmVirtualLayer.pas"/>
|
||||
<ComponentName Value="frmVirtualLayer"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="Tools/UfrmVirtualLayer.lrs"/>
|
||||
<UnitName Value="UfrmVirtualLayer"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="Tools/UfrmFilter.pas"/>
|
||||
<ComponentName Value="frmFilter"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="Tools/UfrmFilter.lrs"/>
|
||||
<UnitName Value="UfrmFilter"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="UfrmTileInfo.pas"/>
|
||||
<ComponentName Value="frmTileInfo"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="UfrmTileInfo.lrs"/>
|
||||
<UnitName Value="UfrmTileInfo"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="UGUIPlatformUtils.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="UGUIPlatformUtils"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="UPlatformTypes.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="UPlatformTypes"/>
|
||||
</Unit23>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<Target>
|
||||
<Filename Value="../bin/CentrED"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="../Imaging/;../"/>
|
||||
<OtherUnitFiles Value="../;../UOLib/;../MulProvider/;../Imaging/;../Imaging/JpegLib/;../Imaging/ZLib/;Tools/"/>
|
||||
<UnitOutputDirectory Value="../obj/$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)"/>
|
||||
<LCLWidgetType Value="gtk"/>
|
||||
<SrcPath Value="$(LazarusDir)/lcl/;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)/;../;../UOLib/;../MulProvider/;../Imaging/;../Imaging/JpegLib/;../Imaging/ZLib/;Tools/"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="True"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<Generate Value="Faster"/>
|
||||
<TargetCPU Value="i386"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="3"/>
|
||||
</Optimizations>
|
||||
<TargetOS Value="Linux"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<UseLineInfoUnit Value="False"/>
|
||||
<StripSymbols Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-FE..\bin\
|
||||
"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
53
Client/CentrED.lpr
Normal file
53
Client/CentrED.lpr
Normal file
@@ -0,0 +1,53 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
program CentrED;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, lnetvisual, LazOpenGLContext,
|
||||
UdmNetwork, UfrmMain, UfrmLogin, UfrmInitialize, UfrmAccountControl,
|
||||
virtualtreeview_package, UfrmEditAccount, UfrmDrawSettings, UfrmBoundaries,
|
||||
UfrmElevateSettings, UOverlayUI, UResourceManager, UfrmConfirmation,
|
||||
UfrmMoveSettings, UfrmAbout, UfrmHueSettings, UfrmRadar,
|
||||
UfrmLargeScaleCommand, UfrmVirtualLayer, UfrmFilter, UfrmTileInfo,
|
||||
UGUIPlatformUtils, UPlatformTypes;
|
||||
|
||||
{$IFDEF Windows}
|
||||
{$R *.res}
|
||||
{$ENDIF}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TdmNetwork, dmNetwork);
|
||||
//Application.CreateForm(TfrmMain, frmMain);
|
||||
Application.Run;
|
||||
end.
|
||||
|
||||
BIN
Client/CentrED.res
Normal file
BIN
Client/CentrED.res
Normal file
Binary file not shown.
BIN
Client/Overlay/LeftTopArrow.tga
Normal file
BIN
Client/Overlay/LeftTopArrow.tga
Normal file
Binary file not shown.
BIN
Client/Overlay/TopArrow.tga
Normal file
BIN
Client/Overlay/TopArrow.tga
Normal file
Binary file not shown.
BIN
Client/Overlay/VirtualLayer.tga
Normal file
BIN
Client/Overlay/VirtualLayer.tga
Normal file
Binary file not shown.
3
Client/ResourceList.txt
Normal file
3
Client/ResourceList.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Overlay/LeftTopArrow.tga
|
||||
Overlay/TopArrow.tga
|
||||
Overlay/VirtualLayer.tga
|
||||
82
Client/Tools/UfrmBoundaries.lfm
Normal file
82
Client/Tools/UfrmBoundaries.lfm
Normal file
@@ -0,0 +1,82 @@
|
||||
object frmBoundaries: TfrmBoundaries
|
||||
Left = 290
|
||||
Height = 105
|
||||
Top = 171
|
||||
Width = 187
|
||||
HorzScrollBar.Page = 186
|
||||
VertScrollBar.Page = 104
|
||||
ActiveControl = tbMinZ
|
||||
BorderIcons = []
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Boundaries'
|
||||
ClientHeight = 105
|
||||
ClientWidth = 187
|
||||
OnClose = FormClose
|
||||
OnDeactivate = FormDeactivate
|
||||
object lblMinZ: TLabel
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 8
|
||||
Width = 67
|
||||
Caption = 'Minimum Z:'
|
||||
ParentColor = False
|
||||
end
|
||||
object lblMaxZ: TLabel
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 56
|
||||
Width = 68
|
||||
Caption = 'Maximum Z:'
|
||||
ParentColor = False
|
||||
end
|
||||
object tbMinZ: TTrackBar
|
||||
Left = 8
|
||||
Height = 17
|
||||
Top = 32
|
||||
Width = 172
|
||||
Frequency = 10
|
||||
Max = 127
|
||||
Min = -128
|
||||
OnChange = tbMinZChange
|
||||
PageSize = 1
|
||||
Position = -128
|
||||
ScalePos = trTop
|
||||
TabOrder = 0
|
||||
end
|
||||
object tbMaxZ: TTrackBar
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 80
|
||||
Width = 172
|
||||
Frequency = 10
|
||||
Max = 127
|
||||
Min = -128
|
||||
OnChange = tbMaxZChange
|
||||
PageSize = 1
|
||||
Position = 127
|
||||
ScalePos = trTop
|
||||
TabOrder = 1
|
||||
end
|
||||
object seMinZ: TSpinEdit
|
||||
Left = 128
|
||||
Height = 23
|
||||
Top = 4
|
||||
Width = 50
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seMinZChange
|
||||
TabOrder = 2
|
||||
Value = -128
|
||||
end
|
||||
object seMaxZ: TSpinEdit
|
||||
Left = 128
|
||||
Height = 23
|
||||
Top = 52
|
||||
Width = 50
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seMaxZChange
|
||||
TabOrder = 3
|
||||
Value = 127
|
||||
end
|
||||
end
|
||||
107
Client/Tools/UfrmBoundaries.pas
Normal file
107
Client/Tools/UfrmBoundaries.pas
Normal file
@@ -0,0 +1,107 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmBoundaries;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, LMessages,
|
||||
LCLIntf, StdCtrls, ComCtrls, Spin;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmBoundaries }
|
||||
|
||||
TfrmBoundaries = class(TForm)
|
||||
lblMinZ: TLabel;
|
||||
lblMaxZ: TLabel;
|
||||
seMinZ: TSpinEdit;
|
||||
seMaxZ: TSpinEdit;
|
||||
tbMinZ: TTrackBar;
|
||||
tbMaxZ: TTrackBar;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormDeactivate(Sender: TObject);
|
||||
procedure seMaxZChange(Sender: TObject);
|
||||
procedure seMinZChange(Sender: TObject);
|
||||
procedure tbMaxZChange(Sender: TObject);
|
||||
procedure tbMinZChange(Sender: TObject);
|
||||
protected
|
||||
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBoundaries: TfrmBoundaries;
|
||||
|
||||
implementation
|
||||
|
||||
{ TfrmBoundaries }
|
||||
|
||||
procedure TfrmBoundaries.FormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.FormDeactivate(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.seMaxZChange(Sender: TObject);
|
||||
begin
|
||||
tbMaxZ.Position := seMaxZ.Value;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.seMinZChange(Sender: TObject);
|
||||
begin
|
||||
tbMinZ.Position := seMinZ.Value;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.tbMaxZChange(Sender: TObject);
|
||||
begin
|
||||
seMaxZ.Value := tbMaxZ.Position;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.tbMinZChange(Sender: TObject);
|
||||
begin
|
||||
seMinZ.Value := tbMinZ.Position;
|
||||
end;
|
||||
|
||||
procedure TfrmBoundaries.MouseLeave(var msg: TLMessage);
|
||||
begin
|
||||
if not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
|
||||
Close;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmBoundaries.lrs}
|
||||
|
||||
end.
|
||||
|
||||
35
Client/Tools/UfrmConfirmation.lfm
Normal file
35
Client/Tools/UfrmConfirmation.lfm
Normal file
@@ -0,0 +1,35 @@
|
||||
object frmConfirmation: TfrmConfirmation
|
||||
Left = 290
|
||||
Height = 43
|
||||
Top = 171
|
||||
Width = 108
|
||||
HorzScrollBar.Page = 107
|
||||
VertScrollBar.Page = 42
|
||||
BorderIcons = []
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Apply?'
|
||||
ClientHeight = 43
|
||||
ClientWidth = 108
|
||||
object btnYes: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 40
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = 'Yes'
|
||||
Default = True
|
||||
ModalResult = 6
|
||||
TabOrder = 0
|
||||
end
|
||||
object btnNo: TButton
|
||||
Left = 56
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 40
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Cancel = True
|
||||
Caption = 'No'
|
||||
ModalResult = 7
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
57
Client/Tools/UfrmConfirmation.pas
Normal file
57
Client/Tools/UfrmConfirmation.pas
Normal file
@@ -0,0 +1,57 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmConfirmation;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmConfirmation }
|
||||
|
||||
TfrmConfirmation = class(TForm)
|
||||
btnYes: TButton;
|
||||
btnNo: TButton;
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmConfirmation: TfrmConfirmation;
|
||||
|
||||
implementation
|
||||
|
||||
initialization
|
||||
{$I UfrmConfirmation.lrs}
|
||||
|
||||
end.
|
||||
|
||||
74
Client/Tools/UfrmDrawSettings.lfm
Normal file
74
Client/Tools/UfrmDrawSettings.lfm
Normal file
@@ -0,0 +1,74 @@
|
||||
object frmDrawSettings: TfrmDrawSettings
|
||||
Left = 290
|
||||
Height = 138
|
||||
Top = 171
|
||||
Width = 186
|
||||
HorzScrollBar.Page = 185
|
||||
VertScrollBar.Page = 137
|
||||
ActiveControl = rbTileList
|
||||
BorderIcons = []
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Draw settings'
|
||||
ClientHeight = 138
|
||||
ClientWidth = 186
|
||||
FormStyle = fsStayOnTop
|
||||
OnClose = FormClose
|
||||
OnDeactivate = FormDeactivate
|
||||
OnShow = FormShow
|
||||
object rbTileList: TRadioButton
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 8
|
||||
Width = 113
|
||||
Caption = 'Use tile from the list'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
UseOnChange = True
|
||||
end
|
||||
object rbRandom: TRadioButton
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 32
|
||||
Width = 164
|
||||
Caption = 'Use tiles from the random pool'
|
||||
TabOrder = 1
|
||||
UseOnChange = True
|
||||
end
|
||||
object cbForceAltitude: TCheckBox
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 60
|
||||
Width = 89
|
||||
Caption = 'Force altitude:'
|
||||
TabOrder = 2
|
||||
end
|
||||
object seForceAltitude: TSpinEdit
|
||||
Left = 104
|
||||
Height = 23
|
||||
Top = 56
|
||||
Width = 50
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seForceAltitudeChange
|
||||
TabOrder = 3
|
||||
end
|
||||
object gbHue: TGroupBox
|
||||
Height = 49
|
||||
Top = 88
|
||||
Width = 185
|
||||
Caption = 'Hue (Statics only)'
|
||||
ClientHeight = 31
|
||||
ClientWidth = 181
|
||||
TabOrder = 4
|
||||
object pbHue: TPaintBox
|
||||
Cursor = crHandPoint
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 1
|
||||
Width = 169
|
||||
OnClick = pbHueClick
|
||||
OnPaint = pbHuePaint
|
||||
end
|
||||
end
|
||||
end
|
||||
132
Client/Tools/UfrmDrawSettings.pas
Normal file
132
Client/Tools/UfrmDrawSettings.pas
Normal file
@@ -0,0 +1,132 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmDrawSettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
Spin, ExtCtrls, LMessages, LCLIntf;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmDrawSettings }
|
||||
|
||||
TfrmDrawSettings = class(TForm)
|
||||
cbForceAltitude: TCheckBox;
|
||||
gbHue: TGroupBox;
|
||||
pbHue: TPaintBox;
|
||||
rbRandom: TRadioButton;
|
||||
rbTileList: TRadioButton;
|
||||
seForceAltitude: TSpinEdit;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormDeactivate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure pbHueClick(Sender: TObject);
|
||||
procedure pbHuePaint(Sender: TObject);
|
||||
procedure seForceAltitudeChange(Sender: TObject);
|
||||
protected
|
||||
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmDrawSettings: TfrmDrawSettings;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UHue, UfrmHueSettings;
|
||||
|
||||
{ TfrmDrawSettings }
|
||||
|
||||
procedure TfrmDrawSettings.FormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.FormDeactivate(Sender: TObject);
|
||||
begin
|
||||
if not frmHueSettings.Visible then
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.FormShow(Sender: TObject);
|
||||
begin
|
||||
Left := Mouse.CursorPos.x - 8;
|
||||
Top := Mouse.CursorPos.y - 8;
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.pbHueClick(Sender: TObject);
|
||||
var
|
||||
msg: TLMessage;
|
||||
begin
|
||||
frmHueSettings.Left := Mouse.CursorPos.x - 8;
|
||||
frmHueSettings.Top := Mouse.CursorPos.y - 8;
|
||||
frmHueSettings.ShowModal;
|
||||
pbHue.Repaint;
|
||||
MouseLeave(msg);
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.pbHuePaint(Sender: TObject);
|
||||
var
|
||||
hue: THue;
|
||||
begin
|
||||
if frmHueSettings <> nil then
|
||||
begin
|
||||
if frmHueSettings.lbHue.ItemIndex > 0 then
|
||||
hue := ResMan.Hue.Hues[frmHueSettings.lbHue.ItemIndex - 1]
|
||||
else
|
||||
hue := nil;
|
||||
TfrmHueSettings.DrawHue(hue, pbHue.Canvas, pbHue.Canvas.ClipRect,
|
||||
frmHueSettings.lbHue.Items.Strings[frmHueSettings.lbHue.ItemIndex]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.seForceAltitudeChange(Sender: TObject);
|
||||
begin
|
||||
cbForceAltitude.Checked := True;
|
||||
end;
|
||||
|
||||
procedure TfrmDrawSettings.MouseLeave(var msg: TLMessage);
|
||||
begin
|
||||
try
|
||||
if (not frmHueSettings.Visible) and (not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos))) then
|
||||
Close;
|
||||
except
|
||||
Close;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmDrawSettings.lrs}
|
||||
|
||||
end.
|
||||
|
||||
52
Client/Tools/UfrmElevateSettings.lfm
Normal file
52
Client/Tools/UfrmElevateSettings.lfm
Normal file
@@ -0,0 +1,52 @@
|
||||
object frmElevateSettings: TfrmElevateSettings
|
||||
Left = 290
|
||||
Height = 59
|
||||
Top = 171
|
||||
Width = 131
|
||||
HorzScrollBar.Page = 130
|
||||
VertScrollBar.Page = 58
|
||||
ActiveControl = rbRaise
|
||||
BorderIcons = []
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Elevate'
|
||||
ClientHeight = 59
|
||||
ClientWidth = 131
|
||||
OnClose = FormClose
|
||||
OnDeactivate = FormDeactivate
|
||||
object rbRaise: TRadioButton
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 8
|
||||
Width = 49
|
||||
Caption = 'Raise'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
object rbLower: TRadioButton
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 24
|
||||
Width = 51
|
||||
Caption = 'Lower'
|
||||
TabOrder = 1
|
||||
end
|
||||
object seZ: TSpinEdit
|
||||
Left = 72
|
||||
Height = 23
|
||||
Top = 20
|
||||
Width = 50
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
TabOrder = 3
|
||||
Value = 1
|
||||
end
|
||||
object rbSet: TRadioButton
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 40
|
||||
Width = 38
|
||||
Caption = 'Set'
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
81
Client/Tools/UfrmElevateSettings.pas
Normal file
81
Client/Tools/UfrmElevateSettings.pas
Normal file
@@ -0,0 +1,81 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmElevateSettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, LMessages,
|
||||
LCLIntf, StdCtrls, Spin;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmElevateSettings }
|
||||
|
||||
TfrmElevateSettings = class(TForm)
|
||||
rbSet: TRadioButton;
|
||||
rbRaise: TRadioButton;
|
||||
rbLower: TRadioButton;
|
||||
seZ: TSpinEdit;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormDeactivate(Sender: TObject);
|
||||
protected
|
||||
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmElevateSettings: TfrmElevateSettings;
|
||||
|
||||
implementation
|
||||
|
||||
{ TfrmElevateSettings }
|
||||
|
||||
procedure TfrmElevateSettings.FormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmElevateSettings.FormDeactivate(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmElevateSettings.MouseLeave(var msg: TLMessage);
|
||||
begin
|
||||
if not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
|
||||
Close;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmElevateSettings.lrs}
|
||||
|
||||
end.
|
||||
|
||||
374
Client/Tools/UfrmFilter.lfm
Normal file
374
Client/Tools/UfrmFilter.lfm
Normal file
@@ -0,0 +1,374 @@
|
||||
object frmFilter: TfrmFilter
|
||||
Left = 290
|
||||
Height = 491
|
||||
Top = 171
|
||||
Width = 236
|
||||
HorzScrollBar.Page = 235
|
||||
VertScrollBar.Page = 490
|
||||
ActiveControl = rgFilterType
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Filter'
|
||||
ClientHeight = 491
|
||||
ClientWidth = 236
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
object rgFilterType: TRadioGroup
|
||||
Left = 4
|
||||
Height = 40
|
||||
Top = 4
|
||||
Width = 228
|
||||
Align = alTop
|
||||
AutoFill = True
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Filter rule'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
ClientHeight = 18
|
||||
ClientWidth = 222
|
||||
Columns = 2
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Exclusive'
|
||||
'Inclusive'
|
||||
)
|
||||
TabOrder = 0
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 4
|
||||
Height = 258
|
||||
Top = 48
|
||||
Width = 228
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Tile filter'
|
||||
ClientHeight = 236
|
||||
ClientWidth = 222
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 4
|
||||
Height = 25
|
||||
Top = 32
|
||||
Width = 214
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Drag and Drop static tiles from the tile list on this list to add them to the filter.'
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
object vdtFilter: TVirtualDrawTree
|
||||
Tag = 1
|
||||
Left = 4
|
||||
Height = 145
|
||||
Top = 61
|
||||
Width = 214
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 4
|
||||
BorderStyle = bsSingle
|
||||
DefaultNodeHeight = 44
|
||||
DragType = dtVCL
|
||||
Header.Options = [hoColumnResize, hoDrag, hoVisible]
|
||||
Header.Style = hsFlatButtons
|
||||
TabOrder = 0
|
||||
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect]
|
||||
OnDragOver = vdtFilterDragOver
|
||||
OnDragDrop = vdtFilterDragDrop
|
||||
OnDrawNode = vdtFilterDrawNode
|
||||
Columns = <
|
||||
item
|
||||
WideText = 'ID'
|
||||
end
|
||||
item
|
||||
Position = 1
|
||||
Width = 44
|
||||
WideText = 'Tile'
|
||||
end
|
||||
item
|
||||
Position = 2
|
||||
Width = 100
|
||||
WideText = 'Name'
|
||||
end>
|
||||
end
|
||||
object pnlControls: TPanel
|
||||
Left = 4
|
||||
Height = 22
|
||||
Top = 210
|
||||
Width = 214
|
||||
Align = alBottom
|
||||
BorderSpacing.Around = 4
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 22
|
||||
ClientWidth = 214
|
||||
TabOrder = 1
|
||||
object btnDelete: TSpeedButton
|
||||
Left = 84
|
||||
Height = 22
|
||||
Hint = 'Delete'
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
810900002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A223136203136203131332032222C0A222E2E2063204E6F
|
||||
6E65222C0A222E2C20632023444436413638222C0A222E2D2063202344433634
|
||||
3633222C0A222E2A20632023444136343631222C0A222E612063202344393633
|
||||
3544222C0A222E6220632023444636413641222C0A222E632063202345443933
|
||||
3845222C0A222E6420632023463843334245222C0A222E652063202346394433
|
||||
4343222C0A222E6620632023463943424334222C0A222E672063202346344234
|
||||
4141222C0A222E6820632023453237303636222C0A222E692063202344313545
|
||||
3533222C0A222E6A20632023453036393641222C0A222E6B2063202346324144
|
||||
4141222C0A222E6C20632023464444434438222C0A222E6D2063202346414241
|
||||
4145222C0A222E6E20632023464141333931222C0A222E6F2063202346413944
|
||||
3842222C0A222E7020632023464241393943222C0A222E712063202346434337
|
||||
4241222C0A222E7220632023453937423730222C0A222E732063202343433542
|
||||
3443222C0A222E7420632023463341374133222C0A222E752063202346444442
|
||||
4434222C0A222E7620632023464139413837222C0A222E772063202346303931
|
||||
3746222C0A222E7820632023463138453741222C0A222E792063202346383934
|
||||
3746222C0A222E7A20632023463939323745222C0A222E412063202346383843
|
||||
3736222C0A222E4220632023463842364138222C0A222E432063202345333645
|
||||
3633222C0A222E4420632023433735373435222C0A222E452063202345413833
|
||||
3744222C0A222E4620632023464344344344222C0A222E472063202346373933
|
||||
3745222C0A222E4820632023454538413735222C0A222E492063202346363834
|
||||
3643222C0A222E4A20632023463337393633222C0A222E4B2063202346384146
|
||||
4134222C0A222E4C20632023443034463345222C0A222E4D2063202344453641
|
||||
3637222C0A222E4E20632023463541464135222C0A222E4F2063202346414142
|
||||
3944222C0A222E5020632023463038433737222C0A222E512063202345433546
|
||||
3534222C0A222E5220632023463237373633222C0A222E532063202346343845
|
||||
3831222C0A222E5420632023453937463738222C0A222E552063202343303533
|
||||
3341222C0A222E5620632023444236393634222C0A222E572063202346394239
|
||||
4146222C0A222E5820632023464139333746222C0A222E592063202346303835
|
||||
3730222C0A222E5A20632023464646464646222C0A222E302063202345393539
|
||||
3444222C0A222E3120632023454536413545222C0A222E322063202346313944
|
||||
3936222C0A222E3320632023424534463336222C0A222E342063202344413633
|
||||
3546222C0A222E3520632023463741424131222C0A222E362063202346383836
|
||||
3730222C0A222E3720632023463638323638222C0A222E382063202345413636
|
||||
3543222C0A222E3920632023463139433936222C0A222E402063202342433530
|
||||
3332222C0A222E2320632023443736323543222C0A222E3B2063202345453843
|
||||
3831222C0A222E3A20632023463739313745222C0A222E3D2063202346333733
|
||||
3544222C0A222E2B20632023453935423446222C0A222E252063202346303833
|
||||
3742222C0A222E2420632023453237423735222C0A222E282063202342413442
|
||||
3245222C0A222E2920632023444235363442222C0A222E5B2063202346364142
|
||||
4132222C0A222E5D20632023463036343536222C0A222C2E2063202345453636
|
||||
3532222C0A222C2C20632023453635383443222C0A222C2D2063202345363541
|
||||
3532222C0A222C2A20632023463541333946222C0A222C612063202343343530
|
||||
3334222C0A222C6220632023434636313533222C0A222C632063202345333642
|
||||
3631222C0A222C6420632023463541434131222C0A222C652063202345413543
|
||||
3530222C0A222C6620632023453635393445222C0A222C672063202345363536
|
||||
3443222C0A222C6820632023453635363530222C0A222C692063202346344132
|
||||
3945222C0A222C6A20632023443636303534222C0A222C6B2063202342383441
|
||||
3241222C0A222C6C20632023434235393439222C0A222C6D2063202345303635
|
||||
3543222C0A222C6E20632023463541364131222C0A222C6F2063202345463836
|
||||
3745222C0A222C7020632023453936333542222C0A222C712063202345373544
|
||||
3539222C0A222C7220632023454538343744222C0A222C732063202346344130
|
||||
3945222C0A222C7420632023443735443531222C0A222C752063202342373441
|
||||
3242222C0A222C7620632023433635353432222C0A222C772063202343433532
|
||||
3343222C0A222C7820632023453837413735222C0A222C792063202345453932
|
||||
3846222C0A222C7A20632023453437383731222C0A222C412063202343313444
|
||||
3333222C0A222C4220632023424535333338222C0A222C432063202342443531
|
||||
3335222C0A222C4420632023424334423330222C0A222C452063202342383445
|
||||
3245222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2C2E2D2E2A2E612E2E
|
||||
2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E622E632E642E652E66
|
||||
2E672E682E692E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E6A2E6B2E6C2E6D
|
||||
2E6E2E6F2E702E712E722E732E2E2E2E2E2E222C0A222E2E2E2E2E6A2E742E75
|
||||
2E762E772E782E792E7A2E412E422E432E442E2E2E2E222C0A222E2E2E2E2E45
|
||||
2E462E6F2E472E482E492E492E492E492E4A2E4B2E4C2E2E2E2E222C0A222E2E
|
||||
2E4D2E4E2E4F2E502E512E512E512E512E512E512E522E532E542E552E2E222C
|
||||
0A222E2E2E562E572E582E592E5A2E5A2E5A2E5A2E5A2E5A2E302E312E322E33
|
||||
2E2E222C0A222E2E2E342E352E362E372E5A2E5A2E5A2E5A2E5A2E5A2E302E38
|
||||
2E392E402E2E222C0A222E2E2E232E3B2E3A2E3D2E302E302E302E302E302E30
|
||||
2E2B2E252E242E282E2E222C0A222E2E2E2E2E292E5B2E5D2C2E2E302E302E30
|
||||
2E302C2C2C2D2C2A2C612E2E2E2E222C0A222E2E2E2E2C622C632C642E512C65
|
||||
2E302C662C672C682C692C6A2C6B2E2E2E2E222C0A222E2E2E2E2E2E2C6C2C6D
|
||||
2C6E2C6F2C702C712C722C732C742C752E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2C762C772C782C792C792C7A2C412C752E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2C422C432C442C452E2E2E2E2E2E2E2E2E2E2E2E222C
|
||||
0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E227D0A
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnDeleteClick
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object btnClear: TSpeedButton
|
||||
Left = 108
|
||||
Height = 22
|
||||
Hint = 'Clear'
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
F10800002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A223136203136203130342032222C0A222E2E2063204E6F
|
||||
6E65222C0A222E2C20632023464630303030222C0A222E2D2063202346443030
|
||||
3030222C0A222E2A20632023464632423236222C0A222E612063202346463639
|
||||
3543222C0A222E6220632023464636383542222C0A222E632063202346453637
|
||||
3541222C0A222E6420632023464536353538222C0A222E652063202346453633
|
||||
3536222C0A222E6620632023464536313534222C0A222E672063202346433237
|
||||
3232222C0A222E6820632023464230303030222C0A222E692063202346463641
|
||||
3544222C0A222E6A20632023464634373433222C0A222E6B2063202346453334
|
||||
3334222C0A222E6C20632023464533323332222C0A222E6D2063202346443330
|
||||
3330222C0A222E6E20632023464432443244222C0A222E6F2063202346433343
|
||||
3338222C0A222E7020632023464335443446222C0A222E712063202346413235
|
||||
3146222C0A222E7220632023463730303030222C0A222E732063202346463542
|
||||
3538222C0A222E7420632023464643464346222C0A222E752063202346453532
|
||||
3532222C0A222E7620632023464432463246222C0A222E772063202346443243
|
||||
3243222C0A222E7820632023464334423442222C0A222E792063202346454343
|
||||
4343222C0A222E7A20632023464234433438222C0A222E412063202346423537
|
||||
3439222C0A222E4220632023463932333144222C0A222E432063202346353030
|
||||
3030222C0A222E4420632023464534373433222C0A222E452063202346464633
|
||||
4633222C0A222E4620632023464645444544222C0A222E472063202346433443
|
||||
3443222C0A222E4820632023464334413441222C0A222E492063202346464543
|
||||
4543222C0A222E4A20632023464646324632222C0A222E4B2063202346454341
|
||||
4341222C0A222E4C20632023464132463241222C0A222E4D2063202346413531
|
||||
3432222C0A222E4E20632023463330303030222C0A222E4F2063202346453333
|
||||
3333222C0A222E5020632023464435303530222C0A222E512063202346454543
|
||||
4543222C0A222E5220632023464133453345222C0A222E532063202346383137
|
||||
3137222C0A222E5420632023463934453346222C0A222E552063202346313030
|
||||
3030222C0A222E5620632023464536343537222C0A222E572063202346393344
|
||||
3344222C0A222E5820632023463831363136222C0A222E592063202346373133
|
||||
3133222C0A222E5A20632023463834423343222C0A222E302063202346453632
|
||||
3535222C0A222E3120632023464332393239222C0A222E322063202346433438
|
||||
3438222C0A222E3320632023463933413341222C0A222E342063202346373132
|
||||
3132222C0A222E3520632023463630463046222C0A222E362063202346383438
|
||||
3338222C0A222E3720632023464435463532222C0A222E382063202346433238
|
||||
3238222C0A222E3920632023464334373437222C0A222E402063202346464631
|
||||
4631222C0A222E2320632023464545414541222C0A222E3B2063202346373334
|
||||
3334222C0A222E3A20632023463530423042222C0A222E3D2063202346383435
|
||||
3335222C0A222E2B20632023454630303030222C0A222E252063202346443544
|
||||
3446222C0A222E2420632023464233373332222C0A222E282063202346454342
|
||||
4342222C0A222E2920632023464545424542222C0A222E5B2063202346393342
|
||||
3342222C0A222E5D20632023463833393339222C0A222C2E2063202346454631
|
||||
4631222C0A222C2C20632023464443354335222C0A222C2D2063202346363144
|
||||
3138222C0A222C2A20632023463734333333222C0A222C612063202346393030
|
||||
3030222C0A222C6220632023464235383441222C0A222C632063202346423437
|
||||
3432222C0A222C6420632023464443394339222C0A222C652063202346363130
|
||||
3130222C0A222C6620632023463733333333222C0A222C672063202346373335
|
||||
3330222C0A222C6820632023463734343334222C0A222C692063202346323142
|
||||
3134222C0A222C6A20632023454430303030222C0A222C6B2063202346413533
|
||||
3434222C0A222C6C20632023463932393234222C0A222C6D2063202346353043
|
||||
3043222C0A222C6E20632023463530393039222C0A222C6F2063202346353142
|
||||
3136222C0A222C7020632023463131423134222C0A222C712063202346353230
|
||||
3141222C0A222C7220632023463934433343222C0A222C732063202346383439
|
||||
3341222C0A222C7420632023463834373338222C0A222C752063202346373433
|
||||
3334222C0A222C7620632023463734323332222C0A222E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2E2C2E2C2E2C2E2C2E2D2E2D2E2D2E2D2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2C2E2A2E612E622E632E642E652E662E672E682E2E2E2E2E2E222C
|
||||
0A222E2E2E2E2E2C2E2A2E692E6A2E6B2E6C2E6D2E6E2E6F2E702E712E722E2E
|
||||
2E2E222C0A222E2E2E2C2E2A2E692E732E742E752E762E772E782E792E7A2E41
|
||||
2E422E432E2E222C0A222E2E2E2C2E622E442E742E452E462E472E482E492E4A
|
||||
2E4B2E4C2E4D2E4E2E2E222C0A222E2E2E2C2E632E4F2E502E462E452E462E46
|
||||
2E4A2E512E522E532E542E552E2E222C0A222E2E2E2D2E562E6D2E6E2E782E46
|
||||
2E4A2E4A2E492E572E582E592E5A2E552E2E222C0A222E2E2E2D2E302E772E31
|
||||
2E322E462E4A2E4A2E512E332E342E352E362E552E2E222C0A222E2E2E2D2E37
|
||||
2E382E392E492E4A2E492E512E402E232E3B2E3A2E3D2E2B2E2E222C0A222E2E
|
||||
2E682E252E242E282E4A2E292E5B2E5D2E232C2E2C2C2C2D2C2A2E2B2E2E222C
|
||||
0A222E2E2C612E712C622C632C642E5B2E592C652C662C2C2C672C682C692C6A
|
||||
2E2E222C0A222E2E2E2E2E722E422C6B2C6C2E342E352C6D2C6E2C6F2C2A2C70
|
||||
2C6A2E2E2E2E222C0A222E2E2E2E2E2E2E432C712C722C732C742E3D2C752C76
|
||||
2C702C6A2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E552E552E552E552E2B
|
||||
2E2B2C6A2C6A2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnClearClick
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
end
|
||||
object cbTileFilter: TCheckBox
|
||||
Left = 4
|
||||
Height = 24
|
||||
Top = 4
|
||||
Width = 214
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Filter active'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object GroupBox2: TGroupBox
|
||||
Left = 4
|
||||
Height = 168
|
||||
Top = 319
|
||||
Width = 228
|
||||
Align = alBottom
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Hue filter'
|
||||
ClientHeight = 146
|
||||
ClientWidth = 222
|
||||
TabOrder = 2
|
||||
object cbHueFilter: TCheckBox
|
||||
Left = 4
|
||||
Height = 24
|
||||
Top = 4
|
||||
Width = 214
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 4
|
||||
Caption = 'Filter active'
|
||||
TabOrder = 0
|
||||
end
|
||||
object vdtHues: TVirtualDrawTree
|
||||
Left = 4
|
||||
Height = 110
|
||||
Top = 32
|
||||
Width = 214
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 4
|
||||
BorderStyle = bsSingle
|
||||
Header.AutoSizeIndex = 2
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
||||
Header.Style = hsFlatButtons
|
||||
PopupMenu = pmHues
|
||||
TabOrder = 1
|
||||
TreeOptions.MiscOptions = [toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
||||
OnChecked = vdtHuesChecked
|
||||
OnDrawNode = vdtHuesDrawNode
|
||||
Columns = <
|
||||
item
|
||||
Width = 20
|
||||
end
|
||||
item
|
||||
Position = 1
|
||||
Width = 38
|
||||
WideText = 'Hue'
|
||||
end
|
||||
item
|
||||
Position = 2
|
||||
Width = 156
|
||||
WideText = 'Name'
|
||||
end>
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Cursor = crVSplit
|
||||
Height = 5
|
||||
Top = 310
|
||||
Width = 236
|
||||
Align = alBottom
|
||||
ResizeAnchor = akBottom
|
||||
end
|
||||
object pmHues: TPopupMenu
|
||||
left = 148
|
||||
top = 404
|
||||
object mnuCheckHues: TMenuItem
|
||||
Caption = 'Check all hues'
|
||||
OnClick = mnuCheckHuesClick
|
||||
end
|
||||
object mnuUncheckHues: TMenuItem
|
||||
Caption = 'Uncheck all hues'
|
||||
OnClick = mnuUncheckHuesClick
|
||||
end
|
||||
end
|
||||
end
|
||||
325
Client/Tools/UfrmFilter.pas
Normal file
325
Client/Tools/UfrmFilter.pas
Normal file
@@ -0,0 +1,325 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmFilter;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
ExtCtrls, VirtualTrees, LCLIntf, LMessages, Buttons, UPlatformTypes, UStatics,
|
||||
PairSplitter, Menus;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmFilter }
|
||||
|
||||
TfrmFilter = class(TForm)
|
||||
btnClear: TSpeedButton;
|
||||
btnDelete: TSpeedButton;
|
||||
btnRandomPresetDelete: TSpeedButton;
|
||||
btnRandomPresetSave: TSpeedButton;
|
||||
cbRandomPreset: TComboBox;
|
||||
cbTileFilter: TCheckBox;
|
||||
cbHueFilter: TCheckBox;
|
||||
GroupBox1: TGroupBox;
|
||||
GroupBox2: TGroupBox;
|
||||
Label1: TLabel;
|
||||
mnuUncheckHues: TMenuItem;
|
||||
mnuCheckHues: TMenuItem;
|
||||
pnlControls: TPanel;
|
||||
pnlRandomPreset: TPanel;
|
||||
pmHues: TPopupMenu;
|
||||
rgFilterType: TRadioGroup;
|
||||
Splitter1: TSplitter;
|
||||
vdtFilter: TVirtualDrawTree;
|
||||
vdtHues: TVirtualDrawTree;
|
||||
procedure btnClearClick(Sender: TObject);
|
||||
procedure btnDeleteClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure mnuUncheckHuesClick(Sender: TObject);
|
||||
procedure mnuCheckHuesClick(Sender: TObject);
|
||||
procedure vdtFilterDragDrop(Sender: TBaseVirtualTree; Source: TObject;
|
||||
DataObject: IDataObject; Formats: TFormatArray; Shift: TShiftState;
|
||||
Pt: TPoint; var Effect: Integer; Mode: TDropMode);
|
||||
procedure vdtFilterDragOver(Sender: TBaseVirtualTree; Source: TObject;
|
||||
Shift: TShiftState; State: TDragState; Pt: TPoint; Mode: TDropMode;
|
||||
var Effect: Integer; var Accept: Boolean);
|
||||
procedure vdtFilterDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
procedure vdtHuesChecked(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure vdtHuesDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
protected
|
||||
FLocked: Boolean;
|
||||
FCheckedHues: TBits;
|
||||
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
|
||||
public
|
||||
property Locked: Boolean read FLocked write FLocked;
|
||||
function Filter(AStatic: TStaticItem): Boolean;
|
||||
procedure JumpToHue(AHueID: Word);
|
||||
end;
|
||||
|
||||
var
|
||||
frmFilter: TfrmFilter;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UfrmMain, UGameResources, UHue, UGraphicHelper, UGUIPlatformUtils;
|
||||
|
||||
type
|
||||
PTileInfo = ^TTileInfo;
|
||||
TTileInfo = record
|
||||
ID: Word;
|
||||
end;
|
||||
PHueInfo = ^THueInfo;
|
||||
THueInfo = record
|
||||
ID: Word;
|
||||
Hue: THue;
|
||||
end;
|
||||
|
||||
{ TfrmFilter }
|
||||
|
||||
procedure TfrmFilter.FormShow(Sender: TObject);
|
||||
var
|
||||
upperLeft, lowerLeft: TPoint;
|
||||
begin
|
||||
upperLeft := frmMain.pnlMain.ClientToScreen(Point(0, 0));
|
||||
lowerLeft := frmMain.pnlMain.ClientToScreen(Point(0, frmMain.pnlMain.Height));
|
||||
Left := upperLeft.x;
|
||||
Top := upperLeft.y;
|
||||
Height := lowerLeft.y - upperLeft.y;
|
||||
|
||||
SetWindowParent(Handle, frmMain.Handle);
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.mnuUncheckHuesClick(Sender: TObject);
|
||||
begin
|
||||
vdtHues.ClearChecked;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.mnuCheckHuesClick(Sender: TObject);
|
||||
var
|
||||
node: PVirtualNode;
|
||||
begin
|
||||
node := vdtHues.GetFirst;
|
||||
while node <> nil do
|
||||
begin
|
||||
vdtHues.CheckState[node] := csCheckedNormal;
|
||||
node := vdtHues.GetNext(node);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.vdtFilterDragDrop(Sender: TBaseVirtualTree;
|
||||
Source: TObject; DataObject: IDataObject; Formats: TFormatArray;
|
||||
Shift: TShiftState; Pt: TPoint; var Effect: Integer; Mode: TDropMode);
|
||||
var
|
||||
sourceTree: TVirtualDrawTree;
|
||||
selected, node: PVirtualNode;
|
||||
sourceTileInfo, targetTileInfo: PTileInfo;
|
||||
begin
|
||||
sourceTree := Source as TVirtualDrawTree;
|
||||
if (sourceTree <> Sender) and (sourceTree <> nil) and
|
||||
(sourceTree.Tag = 1) then
|
||||
begin
|
||||
Sender.BeginUpdate;
|
||||
selected := sourceTree.GetFirstSelected;
|
||||
while selected <> nil do
|
||||
begin
|
||||
sourceTileInfo := sourceTree.GetNodeData(selected);
|
||||
if sourceTileInfo^.ID > $3FFF then
|
||||
begin
|
||||
node := Sender.AddChild(nil);
|
||||
targetTileInfo := Sender.GetNodeData(node);
|
||||
targetTileInfo^.ID := sourceTileInfo^.ID;
|
||||
end;
|
||||
selected := sourceTree.GetNextSelected(selected);
|
||||
end;
|
||||
Sender.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.vdtFilterDragOver(Sender: TBaseVirtualTree;
|
||||
Source: TObject; Shift: TShiftState; State: TDragState; Pt: TPoint;
|
||||
Mode: TDropMode; var Effect: Integer; var Accept: Boolean);
|
||||
begin
|
||||
if (Source <> Sender) and (Source is TVirtualDrawTree) and
|
||||
(TVirtualDrawTree(Source).Tag = 1) then
|
||||
begin
|
||||
Accept := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.vdtFilterDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
begin
|
||||
frmMain.vdtTilesDrawNode(Sender, PaintInfo);
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.vdtHuesChecked(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
var
|
||||
hueInfo: PHueInfo;
|
||||
begin
|
||||
hueInfo := Sender.GetNodeData(Node);
|
||||
FCheckedHues.Bits[hueInfo^.ID] := (Sender.CheckState[node] = csCheckedNormal);
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.vdtHuesDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
var
|
||||
hueInfo: PHueInfo;
|
||||
hueColor: TColor;
|
||||
i: Integer;
|
||||
textStyle: TTextStyle;
|
||||
begin
|
||||
hueInfo := Sender.GetNodeData(PaintInfo.Node);
|
||||
textStyle := PaintInfo.Canvas.TextStyle;
|
||||
textStyle.Alignment := taLeftJustify;
|
||||
textStyle.Layout := tlCenter;
|
||||
textStyle.Wordbreak := True;
|
||||
case PaintInfo.Column of
|
||||
1:
|
||||
begin
|
||||
for i := 0 to 31 do
|
||||
begin
|
||||
hueColor := ARGB2RGB(hueInfo^.Hue.ColorTable[i]);
|
||||
PaintInfo.Canvas.Pen.Color := hueColor;
|
||||
PaintInfo.Canvas.MoveTo(PaintInfo.CellRect.Left + 2 + i, PaintInfo.CellRect.Top + 1);
|
||||
PaintInfo.Canvas.LineTo(PaintInfo.CellRect.Left + 2 + i, PaintInfo.CellRect.Bottom - 1);
|
||||
end;
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
PaintInfo.Canvas.TextRect(PaintInfo.CellRect, PaintInfo.CellRect.Left, PaintInfo.CellRect.Top, Format('$%x (%s)', [hueInfo^.ID, hueInfo^.Hue.Name]), textStyle);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.MouseLeave(var msg: TLMessage);
|
||||
begin
|
||||
{if Active and (not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos))) then
|
||||
Close;}
|
||||
end;
|
||||
|
||||
function TfrmFilter.Filter(AStatic: TStaticItem): Boolean;
|
||||
var
|
||||
found: Boolean;
|
||||
tileInfo: PTileInfo;
|
||||
node: PVirtualNode;
|
||||
id: Word;
|
||||
begin
|
||||
if cbTileFilter.Checked then
|
||||
begin
|
||||
id := AStatic.TileID + $4000;
|
||||
|
||||
found := False;
|
||||
node := vdtFilter.GetFirst;
|
||||
while (node <> nil) and (not found) do
|
||||
begin
|
||||
tileInfo := vdtFilter.GetNodeData(node);
|
||||
if tileInfo^.ID = id then
|
||||
found := True
|
||||
else
|
||||
node := vdtFilter.GetNext(node);
|
||||
end;
|
||||
|
||||
Result := ((rgFilterType.ItemIndex = 0) and (not found)) or
|
||||
((rgFilterType.ItemIndex = 1) and found);
|
||||
end else
|
||||
Result := True;
|
||||
|
||||
if cbHueFilter.Checked then
|
||||
begin
|
||||
Result := Result and (
|
||||
((rgFilterType.ItemIndex = 0) and (not FCheckedHues.Bits[AStatic.Hue])) or
|
||||
((rgFilterType.ItemIndex = 1) and (FCheckedHues.Bits[AStatic.Hue]))
|
||||
);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.JumpToHue(AHueID: Word);
|
||||
var
|
||||
hueInfo: PHueInfo;
|
||||
node: PVirtualNode;
|
||||
begin
|
||||
node := vdtHues.GetFirst;
|
||||
while node <> nil do
|
||||
begin
|
||||
hueInfo := vdtHues.GetNodeData(node);
|
||||
if hueInfo^.ID = AHueID then
|
||||
begin
|
||||
vdtHues.ClearSelection;
|
||||
vdtHues.Selected[node] := True;
|
||||
vdtHues.FocusedNode := node;
|
||||
node := nil;
|
||||
end else
|
||||
node := vdtHues.GetNext(node);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
hueInfo: PHueInfo;
|
||||
node: PVirtualNode;
|
||||
begin
|
||||
FLocked := False;
|
||||
vdtFilter.NodeDataSize := SizeOf(TTileInfo);
|
||||
vdtHues.NodeDataSize := SizeOf(THueInfo);
|
||||
|
||||
vdtHues.BeginUpdate;
|
||||
vdtHues.Clear;
|
||||
for i := 0 to ResMan.Hue.Count - 1 do
|
||||
begin
|
||||
node := vdtHues.AddChild(nil);
|
||||
hueInfo := vdtHues.GetNodeData(node);
|
||||
hueInfo^.ID := i + 1;
|
||||
hueInfo^.Hue := ResMan.Hue.Hues[i];
|
||||
vdtHues.CheckType[node] := ctCheckBox;
|
||||
end;
|
||||
vdtHues.EndUpdate;
|
||||
FCheckedHues := TBits.Create(ResMan.Hue.Count + 1);
|
||||
//FCheckedHues.Bits[0] := True;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.btnDeleteClick(Sender: TObject);
|
||||
begin
|
||||
vdtFilter.DeleteSelectedNodes;
|
||||
end;
|
||||
|
||||
procedure TfrmFilter.btnClearClick(Sender: TObject);
|
||||
begin
|
||||
vdtFilter.Clear;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmFilter.lrs}
|
||||
|
||||
end.
|
||||
|
||||
45
Client/Tools/UfrmHueSettings.lfm
Normal file
45
Client/Tools/UfrmHueSettings.lfm
Normal file
@@ -0,0 +1,45 @@
|
||||
object frmHueSettings: TfrmHueSettings
|
||||
Left = 290
|
||||
Height = 207
|
||||
Top = 171
|
||||
Width = 217
|
||||
HorzScrollBar.Page = 216
|
||||
VertScrollBar.Page = 206
|
||||
ActiveControl = lbHue
|
||||
BorderIcons = []
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Hue Settings'
|
||||
ClientHeight = 207
|
||||
ClientWidth = 217
|
||||
FormStyle = fsStayOnTop
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDeactivate = FormDeactivate
|
||||
object lblHue: TLabel
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 12
|
||||
Width = 26
|
||||
Caption = 'Hue:'
|
||||
ParentColor = False
|
||||
end
|
||||
object lbHue: TListBox
|
||||
Left = 8
|
||||
Height = 160
|
||||
Top = 40
|
||||
Width = 200
|
||||
ItemHeight = 16
|
||||
OnDrawItem = lbHueDrawItem
|
||||
OnSelectionChange = lbHueSelectionChange
|
||||
Style = lbOwnerDrawFixed
|
||||
TabOrder = 0
|
||||
end
|
||||
object edHue: TEdit
|
||||
Left = 48
|
||||
Height = 23
|
||||
Top = 10
|
||||
Width = 80
|
||||
OnEditingDone = edHueEditingDone
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
156
Client/Tools/UfrmHueSettings.pas
Normal file
156
Client/Tools/UfrmHueSettings.pas
Normal file
@@ -0,0 +1,156 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmHueSettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
LMessages, LCLIntf, UHue;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmHueSettings }
|
||||
|
||||
TfrmHueSettings = class(TForm)
|
||||
edHue: TEdit;
|
||||
lblHue: TLabel;
|
||||
lbHue: TListBox;
|
||||
procedure edHueEditingDone(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDeactivate(Sender: TObject);
|
||||
procedure lbHueDrawItem(Control: TWinControl; Index: Integer; ARect: TRect;
|
||||
State: TOwnerDrawState);
|
||||
procedure lbHueSelectionChange(Sender: TObject; User: boolean);
|
||||
protected
|
||||
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
|
||||
public
|
||||
class procedure DrawHue(AHue: THue; ACanvas: TCanvas; ARect: TRect;
|
||||
ACaption: string);
|
||||
end;
|
||||
|
||||
var
|
||||
frmHueSettings: TfrmHueSettings;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UGraphicHelper;
|
||||
|
||||
{ TfrmHueSettings }
|
||||
|
||||
procedure TfrmHueSettings.FormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.edHueEditingDone(Sender: TObject);
|
||||
var
|
||||
hueID: Integer;
|
||||
begin
|
||||
if (not TryStrToInt(edHue.Text, hueID)) or (hueID >= lbHue.Items.Count) then
|
||||
begin
|
||||
edHue.Text := Format('$%x', [lbHue.ItemIndex]);
|
||||
MessageDlg('Invalid Hue', 'The hue you''ve entered is invalid.', mtWarning, [mbOK], 0);
|
||||
end else
|
||||
lbHue.ItemIndex := hueID;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
hue: THue;
|
||||
begin
|
||||
lbHue.Clear;
|
||||
lbHue.Items.Add('$0 (no hue)');
|
||||
for i := 1 to ResMan.Hue.Count do
|
||||
begin
|
||||
hue := ResMan.Hue.Hues[i-1];
|
||||
lbHue.Items.AddObject(Format('$%x (%s)', [i, hue.Name]), hue);
|
||||
end;
|
||||
lbHue.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.FormDeactivate(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.lbHueDrawItem(Control: TWinControl; Index: Integer;
|
||||
ARect: TRect; State: TOwnerDrawState);
|
||||
var
|
||||
hue: THue;
|
||||
begin
|
||||
if Index > 0 then
|
||||
hue := ResMan.Hue.Hues[Index-1]
|
||||
else
|
||||
hue := nil;
|
||||
DrawHue(hue, lbHue.Canvas, ARect, lbHue.Items.Strings[Index]);
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.lbHueSelectionChange(Sender: TObject; User: boolean);
|
||||
begin
|
||||
edHue.Text := Format('$%x', [lbHue.ItemIndex]);
|
||||
end;
|
||||
|
||||
procedure TfrmHueSettings.MouseLeave(var msg: TLMessage);
|
||||
begin
|
||||
try
|
||||
if not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
|
||||
Close;
|
||||
except
|
||||
Close;
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TfrmHueSettings.DrawHue(AHue: THue; ACanvas: TCanvas; ARect: TRect;
|
||||
ACaption: string);
|
||||
var
|
||||
hueColor: TColor;
|
||||
i: Integer;
|
||||
begin
|
||||
ACanvas.Pen.Color := clWhite;
|
||||
ACanvas.Rectangle(ARect);
|
||||
if AHue <> nil then
|
||||
for i := 0 to 31 do
|
||||
begin
|
||||
hueColor := ARGB2RGB(AHue.ColorTable[i]);
|
||||
ACanvas.Pen.Color := hueColor;
|
||||
ACanvas.MoveTo(ARect.Left + 2 + i, ARect.Top + 1);
|
||||
ACanvas.LineTo(ARect.Left + 2 + i, ARect.Bottom - 1);
|
||||
end;
|
||||
ACanvas.TextOut(ARect.Left + 36, ARect.Top, ACaption);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmHueSettings.lrs}
|
||||
|
||||
end.
|
||||
|
||||
259
Client/Tools/UfrmMoveSettings.lfm
Normal file
259
Client/Tools/UfrmMoveSettings.lfm
Normal file
@@ -0,0 +1,259 @@
|
||||
object frmMoveSettings: TfrmMoveSettings
|
||||
Left = 290
|
||||
Height = 125
|
||||
Top = 171
|
||||
Width = 228
|
||||
HorzScrollBar.Page = 227
|
||||
VertScrollBar.Page = 124
|
||||
ActiveControl = cbAsk
|
||||
BorderIcons = []
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Move settings'
|
||||
ClientHeight = 125
|
||||
ClientWidth = 228
|
||||
FormStyle = fsStayOnTop
|
||||
OnClose = FormClose
|
||||
OnDeactivate = FormDeactivate
|
||||
OnShow = FormShow
|
||||
object cbAsk: TCheckBox
|
||||
Left = 128
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 89
|
||||
Caption = 'Ask each time'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
object gbDirection: TGroupBox
|
||||
Left = 8
|
||||
Height = 112
|
||||
Top = 8
|
||||
Width = 105
|
||||
ClientHeight = 94
|
||||
ClientWidth = 101
|
||||
TabOrder = 1
|
||||
object btnTopLeft: TSpeedButton
|
||||
Left = 6
|
||||
Height = 22
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Down = True
|
||||
Glyph.Data = {
|
||||
8D0100002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A22313620313620322031222C0A222E2063204E6F6E6522
|
||||
2C0A222C20632023343034303430222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2C2C2C2C
|
||||
2C2C2C2E2E2E2E2E2E2E222C0A222E2E2C2C2C2C2C2C2E2E2E2E2E2E2E2E222C
|
||||
0A222E2E2C2C2C2C2C2E2E2E2E2E2E2E2E2E222C0A222E2E2C2C2C2C2C2C2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2C2C2C2C2C2C2C2E2E2E2E2E2E2E222C0A222E2E
|
||||
2C2C2E2C2C2C2C2C2E2E2E2E2E2E222C0A222E2E2C2E2E2E2C2C2C2C2C2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2C2C2C2C2C2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2C2C2C2C2C2E2E2E222C0A222E2E2E2E2E2E2E2E2E2C2C2C2C2C2E2E222C
|
||||
0A222E2E2E2E2E2E2E2E2E2E2C2C2C2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E
|
||||
2E2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnTopLeftClick
|
||||
end
|
||||
object btnTop: TSpeedButton
|
||||
Left = 38
|
||||
Height = 22
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
8D0100002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A22313620313620322031222C0A222E2063204E6F6E6522
|
||||
2C0A222C20632023343034303430222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2C2C2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2E2E2C2C2C2C2C2C2E2E2E2E2E222C
|
||||
0A222E2E2E2E2C2C2C2C2C2C2C2C2E2E2E2E222C0A222E2E2E2C2C2C2C2C2C2C
|
||||
2C2C2C2E2E2E222C0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C
|
||||
0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2E2E2E2C2C2C2C
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnTopLeftClick
|
||||
end
|
||||
object btnTopRight: TSpeedButton
|
||||
Left = 70
|
||||
Height = 22
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
8D0100002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A22313620313620322031222C0A222E2063204E6F6E6522
|
||||
2C0A222C20632023343034303430222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2E2C2C2C2C2C2C2C2E2E222C0A222E2E2E2E2E2E2E2E2C2C2C2C2C2C2E2E222C
|
||||
0A222E2E2E2E2E2E2E2E2E2C2C2C2C2C2E2E222C0A222E2E2E2E2E2E2E2E2C2C
|
||||
2C2C2C2C2E2E222C0A222E2E2E2E2E2E2E2C2C2C2C2C2C2C2E2E222C0A222E2E
|
||||
2E2E2E2E2C2C2C2C2C2E2C2C2E2E222C0A222E2E2E2E2E2C2C2C2C2C2E2E2E2C
|
||||
2E2E222C0A222E2E2E2E2C2C2C2C2C2E2E2E2E2E2E2E222C0A222E2E2E2C2C2C
|
||||
2C2C2E2E2E2E2E2E2E2E222C0A222E2E2C2C2C2C2C2E2E2E2E2E2E2E2E2E222C
|
||||
0A222E2E2E2C2C2C2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2C2E2E2E2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnTopLeftClick
|
||||
end
|
||||
object btnRight: TSpeedButton
|
||||
Left = 70
|
||||
Height = 22
|
||||
Top = 32
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
8D0100002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A22313620313620322031222C0A222E2063204E6F6E6522
|
||||
2C0A222C20632023343034303430222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2C2E2E2E2E2E222C
|
||||
0A222E2E2E2E2E2E2E2E2E2E2C2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E
|
||||
2C2C2C2E2E2E222C0A222E2E2C2C2C2C2C2C2C2C2C2C2C2C2E2E222C0A222E2E
|
||||
2C2C2C2C2C2C2C2C2C2C2C2C2C2E222C0A222E2E2C2C2C2C2C2C2C2C2C2C2C2C
|
||||
2C2E222C0A222E2E2C2C2C2C2C2C2C2C2C2C2C2C2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2E2E2C2C2C2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2C2C2E2E2E2E222C
|
||||
0A222E2E2E2E2E2E2E2E2E2E2C2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnTopLeftClick
|
||||
end
|
||||
object btnBottomRight: TSpeedButton
|
||||
Left = 70
|
||||
Height = 22
|
||||
Top = 64
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
8D0100002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A22313620313620322031222C0A222E2063204E6F6E6522
|
||||
2C0A222C20632023343034303430222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2C2E
|
||||
2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2C2C2C2E2E2E2E2E2E2E2E2E2E222C
|
||||
0A222E2E2C2C2C2C2C2E2E2E2E2E2E2E2E2E222C0A222E2E2E2C2C2C2C2C2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2C2C2C2C2C2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2C2C2C2C2C2E2E2E2C2E2E222C0A222E2E2E2E2E2E2C2C2C2C2C2E2C2C
|
||||
2E2E222C0A222E2E2E2E2E2E2E2C2C2C2C2C2C2C2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2C2C2C2C2C2C2E2E222C0A222E2E2E2E2E2E2E2E2E2C2C2C2C2C2E2E222C
|
||||
0A222E2E2E2E2E2E2E2E2C2C2C2C2C2C2E2E222C0A222E2E2E2E2E2E2E2C2C2C
|
||||
2C2C2C2C2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnTopLeftClick
|
||||
end
|
||||
object btnBottom: TSpeedButton
|
||||
Left = 38
|
||||
Height = 22
|
||||
Top = 64
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
8D0100002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A22313620313620322031222C0A222E2063204E6F6E6522
|
||||
2C0A222C20632023343034303430222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C
|
||||
0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2E2E2E2C2C2C2C
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2C2C2C
|
||||
2C2C2C2C2C2C2C2E2E2E222C0A222E2E2E2E2C2C2C2C2C2C2C2C2E2E2E2E222C
|
||||
0A222E2E2E2E2E2C2C2C2C2C2C2E2E2E2E2E222C0A222E2E2E2E2E2E2C2C2C2C
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2C2C2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnTopLeftClick
|
||||
end
|
||||
object btnBottomLeft: TSpeedButton
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 64
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
8D0100002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A22313620313620322031222C0A222E2063204E6F6E6522
|
||||
2C0A222C20632023343034303430222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2E2E2E2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2C2C2C2E2E2E222C
|
||||
0A222E2E2E2E2E2E2E2E2E2C2C2C2C2C2E2E222C0A222E2E2E2E2E2E2E2E2C2C
|
||||
2C2C2C2E2E2E222C0A222E2E2E2E2E2E2E2C2C2C2C2C2E2E2E2E222C0A222E2E
|
||||
2C2E2E2E2C2C2C2C2C2E2E2E2E2E222C0A222E2E2C2C2E2C2C2C2C2C2E2E2E2E
|
||||
2E2E222C0A222E2E2C2C2C2C2C2C2C2E2E2E2E2E2E2E222C0A222E2E2C2C2C2C
|
||||
2C2C2E2E2E2E2E2E2E2E222C0A222E2E2C2C2C2C2C2E2E2E2E2E2E2E2E2E222C
|
||||
0A222E2E2C2C2C2C2C2C2E2E2E2E2E2E2E2E222C0A222E2E2C2C2C2C2C2C2C2E
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnTopLeftClick
|
||||
end
|
||||
object btnLeft: TSpeedButton
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 32
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
8D0100002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A22313620313620322031222C0A222E2063204E6F6E6522
|
||||
2C0A222C20632023343034303430222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2C2E2E2E2E2E2E2E2E2E2E222C
|
||||
0A222E2E2E2E2C2C2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2C2C2C2E2E2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2C2C2C2C2C2C2C2C2C2C2C2C2E2E222C0A222E2C
|
||||
2C2C2C2C2C2C2C2C2C2C2C2C2E2E222C0A222E2C2C2C2C2C2C2C2C2C2C2C2C2C
|
||||
2E2E222C0A222E2E2C2C2C2C2C2C2C2C2C2C2C2C2E2E222C0A222E2E2E2C2C2C
|
||||
2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2C2C2E2E2E2E2E2E2E2E2E2E222C
|
||||
0A222E2E2E2E2E2C2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnTopLeftClick
|
||||
end
|
||||
object seOffset: TSpinEdit
|
||||
Left = 33
|
||||
Height = 23
|
||||
Hint = 'Offset'
|
||||
Top = 32
|
||||
Width = 34
|
||||
MaxValue = 8
|
||||
MinValue = 1
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
Value = 1
|
||||
end
|
||||
end
|
||||
object btnCancel: TButton
|
||||
Left = 128
|
||||
Height = 25
|
||||
Top = 88
|
||||
Width = 89
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
152
Client/Tools/UfrmMoveSettings.pas
Normal file
152
Client/Tools/UfrmMoveSettings.pas
Normal file
@@ -0,0 +1,152 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmMoveSettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
Buttons, Spin, LMessages, LCLIntf, math;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmMoveSettings }
|
||||
|
||||
TfrmMoveSettings = class(TForm)
|
||||
btnCancel: TButton;
|
||||
cbAsk: TCheckBox;
|
||||
gbDirection: TGroupBox;
|
||||
btnTopLeft: TSpeedButton;
|
||||
btnTop: TSpeedButton;
|
||||
btnTopRight: TSpeedButton;
|
||||
btnRight: TSpeedButton;
|
||||
btnBottomRight: TSpeedButton;
|
||||
btnBottom: TSpeedButton;
|
||||
btnBottomLeft: TSpeedButton;
|
||||
btnLeft: TSpeedButton;
|
||||
seOffset: TSpinEdit;
|
||||
procedure btnTopLeftClick(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormDeactivate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
protected
|
||||
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
|
||||
public
|
||||
function GetOffsetX: Integer;
|
||||
function GetOffsetY: Integer;
|
||||
end;
|
||||
|
||||
var
|
||||
frmMoveSettings: TfrmMoveSettings;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UdmNetwork, UfrmMain, UEnums;
|
||||
|
||||
{ TfrmMoveSettings }
|
||||
|
||||
procedure TfrmMoveSettings.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmMoveSettings.FormDeactivate(Sender: TObject);
|
||||
begin
|
||||
if not (fsModal in FormState) then
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmMoveSettings.FormShow(Sender: TObject);
|
||||
begin
|
||||
btnCancel.Visible := (fsModal in FormState);
|
||||
if dmNetwork.AccessLevel = alAdministrator then
|
||||
seOffset.MaxValue := Max(frmMain.Landscape.CellWidth, frmMain.Landscape.CellHeight);
|
||||
end;
|
||||
|
||||
procedure TfrmMoveSettings.MouseLeave(var msg: TLMessage);
|
||||
begin
|
||||
if Visible and (not (fsModal in FormState)) and
|
||||
(not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos))) then
|
||||
Close;
|
||||
end;
|
||||
|
||||
function TfrmMoveSettings.GetOffsetX: Integer;
|
||||
begin
|
||||
if btnTopLeft.Down then
|
||||
Result := -seOffset.Value
|
||||
else if btnTop.Down then
|
||||
Result := -seOffset.Value
|
||||
else if btnTopRight.Down then
|
||||
Result := 0
|
||||
else if btnRight.Down then
|
||||
Result := seOffset.Value
|
||||
else if btnBottomRight.Down then
|
||||
Result := seOffset.Value
|
||||
else if btnBottom.Down then
|
||||
Result := seOffset.Value
|
||||
else if btnBottomLeft.Down then
|
||||
Result := 0
|
||||
else if btnLeft.Down then
|
||||
Result := -seOffset.Value
|
||||
else
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function TfrmMoveSettings.GetOffsetY: Integer;
|
||||
begin
|
||||
if btnTopLeft.Down then
|
||||
Result := 0
|
||||
else if btnTop.Down then
|
||||
Result := -seOffset.Value
|
||||
else if btnTopRight.Down then
|
||||
Result := -seOffset.Value
|
||||
else if btnRight.Down then
|
||||
Result := -seOffset.Value
|
||||
else if btnBottomRight.Down then
|
||||
Result := 0
|
||||
else if btnBottom.Down then
|
||||
Result := seOffset.Value
|
||||
else if btnBottomLeft.Down then
|
||||
Result := seOffset.Value
|
||||
else if btnLeft.Down then
|
||||
Result := seOffset.Value
|
||||
else
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure TfrmMoveSettings.btnTopLeftClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := mrYes;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmMoveSettings.lrs}
|
||||
|
||||
end.
|
||||
|
||||
46
Client/Tools/UfrmVirtualLayer.lfm
Normal file
46
Client/Tools/UfrmVirtualLayer.lfm
Normal file
@@ -0,0 +1,46 @@
|
||||
object frmVirtualLayer: TfrmVirtualLayer
|
||||
Left = 290
|
||||
Height = 73
|
||||
Top = 171
|
||||
Width = 178
|
||||
HorzScrollBar.Page = 177
|
||||
VertScrollBar.Page = 72
|
||||
BorderIcons = []
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Virtual Layer'
|
||||
ClientHeight = 73
|
||||
ClientWidth = 178
|
||||
OnClose = FormClose
|
||||
OnDeactivate = FormDeactivate
|
||||
object seZ: TSpinEdit
|
||||
Left = 120
|
||||
Height = 23
|
||||
Top = 8
|
||||
Width = 50
|
||||
MaxValue = 127
|
||||
MinValue = -128
|
||||
OnChange = seZChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object cbShowLayer: TCheckBox
|
||||
Left = 11
|
||||
Height = 15
|
||||
Top = 12
|
||||
Width = 103
|
||||
Caption = 'Show Layer at Z:'
|
||||
TabOrder = 1
|
||||
end
|
||||
object tbZ: TTrackBar
|
||||
Left = 8
|
||||
Height = 33
|
||||
Top = 32
|
||||
Width = 162
|
||||
Frequency = 10
|
||||
Max = 127
|
||||
Min = -128
|
||||
OnChange = tbZChange
|
||||
PageSize = 1
|
||||
ScalePos = trTop
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
92
Client/Tools/UfrmVirtualLayer.pas
Normal file
92
Client/Tools/UfrmVirtualLayer.pas
Normal file
@@ -0,0 +1,92 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmVirtualLayer;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, LCLIntf,
|
||||
LMessages, StdCtrls, Spin, ComCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmVirtualLayer }
|
||||
|
||||
TfrmVirtualLayer = class(TForm)
|
||||
cbShowLayer: TCheckBox;
|
||||
seZ: TSpinEdit;
|
||||
tbZ: TTrackBar;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormDeactivate(Sender: TObject);
|
||||
procedure seZChange(Sender: TObject);
|
||||
procedure tbZChange(Sender: TObject);
|
||||
protected
|
||||
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmVirtualLayer: TfrmVirtualLayer;
|
||||
|
||||
implementation
|
||||
|
||||
{ TfrmVirtualLayer }
|
||||
|
||||
procedure TfrmVirtualLayer.FormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmVirtualLayer.FormDeactivate(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmVirtualLayer.seZChange(Sender: TObject);
|
||||
begin
|
||||
tbZ.Position := seZ.Value;
|
||||
end;
|
||||
|
||||
procedure TfrmVirtualLayer.tbZChange(Sender: TObject);
|
||||
begin
|
||||
seZ.Value := tbZ.Position;
|
||||
end;
|
||||
|
||||
procedure TfrmVirtualLayer.MouseLeave(var msg: TLMessage);
|
||||
begin
|
||||
if not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
|
||||
Close;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmVirtualLayer.lrs}
|
||||
|
||||
end.
|
||||
|
||||
96
Client/UAdminHandling.pas
Normal file
96
Client/UAdminHandling.pas
Normal file
@@ -0,0 +1,96 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UAdminHandling;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, UPacket, UPacketHandlers, UEnhancedMemoryStream, UEnums;
|
||||
|
||||
type
|
||||
|
||||
{ TFlushServerPacket }
|
||||
|
||||
TFlushServerPacket = class(TPacket)
|
||||
constructor Create;
|
||||
end;
|
||||
|
||||
{ TQuitServerPacket }
|
||||
|
||||
TQuitServerPacket = class(TPacket)
|
||||
constructor Create(AReason: string);
|
||||
end;
|
||||
|
||||
procedure OnAdminHandlerPacket(ABuffer: TEnhancedMemoryStream);
|
||||
|
||||
var
|
||||
AdminPacketHandlers: array[0..$FF] of TPacketHandler;
|
||||
|
||||
implementation
|
||||
|
||||
procedure OnAdminHandlerPacket(ABuffer: TEnhancedMemoryStream);
|
||||
var
|
||||
packetHandler: TPacketHandler;
|
||||
begin
|
||||
packetHandler := AdminPacketHandlers[ABuffer.ReadByte];
|
||||
if packetHandler <> nil then
|
||||
packetHandler.Process(ABuffer);
|
||||
end;
|
||||
|
||||
{ TFlushServerPacket }
|
||||
|
||||
constructor TFlushServerPacket.Create;
|
||||
begin
|
||||
inherited Create($03, 0);
|
||||
FStream.WriteByte($01);
|
||||
end;
|
||||
|
||||
{ TQuitServerPacket }
|
||||
|
||||
constructor TQuitServerPacket.Create(AReason: string);
|
||||
begin
|
||||
inherited Create($03, 0);
|
||||
FStream.WriteByte($02);
|
||||
FStream.WriteStringNull(AReason);
|
||||
end;
|
||||
|
||||
{$WARNINGS OFF}
|
||||
var
|
||||
i: Integer;
|
||||
|
||||
initialization
|
||||
for i := 0 to $FF do
|
||||
AdminPacketHandlers[i] := nil;
|
||||
finalization
|
||||
for i := 0 to $FF do
|
||||
if AdminPacketHandlers[i] <> nil then
|
||||
AdminPacketHandlers[i].Free;
|
||||
{$WARNINGS ON}
|
||||
|
||||
end.
|
||||
|
||||
52
Client/UGUIPlatformUtils.pas
Normal file
52
Client/UGUIPlatformUtils.pas
Normal file
@@ -0,0 +1,52 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UGUIPlatformUtils;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils
|
||||
{$IFDEF LCLWin32}, windows{$ENDIF}
|
||||
{$IFDEF LCLGtk}, gtk{$ENDIF};
|
||||
|
||||
procedure SetWindowParent(AHandle, AParent: THANDLE);
|
||||
|
||||
implementation
|
||||
|
||||
procedure SetWindowParent(AHandle, AParent: THANDLE);
|
||||
begin
|
||||
{$IFDEF LCLWin32}
|
||||
SetWindowLong(AHandle, GWL_HWNDPARENT, AParent);
|
||||
{$ENDIF}
|
||||
{$IFDEF LCLGtk}
|
||||
gtk_window_set_transient_for(PGtkWindow(AHandle), PGtkWindow(AParent));
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
120
Client/UGameResources.pas
Normal file
120
Client/UGameResources.pas
Normal file
@@ -0,0 +1,120 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UGameResources;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, UArtProvider, UTileDataProvider, UTexmapProvider,
|
||||
ULandscape, {URadarProvider,} UHueProvider;
|
||||
|
||||
type
|
||||
|
||||
{ TGameResourceManager }
|
||||
|
||||
TGameResourceManager = class(TObject)
|
||||
constructor Create(ADataDir: string);
|
||||
destructor Destroy; override;
|
||||
protected
|
||||
FDataDir: string;
|
||||
FArtProvider: TArtProvider;
|
||||
FTiledataProvider: TTiledataProvider;
|
||||
FTexmapProvider: TTexmapProvider;
|
||||
//FRadarProvider: TRadarProvider;
|
||||
FHueProvider: THueProvider;
|
||||
|
||||
FLandscape: TLandscape;
|
||||
public
|
||||
procedure InitLandscape(AWidth, AHeight: Word);
|
||||
function GetFile(AFileName: string): string;
|
||||
|
||||
property Art: TArtProvider read FArtProvider;
|
||||
property Tiledata: TTiledataProvider read FTiledataProvider;
|
||||
property Texmaps: TTexmapProvider read FTexmapProvider;
|
||||
//property Radar: TRadarProvider read FRadarProvider;
|
||||
property Hue: THueProvider read FHueProvider;
|
||||
property Landscape: TLandscape read FLandscape;
|
||||
end;
|
||||
|
||||
var
|
||||
GameResourceManager: TGameResourceManager;
|
||||
ResMan: TGameResourceManager absolute GameResourceManager;
|
||||
|
||||
procedure InitGameResourceManager(ADataDir: string);
|
||||
|
||||
implementation
|
||||
|
||||
procedure InitGameResourceManager(ADataDir: string);
|
||||
begin
|
||||
if GameResourceManager <> nil then FreeAndNil(GameResourceManager);
|
||||
GameResourceManager := TGameResourceManager.Create(ADataDir);
|
||||
end;
|
||||
|
||||
{ TGameResourceManager }
|
||||
|
||||
constructor TGameResourceManager.Create(ADataDir: string);
|
||||
begin
|
||||
inherited Create;
|
||||
FDataDir := IncludeTrailingPathDelimiter(ADataDir);
|
||||
|
||||
FArtProvider := TArtProvider.Create(GetFile('art.mul'), GetFile('artidx.mul'), True);
|
||||
FTiledataProvider := TTiledataProvider.Create(GetFile('tiledata.mul'), True);
|
||||
FTexmapProvider := TTexmapProvider.Create(GetFile('texmaps.mul'), GetFile('texidx.mul'), True);
|
||||
//FRadarProvider := TRadarProvider.Create(GetFile('radarcol.mul'));
|
||||
FHueProvider := THueProvider.Create(GetFile('hues.mul'), True);
|
||||
end;
|
||||
|
||||
destructor TGameResourceManager.Destroy;
|
||||
begin
|
||||
if FArtProvider <> nil then FreeAndNil(FArtProvider);
|
||||
if FTiledataProvider <> nil then FreeAndNil(FTiledataProvider);
|
||||
if FTexmapProvider <> nil then FreeAndNil(FTexmapProvider);
|
||||
//if FRadarProvider <> nil then FreeAndNil(FRadarProvider);
|
||||
if FHueProvider <> nil then FreeAndNil(FHueProvider);
|
||||
if FLandscape <> nil then FreeAndNil(FLandscape);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TGameResourceManager.GetFile(AFileName: string): string;
|
||||
begin
|
||||
Result := FDataDir + AFileName;
|
||||
end;
|
||||
|
||||
procedure TGameResourceManager.InitLandscape(AWidth, AHeight: Word);
|
||||
begin
|
||||
if FLandscape <> nil then FreeAndNil(FLandscape);
|
||||
FLandscape := TLandscape.Create(AWidth, AHeight);
|
||||
end;
|
||||
|
||||
finalization
|
||||
begin
|
||||
if GameResourceManager <> nil then FreeAndNil(GameResourceManager);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1163
Client/ULandscape.pas
Normal file
1163
Client/ULandscape.pas
Normal file
File diff suppressed because it is too large
Load Diff
246
Client/UOverlayUI.pas
Normal file
246
Client/UOverlayUI.pas
Normal file
@@ -0,0 +1,246 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UOverlayUI;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Gl, GLU, ImagingTypes, ImagingClasses, ImagingOpenGL,
|
||||
OpenGLContext, ImagingUtility;
|
||||
|
||||
type
|
||||
|
||||
{ TGLArrow }
|
||||
|
||||
TGLArrow = class(TObject)
|
||||
constructor Create(AGraphic: TSingleImage);
|
||||
destructor Destroy; override;
|
||||
protected
|
||||
FGraphic: TSingleImage;
|
||||
FTexture: GLuint;
|
||||
FRealWidth: Integer;
|
||||
FRealHeight: Integer;
|
||||
FWidth: Integer;
|
||||
FHeight: Integer;
|
||||
FCurrentX: Integer;
|
||||
FCurrentY: Integer;
|
||||
procedure UpdateTexture;
|
||||
public
|
||||
property Width: Integer read FWidth;
|
||||
property Height: Integer read FHeight;
|
||||
property CurrentX: Integer read FCurrentX;
|
||||
property CurrentY: Integer read FCurrentY;
|
||||
|
||||
function HitTest(AX, AY: Integer): Boolean;
|
||||
procedure DrawGL(AX, AY: Integer; AActive: Boolean = False);
|
||||
end;
|
||||
|
||||
{ TOverlayUI }
|
||||
|
||||
TOverlayUI = class(TObject)
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
protected
|
||||
FArrows: array[0..7] of TGLArrow;
|
||||
FActiveArrow: Integer;
|
||||
FVisible: Boolean;
|
||||
public
|
||||
property ActiveArrow: Integer read FActiveArrow write FActiveArrow;
|
||||
property Visible: Boolean read FVisible write FVisible;
|
||||
function HitTest(AX, AY: Integer): Integer;
|
||||
procedure Draw(AContext: TOpenGLControl);
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UResourceManager;
|
||||
|
||||
{ TGLArrow }
|
||||
|
||||
constructor TGLArrow.Create(AGraphic: TSingleImage);
|
||||
var
|
||||
caps: TGLTextureCaps;
|
||||
begin
|
||||
inherited Create;
|
||||
FRealWidth := AGraphic.Width;
|
||||
FRealHeight := AGraphic.Height;
|
||||
GetGLTextureCaps(caps);
|
||||
if caps.PowerOfTwo then
|
||||
begin
|
||||
if IsPow2(FRealWidth) then FWidth := FRealWidth else FWidth := NextPow2(FRealWidth);
|
||||
if IsPow2(FRealHeight) then FHeight := FRealHeight else FHeight := NextPow2(FRealHeight);
|
||||
end else
|
||||
begin
|
||||
FWidth := FRealHeight;
|
||||
FHeight := FRealHeight;
|
||||
end;
|
||||
FGraphic := TSingleImage.CreateFromParams(FWidth, FHeight, ifA8R8G8B8);
|
||||
AGraphic.CopyTo(0, 0, FRealWidth, FRealHeight, FGraphic, 0, 0);
|
||||
FTexture := 0;
|
||||
end;
|
||||
|
||||
destructor TGLArrow.Destroy;
|
||||
begin
|
||||
if FGraphic <> nil then FreeAndNil(FGraphic);
|
||||
if FTexture <> 0 then glDeleteTextures(1, @FTexture);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TGLArrow.UpdateTexture;
|
||||
begin
|
||||
if (FGraphic <> nil) and (FRealWidth > 0) and (FRealWidth > 0) then
|
||||
begin
|
||||
FTexture := CreateGLTextureFromImage(FGraphic.ImageDataPointer^, 0, 0, False);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, FTexture);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TGLArrow.HitTest(AX, AY: Integer): Boolean;
|
||||
begin
|
||||
if (AX > -1) and (AX < FRealWidth) and (AY > -1) and (AY < FRealHeight) then
|
||||
begin
|
||||
Result := (FGraphic <> nil) and (Cardinal(PIntegerArray(FGraphic.Bits)^[AY * FWidth + AX] and $FF000000) > 0);
|
||||
end else
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
procedure TGLArrow.DrawGL(AX, AY: Integer; AActive: Boolean = False);
|
||||
begin
|
||||
FCurrentX := AX;
|
||||
FCurrentY := AY;
|
||||
|
||||
if FTexture = 0 then UpdateTexture;
|
||||
|
||||
if FTexture <> 0 then
|
||||
begin
|
||||
if AActive then
|
||||
begin
|
||||
glEnable(GL_COLOR_LOGIC_OP);
|
||||
glLogicOp(GL_COPY_INVERTED);
|
||||
end;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, FTexture);
|
||||
glBegin(GL_QUADS);
|
||||
glTexCoord2f(0, 0); glVertex2d(AX, AY);
|
||||
glTexCoord2f(1, 0); glVertex2d(AX + FWidth, AY);
|
||||
glTexCoord2f(1, 1); glVertex2d(AX + FWidth, AY + FHeight);
|
||||
glTexCoord2f(0, 1); glVertex2d(AX, AY + FHeight);
|
||||
glEnd;
|
||||
|
||||
if AActive then
|
||||
glDisable(GL_COLOR_LOGIC_OP);
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TOverlayUI }
|
||||
|
||||
constructor TOverlayUI.Create;
|
||||
var
|
||||
i: Integer;
|
||||
arrow: TSingleImage;
|
||||
begin
|
||||
inherited Create;
|
||||
FActiveArrow := -1;
|
||||
FVisible := False;
|
||||
|
||||
arrow := TSingleImage.CreateFromStream(ResourceManager.GetResource(0));
|
||||
for i := 0 to 3 do
|
||||
begin
|
||||
FArrows[2*i] := TGLArrow.Create(arrow);
|
||||
arrow.Rotate(-90);
|
||||
end;
|
||||
arrow.Free;
|
||||
arrow := TSingleImage.CreateFromStream(ResourceManager.GetResource(1));
|
||||
for i := 0 to 3 do
|
||||
begin
|
||||
FArrows[2*i+1] := TGLArrow.Create(arrow);
|
||||
arrow.Rotate(-90);
|
||||
end;
|
||||
arrow.Free;
|
||||
end;
|
||||
|
||||
destructor TOverlayUI.Destroy;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i := 0 to 7 do
|
||||
if FArrows[i] <> nil then FreeAndNil(FArrows[i]);
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TOverlayUI.HitTest(AX, AY: Integer): Integer;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result := -1;
|
||||
i := 0;
|
||||
while (i <= 7) and (Result = -1) do
|
||||
begin
|
||||
if FArrows[i].HitTest(AX - FArrows[i].CurrentX, AY - FArrows[i].CurrentY) then
|
||||
Result := i;
|
||||
Inc(i);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOverlayUI.Draw(AContext: TOpenGLControl);
|
||||
begin
|
||||
if FVisible then
|
||||
begin
|
||||
FArrows[0].DrawGL(10, 10, FActiveArrow = 0);
|
||||
FArrows[1].DrawGL(AContext.Width div 2 - FArrows[1].Width div 2, 10,
|
||||
FActiveArrow = 1);
|
||||
FArrows[2].DrawGL(AContext.Width - 10 - FArrows[2].Width, 10,
|
||||
FActiveArrow = 2);
|
||||
|
||||
FArrows[3].DrawGL(AContext.Width - 10 - FArrows[3].Width,
|
||||
AContext.Height div 2 - FArrows[3].Height div 2,
|
||||
FActiveArrow = 3);
|
||||
|
||||
FArrows[4].DrawGL(AContext.Width - 10 - FArrows[4].Width,
|
||||
AContext.Height - 10 - FArrows[4].Height,
|
||||
FActiveArrow = 4);
|
||||
FArrows[5].DrawGL(AContext.Width div 2 - FArrows[5].Width div 2,
|
||||
AContext.Height - 10 - FArrows[5].Height,
|
||||
FActiveArrow = 5);
|
||||
FArrows[6].DrawGL(10, AContext.Height - 10 - FArrows[6].Height,
|
||||
FActiveArrow = 6);
|
||||
|
||||
FArrows[7].DrawGL(10, AContext.Height div 2 - FArrows[7].Height div 2,
|
||||
FActiveArrow = 7);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
150
Client/UPacketHandlers.pas
Normal file
150
Client/UPacketHandlers.pas
Normal file
@@ -0,0 +1,150 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UPacketHandlers;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, dzlib, UEnhancedMemoryStream;
|
||||
|
||||
type
|
||||
TPacketProcessor = procedure(ABuffer: TEnhancedMemoryStream);
|
||||
TPacketProcessorMethod = procedure(ABuffer: TEnhancedMemoryStream) of object;
|
||||
|
||||
{ TPacketHandler }
|
||||
|
||||
TPacketHandler = class(TObject)
|
||||
constructor Create(ALength: Cardinal; APacketProcessor: TPacketProcessor); overload;
|
||||
constructor Create(ALength: Cardinal; APacketProcessorMethod: TPacketProcessorMethod); overload;
|
||||
procedure Process(ABuffer: TEnhancedMemoryStream);
|
||||
protected
|
||||
FLength: Cardinal;
|
||||
FPacketProcessor: TPacketProcessor;
|
||||
FPacketProcessorMethod: TPacketProcessorMethod;
|
||||
published
|
||||
property PacketLength: Cardinal read FLength;
|
||||
end;
|
||||
|
||||
var
|
||||
PacketHandlers: array[0..$FF] of TPacketHandler;
|
||||
|
||||
procedure RegisterPacketHandler(AID: Byte; APacketHandler: TPacketHandler);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UPackets, UAdminHandling;
|
||||
|
||||
procedure RegisterPacketHandler(AID: Byte; APacketHandler: TPacketHandler);
|
||||
begin
|
||||
if Assigned(PacketHandlers[AID]) then FreeAndNil(PacketHandlers[AID]);
|
||||
PacketHandlers[AID] := APacketHandler;
|
||||
end;
|
||||
|
||||
{ TPacketHandler }
|
||||
|
||||
constructor TPacketHandler.Create(ALength: Cardinal; APacketProcessor: TPacketProcessor);
|
||||
begin
|
||||
inherited Create;
|
||||
FLength := ALength;
|
||||
FPacketProcessor := APacketProcessor;
|
||||
FPacketProcessorMethod := nil;
|
||||
end;
|
||||
|
||||
constructor TPacketHandler.Create(ALength: Cardinal;
|
||||
APacketProcessorMethod: TPacketProcessorMethod);
|
||||
begin
|
||||
inherited Create;
|
||||
FLength := ALength;
|
||||
FPacketProcessor := nil;
|
||||
FPacketProcessorMethod := APacketProcessorMethod;
|
||||
end;
|
||||
|
||||
procedure TPacketHandler.Process(ABuffer: TEnhancedMemoryStream);
|
||||
begin
|
||||
if Assigned(FPacketProcessor) then
|
||||
FPacketProcessor(ABuffer)
|
||||
else if Assigned(FPacketProcessorMethod) then
|
||||
FPacketProcessorMethod(ABuffer);
|
||||
end;
|
||||
|
||||
procedure OnCompressedPacket(ABuffer: TEnhancedMemoryStream);
|
||||
var
|
||||
uncompStream: TEnhancedMemoryStream;
|
||||
uncompBuffer: TDecompressionStream;
|
||||
targetSize: Cardinal;
|
||||
packetID: Byte;
|
||||
begin
|
||||
//writeln('compressed size: ', ABuffer.Size);
|
||||
targetSize := ABuffer.ReadCardinal;
|
||||
//writeln('uncompressed size: ', targetSize);
|
||||
uncompBuffer := TDecompressionStream.Create(ABuffer);
|
||||
uncompStream := TEnhancedMemoryStream.Create;
|
||||
try
|
||||
uncompStream.CopyFrom(uncompBuffer, targetSize);
|
||||
uncompStream.Position := 0;
|
||||
packetID := uncompStream.ReadByte;
|
||||
if PacketHandlers[packetID] <> nil then
|
||||
begin
|
||||
if PacketHandlers[PacketID].PacketLength = 0 then
|
||||
uncompStream.Position := uncompStream.Position + 4;
|
||||
uncompStream.Lock(uncompStream.Position, uncompStream.Size - uncompStream.Position);
|
||||
PacketHandlers[PacketID].Process(uncompStream);
|
||||
uncompStream.Unlock;
|
||||
end else
|
||||
begin
|
||||
{Writeln('Dropping client due to unknown packet: ', ANetState.Socket.PeerAddress);
|
||||
ANetState.Socket.Disconnect;
|
||||
ANetState.ReceiveQueue.Clear;}
|
||||
end;
|
||||
finally
|
||||
if uncompBuffer <> nil then uncompBuffer.Free;
|
||||
if uncompStream <> nil then uncompStream.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{$WARNINGS OFF}
|
||||
var
|
||||
i: Integer;
|
||||
|
||||
initialization
|
||||
for i := 0 to $FF do
|
||||
PacketHandlers[i] := nil;
|
||||
PacketHandlers[$01] := TPacketHandler.Create(0, @OnCompressedPacket);
|
||||
//$02 --> ConnectionHandling, done by TdmNetwork
|
||||
PacketHandlers[$03] := TPacketHandler.Create(0, @OnAdminHandlerPacket);;
|
||||
//$04 --> handled by TLandscape
|
||||
//$06-$0B --> handled by TLandscape
|
||||
//$0C --> ClientHandling, done by TfrmMain
|
||||
//$0D --> RadarMapHandling, done by TfrmRadarMap
|
||||
finalization
|
||||
for i := 0 to $FF do
|
||||
if PacketHandlers[i] <> nil then
|
||||
PacketHandlers[i].Free;
|
||||
{$WARNINGS ON}
|
||||
end.
|
||||
|
||||
330
Client/UPackets.pas
Normal file
330
Client/UPackets.pas
Normal file
@@ -0,0 +1,330 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UPackets;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, dzlib, UEnhancedMemoryStream, UPacket, UMap, UStatics;
|
||||
|
||||
type
|
||||
TBlockCoords = packed record
|
||||
X: Word;
|
||||
Y: Word;
|
||||
end;
|
||||
TBlockCoordsArray = array of TBlockCoords;
|
||||
|
||||
{ TCompressedPacket }
|
||||
|
||||
TCompressedPacket = class(TPacket)
|
||||
constructor Create(APacket: TPacket);
|
||||
end;
|
||||
|
||||
{ TLoginRequestPacket }
|
||||
|
||||
TLoginRequestPacket = class(TPacket)
|
||||
constructor Create(AUsername, APassword: string);
|
||||
end;
|
||||
|
||||
{ TQuitPacket }
|
||||
|
||||
TQuitPacket = class(TPacket)
|
||||
constructor Create;
|
||||
end;
|
||||
|
||||
{ TRequestBlocksPacket }
|
||||
|
||||
TRequestBlocksPacket = class(TPacket)
|
||||
constructor Create(ACoords: TBlockCoordsArray);
|
||||
end;
|
||||
|
||||
{ TFreeBlockPacket }
|
||||
|
||||
TFreeBlockPacket = class(TPacket)
|
||||
constructor Create(AX, AY: Word);
|
||||
end;
|
||||
|
||||
{ TDrawMapPacket }
|
||||
|
||||
TDrawMapPacket = class(TPacket)
|
||||
constructor Create(AX, AY: Word; AZ: ShortInt; ATileID: Word);
|
||||
end;
|
||||
|
||||
{ TInsertStaticPacket }
|
||||
|
||||
TInsertStaticPacket = class(TPacket)
|
||||
constructor Create(AX, AY: Word; AZ: ShortInt; ATileID: Word; AHue: Word);
|
||||
end;
|
||||
|
||||
{ TDeleteStaticPacket }
|
||||
|
||||
TDeleteStaticPacket = class(TPacket)
|
||||
constructor Create(AStaticItem: TStaticItem);
|
||||
end;
|
||||
|
||||
{ TElevateStaticPacket }
|
||||
|
||||
TElevateStaticPacket = class(TPacket)
|
||||
constructor Create(AStaticItem: TStaticItem; ANewZ: ShortInt);
|
||||
end;
|
||||
|
||||
{ TMoveStaticPacket }
|
||||
|
||||
TMoveStaticPacket = class(TPacket)
|
||||
constructor Create(AStaticItem: TStaticItem; ANewX, ANewY: Word);
|
||||
end;
|
||||
|
||||
{ THueStaticPacket }
|
||||
|
||||
THueStaticPacket = class(TPacket)
|
||||
constructor Create(AStaticItem: TStaticItem; ANewHue: Word);
|
||||
end;
|
||||
|
||||
{ TUpdateClientPosPacket }
|
||||
|
||||
TUpdateClientPosPacket = class(TPacket)
|
||||
constructor Create(AX, AY: Word);
|
||||
end;
|
||||
|
||||
{ TChatMessagePacket }
|
||||
|
||||
TChatMessagePacket = class(TPacket)
|
||||
constructor Create(AMessage: string);
|
||||
end;
|
||||
|
||||
{ TGotoClientPosPacket }
|
||||
|
||||
TGotoClientPosPacket = class(TPacket)
|
||||
constructor Create(AUsername: string);
|
||||
end;
|
||||
|
||||
{ TRequestRadarChecksumPacket }
|
||||
|
||||
TRequestRadarChecksumPacket = class(TPacket)
|
||||
constructor Create;
|
||||
end;
|
||||
|
||||
{ TRequestRadarMapPacket }
|
||||
|
||||
TRequestRadarMapPacket = class(TPacket)
|
||||
constructor Create;
|
||||
end;
|
||||
|
||||
{ TNoOpPacket }
|
||||
|
||||
TNoOpPacket = class(TPacket)
|
||||
constructor Create;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TCompressedPacket }
|
||||
|
||||
constructor TCompressedPacket.Create(APacket: TPacket);
|
||||
var
|
||||
compBuffer: TEnhancedMemoryStream;
|
||||
compStream: TCompressionStream;
|
||||
sourceStream: TStream;
|
||||
begin
|
||||
inherited Create($01, 0);
|
||||
compBuffer := TEnhancedMemoryStream.Create;
|
||||
compStream := TCompressionStream.Create(clMax, compBuffer);
|
||||
sourceStream := APacket.Stream;
|
||||
compStream.CopyFrom(sourceStream, 0);
|
||||
compStream.Free;
|
||||
FStream.WriteCardinal(sourceStream.Size);
|
||||
FStream.CopyFrom(compBuffer, 0);
|
||||
compBuffer.Free;
|
||||
APacket.Free;
|
||||
end;
|
||||
|
||||
{ TLoginRequestPacket }
|
||||
|
||||
constructor TLoginRequestPacket.Create(AUsername, APassword: string);
|
||||
begin
|
||||
inherited Create($02, 0);
|
||||
FStream.WriteByte($03);
|
||||
FStream.WriteStringNull(AUsername);
|
||||
FStream.WriteStringNull(APassword);
|
||||
end;
|
||||
|
||||
{ TQuitPacket }
|
||||
|
||||
constructor TQuitPacket.Create;
|
||||
begin
|
||||
inherited Create($02, 0);
|
||||
FStream.WriteByte($05);
|
||||
end;
|
||||
|
||||
{ TRequestBlocksPacket }
|
||||
|
||||
constructor TRequestBlocksPacket.Create(ACoords: TBlockCoordsArray);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited Create($04, 0);
|
||||
FStream.Write(ACoords[0], Length(ACoords) * SizeOf(TBlockCoords));
|
||||
end;
|
||||
|
||||
{ TFreeBlockPacket }
|
||||
|
||||
constructor TFreeBlockPacket.Create(AX, AY: Word);
|
||||
begin
|
||||
inherited Create($05, 5);
|
||||
FStream.WriteWord(AX);
|
||||
FStream.WriteWord(AY);
|
||||
end;
|
||||
|
||||
{ TDrawMapPacket }
|
||||
|
||||
constructor TDrawMapPacket.Create(AX, AY: Word; AZ: ShortInt; ATileID: Word);
|
||||
begin
|
||||
inherited Create($06, 8);
|
||||
FStream.WriteWord(AX);
|
||||
FStream.WriteWord(AY);
|
||||
FStream.WriteShortInt(AZ);
|
||||
FStream.WriteWord(ATileID);
|
||||
end;
|
||||
|
||||
{ TInsertStaticPacket }
|
||||
|
||||
constructor TInsertStaticPacket.Create(AX, AY: Word; AZ: ShortInt;
|
||||
ATileID: Word; AHue: Word);
|
||||
begin
|
||||
inherited Create($07, 10);
|
||||
FStream.WriteWord(AX);
|
||||
FStream.WriteWord(AY);
|
||||
FStream.WriteShortInt(AZ);
|
||||
FStream.WriteWord(ATileID);
|
||||
FStream.WriteWord(AHue);
|
||||
end;
|
||||
|
||||
{ TDeleteStaticPacket }
|
||||
|
||||
constructor TDeleteStaticPacket.Create(AStaticItem: TStaticItem);
|
||||
begin
|
||||
inherited Create($08, 10);
|
||||
FStream.WriteWord(AStaticItem.X);
|
||||
FStream.WriteWord(AStaticItem.Y);
|
||||
FStream.WriteShortInt(AStaticItem.Z);
|
||||
FStream.WriteWord(AStaticItem.TileID);
|
||||
FStream.WriteWord(AStaticItem.Hue);
|
||||
end;
|
||||
|
||||
{ TElevateStaticPacket }
|
||||
|
||||
constructor TElevateStaticPacket.Create(AStaticItem: TStaticItem; ANewZ: ShortInt);
|
||||
begin
|
||||
inherited Create($09, 11);
|
||||
FStream.WriteWord(AStaticItem.X);
|
||||
FStream.WriteWord(AStaticItem.Y);
|
||||
FStream.WriteShortInt(AStaticItem.Z);
|
||||
FStream.WriteWord(AStaticItem.TileID);
|
||||
FStream.WriteWord(AStaticItem.Hue);
|
||||
FStream.WriteShortInt(ANewZ);
|
||||
end;
|
||||
|
||||
{ TMoveStaticPacket }
|
||||
|
||||
constructor TMoveStaticPacket.Create(AStaticItem: TStaticItem; ANewX,
|
||||
ANewY: Word);
|
||||
begin
|
||||
inherited Create($0A, 14);
|
||||
FStream.WriteWord(AStaticItem.X);
|
||||
FStream.WriteWord(AStaticItem.Y);
|
||||
FStream.WriteShortInt(AStaticItem.Z);
|
||||
FStream.WriteWord(AStaticItem.TileID);
|
||||
FStream.WriteWord(AStaticItem.Hue);
|
||||
FStream.WriteWord(ANewX);
|
||||
FStream.WriteWord(ANewY);
|
||||
end;
|
||||
|
||||
{ THueStaticPacket }
|
||||
|
||||
constructor THueStaticPacket.Create(AStaticItem: TStaticItem; ANewHue: Word);
|
||||
begin
|
||||
inherited Create($0B, 12);
|
||||
FStream.WriteWord(AStaticItem.X);
|
||||
FStream.WriteWord(AStaticItem.Y);
|
||||
FStream.WriteShortInt(AStaticItem.Z);
|
||||
FStream.WriteWord(AStaticItem.TileID);
|
||||
FStream.WriteWord(AStaticItem.Hue);
|
||||
FStream.WriteWord(ANewHue);
|
||||
end;
|
||||
|
||||
{ TUpdateClientPosPacket }
|
||||
|
||||
constructor TUpdateClientPosPacket.Create(AX, AY: Word);
|
||||
begin
|
||||
inherited Create($0C, 0);
|
||||
FStream.WriteByte($04);
|
||||
FStream.WriteWord(AX);
|
||||
FStream.WriteWord(AY);
|
||||
end;
|
||||
|
||||
{ TChatMessagePacket }
|
||||
|
||||
constructor TChatMessagePacket.Create(AMessage: string);
|
||||
begin
|
||||
inherited Create($0C, 0);
|
||||
FStream.WriteByte($05);
|
||||
FStream.WriteStringNull(AMessage);
|
||||
end;
|
||||
|
||||
{ TGotoClientPosPacket }
|
||||
|
||||
constructor TGotoClientPosPacket.Create(AUsername: string);
|
||||
begin
|
||||
inherited Create($0C, 0);
|
||||
FStream.WriteByte($06);
|
||||
FStream.WriteStringNull(AUsername);
|
||||
end;
|
||||
|
||||
{ TRequestRadarChecksumPacket }
|
||||
|
||||
constructor TRequestRadarChecksumPacket.Create;
|
||||
begin
|
||||
inherited Create($0D, 2);
|
||||
FStream.WriteByte($01);
|
||||
end;
|
||||
|
||||
{ TRequestRadarMapPacket }
|
||||
|
||||
constructor TRequestRadarMapPacket.Create;
|
||||
begin
|
||||
inherited Create($0D, 2);
|
||||
FStream.WriteByte($02);
|
||||
end;
|
||||
|
||||
{ TNoOpPacket }
|
||||
|
||||
constructor TNoOpPacket.Create;
|
||||
begin
|
||||
inherited Create($FF, 1);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
53
Client/UPlatformTypes.pas
Normal file
53
Client/UPlatformTypes.pas
Normal file
@@ -0,0 +1,53 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UPlatformTypes;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, ActiveX;
|
||||
|
||||
type
|
||||
IDataObject = ActiveX.IDataObject;
|
||||
{IDataObject = Interface (IUnknown)
|
||||
['{0000010e-0000-0000-C000-000000000046}']
|
||||
function GetData(const formatetcIn: FORMATETC; out medium: STGMEDIUM): HRESULT; stdcall;
|
||||
function GetDataHere(const pformatetc: FormatETC; out medium: STGMEDIUM): HRESULT; stdcall;
|
||||
function QueryGetData(const pformatetc: FORMATETC): HRESULT; stdcall;
|
||||
function GetCanonicalFormatTEtc(const pformatetcIn: FORMATETC; out pformatetcOut: FORMATETC): HResult; stdcall;
|
||||
function SetData (const pformatetc: FORMATETC;const medium:STGMEDIUM;FRelease : BOOL):HRESULT; stdcall;
|
||||
function EnumFormatEtc(dwDirection: DWord; out enumformatetcpara: IENUMFORMATETC): HRESULT; stdcall;
|
||||
function DAdvise(const formatetc: FORMATETC; advf: DWORD; const AdvSink: IAdviseSink; out dwConnection: DWORD): HRESULT; stdcall;
|
||||
function DUnadvise(dwconnection: DWord): HRESULT; stdcall;
|
||||
function EnumDAvise(out enumAdvise: IEnumStatData): HRESULT; stdcall;
|
||||
end;}
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
106
Client/UResourceManager.pas
Normal file
106
Client/UResourceManager.pas
Normal file
@@ -0,0 +1,106 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UResourceManager;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
type
|
||||
|
||||
{ TResourceManager }
|
||||
|
||||
TResourceManager = class(TObject)
|
||||
constructor Create(AFileName: string);
|
||||
destructor Destroy; override;
|
||||
protected
|
||||
FFileStream: TFileStream;
|
||||
FCount: Integer;
|
||||
FLookupTable: array of Cardinal;
|
||||
FCurrentResource: Integer;
|
||||
FResourceStream: TMemoryStream;
|
||||
public
|
||||
function GetResource(AIndex: Integer): TStream;
|
||||
end;
|
||||
|
||||
var
|
||||
ResourceManager: TResourceManager;
|
||||
|
||||
implementation
|
||||
|
||||
{ TResourceManager }
|
||||
|
||||
constructor TResourceManager.Create(AFileName: string);
|
||||
begin
|
||||
inherited Create;
|
||||
FFileStream := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyWrite);
|
||||
FFileStream.Position := 0;
|
||||
FFileStream.Read(FCount, SizeOf(Integer));
|
||||
SetLength(FLookupTable, FCount);
|
||||
FFileStream.Read(FLookupTable[0], FCount * SizeOf(Cardinal));
|
||||
FCurrentResource := -1;
|
||||
end;
|
||||
|
||||
destructor TResourceManager.Destroy;
|
||||
begin
|
||||
if FFileStream <> nil then FreeAndNil(FFileStream);
|
||||
if FResourceStream <> nil then FreeAndNil(FResourceStream);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TResourceManager.GetResource(AIndex: Integer): TStream;
|
||||
var
|
||||
size: Cardinal;
|
||||
begin
|
||||
if AIndex <> FCurrentResource then
|
||||
begin
|
||||
FFileStream.Position := FLookupTable[AIndex];
|
||||
if FResourceStream <> nil then
|
||||
FResourceStream.Free;
|
||||
FResourceStream := TMemoryStream.Create;
|
||||
FFileStream.Read(size, SizeOf(Cardinal));
|
||||
FResourceStream.CopyFrom(FFileStream, size);
|
||||
FCurrentResource := AIndex;
|
||||
end;
|
||||
FResourceStream.Position := 0;
|
||||
Result := FResourceStream;
|
||||
end;
|
||||
|
||||
initialization
|
||||
begin
|
||||
ResourceManager := TResourceManager.Create(ChangeFileExt(ParamStr(0), '.dat'));
|
||||
end;
|
||||
|
||||
finalization
|
||||
begin
|
||||
if ResourceManager <> nil then FreeAndNil(ResourceManager);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
24
Client/UdmNetwork.lfm
Normal file
24
Client/UdmNetwork.lfm
Normal file
@@ -0,0 +1,24 @@
|
||||
object dmNetwork: TdmNetwork
|
||||
OnCreate = DataModuleCreate
|
||||
OnDestroy = DataModuleDestroy
|
||||
Height = 300
|
||||
HorizontalOffset = 290
|
||||
VerticalOffset = 171
|
||||
Width = 400
|
||||
object TCPClient: TLTCPComponent
|
||||
OnReceive = TCPClientReceive
|
||||
OnError = TCPClientError
|
||||
OnDisconnect = TCPClientDisconnect
|
||||
OnConnect = TCPClientConnect
|
||||
left = 40
|
||||
top = 24
|
||||
end
|
||||
object tmNoOp: TTimer
|
||||
Enabled = False
|
||||
Interval = 30000
|
||||
OnTimer = tmNoOpTimer
|
||||
OnStartTimer = tmNoOpStartTimer
|
||||
left = 72
|
||||
top = 24
|
||||
end
|
||||
end
|
||||
362
Client/UdmNetwork.pas
Normal file
362
Client/UdmNetwork.pas
Normal file
@@ -0,0 +1,362 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UdmNetwork;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Dialogs, lNetComponents, lNet,
|
||||
UEnhancedMemoryStream, UPacket, UEnums, ExtCtrls, dateutils;
|
||||
|
||||
type
|
||||
|
||||
{ TdmNetwork }
|
||||
|
||||
TdmNetwork = class(TDataModule)
|
||||
TCPClient: TLTCPComponent;
|
||||
tmNoOp: TTimer;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
procedure TCPClientConnect(aSocket: TLSocket);
|
||||
procedure TCPClientDisconnect(aSocket: TLSocket);
|
||||
procedure TCPClientError(const msg: string; aSocket: TLSocket);
|
||||
procedure TCPClientReceive(aSocket: TLSocket);
|
||||
procedure tmNoOpStartTimer(Sender: TObject);
|
||||
procedure tmNoOpTimer(Sender: TObject);
|
||||
protected
|
||||
FSendQueue: TEnhancedMemoryStream;
|
||||
FReceiveQueue: TEnhancedMemoryStream;
|
||||
FUsername: string;
|
||||
FPassword: string;
|
||||
FAccessLevel: TAccessLevel;
|
||||
FDataDir: string;
|
||||
FLastPacket: TDateTime;
|
||||
procedure OnCanSend(ASocket: TLSocket);
|
||||
procedure OnConnectionHandlingPacket(ABuffer: TEnhancedMemoryStream);
|
||||
procedure ProcessQueue;
|
||||
procedure DoLogin;
|
||||
public
|
||||
property Username: string read FUsername;
|
||||
property AccessLevel: TAccessLevel read FAccessLevel write FAccessLevel;
|
||||
procedure Send(APacket: TPacket);
|
||||
procedure Disconnect;
|
||||
procedure CheckClose(ASender: TForm);
|
||||
end;
|
||||
|
||||
var
|
||||
dmNetwork: TdmNetwork;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UPacketHandlers, UPackets, UfrmMain, UfrmLogin, UfrmInitialize,
|
||||
UGameResources, UfrmAccountControl, UfrmEditAccount, UfrmDrawSettings,
|
||||
UfrmBoundaries, UfrmElevateSettings, UfrmConfirmation, UfrmMoveSettings,
|
||||
UfrmAbout, UfrmHueSettings, UfrmRadar, UfrmLargeScaleCommand,
|
||||
UfrmVirtualLayer, UfrmFilter, UfrmTileInfo;
|
||||
|
||||
{$I version.inc}
|
||||
|
||||
{ TdmNetwork }
|
||||
|
||||
procedure TdmNetwork.DataModuleCreate(Sender: TObject);
|
||||
begin
|
||||
FSendQueue := TEnhancedMemoryStream.Create;
|
||||
FReceiveQueue := TEnhancedMemoryStream.Create;
|
||||
TCPClient.OnCanSend := @OnCanSend;
|
||||
PacketHandlers[$02] := TPacketHandler.Create(0, @OnConnectionHandlingPacket);
|
||||
DoLogin;
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
if FSendQueue <> nil then FreeAndNil(FSendQueue);
|
||||
if FReceiveQueue <> nil then FreeAndNil(FReceiveQueue);
|
||||
if PacketHandlers[$02] <> nil then FreeAndNil(PacketHandlers[$02]);
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.TCPClientConnect(aSocket: TLSocket);
|
||||
begin
|
||||
FSendQueue.Clear;
|
||||
FReceiveQueue.Clear;
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.TCPClientDisconnect(aSocket: TLSocket);
|
||||
begin
|
||||
FSendQueue.Clear;
|
||||
FReceiveQueue.Clear;
|
||||
DoLogin;
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.TCPClientError(const msg: string; aSocket: TLSocket);
|
||||
begin
|
||||
MessageDlg('Connection error', msg, mtError, [mbOK], 0);
|
||||
if not TCPClient.Connected then
|
||||
TCPClientDisconnect(aSocket);
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.TCPClientReceive(aSocket: TLSocket);
|
||||
var
|
||||
buffer: array[0..4095] of byte;
|
||||
size: Integer;
|
||||
begin
|
||||
repeat
|
||||
size := TCPClient.Get(buffer, 4096);
|
||||
if size > 0 then
|
||||
FReceiveQueue.Enqueue(buffer, size);
|
||||
until size <= 0;
|
||||
ProcessQueue;
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.tmNoOpStartTimer(Sender: TObject);
|
||||
begin
|
||||
FLastPacket := Now;
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.tmNoOpTimer(Sender: TObject);
|
||||
begin
|
||||
if SecondsBetween(FLastPacket, Now) > 25 then
|
||||
Send(TNoOpPacket.Create);
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.OnCanSend(ASocket: TLSocket);
|
||||
var
|
||||
size: Integer;
|
||||
begin
|
||||
while FSendQueue.Size > 0 do
|
||||
begin
|
||||
FLastPacket := Now;
|
||||
size := TCPClient.Send(FSendQueue.Memory^, FSendQueue.Size);
|
||||
if size > 0 then
|
||||
FSendQueue.Dequeue(size)
|
||||
else
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.OnConnectionHandlingPacket(ABuffer: TEnhancedMemoryStream);
|
||||
var
|
||||
subID: Byte;
|
||||
loginState: TLoginState;
|
||||
width, height: Word;
|
||||
serverState: TServerState;
|
||||
begin
|
||||
subID := ABuffer.ReadByte;
|
||||
case subID of
|
||||
$01:
|
||||
begin
|
||||
if ABuffer.ReadCardinal = ProtocolVersion then
|
||||
begin
|
||||
frmInitialize.lblStatus.Caption := 'Authenticating';
|
||||
Send(TLoginRequestPacket.Create(FUsername, FPassword));
|
||||
end else
|
||||
begin
|
||||
MessageDlg('Error', 'Invalid protocol version. Maybe your client is outdated.', mtError, [mbOK], 0);
|
||||
Disconnect;
|
||||
end;
|
||||
end;
|
||||
$03:
|
||||
begin
|
||||
loginState := TLoginState(ABuffer.ReadByte);
|
||||
if loginState = lsOK then
|
||||
begin
|
||||
frmInitialize.lblStatus.Caption := 'Initializing';
|
||||
frmInitialize.Repaint;
|
||||
frmInitialize.lblStatus.Repaint;
|
||||
Application.ProcessMessages;
|
||||
FAccessLevel := TAccessLevel(ABuffer.ReadByte);
|
||||
InitGameResourceManager(FDataDir);
|
||||
width := ABuffer.ReadWord;
|
||||
height := ABuffer.ReadWord;
|
||||
ResMan.InitLandscape(width, height);
|
||||
frmMain := TfrmMain.Create(dmNetwork);
|
||||
frmAccountControl := TfrmAccountControl.Create(frmMain);
|
||||
frmEditAccount := TfrmEditAccount.Create(frmAccountControl);
|
||||
frmConfirmation := TfrmConfirmation.Create(frmMain);
|
||||
frmDrawSettings := TfrmDrawSettings.Create(frmMain);
|
||||
frmMoveSettings := TfrmMoveSettings.Create(frmMain);
|
||||
frmElevateSettings := TfrmElevateSettings.Create(frmMain);
|
||||
frmHueSettings := TfrmHueSettings.Create(frmMain);
|
||||
frmBoundaries := TfrmBoundaries.Create(frmMain);
|
||||
frmFilter := TfrmFilter.Create(frmMain);
|
||||
frmVirtualLayer := TfrmVirtualLayer.Create(frmMain);
|
||||
frmAbout := TfrmAbout.Create(frmMain);
|
||||
frmRadarMap := TfrmRadarMap.Create(frmMain);
|
||||
frmLargeScaleCommand := TfrmLargeScaleCommand.Create(frmMain);
|
||||
frmTileInfo := TfrmTileInfo.Create(frmMain);
|
||||
frmMain.Show;
|
||||
frmInitialize.Hide;
|
||||
tmNoOp.Enabled := True;
|
||||
end else
|
||||
begin
|
||||
if loginState = lsInvalidUser then
|
||||
MessageDlg('Error', 'The username you specified is incorrect.', mtWarning, [mbOK], 0)
|
||||
else if loginState = lsInvalidPassword then
|
||||
MessageDlg('Error', 'The password you specified is incorrect.', mtWarning, [mbOK], 0)
|
||||
else if loginState = lsAlreadyLoggedIn then
|
||||
MessageDlg('Error', 'There is already a client logged in using that account.', mtWarning, [mbOK], 0)
|
||||
else if loginState = lsNoAccess then
|
||||
MessageDlg('Error', 'This account has no access.', mtWarning, [mbOK], 0);
|
||||
end;
|
||||
end;
|
||||
$04: //Server state
|
||||
begin
|
||||
serverState := TServerState(ABuffer.ReadByte);
|
||||
if serverState = ssRunning then
|
||||
begin
|
||||
frmInitialize.UnsetModal;
|
||||
frmInitialize.Hide;
|
||||
tmNoOp.Enabled := True;
|
||||
end else
|
||||
begin
|
||||
case serverState of
|
||||
ssFrozen: frmInitialize.lblStatus.Caption := 'The server is currently paused.';
|
||||
ssOther: frmInitialize.lblStatus.Caption := ABuffer.ReadStringNull
|
||||
end;
|
||||
tmNoOp.Enabled := False;
|
||||
frmInitialize.Show;
|
||||
frmInitialize.SetModal;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.ProcessQueue;
|
||||
var
|
||||
packetHandler: TPacketHandler;
|
||||
size: Cardinal;
|
||||
begin
|
||||
FReceiveQueue.Position := 0;
|
||||
while FReceiveQueue.Size >= 1 do
|
||||
begin
|
||||
packetHandler := PacketHandlers[FReceiveQueue.ReadByte];
|
||||
if packetHandler <> nil then
|
||||
begin
|
||||
size := packetHandler.PacketLength;
|
||||
if size = 0 then
|
||||
begin
|
||||
if FReceiveQueue.Size > 5 then
|
||||
size := FReceiveQueue.ReadCardinal
|
||||
else
|
||||
Break; //wait for more data
|
||||
end;
|
||||
|
||||
if FReceiveQueue.Size >= size then
|
||||
begin
|
||||
FReceiveQueue.Lock(FReceiveQueue.Position, size - FReceiveQueue.Position); //prevent handler from reading too much
|
||||
packetHandler.Process(FReceiveQueue);
|
||||
FReceiveQueue.Unlock;
|
||||
FReceiveQueue.Dequeue(size);
|
||||
end else
|
||||
Break; //wait for more data
|
||||
end else
|
||||
begin
|
||||
{Writeln('Dropping client due to unknown packet: ', ANetState.Socket.PeerAddress);}
|
||||
Disconnect;
|
||||
FReceiveQueue.Clear;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.DoLogin;
|
||||
begin
|
||||
tmNoOp.Enabled := False;
|
||||
frmLogin := TfrmLogin.Create(dmNetwork);
|
||||
if frmInitialize = nil then frmInitialize := TfrmInitialize.Create(dmNetwork);
|
||||
if frmTileInfo <> nil then FreeAndNil(frmTileInfo);
|
||||
if frmLargeScaleCommand <> nil then FreeAndNil(frmLargeScaleCommand);
|
||||
if frmEditAccount <> nil then FreeAndNil(frmEditAccount);
|
||||
if frmAccountControl <> nil then FreeAndNil(frmAccountControl);
|
||||
if frmConfirmation <> nil then FreeAndNil(frmConfirmation);
|
||||
if frmDrawSettings <> nil then FreeAndNil(frmDrawSettings);
|
||||
if frmMoveSettings <> nil then FreeAndNil(frmMoveSettings);
|
||||
if frmElevateSettings <> nil then FreeAndNil(frmElevateSettings);
|
||||
if frmHueSettings <> nil then FreeAndNil(frmHueSettings);
|
||||
if frmBoundaries <> nil then FreeAndNil(frmBoundaries);
|
||||
if frmFilter <> nil then FreeAndNil(frmFilter);
|
||||
if frmVirtualLayer <> nil then FreeAndNil(frmVirtualLayer);
|
||||
if frmAbout <> nil then FreeAndNil(frmAbout);
|
||||
if frmRadarMap <> nil then FreeAndNil(frmRadarMap);
|
||||
if frmMain <> nil then
|
||||
begin
|
||||
frmMain.ApplicationProperties1.OnIdle := nil;
|
||||
FreeAndNil(frmMain);
|
||||
end;
|
||||
if GameResourceManager <> nil then FreeAndNil(GameResourceManager);
|
||||
frmInitialize.Hide;
|
||||
while frmLogin.ShowModal = mrOK do
|
||||
begin
|
||||
if TCPClient.Connect(frmLogin.edHost.Text, frmLogin.edPort.Value) then
|
||||
begin
|
||||
FUsername := frmLogin.edUsername.Text;
|
||||
FPassword := frmLogin.edPassword.Text;
|
||||
FDataDir := frmLogin.edData.Text;
|
||||
frmInitialize.lblStatus.Caption := 'Connecting';
|
||||
frmInitialize.Show;
|
||||
Break;
|
||||
end else
|
||||
MessageDlg('Error', 'Cannot connect to the specified server.', mtError, [mbOK], 0);
|
||||
end;
|
||||
frmLogin.Close;
|
||||
FreeAndNil(frmLogin);
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.Send(APacket: TPacket);
|
||||
var
|
||||
source: TEnhancedMemoryStream;
|
||||
begin
|
||||
if TCPClient.Connected then
|
||||
begin
|
||||
FSendQueue.Seek(0, soFromEnd);
|
||||
source := APacket.Stream;
|
||||
FSendQueue.CopyFrom(source, 0);
|
||||
OnCanSend(nil);
|
||||
end;
|
||||
APacket.Free;
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.Disconnect;
|
||||
begin
|
||||
Send(TQuitPacket.Create);
|
||||
end;
|
||||
|
||||
procedure TdmNetwork.CheckClose(ASender: TForm);
|
||||
begin
|
||||
if ((frmLogin = nil) or (ASender = frmLogin)) and
|
||||
((frmMain = nil) or (ASender = frmMain)) and
|
||||
((frmInitialize = nil) or (not frmInitialize.Visible)) then
|
||||
begin
|
||||
Application.Terminate;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UdmNetwork.lrs}
|
||||
|
||||
end.
|
||||
|
||||
105
Client/UfrmAbout.lfm
Normal file
105
Client/UfrmAbout.lfm
Normal file
@@ -0,0 +1,105 @@
|
||||
object frmAbout: TfrmAbout
|
||||
Left = 290
|
||||
Height = 323
|
||||
Top = 171
|
||||
Width = 355
|
||||
HorzScrollBar.Page = 354
|
||||
VertScrollBar.Page = 322
|
||||
ActiveControl = btnClose
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'About CentrED'
|
||||
ClientHeight = 323
|
||||
ClientWidth = 355
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
object Label3: TLabel
|
||||
Left = 8
|
||||
Height = 61
|
||||
Top = 208
|
||||
Width = 339
|
||||
BorderSpacing.Around = 8
|
||||
Caption = 'Ultima™ Online © 1997 Electronic Arts Inc. Ultima, the UO logo, Are You With Us?, ORIGIN, the ORIGIN logo and We create worlds are trademarks or registered trademarks of Electronic Arts Inc. in the U.S. and/or other countries. All rights reserved.'
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 128
|
||||
Width = 227
|
||||
Caption = 'It is using the following great components:'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 16
|
||||
Height = 46
|
||||
Top = 144
|
||||
Width = 218
|
||||
Caption = '- Vampyre Imaging Lib by Marek Mauder'#13#10'- lNet by Ales Katona and Micha Nelissen'#13#10'- VirtualTrees by Mike Lischke'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 8
|
||||
Height = 16
|
||||
Top = 104
|
||||
Width = 310
|
||||
Caption = 'CentrED has been developed using Lazarus and FreePascal.'
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Height = 88
|
||||
Width = 202
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
ClientHeight = 88
|
||||
ClientWidth = 202
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
Left = 2
|
||||
Height = 38
|
||||
Top = 2
|
||||
Width = 198
|
||||
Align = alTop
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
Caption = 'UO CentrED'
|
||||
Font.Height = -27
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
end
|
||||
object lblVersion: TLabel
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 40
|
||||
Width = 190
|
||||
Align = alTop
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 4
|
||||
Font.Style = [fsItalic]
|
||||
ParentColor = False
|
||||
end
|
||||
object lblCopyright: TLabel
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 63
|
||||
Width = 190
|
||||
Align = alBottom
|
||||
Alignment = taCenter
|
||||
BorderSpacing.Around = 4
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object btnClose: TButton
|
||||
Left = 144
|
||||
Height = 25
|
||||
Top = 288
|
||||
Width = 75
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = 'Close'
|
||||
OnClick = btnCloseClick
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
82
Client/UfrmAbout.pas
Normal file
82
Client/UfrmAbout.pas
Normal file
@@ -0,0 +1,82 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmAbout;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
ExtCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmAbout }
|
||||
|
||||
TfrmAbout = class(TForm)
|
||||
btnClose: TButton;
|
||||
Label1: TLabel;
|
||||
lblCopyright: TLabel;
|
||||
Label3: TLabel;
|
||||
lblVersion: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
Panel1: TPanel;
|
||||
procedure btnCloseClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmAbout: TfrmAbout;
|
||||
|
||||
implementation
|
||||
|
||||
{$I version.inc}
|
||||
|
||||
{ TfrmAbout }
|
||||
|
||||
procedure TfrmAbout.btnCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmAbout.FormCreate(Sender: TObject);
|
||||
begin
|
||||
lblVersion.Caption := Format('Version %s', [ProductVersion]);
|
||||
lblCopyright.Caption := Format('Copyright %s', [Copyright]);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmAbout.lrs}
|
||||
|
||||
end.
|
||||
|
||||
789
Client/UfrmAccountControl.lfm
Normal file
789
Client/UfrmAccountControl.lfm
Normal file
@@ -0,0 +1,789 @@
|
||||
object frmAccountControl: TfrmAccountControl
|
||||
Left = 290
|
||||
Height = 378
|
||||
Top = 171
|
||||
Width = 369
|
||||
HorzScrollBar.Page = 368
|
||||
VertScrollBar.Page = 377
|
||||
ActiveControl = vstAccounts
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Account Management'
|
||||
ClientHeight = 378
|
||||
ClientWidth = 369
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
Position = poOwnerFormCenter
|
||||
object tbMain: TToolBar
|
||||
Height = 26
|
||||
Width = 369
|
||||
Caption = 'tbMain'
|
||||
Flat = True
|
||||
Images = ilToolbar
|
||||
TabOrder = 0
|
||||
object tbRefresh: TToolButton
|
||||
Left = 1
|
||||
Hint = 'Refresh'
|
||||
Top = 2
|
||||
Caption = 'Refresh'
|
||||
ImageIndex = 0
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
OnClick = tbRefreshClick
|
||||
end
|
||||
object tbAddUser: TToolButton
|
||||
Left = 32
|
||||
Hint = 'Add User'
|
||||
Top = 2
|
||||
Caption = 'Add User'
|
||||
ImageIndex = 1
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
OnClick = tbAddUserClick
|
||||
end
|
||||
object tbEditUser: TToolButton
|
||||
Left = 55
|
||||
Hint = 'Edit User'
|
||||
Top = 2
|
||||
Caption = 'Edit User'
|
||||
ImageIndex = 2
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
OnClick = tbEditUserClick
|
||||
end
|
||||
object tbDeleteUser: TToolButton
|
||||
Left = 78
|
||||
Hint = 'Delete User'
|
||||
Top = 2
|
||||
Caption = 'Delete User'
|
||||
ImageIndex = 3
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
OnClick = tbDeleteUserClick
|
||||
end
|
||||
object tbSeparator1: TToolButton
|
||||
Left = 24
|
||||
Top = 2
|
||||
Width = 8
|
||||
Caption = 'tbSeparator1'
|
||||
Style = tbsDivider
|
||||
end
|
||||
end
|
||||
object vstAccounts: TVirtualStringTree
|
||||
Height = 352
|
||||
Top = 26
|
||||
Width = 369
|
||||
Align = alClient
|
||||
Header.AutoSizeIndex = 1
|
||||
Header.Options = [hoColumnResize, hoDrag, hoVisible]
|
||||
Header.Style = hsPlates
|
||||
Images = ilAccesslevel
|
||||
TabOrder = 1
|
||||
TreeOptions.AutoOptions = [toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
||||
OnDblClick = vstAccountsDblClick
|
||||
OnGetText = vstAccountsGetText
|
||||
OnGetImageIndex = vstAccountsGetImageIndex
|
||||
Columns = <
|
||||
item
|
||||
Width = 30
|
||||
end
|
||||
item
|
||||
Position = 1
|
||||
Width = 200
|
||||
WideText = 'Username'
|
||||
end
|
||||
item
|
||||
Position = 2
|
||||
Width = 100
|
||||
WideText = 'Accesslevel'
|
||||
end>
|
||||
end
|
||||
object ilToolbar: TImageList
|
||||
left = 144
|
||||
Bitmap = {
|
||||
6C69040000001000000010000000F00700002F2A2058504D202A2F0A73746174
|
||||
69632063686172202A677261706869635B5D203D207B0A223136203136203838
|
||||
2032222C0A222E2E2063204E6F6E65222C0A222E2C2063202334463939343722
|
||||
2C0A222E2D20632023343939313431222C0A222E2A2063202336354234354222
|
||||
2C0A222E6120632023354641443536222C0A222E622063202335414136353022
|
||||
2C0A222E6320632023353339453442222C0A222E642063202334443936343522
|
||||
2C0A222E6520632023363841383630222C0A222E662063202336324132354222
|
||||
2C0A222E6720632023334137453334222C0A222E682063202336384239354522
|
||||
2C0A222E6920632023383343333739222C0A222E6A2063202339324341383922
|
||||
2C0A222E6B20632023394344303934222C0A222E6C2063202339454431393522
|
||||
2C0A222E6D20632023393943463930222C0A222E6E2063202339344342384322
|
||||
2C0A222E6F20632023384643393837222C0A222E702063202338374334383022
|
||||
2C0A222E7120632023353439353445222C0A222E722063202332433644323722
|
||||
2C0A222E7320632023363742363543222C0A222E742063202338454339383522
|
||||
2C0A222E7520632023413444343942222C0A222E762063202339384345384622
|
||||
2C0A222E7720632023394143463932222C0A222E782063202339354343384422
|
||||
2C0A222E7920632023393043413838222C0A222E7A2063202338424336383322
|
||||
2C0A222E4120632023383543343745222C0A222E422063202337464331373922
|
||||
2C0A222E4320632023344338443437222C0A222E442063202332353635323222
|
||||
2C0A222E4520632023374542463735222C0A222E462063202341314432393822
|
||||
2C0A222E4720632023394343463934222C0A222E482063202338444337383622
|
||||
2C0A222E4920632023363541373545222C0A222E4A2063202334303836333922
|
||||
2C0A222E4B20632023333337363245222C0A222E4C2063202334463930343922
|
||||
2C0A222E4D20632023344138423435222C0A222E4E2063202332343633323022
|
||||
2C0A222E4F20632023354541423534222C0A222E502063202338394333383022
|
||||
2C0A222E5120632023384143343833222C0A222E522063202334343842334422
|
||||
2C0A222E5320632023334538333337222C0A222E542063202332373636323322
|
||||
2C0A222E5520632023323336313146222C0A222E562063202335354131344422
|
||||
2C0A222E5720632023343238383342222C0A222E582063202333433830333522
|
||||
2C0A222E5920632023364543303633222C0A222E5A2063202336414242354622
|
||||
2C0A222E3020632023384543363836222C0A222E312063202338464339383822
|
||||
2C0A222E3220632023373642333646222C0A222E332063202336444245363222
|
||||
2C0A222E3420632023383543373742222C0A222E352063202338314332373722
|
||||
2C0A222E3620632023353741333445222C0A222E372063202335313942343922
|
||||
2C0A222E3820632023364241433633222C0A222E392063202338424333383322
|
||||
2C0A222E4020632023383943363832222C0A222E232063202335363937353022
|
||||
2C0A222E3B20632023364342433630222C0A222E3A2063202338334334373922
|
||||
2C0A222E3D20632023413744373945222C0A222E2B2063202339464432393722
|
||||
2C0A222E2520632023383243323741222C0A222E242063202336334134354422
|
||||
2C0A222E2820632023324136423236222C0A222E292063202337434244373322
|
||||
2C0A222E5B20632023394644313936222C0A222E5D2063202339364344384622
|
||||
2C0A222C2E20632023393143413841222C0A222C2C2063202338424337383522
|
||||
2C0A222C2D20632023383142453741222C0A222C2A2063202336434144363522
|
||||
2C0A222C6120632023353139323442222C0A222C622063202332393638323422
|
||||
2C0A222C6320632023364542303636222C0A222C642063202336384141363122
|
||||
2C0A222C6520632023333737423332222C0A222C662063202333323734324322
|
||||
2C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2C2E2D2E2E2E
|
||||
2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2A2E612E622E632E642E652E
|
||||
662E672E2E2E2E2E2E2E2E222C0A222E2E2E2E2E682E692E6A2E6B2E6C2E6D2E
|
||||
6E2E6F2E702E712E722E2E2E2E2E2E222C0A222E2E2E732E742E752E762E772E
|
||||
782E792E7A2E412E422E432E442E2E2E2E2E2E222C0A222E2E2E452E462E472E
|
||||
482E492E4A2E672E4B2E4C2E4D2E4E2E2E2E2E2E2E2E2E222C0A222E4F2E502E
|
||||
782E512E522E532E2E2E2E2E2E2E542E552E2E2E2E2E2E2E2E2E2E222C0A222E
|
||||
562E2C2E2D2E572E582E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E562E2C2E2D2E
|
||||
572E58222C0A222E2E2E2E2E2E2E2E2E2E2E592E5A2E2E2E2E2E2E2E632E642E
|
||||
302E312E322E4B222C0A222E2E2E2E2E2E2E2E2E332E342E352E4F2E362E372E
|
||||
382E392E6F2E402E232E2E222C0A222E2E2E2E2E2E2E3B2E3A2E3D2E752E2B2E
|
||||
772E782E792E252E412E242E282E2E222C0A222E2E2E2E2E2E2E2A2E292E5B2E
|
||||
472E5D2C2E2C2C2C2D2C2A2C612C622E2E2E2E222C0A222E2E2E2E2E2E2E2E2E
|
||||
362C632C642E522E532C652C662E722E2E2E2E2E2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2E2E2E2D2E572E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E22
|
||||
7D0A310A00002F2A2058504D202A2F0A7374617469632063686172202A677261
|
||||
706869635B5D203D207B0A223136203136203132342032222C0A222E2E206320
|
||||
4E6F6E65222C0A222E2C20632023384434383132222C0A222E2D206320233930
|
||||
34423130222C0A222E2A20632023384134383046222C0A222E61206320233744
|
||||
34323131222C0A222E6220632023354233333135222C0A222E63206320233936
|
||||
34453131222C0A222E6420632023394235383132222C0A222E65206320233939
|
||||
35383132222C0A222E6620632023393335333131222C0A222E67206320233837
|
||||
34413046222C0A222E6820632023373133453045222C0A222E69206320233442
|
||||
32453133222C0A222E6A20632023393734423046222C0A222E6B206320233946
|
||||
35383132222C0A222E6C20632023384134413046222C0A222E6D206320233837
|
||||
34423046222C0A222E6E20632023383734423131222C0A222E6F206320233835
|
||||
34433135222C0A222E7020632023373534313132222C0A222E71206320233543
|
||||
33333046222C0A222E7220632023383733453043222C0A222E73206320234238
|
||||
39373743222C0A222E7420632023453442373841222C0A222E75206320234338
|
||||
39433731222C0A222E7620632023364534303135222C0A222E77206320233732
|
||||
34343139222C0A222E7820632023364234353232222C0A222E79206320233636
|
||||
33423131222C0A222E7A20632023394235453146222C0A222E41206320234637
|
||||
45384439222C0A222E4220632023463143353937222C0A222E43206320234535
|
||||
42423845222C0A222E4420632023443141393746222C0A222E45206320234446
|
||||
42353839222C0A222E4620632023454544464344222C0A222E47206320234137
|
||||
36383233222C0A222E4820632023393235423241222C0A222E49206320234545
|
||||
43414136222C0A222E4A20632023454143434142222C0A222E4B206320234636
|
||||
44304137222C0A222E4C20632023463644304138222C0A222E4D206320234545
|
||||
43444137222C0A222E4E20632023394136323244222C0A222E4F206320233235
|
||||
33433641222C0A222E5020632023413736443334222C0A222E51206320234638
|
||||
43433943222C0A222E5220632023463744344146222C0A222E53206320234636
|
||||
43464135222C0A222E5420632023414537343334222C0A222E55206320233244
|
||||
33453638222C0A222E5620632023314334384243222C0A222E57206320234434
|
||||
45324634222C0A222E5820632023413937423445222C0A222E59206320234138
|
||||
37423444222C0A222E5A20632023433344364633222C0A222E30206320233143
|
||||
34364245222C0A222E3120632023314634434334222C0A222E32206320234436
|
||||
45344636222C0A222E3320632023413445344646222C0A222E34206320233732
|
||||
44344646222C0A222E3520632023363943394646222C0A222E36206320233633
|
||||
43304646222C0A222E3720632023354642364646222C0A222E38206320233738
|
||||
41424145222C0A222E3920632023373239373630222C0A222E40206320233636
|
||||
38453446222C0A222E2320632023353738333432222C0A222E3B206320233434
|
||||
35343841222C0A222E3A20632023414243384643222C0A222E3D206320233938
|
||||
44314646222C0A222E2B20632023364443374645222C0A222E25206320233638
|
||||
42464645222C0A222E2420632023363442394645222C0A222E28206320233545
|
||||
42314645222C0A222E2920632023363139424137222C0A222E5B206320233831
|
||||
41423631222C0A222E5D20632023423444343935222C0A222C2E206320234430
|
||||
45364241222C0A222C2C20632023384642423641222C0A222C2D206320233537
|
||||
38463244222C0A222C2A20632023333736423139222C0A222C61206320234345
|
||||
37433238222C0A222C6220632023454142333738222C0A222C63206320233934
|
||||
39454233222C0A222C6420632023363042374646222C0A222C65206320233633
|
||||
42364646222C0A222C6620632023363142324645222C0A222C67206320233544
|
||||
41434645222C0A222C6820632023353941354645222C0A222C69206320233544
|
||||
38383441222C0A222C6A20632023423144333930222C0A222C6B206320234231
|
||||
44363932222C0A222C6C20632023464646464646222C0A222C6D206320233843
|
||||
42433635222C0A222C6E20632023384642433637222C0A222C6F206320234431
|
||||
37443239222C0A222C7020632023454542413832222C0A222C71206320233538
|
||||
36363946222C0A222C7220632023383442424635222C0A222C73206320233542
|
||||
41434646222C0A222C7420632023354141384645222C0A222C75206320233537
|
||||
41324645222C0A222C7620632023353339434645222C0A222C77206320233443
|
||||
37423331222C0A222C7820632023423644343943222C0A222C79206320234232
|
||||
44323935222C0A222C7A20632023434437393235222C0A222C41206320233631
|
||||
36313836222C0A222C4220632023333536304246222C0A222C43206320233631
|
||||
42394645222C0A222C4420632023363242394645222C0A222C45206320233341
|
||||
36453232222C0A222C4620632023384242413632222C0A222C47206320233837
|
||||
42413630222C0A222C4820632023383742393630222C0A222C49206320233230
|
||||
35304233222C0A222C4A20632023314634304130222C0A222C4B206320233232
|
||||
34354141222C0A222C4C20632023323234364143222C0A222C4D206320233232
|
||||
34344142222C0A222C4E20632023324435373543222C0A222C4F206320233533
|
||||
38433238222C0A222C5020632023384442413634222C0A222E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2C2E2D2E2A2E612E622E2E2E2E2E2E2E2E2E2E222C0A22
|
||||
2E2E2E2E2E2E2E2E2E2E2E632E642E652E662E672E682E692E2E2E2E2E2E2E2E
|
||||
222C0A222E2E2E2E2E2E2E2E2E6A2E6B2E6C2E6D2E6E2E6F2E702E712E2E2E2E
|
||||
2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E722E732E742E752E762E772E782E79
|
||||
2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E7A2E412E422E432E442E45
|
||||
2E462E472E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E482E492E4A2E4B
|
||||
2E4C2E4A2E4D2E4E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E4F2E50
|
||||
2E512E522E522E532E542E552E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E
|
||||
2E562E572E582E592E592E582E5A2E302E2E2E2E2E2E2E2E222C0A222E2E2E2E
|
||||
2E2E2E312E322E332E342E352E362E372E382E392E402E232E2E2E2E222C0A22
|
||||
2E2E2E2E2E3B2E3A2E3D2E2B2E252E242E282E292E5B2E5D2C2E2C2C2C2D2C2A
|
||||
222C0A222E2E2C612C622C632C642C652C662C672C682C692C6A2C6B2C6C2C6D
|
||||
2C6E2C2A222C0A222E2E2C6F2C702C712C722C732C742C752C762C772C782C6C
|
||||
2C6C2C6C2C792C2A222C0A222E2E2E2E2C7A2C412C422C432C442C442C442C45
|
||||
2C462C472C6C2C482C6E2C2A222C0A222E2E2E2E2E2E2E2E2C492C4A2C4B2C4C
|
||||
2C4D2C4E2C4F2C502C792C502C4F2C2A222C0A222E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2C2A2C2A2C2A2C2A2C2A2E2E227D0AF10B00002F2A205850
|
||||
4D202A2F0A7374617469632063686172202A677261706869635B5D203D207B0A
|
||||
223136203136203135322032222C0A222E2E2063204E6F6E65222C0A222E2C20
|
||||
632023384434383132222C0A222E2D20632023393034423130222C0A222E2A20
|
||||
632023384134383046222C0A222E6120632023374434323131222C0A222E6220
|
||||
632023354233333135222C0A222E6320632023393634453131222C0A222E6420
|
||||
632023394235383132222C0A222E6520632023393935383132222C0A222E6620
|
||||
632023393335333131222C0A222E6720632023383734413046222C0A222E6820
|
||||
632023373133453045222C0A222E6920632023344232453133222C0A222E6A20
|
||||
632023393734423046222C0A222E6B20632023394635383132222C0A222E6C20
|
||||
632023384134413046222C0A222E6D20632023383734423046222C0A222E6E20
|
||||
632023383734423131222C0A222E6F20632023383534433135222C0A222E7020
|
||||
632023373534313132222C0A222E7120632023354333333046222C0A222E7220
|
||||
632023383733453043222C0A222E7320632023423839373743222C0A222E7420
|
||||
632023453442373841222C0A222E7520632023433839433731222C0A222E7620
|
||||
632023364534303135222C0A222E7720632023373234343139222C0A222E7820
|
||||
632023364234353232222C0A222E7920632023363633423131222C0A222E7A20
|
||||
632023394235453146222C0A222E4120632023463745384439222C0A222E4220
|
||||
632023463143353937222C0A222E4320632023453542423845222C0A222E4420
|
||||
632023443141393746222C0A222E4520632023444642353839222C0A222E4620
|
||||
632023454544464344222C0A222E4720632023413736383233222C0A222E4820
|
||||
632023443841353538222C0A222E4920632023444242313835222C0A222E4A20
|
||||
632023443039443436222C0A222E4B20632023393235423241222C0A222E4C20
|
||||
632023454543414136222C0A222E4D20632023454143434142222C0A222E4E20
|
||||
632023463644304137222C0A222E4F20632023463644304138222C0A222E5020
|
||||
632023454543444137222C0A222E5120632023423738343238222C0A222E5220
|
||||
632023453742453737222C0A222E5320632023463044324234222C0A222E5420
|
||||
632023464646334535222C0A222E5520632023454644324143222C0A222E5620
|
||||
632023433738433438222C0A222E5720632023323533433641222C0A222E5820
|
||||
632023413736443334222C0A222E5920632023463843433943222C0A222E5A20
|
||||
632023463744344146222C0A222E3020632023463643464135222C0A222E3120
|
||||
632023424638413245222C0A222E3220632023454244333745222C0A222E3320
|
||||
632023463945334232222C0A222E3420632023453743303842222C0A222E3520
|
||||
632023463644334145222C0A222E3620632023464345304334222C0A222E3720
|
||||
632023443339463636222C0A222E3820632023314334384243222C0A222E3920
|
||||
632023443445324634222C0A222E4020632023413937423445222C0A222E2320
|
||||
632023413837423444222C0A222E3B20632023424138433432222C0A222E3A20
|
||||
632023454544343744222C0A222E3D20632023464446364334222C0A222E2B20
|
||||
632023463644443643222C0A222E2520632023454443413644222C0A222E2420
|
||||
632023443741333633222C0A222E2820632023443239423544222C0A222E2920
|
||||
632023314634434334222C0A222E5B20632023443645344636222C0A222E5D20
|
||||
632023413445344646222C0A222C2E20632023373244344646222C0A222C2C20
|
||||
632023363943394646222C0A222C2D20632023383642424246222C0A222C2A20
|
||||
632023454544333739222C0A222C6120632023464446374337222C0A222C6220
|
||||
632023463544433546222C0A222C6320632023463745323542222C0A222C6420
|
||||
632023463244363741222C0A222C6520632023444639393430222C0A222C6620
|
||||
632023343435343841222C0A222C6720632023414243384643222C0A222C6820
|
||||
632023393844314646222C0A222C6920632023364443374645222C0A222C6A20
|
||||
632023363842464645222C0A222C6B20632023383041374230222C0A222C6C20
|
||||
632023453743423737222C0A222C6D20632023463544433545222C0A222C6E20
|
||||
632023463745313541222C0A222C6F20632023463144343742222C0A222C7020
|
||||
632023443439313436222C0A222C7120632023373236363638222C0A222C7220
|
||||
632023434537433238222C0A222C7320632023454142333738222C0A222C7420
|
||||
632023393439454233222C0A222C7520632023363042374646222C0A222C7620
|
||||
632023363342364646222C0A222C7720632023374441334233222C0A222C7820
|
||||
632023443342383736222C0A222C7920632023464446364332222C0A222C7A20
|
||||
632023463744463633222C0A222C4120632023463845323544222C0A222C4220
|
||||
632023463044333739222C0A222C4320632023443839353437222C0A222C4420
|
||||
632023454142323735222C0A222C4520632023433737343239222C0A222C4620
|
||||
632023443137443239222C0A222C4720632023454542413832222C0A222C4820
|
||||
632023353836363946222C0A222C4920632023383442424635222C0A222C4A20
|
||||
632023373439324137222C0A222C4B20632023443542363741222C0A222C4C20
|
||||
632023443142373930222C0A222C4D20632023453443393535222C0A222C4E20
|
||||
632023463544463542222C0A222C4F20632023454444303738222C0A222C5020
|
||||
632023443239363531222C0A222C5120632023354436343936222C0A222C5220
|
||||
632023454642433833222C0A222C5320632023434137373241222C0A222C5420
|
||||
632023434437393235222C0A222C5520632023363136313836222C0A222C5620
|
||||
632023333536304246222C0A222C5720632023414138393433222C0A222C5820
|
||||
632023464646324530222C0A222C5920632023443839413534222C0A222C5A20
|
||||
632023424537413141222C0A222C3020632023433539383439222C0A222C3120
|
||||
632023423738383439222C0A222C3220632023343235343943222C0A222C3320
|
||||
632023364436343741222C0A222C3420632023434537453245222C0A222C3520
|
||||
632023443341323644222C0A222C3620632023323035304233222C0A222C3720
|
||||
632023383136343244222C0A222C3820632023463943373934222C0A222C3920
|
||||
632023463943393931222C0A222C4020632023433938353431222C0A222C2320
|
||||
632023413436323233222C0A222C3B20632023334434393839222C0A222C3A20
|
||||
632023323434464232222C0A222C3D20632023353533443131222C0A222C2B20
|
||||
632023383735463238222C0A222C2520632023424438383439222C0A222C2420
|
||||
632023424338443432222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2C2E2D2E
|
||||
2A2E612E622E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E632E
|
||||
642E652E662E672E682E692E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E
|
||||
6A2E6B2E6C2E6D2E6E2E6F2E702E712E2E2E2E2E2E2E2E2E2E222C0A222E2E2E
|
||||
2E2E2E2E722E732E742E752E762E772E782E792E2E2E2E2E2E2E2E2E2E222C0A
|
||||
222E2E2E2E2E2E2E7A2E412E422E432E442E452E462E472E2E2E482E492E4A2E
|
||||
2E222C0A222E2E2E2E2E2E2E4B2E4C2E4D2E4E2E4F2E4D2E502E512E522E532E
|
||||
542E552E56222C0A222E2E2E2E2E2E2E572E582E592E5A2E5A2E302E312E322E
|
||||
332E342E352E362E37222C0A222E2E2E2E2E2E2E382E392E402E232E232E3B2E
|
||||
3A2E3D2E2B2E252E242E282E2E222C0A222E2E2E2E2E292E5B2E5D2C2E2C2C2C
|
||||
2D2C2A2C612C622C632C642C652E2E2E2E222C0A222E2E2C662C672C682C692C
|
||||
6A2C6B2C6C2C612C6D2C6E2C6F2C702C712E2E2E2E222C0A222C722C732C742C
|
||||
752C762C772C782C792C7A2C412C422C432C442C452E2E2E2E222C0A222C462C
|
||||
472C482C492C4A2C4B2C4C2C4D2C4E2C4F2C502C512C522C532E2E2E2E222C0A
|
||||
222E2E2C542C552C562C572C582C592C5A2C302C312C322C332C342C352E2E2E
|
||||
2E222C0A222E2E2E2E2E2E2C362C372C382C392C402C232C3B2C3A2E2E2E2E2E
|
||||
2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C3D2C2B2C252C242E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E227D0AB10A00002F2A2058504D202A2F0A737461746963
|
||||
2063686172202A677261706869635B5D203D207B0A2231362031362031333220
|
||||
32222C0A222E2E2063204E6F6E65222C0A222E2C20632023384434383132222C
|
||||
0A222E2D20632023393034423130222C0A222E2A20632023384134383046222C
|
||||
0A222E6120632023374434323131222C0A222E6220632023354233333135222C
|
||||
0A222E6320632023393634453131222C0A222E6420632023394235383132222C
|
||||
0A222E6520632023393935383132222C0A222E6620632023393335333131222C
|
||||
0A222E6720632023383734413046222C0A222E6820632023373133453045222C
|
||||
0A222E6920632023344232453133222C0A222E6A20632023393734423046222C
|
||||
0A222E6B20632023394635383132222C0A222E6C20632023384134413046222C
|
||||
0A222E6D20632023383734423046222C0A222E6E20632023383734423131222C
|
||||
0A222E6F20632023383534433135222C0A222E7020632023373534313132222C
|
||||
0A222E7120632023354333333046222C0A222E7220632023383733453043222C
|
||||
0A222E7320632023423839373743222C0A222E7420632023453442373841222C
|
||||
0A222E7520632023433839433731222C0A222E7620632023364534303135222C
|
||||
0A222E7720632023373234343139222C0A222E7820632023364234353232222C
|
||||
0A222E7920632023363633423131222C0A222E7A20632023394235453146222C
|
||||
0A222E4120632023463745384439222C0A222E4220632023463143353937222C
|
||||
0A222E4320632023453542423845222C0A222E4420632023443141393746222C
|
||||
0A222E4520632023444642353839222C0A222E4620632023454544464344222C
|
||||
0A222E4720632023413736383233222C0A222E4820632023393235423241222C
|
||||
0A222E4920632023454543414136222C0A222E4A20632023454143434142222C
|
||||
0A222E4B20632023463644304137222C0A222E4C20632023463644304138222C
|
||||
0A222E4D20632023454543444137222C0A222E4E20632023394136323244222C
|
||||
0A222E4F20632023323533433641222C0A222E5020632023413736443334222C
|
||||
0A222E5120632023463843433943222C0A222E5220632023463744344146222C
|
||||
0A222E5320632023463643464135222C0A222E5420632023414537343334222C
|
||||
0A222E5520632023324433453638222C0A222E5620632023314334384243222C
|
||||
0A222E5720632023443445324634222C0A222E5820632023413937423445222C
|
||||
0A222E5920632023413837423444222C0A222E5A20632023433344364633222C
|
||||
0A222E3020632023314334364245222C0A222E3120632023314634434334222C
|
||||
0A222E3220632023443645344636222C0A222E3320632023413445344646222C
|
||||
0A222E3420632023373244344646222C0A222E3520632023363943394646222C
|
||||
0A222E3620632023363343304646222C0A222E3720632023354642364646222C
|
||||
0A222E3820632023413039303935222C0A222E3920632023433135443239222C
|
||||
0A222E4020632023424234323035222C0A222E2320632023423034353042222C
|
||||
0A222E3B20632023343435343841222C0A222E3A20632023414243384643222C
|
||||
0A222E3D20632023393844314646222C0A222E2B20632023364443374645222C
|
||||
0A222E2520632023363842464645222C0A222E2420632023363442394645222C
|
||||
0A222E2820632023354542314645222C0A222E2920632023384238323935222C
|
||||
0A222E5B20632023434537343344222C0A222E5D20632023463742353844222C
|
||||
0A222C2E20632023464544364238222C0A222C2C20632023463541383732222C
|
||||
0A222C2D20632023434136423244222C0A222C2A20632023434537433238222C
|
||||
0A222C6120632023454142333738222C0A222C6220632023393439454233222C
|
||||
0A222C6320632023363042374646222C0A222C6420632023363342364646222C
|
||||
0A222C6520632023363142324645222C0A222C6620632023354441434645222C
|
||||
0A222C6720632023353941354645222C0A222C6820632023414235303234222C
|
||||
0A222C6920632023463642353844222C0A222C6A20632023464639323444222C
|
||||
0A222C6B20632023464637373131222C0A222C6C20632023464638363231222C
|
||||
0A222C6D20632023454238413430222C0A222C6E20632023423934343033222C
|
||||
0A222C6F20632023443137443239222C0A222C7020632023454542413832222C
|
||||
0A222C7120632023353836363946222C0A222C7220632023383442424635222C
|
||||
0A222C7320632023354241434646222C0A222C7420632023354141384645222C
|
||||
0A222C7520632023353741324645222C0A222C7620632023353339434645222C
|
||||
0A222C7720632023424334323035222C0A222C7820632023464543444145222C
|
||||
0A222C7920632023464646464646222C0A222C7A20632023454637463138222C
|
||||
0A222C4120632023424334323034222C0A222C4220632023434437393235222C
|
||||
0A222C4320632023363136313836222C0A222C4420632023333536304246222C
|
||||
0A222C4520632023363142394645222C0A222C4620632023363242394645222C
|
||||
0A222C4720632023414635323146222C0A222C4820632023463439443633222C
|
||||
0A222C4920632023464637463138222C0A222C4A20632023463837363030222C
|
||||
0A222C4B20632023454537363030222C0A222C4C20632023453136383033222C
|
||||
0A222C4D20632023423934353033222C0A222C4E20632023323035304233222C
|
||||
0A222C4F20632023314634304130222C0A222C5020632023323234354141222C
|
||||
0A222C5120632023323234364143222C0A222C5220632023323234344142222C
|
||||
0A222C5320632023373434433546222C0A222C5420632023433636333237222C
|
||||
0A222C5520632023453637373231222C0A222C5620632023454137393035222C
|
||||
0A222C5720632023444436343031222C0A222C5820632023424434443034222C
|
||||
0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2C2E2D2E2A2E612E622E2E2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E632E642E652E662E672E68
|
||||
2E692E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E6A2E6B2E6C2E6D2E6E
|
||||
2E6F2E702E712E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E722E732E74
|
||||
2E752E762E772E782E792E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E7A
|
||||
2E412E422E432E442E452E462E472E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2E482E492E4A2E4B2E4C2E4A2E4D2E4E2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E4F2E502E512E522E522E532E542E552E2E2E2E2E2E2E2E222C
|
||||
0A222E2E2E2E2E2E2E2E2E562E572E582E592E592E582E5A2E302E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E312E322E332E342E352E362E372E382E392E40
|
||||
2E232E2E2E2E222C0A222E2E2E2E2E3B2E3A2E3D2E2B2E252E242E282E292E5B
|
||||
2E5D2C2E2C2C2C2D2E2E222C0A222E2E2C2A2C612C622C632C642C652C662C67
|
||||
2C682C692C6A2C6B2C6C2C6D2C6E222C0A222E2E2C6F2C702C712C722C732C74
|
||||
2C752C762C772C782C792C792C792C7A2C41222C0A222E2E2E2E2C422C432C44
|
||||
2C452C462C462C462C472C482C492C4A2C4B2C4C2C4D222C0A222E2E2E2E2E2E
|
||||
2E2E2C4E2C4F2C502C512C522C532C542C552C562C572C582E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2C4D2C412C4D2E2E2E2E227D
|
||||
0A
|
||||
}
|
||||
end
|
||||
object ilAccesslevel: TImageList
|
||||
left = 176
|
||||
Bitmap = {
|
||||
6C69040000001000000010000000F10C00002F2A2058504D202A2F0A73746174
|
||||
69632063686172202A677261706869635B5D203D207B0A223136203136203136
|
||||
382032222C0A222E2E2063204E6F6E65222C0A222E2C20632023413341334133
|
||||
222C0A222E2D20632023413041304130222C0A222E2A20632023394439443944
|
||||
222C0A222E6120632023394139413941222C0A222E6220632023393739373937
|
||||
222C0A222E6320632023393439343934222C0A222E6420632023413241324132
|
||||
222C0A222E6520632023424342434243222C0A222E6620632023434143414341
|
||||
222C0A222E6720632023434343434343222C0A222E6820632023433243324332
|
||||
222C0A222E6920632023414441444144222C0A222E6A20632023384338433843
|
||||
222C0A222E6B20632023413141314131222C0A222E6C20632023433443344334
|
||||
222C0A222E6D20632023424542454245222C0A222E6E20632023393639363936
|
||||
222C0A222E6F20632023393339333933222C0A222E7020632023414541454145
|
||||
222C0A222E7120632023383438343834222C0A222E7220632023424142414241
|
||||
222C0A222E7320632023424642464246222C0A222E7420632023393839383938
|
||||
222C0A222E7520632023383738373837222C0A222E7620632023413841384138
|
||||
222C0A222E7720632023394539453945222C0A222E7820632023383938393839
|
||||
222C0A222E7920632023413941394139222C0A222E7A20632023373937393739
|
||||
222C0A222E4120632023393939393939222C0A222E4220632023433643364336
|
||||
222C0A222E4320632023374437443744222C0A222E4420632023414241424142
|
||||
222C0A222E4520632023373637363736222C0A222E4620632023453143333631
|
||||
222C0A222E4720632023413841303838222C0A222E4820632023393139313931
|
||||
222C0A222E4920632023384538453845222C0A222E4A20632023444342393541
|
||||
222C0A222E4B20632023444642383535222C0A222E4C20632023444542353531
|
||||
222C0A222E4D20632023444442313444222C0A222E4E20632023444341443439
|
||||
222C0A222E4F20632023443741383436222C0A222E5020632023373837383738
|
||||
222C0A222E5120632023384437453635222C0A222E5220632023443839393331
|
||||
222C0A222E5320632023453143323630222C0A222E5420632023464346334339
|
||||
222C0A222E5520632023464446334342222C0A222E5620632023464546364434
|
||||
222C0A222E5720632023464646364437222C0A222E5820632023464646344438
|
||||
222C0A222E5920632023464646384530222C0A222E5A20632023464646384446
|
||||
222C0A222E3020632023464646354441222C0A222E3120632023464346314344
|
||||
222C0A222E3220632023464145444332222C0A222E3320632023464145424244
|
||||
222C0A222E3420632023443639333242222C0A222E3520632023453042463543
|
||||
222C0A222E3620632023464346334338222C0A222E3720632023463944463735
|
||||
222C0A222E3820632023464445363839222C0A222E3920632023464645373935
|
||||
222C0A222E4020632023464645353941222C0A222E2320632023464645454141
|
||||
222C0A222E3B20632023464645444138222C0A222E3A20632023464645333939
|
||||
222C0A222E3D20632023463944353734222C0A222E2B20632023463343433539
|
||||
222C0A222E2520632023463143383446222C0A222E2420632023464145394242
|
||||
222C0A222E2820632023443538443234222C0A222E2920632023444642423538
|
||||
222C0A222E5B20632023464346314337222C0A222E5D20632023463944433646
|
||||
222C0A222C2E20632023454442423536222C0A222C2C20632023454642443631
|
||||
222C0A222C2D20632023464645373942222C0A222C2A20632023453241363335
|
||||
222C0A222C6120632023453141343442222C0A222C6220632023464645323930
|
||||
222C0A222C6320632023453941443439222C0A222C6420632023453341343338
|
||||
222C0A222C6520632023463043343439222C0A222C6620632023463945384238
|
||||
222C0A222C6720632023443438383145222C0A222C6820632023444542373533
|
||||
222C0A222C6920632023464346304336222C0A222C6A20632023463844393641
|
||||
222C0A222C6B20632023464445323743222C0A222C6C20632023464645383930
|
||||
222C0A222C6D20632023464645393939222C0A222C6E20632023444639463332
|
||||
222C0A222C6F20632023423238423534222C0A222C7020632023464645323841
|
||||
222C0A222C7120632023463944303641222C0A222C7220632023463143353530
|
||||
222C0A222C7320632023463043313436222C0A222C7420632023463945374236
|
||||
222C0A222C7520632023443338333138222C0A222C7620632023444442323445
|
||||
222C0A222C7720632023464245464333222C0A222C7820632023463844363635
|
||||
222C0A222C7920632023454342363443222C0A222C7A20632023454642443541
|
||||
222C0A222C4120632023464645423935222C0A222C4220632023444439373330
|
||||
222C0A222C4320632023414238323444222C0A222C4420632023464645313834
|
||||
222C0A222C4520632023453941393431222C0A222C4620632023453139463332
|
||||
222C0A222C4720632023454642453432222C0A222C4820632023463945354234
|
||||
222C0A222C4920632023443237453133222C0A222C4A20632023464245454331
|
||||
222C0A222C4B20632023463744333546222C0A222C4C20632023464344423643
|
||||
222C0A222C4D20632023464645353746222C0A222C4E20632023464645443846
|
||||
222C0A222C4F20632023464646323937222C0A222C5020632023464645443933
|
||||
222C0A222C5120632023464644463743222C0A222C5220632023463843433542
|
||||
222C0A222C5320632023454642453436222C0A222C5420632023454542413343
|
||||
222C0A222C5520632023463945334233222C0A222C5620632023443137393045
|
||||
222C0A222C5720632023444241383433222C0A222C5820632023464245434246
|
||||
222C0A222C5920632023463543463539222C0A222C5A20632023454342303431
|
||||
222C0A222C3020632023454642413445222C0A222C3120632023454643323541
|
||||
222C0A222C3220632023454643363630222C0A222C3320632023454643343543
|
||||
222C0A222C3420632023454642363443222C0A222C3520632023453641353337
|
||||
222C0A222C3620632023453139413241222C0A222C3720632023454542383338
|
||||
222C0A222C3820632023463845334231222C0A222C3920632023443037353039
|
||||
222C0A222C4020632023444141333344222C0A222C2320632023464145424243
|
||||
222C0A222C3B20632023464345424243222C0A222C3A20632023464545454246
|
||||
222C0A222C3D20632023464646344336222C0A222C2B20632023464646384345
|
||||
222C0A222C2520632023464646414433222C0A222C2420632023464646384430
|
||||
222C0A222C2820632023464646324337222C0A222C2920632023464345394241
|
||||
222C0A222C5B20632023463945344233222C0A222C5D20632023463845324230
|
||||
222C0A222D2E20632023434637313035222C0A222D2C20632023443939443336
|
||||
222C0A222D2D20632023443739343243222C0A222D2A20632023443639303238
|
||||
222C0A222D6120632023443538433233222C0A222D6220632023443338343141
|
||||
222C0A222D6320632023443238303135222C0A222D6420632023443137433131
|
||||
222C0A222D6520632023443037363041222C0A222D6620632023434637333037
|
||||
222C0A222D6720632023434637303034222C0A222D6820632023434536453031
|
||||
222C0A222E2E2E2E2E2E2E2E2E2E2E2C2E2D2E2A2E612E622E632E2E2E2E2E2E
|
||||
2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E642E652E662E672E662E682E692E6A
|
||||
2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E6B2E6C2E6D2E6B2E6E2E6F2E62
|
||||
2E702E702E712E2E2E2E2E2E222C0A222E2E2E2E2E2E2E722E732E742E2E2E2E
|
||||
2E2E2E2E2E752E762E772E2E2E2E2E2E222C0A222E2E2E2E2E2A2E6C2E6B2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E782E792E7A2E2E2E2E222C0A222E2E2E2E2E412E42
|
||||
2E632E2E2E2E2E2E2E2E2E2E2E2E2E432E442E452E2E2E2E222C0A222E2E2E46
|
||||
2E472E482E492E4A2E4B2E4C2E4D2E4E2E4F2E502E452E512E522E2E222C0A22
|
||||
2E2E2E532E542E552E562E572E582E592E5A2E302E312E322E332E332E342E2E
|
||||
222C0A222E2E2E352E362E372E382E392E402E232E3B2E3A2E3D2E2B2E252E24
|
||||
2E282E2E222C0A222E2E2E292E5B2E5D2C2E2C2C2C2D2C2A2C612C622C632C64
|
||||
2C652C662C672E2E222C0A222E2E2C682C692C6A2C6B2C6C2C6D2C6E2C6F2C70
|
||||
2C712C722C732C742C752E2E222C0A222E2E2C762C772C782C792C7A2C412C42
|
||||
2C432C442C452C462C472C482C492E2E222C0A222E2E2E4E2C4A2C4B2C4C2C4D
|
||||
2C4E2C4F2C502C512C522C532C542C552C562E2E222C0A222E2E2C572C582C59
|
||||
2C5A2C302C312C322C332C342C352C362C372C382C392E2E222C0A222E2E2C40
|
||||
2C232C3B2C3A2C3D2C2B2C252C242C282C292C5B2C5D2C5D2D2E2E2E222C0A22
|
||||
2E2E2D2C2E522D2D2D2A2D612C672D622D632D642C562D652D662D672D682E2E
|
||||
227D0A410900002F2A2058504D202A2F0A7374617469632063686172202A6772
|
||||
61706869635B5D203D207B0A223136203136203130392032222C0A222E2E2063
|
||||
204E6F6E65222C0A222E2C20632023363835443536222C0A222E2D2063202337
|
||||
4133463133222C0A222E2A20632023374433453044222C0A222E612063202337
|
||||
3633433043222C0A222E6220632023363933393132222C0A222E632063202336
|
||||
3335363445222C0A222E6420632023363936333546222C0A222E652063202337
|
||||
4434443238222C0A222E6620632023393636313244222C0A222E672063202338
|
||||
3834393046222C0A222E6820632023393336303243222C0A222E692063202337
|
||||
3333453043222C0A222E6A20632023363033443142222C0A222E6B2063202336
|
||||
3335453539222C0A222E6C20632023373935323337222C0A222E6D2063202339
|
||||
3335413235222C0A222E6E20632023373633453043222C0A222E6F2063202338
|
||||
3535343234222C0A222E7020632023373333453045222C0A222E712063202338
|
||||
3435353236222C0A222E7220632023363933453136222C0A222E732063202335
|
||||
3033303134222C0A222E7420632023363733363131222C0A222E752063202337
|
||||
3134423241222C0A222E7620632023394537353443222C0A222E772063202338
|
||||
4536333342222C0A222E7820632023354233353131222C0A222E792063202337
|
||||
4235323238222C0A222E7A20632023353933393143222C0A222E412063202335
|
||||
3533323130222C0A222E4220632023373834383138222C0A222E432063202344
|
||||
3142373942222C0A222E4420632023454443394133222C0A222E452063202345
|
||||
3843353946222C0A222E4620632023434441313734222C0A222E472063202344
|
||||
4442303831222C0A222E4820632023434542333936222C0A222E492063202337
|
||||
4534433141222C0A222E4A20632023384635443330222C0A222E4B2063202345
|
||||
4543414136222C0A222E4C20632023454143434142222C0A222E4D2063202346
|
||||
3644304137222C0A222E4E20632023463644304138222C0A222E4F2063202345
|
||||
4543444137222C0A222E5020632023394136323245222C0A222E512063202333
|
||||
4433443344222C0A222E5220632023394536463431222C0A222E532063202346
|
||||
3843433943222C0A222E5420632023463744344146222C0A222E552063202346
|
||||
3643464135222C0A222E5620632023413637363431222C0A222E572063202333
|
||||
3733373337222C0A222E5820632023343934393439222C0A222E592063202334
|
||||
4234423442222C0A222E5A20632023393839383938222C0A222E302063202335
|
||||
4335433543222C0A222E3120632023413337433535222C0A222E322063202334
|
||||
4334433443222C0A222E3320632023344534453445222C0A222E342063202337
|
||||
3737373737222C0A222E3520632023393739373937222C0A222E362063202335
|
||||
3935393539222C0A222E3720632023414241424142222C0A222E382063202341
|
||||
3541354135222C0A222E3920632023353435343534222C0A222E402063202338
|
||||
3638363836222C0A222E2320632023363236323632222C0A222E3B2063202334
|
||||
4134413441222C0A222E3A20632023363336333633222C0A222E3D2063202341
|
||||
3441344134222C0A222E2B20632023353035303530222C0A222E252063202335
|
||||
3235323532222C0A222E2420632023354235423542222C0A222E282063202342
|
||||
3842384238222C0A222E2920632023433143314331222C0A222E5B2063202335
|
||||
3735373537222C0A222E5D20632023344434443444222C0A222C2E2063202335
|
||||
4135413541222C0A222C2C20632023374537453745222C0A222C2D2063202336
|
||||
3036303630222C0A222C2A20632023434537433238222C0A222C612063202345
|
||||
4142333738222C0A222C6220632023374137413741222C0A222C632063202338
|
||||
3338333833222C0A222C6420632023354435443544222C0A222C652063202335
|
||||
3535353535222C0A222C6620632023363436343634222C0A222C672063202335
|
||||
4635463546222C0A222C6820632023364436443644222C0A222C692063202345
|
||||
4442383745222C0A222C6A20632023433737343239222C0A222C6B2063202344
|
||||
3137443239222C0A222C6C20632023454542413832222C0A222C6D2063202338
|
||||
4638463846222C0A222C6E20632023373237323732222C0A222C6F2063202336
|
||||
4636463646222C0A222C7020632023383438343834222C0A222C712063202345
|
||||
4642433833222C0A222C7220632023434137373241222C0A222C732063202343
|
||||
4437393235222C0A222C7420632023354535453545222C0A222C752063202334
|
||||
4634463446222C0A222C7620632023383038303830222C0A222C772063202334
|
||||
3534353435222C0A222C7820632023434537453245222C0A222C792063202344
|
||||
3341323644222C0A222C7A20632023343734373437222C0A222C412063202333
|
||||
3833383338222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2C2E2D2E2A2E612E
|
||||
622E632E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E642E652E662E
|
||||
672E682E692E6A2E6B2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E6C2E
|
||||
6D2E6E2E6F2E702E712E722E732E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E
|
||||
2E2E742E752E762E772E782E792E7A2E412E2E2E2E2E2E2E2E222C0A222E2E2E
|
||||
2E2E2E2E2E2E422E432E442E452E462E472E482E492E2E2E2E2E2E2E2E222C0A
|
||||
222E2E2E2E2E2E2E2E2E4A2E4B2E4C2E4D2E4E2E4C2E4F2E502E2E2E2E2E2E2E
|
||||
2E222C0A222E2E2E2E2E2E2E2E2E512E522E532E542E542E552E562E572E2E2E
|
||||
2E2E2E2E2E222C0A222E2E2E2E2E2E2E582E592E5A2E302E312E312E322E5A2E
|
||||
332E322E2E2E2E2E2E222C0A222E2E2E2E2E342E322E332E352E362E372E382E
|
||||
392E402E232E3B2E2E2E2E2E2E222C0A222E2E2E2E2E3A2E3D2E2B2E252E242E
|
||||
282E292E5B2E5D2C2E2C2C2C2D2E2E2E2E222C0A222E2E2C2A2C612C622C632C
|
||||
2C2C642E582E322C652C662C672C682C692C6A2E2E222C0A222E2E2C6B2C6C2C
|
||||
672C6D2C622E342C682E332C6E2C6F2C702C652C712C722E2E222C0A222E2E2E
|
||||
2E2C732C742C752C702C702C762E392C632C702E3B2C772C782C792E2E222C0A
|
||||
222E2E2E2E2E2E2E2E2E512E5D2E582C7A2C7A2C772C7A2C412E2E2E2E2E2E2E
|
||||
2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E227D0A210A00002F2A2058504D202A2F0A73746174696320636861
|
||||
72202A677261706869635B5D203D207B0A223136203136203132332032222C0A
|
||||
222E2E2063204E6F6E65222C0A222E2C20632023453542323237222C0A222E2D
|
||||
20632023463341373142222C0A222E2A20632023463441433143222C0A222E61
|
||||
20632023463441383143222C0A222E6220632023463141313142222C0A222E63
|
||||
20632023444541433237222C0A222E6420632023453542353238222C0A222E65
|
||||
20632023463542363142222C0A222E6620632023463542363143222C0A222E67
|
||||
20632023463542323143222C0A222E6820632023463441423143222C0A222E69
|
||||
20632023463041413144222C0A222E6A20632023453042303238222C0A222E6B
|
||||
20632023463542413144222C0A222E6C20632023463441413143222C0A222E6D
|
||||
20632023463341433143222C0A222E6E20632023463041313143222C0A222E6F
|
||||
20632023453439333143222C0A222E7020632023463339453142222C0A222E71
|
||||
20632023434541423632222C0A222E7220632023453442373841222C0A222E73
|
||||
20632023454243363345222C0A222E7420632023454439463143222C0A222E75
|
||||
20632023454541343144222C0A222E7620632023454241353145222C0A222E77
|
||||
20632023453939413143222C0A222E7820632023414436443145222C0A222E79
|
||||
20632023454644374244222C0A222E7A20632023454443394133222C0A222E41
|
||||
20632023453843353944222C0A222E4220632023454643453434222C0A222E43
|
||||
20632023454643443542222C0A222E4420632023463144434138222C0A222E45
|
||||
20632023424437433230222C0A222E4620632023384536313243222C0A222E47
|
||||
20632023454543414136222C0A222E4820632023454143434142222C0A222E49
|
||||
20632023463644304137222C0A222E4A20632023463644304138222C0A222E4B
|
||||
20632023454543444137222C0A222E4C20632023393936323244222C0A222E4D
|
||||
20632023343937323443222C0A222E4E20632023393937343334222C0A222E4F
|
||||
20632023463843433943222C0A222E5020632023463744344146222C0A222E51
|
||||
20632023463643464135222C0A222E5220632023413137413335222C0A222E53
|
||||
20632023343636413441222C0A222E5420632023354439333739222C0A222E55
|
||||
20632023344538353237222C0A222E5620632023433846354233222C0A222E57
|
||||
20632023384638393439222C0A222E5820632023413037463442222C0A222E59
|
||||
20632023424145384139222C0A222E5A20632023344438343236222C0A222E30
|
||||
20632023353938433733222C0A222E3120632023414345304146222C0A222E32
|
||||
20632023354439343337222C0A222E3320632023433646443946222C0A222E34
|
||||
20632023423845463931222C0A222E3520632023394644363738222C0A222E36
|
||||
20632023393643443646222C0A222E3720632023384643363639222C0A222E38
|
||||
20632023383842463632222C0A222E3920632023393843463733222C0A222E40
|
||||
20632023423946303934222C0A222E2320632023353138383330222C0A222E3B
|
||||
20632023353438373738222C0A222E3A20632023364339443834222C0A222E3D
|
||||
20632023364241323435222C0A222E2B20632023413945303832222C0A222E25
|
||||
20632023393043373639222C0A222E2420632023384243323634222C0A222E28
|
||||
20632023383542433545222C0A222E2920632023374542353537222C0A222E5B
|
||||
20632023373741453530222C0A222E5D20632023393143383642222C0A222C2E
|
||||
20632023384143303637222C0A222C2C20632023363639413446222C0A222C2D
|
||||
20632023363439323736222C0A222C2A20632023434537433238222C0A222C61
|
||||
20632023454142333738222C0A222C6220632023383142383541222C0A222C63
|
||||
20632023383943303632222C0A222C6420632023383642443546222C0A222C65
|
||||
20632023374342333535222C0A222C6620632023373641443446222C0A222C67
|
||||
20632023373041373439222C0A222C6820632023363739453431222C0A222C69
|
||||
20632023373441423444222C0A222C6A20632023454442383745222C0A222C6B
|
||||
20632023433737343239222C0A222C6C20632023443137443239222C0A222C6D
|
||||
20632023454542413832222C0A222C6E20632023363739453430222C0A222C6F
|
||||
20632023393543433645222C0A222C7020632023383142383542222C0A222C71
|
||||
20632023374542353538222C0A222C7220632023374142313533222C0A222C73
|
||||
20632023373541433446222C0A222C7420632023374142313534222C0A222C75
|
||||
20632023373641443531222C0A222C7620632023384143313637222C0A222C77
|
||||
20632023354339323342222C0A222C7820632023454642433833222C0A222C79
|
||||
20632023434137373241222C0A222C7A20632023434437393235222C0A222C41
|
||||
20632023363739443432222C0A222C4220632023353838463331222C0A222C43
|
||||
20632023384143313633222C0A222C4420632023353338413244222C0A222C45
|
||||
20632023353338383246222C0A222C4620632023434537453245222C0A222C47
|
||||
20632023443341323644222C0A222C4820632023353738433636222C0A222C49
|
||||
20632023353538423432222C0A222C4A20632023353238393333222C0A222C4B
|
||||
20632023353138383245222C0A222C4C20632023353038373244222C0A222C4D
|
||||
20632023344538353245222C0A222C4E20632023344538353339222C0A222C4F
|
||||
20632023344538323446222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2C2E2D
|
||||
2E2A2E612E622E632E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E64
|
||||
2E652E662E662E672E682E692E6A2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
|
||||
2E2E2E6B2E662E6C2E2A2E2A2E6D2E6E2E6F2E2E2E2E2E2E2E2E222C0A222E2E
|
||||
2E2E2E2E2E2E2E702E712E722E732E742E752E762E772E2E2E2E2E2E2E2E222C
|
||||
0A222E2E2E2E2E2E2E2E2E782E792E7A2E412E422E432E442E452E2E2E2E2E2E
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2E462E472E482E492E4A2E482E4B2E4C2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E4D2E4E2E4F2E502E502E512E52
|
||||
2E532E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E542E552E562E572E582E58
|
||||
2E572E592E5A2E302E2E2E2E2E2E222C0A222E2E2E2E2E312E322E332E342E35
|
||||
2E362E372E382E392E402E232E3B2E2E2E2E222C0A222E2E2E3A2E3D2E2B2E2B
|
||||
2E362E252E242E282E292E5B2E5D2C2E2C2C2C2D2E2E222C0A222E2E2C2A2C61
|
||||
2C622C632C632C642C622C652C662C672C682C692C6A2C6B2E2E222C0A222E2E
|
||||
2C6C2C6D2C6E2C6F2C702C712C722C732C742C752C762C772C782C792E2E222C
|
||||
0A222E2E2E2E2C7A2C412C422C432C432C432C432C432C432C442C452C462C47
|
||||
2E2E222C0A222E2E2E2E2E2E2E2E2C482C492C4A2C4B2C4C2C4D2C4E2C4F2E2E
|
||||
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E227D0AA10A00002F2A2058504D202A2F0A7374617469
|
||||
632063686172202A677261706869635B5D203D207B0A22313620313620313331
|
||||
2032222C0A222E2E2063204E6F6E65222C0A222E2C2063202336383544353622
|
||||
2C0A222E2D20632023374133463133222C0A222E2A2063202337443345304422
|
||||
2C0A222E6120632023373633433043222C0A222E622063202336393339313222
|
||||
2C0A222E6320632023363335363445222C0A222E642063202336393633354622
|
||||
2C0A222E6520632023374434443238222C0A222E662063202338413439304622
|
||||
2C0A222E6720632023383834393046222C0A222E682063202338313435304522
|
||||
2C0A222E6920632023373333453043222C0A222E6A2063202336303344314222
|
||||
2C0A222E6B20632023363335453539222C0A222E6C2063202337393532333722
|
||||
2C0A222E6D20632023384634393046222C0A222E6E2063202337363345304322
|
||||
2C0A222E6F20632023373333453045222C0A222E702063202337303346313122
|
||||
2C0A222E7120632023363133363046222C0A222E722063202335303330313422
|
||||
2C0A222E7320632023373333373130222C0A222E742063202342353933373822
|
||||
2C0A222E7520632023453442373841222C0A222E762063202343333933363722
|
||||
2C0A222E7720632023354233353131222C0A222E782063202335463339313522
|
||||
2C0A222E7920632023353933393143222C0A222E7A2063202335353332313022
|
||||
2C0A222E4120632023393935433146222C0A222E422063202345464437424422
|
||||
2C0A222E4320632023454443394133222C0A222E442063202345384335394622
|
||||
2C0A222E4520632023434441313734222C0A222E462063202344444230383122
|
||||
2C0A222E4720632023454244334237222C0A222E482063202341343635323322
|
||||
2C0A222E4920632023383935463339222C0A222E4A2063202345454341413622
|
||||
2C0A222E4B20632023454143434142222C0A222E4C2063202346364430413722
|
||||
2C0A222E4D20632023463644304138222C0A222E4E2063202345454344413722
|
||||
2C0A222E4F20632023393936323246222C0A222E502063202333453642393622
|
||||
2C0A222E5120632023393137323533222C0A222E522063202346384343394322
|
||||
2C0A222E5320632023463744344146222C0A222E542063202346364346413522
|
||||
2C0A222E5520632023394137393531222C0A222E562063202333433634384322
|
||||
2C0A222E5720632023343537364135222C0A222E582063202333463744423122
|
||||
2C0A222E5920632023413042454438222C0A222E5A2063202337313832393622
|
||||
2C0A222E3020632023413437323535222C0A222E312063202342353545343322
|
||||
2C0A222E3220632023354637394132222C0A222E332063202341304245443922
|
||||
2C0A222E3420632023343238304234222C0A222E352063202334363735413822
|
||||
2C0A222E3620632023373039414332222C0A222E372063202334313744423222
|
||||
2C0A222E3820632023394542464443222C0A222E392063202334433841424522
|
||||
2C0A222E4020632023424342364334222C0A222E232063202343383637354522
|
||||
2C0A222E3B20632023344438314233222C0A222E3A2063202338384230443322
|
||||
2C0A222E3D20632023353939314332222C0A222E2B2063202333453741414622
|
||||
2C0A222E2520632023343136463946222C0A222E242063202334413737413522
|
||||
2C0A222E2820632023354239324333222C0A222E292063202342304341453222
|
||||
2C0A222E5B20632023343438324236222C0A222E5D2063202334353833423722
|
||||
2C0A222C2E20632023353538384238222C0A222C2C2063202344303542344122
|
||||
2C0A222C2D20632023443236303530222C0A222C2A2063202334433837424122
|
||||
2C0A222C6120632023343137464233222C0A222C622063202334453841424622
|
||||
2C0A222C6320632023374441394430222C0A222C642063202335373844424522
|
||||
2C0A222C6520632023343636463943222C0A222C662063202343453743323822
|
||||
2C0A222C6720632023454142333738222C0A222C682063202337394136434522
|
||||
2C0A222C6920632023383341454432222C0A222C6A2063202335393838423722
|
||||
2C0A222C6B20632023413634453444222C0A222C6C2063202337433632373722
|
||||
2C0A222C6D20632023344238344236222C0A222C6E2063202335433933433422
|
||||
2C0A222C6F20632023353538454331222C0A222C702063202336373941433722
|
||||
2C0A222C7120632023454442383745222C0A222C722063202343373734323922
|
||||
2C0A222C7320632023443137443239222C0A222C742063202345454241383222
|
||||
2C0A222C7520632023353538464331222C0A222C762063202339344239443822
|
||||
2C0A222C7720632023373841364345222C0A222C782063202337354133434322
|
||||
2C0A222C7920632023373039334241222C0A222C7A2063202334343746423222
|
||||
2C0A222C4120632023364539464341222C0A222C422063202336393943433822
|
||||
2C0A222C4320632023383541454433222C0A222C442063202334393834423822
|
||||
2C0A222C4520632023454642433833222C0A222C462063202343413737324122
|
||||
2C0A222C4720632023434437393235222C0A222C482063202335343845433022
|
||||
2C0A222C4920632023343338314235222C0A222C4A2063202338354146443322
|
||||
2C0A222C4B20632023374641424431222C0A222C4C2063202334373835423922
|
||||
2C0A222C4D20632023334637424230222C0A222C4E2063202333433736413922
|
||||
2C0A222C4F20632023434537453245222C0A222C502063202344334132364422
|
||||
2C0A222C5120632023333436363939222C0A222C522063202334313741414622
|
||||
2C0A222C5320632023334437394145222C0A222C542063202333433738414422
|
||||
2C0A222C5520632023333937354141222C0A222C562063202333433735414122
|
||||
2C0A222C5720632023333136313933222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E
|
||||
2E2E2C2E2D2E2A2E612E622E632E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2E642E652E662E672E682E692E6A2E6B2E2E2E2E2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2E6C2E6D2E6E2E692E6F2E702E712E722E2E2E2E2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2E732E742E752E762E772E782E792E7A2E2E2E2E2E
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2E412E422E432E442E452E462E472E482E
|
||||
2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E492E4A2E4B2E4C2E4D2E4B2E
|
||||
4E2E4F2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E502E512E522E532E
|
||||
532E542E552E562E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E572E582E592E
|
||||
5A2E302E312E322E332E342E352E2E2E2E2E2E222C0A222E2E2E2E2E362E372E
|
||||
342E382E392E402E232E3B2E3A2E3D2E2B2E252E2E2E2E222C0A222E2E2E242E
|
||||
282E292E5B2E5D2C2E2C2C2C2D2C2A2C612C622C632C642C652E2E222C0A222E
|
||||
2E2C662C672C682C692C632C6A2C6B2C6C2C6D2C6E2C6F2C702C712C722E2E22
|
||||
2C0A222E2E2C732C742C752C762C772C782C792C7A2C412C422C432C442C452C
|
||||
462E2E222C0A222E2E2E2E2C472C482C492C4A2C4A2C4B2C4C2C692C4A2C4D2C
|
||||
4E2C4F2C502E2E222C0A222E2E2E2E2E2E2E2E2C512C522C532C542C542C552C
|
||||
562C572E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
end
|
||||
end
|
||||
354
Client/UfrmAccountControl.pas
Normal file
354
Client/UfrmAccountControl.pas
Normal file
@@ -0,0 +1,354 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmAccountControl;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls,
|
||||
VirtualTrees, VTHeaderPopup, UEnhancedMemoryStream, UEnums;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmAccountControl }
|
||||
|
||||
TfrmAccountControl = class(TForm)
|
||||
ilToolbar: TImageList;
|
||||
ilAccesslevel: TImageList;
|
||||
tbMain: TToolBar;
|
||||
tbRefresh: TToolButton;
|
||||
tbAddUser: TToolButton;
|
||||
tbEditUser: TToolButton;
|
||||
tbDeleteUser: TToolButton;
|
||||
tbSeparator1: TToolButton;
|
||||
vstAccounts: TVirtualStringTree;
|
||||
procedure tbEditUserClick(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure tbAddUserClick(Sender: TObject);
|
||||
procedure tbDeleteUserClick(Sender: TObject);
|
||||
procedure tbRefreshClick(Sender: TObject);
|
||||
procedure vstAccountsDblClick(Sender: TObject);
|
||||
procedure vstAccountsGetImageIndex(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex;
|
||||
var Ghosted: Boolean; var ImageIndex: Integer);
|
||||
procedure vstAccountsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
|
||||
protected
|
||||
procedure OnModifyUserResponse(ABuffer: TEnhancedMemoryStream);
|
||||
procedure OnDeleteUserResponse(ABuffer: TEnhancedMemoryStream);
|
||||
procedure OnListUsersPacket(ABuffer: TEnhancedMemoryStream);
|
||||
function FindNode(AUsername: string): PVirtualNode;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmAccountControl: TfrmAccountControl;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UdmNetwork, UPacket, UPacketHandlers, UAdminHandling, UfrmEditAccount;
|
||||
|
||||
type
|
||||
PAccountInfo = ^TAccountInfo;
|
||||
TAccountInfo = record
|
||||
Username: string;
|
||||
AccessLevel: TAccessLevel;
|
||||
end;
|
||||
|
||||
{ TModifyUserPacket }
|
||||
|
||||
TModifyUserPacket = class(TPacket)
|
||||
constructor Create(AUsername, APassword: string; AAccessLevel: TAccessLevel);
|
||||
end;
|
||||
|
||||
{ TDeleteUserPacket }
|
||||
|
||||
TDeleteUserPacket = class(TPacket)
|
||||
constructor Create(AUsername: string);
|
||||
end;
|
||||
|
||||
{ TRequestUserListPacket }
|
||||
|
||||
TRequestUserListPacket = class(TPacket)
|
||||
constructor Create;
|
||||
end;
|
||||
|
||||
{ TModifyUserPacket }
|
||||
|
||||
constructor TModifyUserPacket.Create(AUsername, APassword: string;
|
||||
AAccessLevel: TAccessLevel);
|
||||
begin
|
||||
inherited Create($03, 0);
|
||||
FStream.WriteByte($05);
|
||||
FStream.WriteStringNull(AUsername);
|
||||
FStream.WriteStringNull(APassword);
|
||||
FStream.WriteByte(Byte(AAccessLevel));
|
||||
end;
|
||||
|
||||
{ TDeleteUserPacket }
|
||||
|
||||
constructor TDeleteUserPacket.Create(AUsername: string);
|
||||
begin
|
||||
inherited Create($03, 0);
|
||||
FStream.WriteByte($06);
|
||||
FStream.WriteStringNull(AUsername);
|
||||
end;
|
||||
|
||||
{ TRequestUserListPacket }
|
||||
|
||||
constructor TRequestUserListPacket.Create;
|
||||
begin
|
||||
inherited Create($03, 0);
|
||||
FStream.WriteByte($07);
|
||||
end;
|
||||
|
||||
{ TfrmAccountControl }
|
||||
|
||||
procedure TfrmAccountControl.FormCreate(Sender: TObject);
|
||||
begin
|
||||
vstAccounts.NodeDataSize := SizeOf(TAccountInfo);
|
||||
|
||||
AdminPacketHandlers[$05] := TPacketHandler.Create(0, @OnModifyUserResponse);
|
||||
AdminPacketHandlers[$06] := TPacketHandler.Create(0, @OnDeleteUserResponse);
|
||||
AdminPacketHandlers[$07] := TPacketHandler.Create(0, @OnListUsersPacket);
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.FormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.tbEditUserClick(Sender: TObject);
|
||||
var
|
||||
selected: PVirtualNode;
|
||||
accountInfo: PAccountInfo;
|
||||
begin
|
||||
selected := vstAccounts.GetFirstSelected;
|
||||
if selected <> nil then
|
||||
begin
|
||||
accountInfo := vstAccounts.GetNodeData(selected);
|
||||
with frmEditAccount do
|
||||
begin
|
||||
edUsername.Text := accountInfo^.Username;
|
||||
edUsername.Color := clBtnFace;
|
||||
edUsername.ReadOnly := True;
|
||||
edPassword.Text := '';
|
||||
lblPasswordHint.Visible := True;
|
||||
SetAccessLevel(accountInfo^.AccessLevel);
|
||||
if ShowModal = mrOK then
|
||||
dmNetwork.Send(TModifyUserPacket.Create(edUsername.Text, edPassword.Text, GetAccessLevel));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
if AdminPacketHandlers[$05] <> nil then FreeAndNil(AdminPacketHandlers[$05]);
|
||||
if AdminPacketHandlers[$06] <> nil then FreeAndNil(AdminPacketHandlers[$06]);
|
||||
if AdminPacketHandlers[$07] <> nil then FreeAndNil(AdminPacketHandlers[$07]);
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.FormShow(Sender: TObject);
|
||||
begin
|
||||
tbRefreshClick(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.tbAddUserClick(Sender: TObject);
|
||||
begin
|
||||
with frmEditAccount do
|
||||
begin
|
||||
edUsername.Text := '';
|
||||
edUsername.Color := clWindow;
|
||||
edUsername.ReadOnly := False;
|
||||
edPassword.Text := '';
|
||||
lblPasswordHint.Visible := False;
|
||||
cbAccessLevel.ItemIndex := 2;
|
||||
if ShowModal = mrOK then
|
||||
dmNetwork.Send(TModifyUserPacket.Create(edUsername.Text, edPassword.Text, GetAccessLevel));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.tbDeleteUserClick(Sender: TObject);
|
||||
var
|
||||
selected: PVirtualNode;
|
||||
accountInfo: PAccountInfo;
|
||||
begin
|
||||
selected := vstAccounts.GetFirstSelected;
|
||||
if selected <> nil then
|
||||
begin
|
||||
accountInfo := vstAccounts.GetNodeData(selected);
|
||||
if MessageDlg('Confirmation', Format('Do you really want to delete "%s"?', [accountInfo^.Username]), mtConfirmation, [mbYes, mbNo], 0) = mrYes then
|
||||
dmNetwork.Send(TDeleteUserPacket.Create(accountInfo^.Username));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.tbRefreshClick(Sender: TObject);
|
||||
begin
|
||||
dmNetwork.Send(TRequestUserListPacket.Create);
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.vstAccountsDblClick(Sender: TObject);
|
||||
begin
|
||||
tbEditUserClick(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.vstAccountsGetImageIndex(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex;
|
||||
var Ghosted: Boolean; var ImageIndex: Integer);
|
||||
var
|
||||
accountInfo: PAccountInfo;
|
||||
begin
|
||||
if Column = 0 then
|
||||
begin
|
||||
accountInfo := Sender.GetNodeData(Node);
|
||||
case accountInfo^.AccessLevel of
|
||||
alNone: ImageIndex := 0;
|
||||
alView: ImageIndex := 1;
|
||||
alNormal: ImageIndex := 2;
|
||||
alAdministrator: ImageIndex := 3;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.vstAccountsGetText(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
|
||||
var CellText: WideString);
|
||||
var
|
||||
accountInfo: PAccountInfo;
|
||||
begin
|
||||
accountInfo := Sender.GetNodeData(Node);
|
||||
case Column of
|
||||
1: CellText := accountInfo^.Username;
|
||||
2: CellText := GetAccessLevelString(accountInfo^.AccessLevel);
|
||||
else
|
||||
CellText := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.OnModifyUserResponse(ABuffer: TEnhancedMemoryStream);
|
||||
var
|
||||
node: PVirtualNode;
|
||||
modifyStatus: TModifyUserStatus;
|
||||
username: string;
|
||||
accountInfo: PAccountInfo;
|
||||
begin
|
||||
modifyStatus := TModifyUserStatus(ABuffer.ReadByte);
|
||||
username := ABuffer.ReadStringNull;
|
||||
case modifyStatus of
|
||||
muAdded:
|
||||
begin
|
||||
node := vstAccounts.AddChild(nil);
|
||||
accountInfo := vstAccounts.GetNodeData(node);
|
||||
accountInfo^.Username := username;
|
||||
accountInfo^.AccessLevel := TAccessLevel(ABuffer.ReadByte);
|
||||
Messagedlg('Success', Format('The user "%s" has been added.', [username]), mtInformation, [mbOK], 0);
|
||||
end;
|
||||
muModified:
|
||||
begin
|
||||
node := FindNode(username);
|
||||
if node <> nil then
|
||||
begin
|
||||
accountInfo := vstAccounts.GetNodeData(node);
|
||||
accountInfo^.AccessLevel := TAccessLevel(ABuffer.ReadByte);
|
||||
Messagedlg('Success', Format('The user "%s" has been modified.', [username]), mtInformation, [mbOK], 0);
|
||||
end;
|
||||
end;
|
||||
muInvalidUsername:
|
||||
MessageDlg('Error', Format('The username "%s" is not valid.', [username]), mtError, [mbOK], 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.OnDeleteUserResponse(ABuffer: TEnhancedMemoryStream);
|
||||
var
|
||||
node: PVirtualNode;
|
||||
deleteStatus: TDeleteUserStatus;
|
||||
username: string;
|
||||
begin
|
||||
deleteStatus := TDeleteUserStatus(ABuffer.ReadByte);
|
||||
username := ABuffer.ReadStringNull;
|
||||
case deleteStatus of
|
||||
duDeleted:
|
||||
begin
|
||||
node := FindNode(username);
|
||||
if node <> nil then
|
||||
begin
|
||||
vstAccounts.DeleteNode(node);
|
||||
Messagedlg('Success', Format('The user "%s" has been deleted.', [username]), mtInformation, [mbOK], 0);
|
||||
end;
|
||||
end;
|
||||
duNotFound:
|
||||
MessageDlg('Error', Format('The user "%s" could not be deleted. Maybe your list is out of date or you tried to delete yourself.', [username]), mtError, [mbOK], 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAccountControl.OnListUsersPacket(ABuffer: TEnhancedMemoryStream);
|
||||
var
|
||||
node: PVirtualNode;
|
||||
accountInfo: PAccountInfo;
|
||||
i, count: Word;
|
||||
begin
|
||||
vstAccounts.BeginUpdate;
|
||||
vstAccounts.Clear;
|
||||
count := ABuffer.ReadWord;
|
||||
for i := 1 to count do
|
||||
begin
|
||||
node := vstAccounts.AddChild(nil);
|
||||
accountInfo := vstAccounts.GetNodeData(node);
|
||||
accountInfo^.Username := ABuffer.ReadStringNull;
|
||||
accountInfo^.AccessLevel := TAccessLevel(ABuffer.ReadByte);
|
||||
end;
|
||||
vstAccounts.EndUpdate;
|
||||
end;
|
||||
|
||||
function TfrmAccountControl.FindNode(AUsername: string): PVirtualNode;
|
||||
var
|
||||
node: PVirtualNode;
|
||||
accountInfo: PAccountInfo;
|
||||
begin
|
||||
Result := nil;
|
||||
node := vstAccounts.GetFirst;
|
||||
while (node <> nil) and (Result = nil) do
|
||||
begin
|
||||
accountInfo := vstAccounts.GetNodeData(node);
|
||||
if accountInfo^.Username = AUsername then
|
||||
Result := node;
|
||||
node := vstAccounts.GetNext(node);
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmAccountControl.lrs}
|
||||
|
||||
end.
|
||||
|
||||
107
Client/UfrmEditAccount.lfm
Normal file
107
Client/UfrmEditAccount.lfm
Normal file
@@ -0,0 +1,107 @@
|
||||
object frmEditAccount: TfrmEditAccount
|
||||
Left = 290
|
||||
Height = 186
|
||||
Top = 171
|
||||
Width = 266
|
||||
HorzScrollBar.Page = 265
|
||||
VertScrollBar.Page = 185
|
||||
ActiveControl = btnOK
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Edit Account'
|
||||
ClientHeight = 186
|
||||
ClientWidth = 266
|
||||
Position = poOwnerFormCenter
|
||||
object lblPasswordHint: TLabel
|
||||
Left = 96
|
||||
Height = 28
|
||||
Top = 72
|
||||
Width = 160
|
||||
AutoSize = False
|
||||
Caption = 'Leave empty to leave the password unchanged.'
|
||||
Enabled = False
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
object lblUsername: TLabel
|
||||
Left = 16
|
||||
Height = 16
|
||||
Top = 20
|
||||
Width = 57
|
||||
Caption = 'Username:'
|
||||
ParentColor = False
|
||||
end
|
||||
object lblPassword: TLabel
|
||||
Left = 16
|
||||
Height = 16
|
||||
Top = 52
|
||||
Width = 54
|
||||
Caption = 'Password:'
|
||||
ParentColor = False
|
||||
end
|
||||
object lblAccessLevel: TLabel
|
||||
Left = 16
|
||||
Height = 16
|
||||
Top = 116
|
||||
Width = 64
|
||||
Caption = 'Accesslevel:'
|
||||
ParentColor = False
|
||||
end
|
||||
object btnOK: TButton
|
||||
Left = 93
|
||||
Height = 25
|
||||
Top = 152
|
||||
Width = 75
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = 'OK'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 0
|
||||
end
|
||||
object btnCancel: TButton
|
||||
Left = 181
|
||||
Height = 25
|
||||
Top = 152
|
||||
Width = 75
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 1
|
||||
end
|
||||
object edUsername: TEdit
|
||||
Left = 96
|
||||
Height = 23
|
||||
Top = 16
|
||||
Width = 160
|
||||
Color = clBtnFace
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object edPassword: TEdit
|
||||
Left = 96
|
||||
Height = 23
|
||||
Top = 48
|
||||
Width = 160
|
||||
EchoMode = emPassword
|
||||
PasswordChar = '*'
|
||||
TabOrder = 3
|
||||
end
|
||||
object cbAccessLevel: TComboBox
|
||||
Left = 96
|
||||
Height = 21
|
||||
Top = 112
|
||||
Width = 160
|
||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
||||
ItemHeight = 13
|
||||
Items.Strings = (
|
||||
'None'
|
||||
'Viewer'
|
||||
'Normal'
|
||||
'Administrator'
|
||||
)
|
||||
MaxLength = 0
|
||||
Style = csDropDownList
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
86
Client/UfrmEditAccount.pas
Normal file
86
Client/UfrmEditAccount.pas
Normal file
@@ -0,0 +1,86 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmEditAccount;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
UEnums;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmEditAccount }
|
||||
|
||||
TfrmEditAccount = class(TForm)
|
||||
btnOK: TButton;
|
||||
btnCancel: TButton;
|
||||
cbAccessLevel: TComboBox;
|
||||
edUsername: TEdit;
|
||||
edPassword: TEdit;
|
||||
lblUsername: TLabel;
|
||||
lblPassword: TLabel;
|
||||
lblAccessLevel: TLabel;
|
||||
lblPasswordHint: TLabel;
|
||||
public
|
||||
function GetAccessLevel: TAccessLevel;
|
||||
procedure SetAccessLevel(AAccessLevel: TAccessLevel);
|
||||
end;
|
||||
|
||||
var
|
||||
frmEditAccount: TfrmEditAccount;
|
||||
|
||||
implementation
|
||||
|
||||
{ TfrmEditAccount }
|
||||
|
||||
function TfrmEditAccount.GetAccessLevel: TAccessLevel;
|
||||
begin
|
||||
case cbAccessLevel.ItemIndex of
|
||||
0: Result := alNone;
|
||||
1: Result := alView;
|
||||
2: Result := alNormal;
|
||||
3: Result := alAdministrator;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmEditAccount.SetAccessLevel(AAccessLevel: TAccessLevel);
|
||||
begin
|
||||
case AAccessLevel of
|
||||
alNone: cbAccessLevel.ItemIndex := 0;
|
||||
alView: cbAccessLevel.ItemIndex := 1;
|
||||
alNormal: cbAccessLevel.ItemIndex := 2;
|
||||
alAdministrator: cbAccessLevel.ItemIndex := 3;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmEditAccount.lrs}
|
||||
|
||||
end.
|
||||
|
||||
38
Client/UfrmInitialize.lfm
Normal file
38
Client/UfrmInitialize.lfm
Normal file
@@ -0,0 +1,38 @@
|
||||
object frmInitialize: TfrmInitialize
|
||||
Left = 290
|
||||
Height = 65
|
||||
Top = 171
|
||||
Width = 241
|
||||
HorzScrollBar.Page = 240
|
||||
VertScrollBar.Page = 64
|
||||
BorderIcons = []
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Please wait ...'
|
||||
ClientHeight = 65
|
||||
ClientWidth = 241
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
object pnlMain: TPanel
|
||||
Left = 8
|
||||
Height = 50
|
||||
Top = 8
|
||||
Width = 226
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
ClientHeight = 50
|
||||
ClientWidth = 226
|
||||
TabOrder = 0
|
||||
object lblStatus: TLabel
|
||||
Left = 8
|
||||
Height = 32
|
||||
Top = 8
|
||||
Width = 208
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
end
|
||||
end
|
||||
96
Client/UfrmInitialize.pas
Normal file
96
Client/UfrmInitialize.pas
Normal file
@@ -0,0 +1,96 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmInitialize;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
StdCtrls, LCLIntf, LCLType, WSForms;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmInitialize }
|
||||
|
||||
TfrmInitialize = class(TForm)
|
||||
lblStatus: TLabel;
|
||||
pnlMain: TPanel;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
protected
|
||||
FActiveWindow: HWND;
|
||||
FModal: Boolean;
|
||||
public
|
||||
procedure SetModal;
|
||||
procedure UnsetModal;
|
||||
end;
|
||||
|
||||
var
|
||||
frmInitialize: TfrmInitialize;
|
||||
|
||||
implementation
|
||||
|
||||
{ TfrmInitialize }
|
||||
|
||||
procedure TfrmInitialize.FormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caNone;
|
||||
end;
|
||||
|
||||
procedure TfrmInitialize.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FModal := False;
|
||||
end;
|
||||
|
||||
procedure TfrmInitialize.SetModal;
|
||||
begin
|
||||
if FModal then Exit;
|
||||
FActiveWindow := GetActiveWindow;
|
||||
TWSCustomFormClass(WidgetSetClass).ShowModal(Self);
|
||||
{FormStyle := fsStayOnTop;
|
||||
Screen.MoveFormToFocusFront(Self);
|
||||
Screen.MoveFormToZFront(Self);}
|
||||
FModal := True;
|
||||
end;
|
||||
|
||||
procedure TfrmInitialize.UnsetModal;
|
||||
begin
|
||||
if not FModal then Exit;
|
||||
TWSCustomFormClass(WidgetSetClass).CloseModal(Self);
|
||||
if FActiveWindow <> 0 then SetActiveWindow(FActiveWindow);
|
||||
FActiveWindow := 0;
|
||||
//FormStyle := fsNormal;
|
||||
FModal := False;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmInitialize.lrs}
|
||||
|
||||
end.
|
||||
|
||||
1512
Client/UfrmLargeScaleCommand.lfm
Normal file
1512
Client/UfrmLargeScaleCommand.lfm
Normal file
File diff suppressed because it is too large
Load Diff
673
Client/UfrmLargeScaleCommand.pas
Normal file
673
Client/UfrmLargeScaleCommand.pas
Normal file
@@ -0,0 +1,673 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmLargeScaleCommand;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, CheckLst,
|
||||
VirtualTrees, ExtCtrls, ImagingComponents, StdCtrls, Buttons, Spin, LCLIntf,
|
||||
math, UPlatformTypes, UEnhancedMemoryStream;
|
||||
|
||||
type
|
||||
|
||||
TAreaMoveType = (amLeft, amTop, amRight, amBottom);
|
||||
TAreaMove = set of TAreaMoveType;
|
||||
|
||||
{ TfrmLargeScaleCommand }
|
||||
|
||||
TfrmLargeScaleCommand = class(TForm)
|
||||
btnClearTerrain: TSpeedButton;
|
||||
btnClearIStaticsTiles: TSpeedButton;
|
||||
btnClearDStaticsTiles: TSpeedButton;
|
||||
btnDeleteTerrain: TSpeedButton;
|
||||
btnDeleteIStaticsTiles: TSpeedButton;
|
||||
btnDeleteDStaticsTiles: TSpeedButton;
|
||||
btnExecute: TButton;
|
||||
btnClose: TButton;
|
||||
cbCMEraseTarget: TCheckBox;
|
||||
gbDrawTerrainTiles: TGroupBox;
|
||||
gbDeleteStaticsTiles: TGroupBox;
|
||||
gbInserStaticsTiles: TGroupBox;
|
||||
gbStaticsProbability: TGroupBox;
|
||||
gbStaticsPlacement: TGroupBox;
|
||||
GroupBox1: TGroupBox;
|
||||
gbCMOffset: TGroupBox;
|
||||
Label1: TLabel;
|
||||
Label10: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
lblDrawTerrainTilesDesc: TLabel;
|
||||
lblDeleteStaticsTilesDesc: TLabel;
|
||||
lblInsertStaticsTiles: TLabel;
|
||||
lblX: TLabel;
|
||||
lblY: TLabel;
|
||||
nbActions: TNotebook;
|
||||
pgCopyMove: TPage;
|
||||
pgDeleteStatics: TPage;
|
||||
pgInsertStatics: TPage;
|
||||
pgModifyAltitude: TPage;
|
||||
pnlControls: TPanel;
|
||||
pnlDrawTerrainTilesControls: TPanel;
|
||||
pnlAreaControls: TPanel;
|
||||
pnlDrawTerrainTilesControls1: TPanel;
|
||||
pnlDrawTerrainTilesControls2: TPanel;
|
||||
pnlLeft: TPanel;
|
||||
pbArea: TPaintBox;
|
||||
pgArea: TPage;
|
||||
pgDrawTerrain: TPage;
|
||||
rgCMAction: TRadioGroup;
|
||||
rbPlaceStaticsOnTerrain: TRadioButton;
|
||||
rbPlaceStaticsOnTop: TRadioButton;
|
||||
rbPlaceStaticsOnZ: TRadioButton;
|
||||
rbSetTerrainAltitude: TRadioButton;
|
||||
rbRelativeAltitudeChange: TRadioButton;
|
||||
sbArea: TScrollBox;
|
||||
btnAddArea: TSpeedButton;
|
||||
btnDeleteArea: TSpeedButton;
|
||||
seDeleteStaticsZ1: TSpinEdit;
|
||||
seDeleteStaticsZ2: TSpinEdit;
|
||||
seX1: TSpinEdit;
|
||||
seX2: TSpinEdit;
|
||||
seY1: TSpinEdit;
|
||||
seY2: TSpinEdit;
|
||||
btnClearArea: TSpeedButton;
|
||||
seTerrainAltitude1: TSpinEdit;
|
||||
seTerrainAltitude2: TSpinEdit;
|
||||
seRelativeAltitude: TSpinEdit;
|
||||
seStaticsProbability: TSpinEdit;
|
||||
seInsertStaticsZ: TSpinEdit;
|
||||
seCMOffsetX: TSpinEdit;
|
||||
seCMOffsetY: TSpinEdit;
|
||||
vdtTerrainTiles: TVirtualDrawTree;
|
||||
vdtInsertStaticsTiles: TVirtualDrawTree;
|
||||
vdtDeleteStaticsTiles: TVirtualDrawTree;
|
||||
vstArea: TVirtualStringTree;
|
||||
vstActions: TVirtualStringTree;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure btnAddAreaClick(Sender: TObject);
|
||||
procedure btnClearDStaticsTilesClick(Sender: TObject);
|
||||
procedure btnClearIStaticsTilesClick(Sender: TObject);
|
||||
procedure btnClearTerrainClick(Sender: TObject);
|
||||
procedure btnCloseClick(Sender: TObject);
|
||||
procedure btnDeleteDStaticsTilesClick(Sender: TObject);
|
||||
procedure btnDeleteIStaticsTilesClick(Sender: TObject);
|
||||
procedure btnDeleteTerrainClick(Sender: TObject);
|
||||
procedure btnExecuteClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure pbAreaMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure pbAreaMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer
|
||||
);
|
||||
procedure pbAreaPaint(Sender: TObject);
|
||||
procedure btnDeleteAreaClick(Sender: TObject);
|
||||
procedure btnClearAreaClick(Sender: TObject);
|
||||
procedure seX1Change(Sender: TObject);
|
||||
procedure vdtTerrainTilesDragDrop(Sender: TBaseVirtualTree; Source: TObject;
|
||||
DataObject: IDataObject; Formats: TFormatArray; Shift: TShiftState;
|
||||
Pt: TPoint; var Effect: Integer; Mode: TDropMode);
|
||||
procedure vdtTerrainTilesDragOver(Sender: TBaseVirtualTree; Source: TObject;
|
||||
Shift: TShiftState; State: TDragState; Pt: TPoint; Mode: TDropMode;
|
||||
var Effect: Integer; var Accept: Boolean);
|
||||
procedure vdtTerrainTilesDrawNode(Sender: TBaseVirtualTree;
|
||||
const PaintInfo: TVTPaintInfo);
|
||||
procedure vstActionsChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure vstActionsGetText(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
|
||||
var CellText: WideString);
|
||||
procedure vstActionsPaintText(Sender: TBaseVirtualTree;
|
||||
const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||
TextType: TVSTTextType);
|
||||
procedure vstAreaChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure vstAreaGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
|
||||
protected
|
||||
FLastX: Integer;
|
||||
FLastY: Integer;
|
||||
FAreaMove: TAreaMove;
|
||||
procedure AddNode(AActionID: Integer; ACaption: string);
|
||||
function FindNode(AActionID: Integer): PVirtualNode;
|
||||
procedure SerializeTiles(ATileList: TVirtualDrawTree;
|
||||
AStream: TEnhancedMemoryStream);
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmLargeScaleCommand: TfrmLargeScaleCommand;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UfrmRadar, UfrmMain, UdmNetwork, UPacket, UPackets,
|
||||
UGUIPlatformUtils;
|
||||
|
||||
type
|
||||
PNodeInfo = ^TNodeInfo;
|
||||
TNodeInfo = record
|
||||
ActionID: Integer;
|
||||
Caption: string;
|
||||
end;
|
||||
PTileInfo = ^TTileInfo;
|
||||
TTileInfo = record
|
||||
ID: Word;
|
||||
end;
|
||||
|
||||
{ TfrmLargeScaleCommand }
|
||||
|
||||
procedure TfrmLargeScaleCommand.FormCreate(Sender: TObject);
|
||||
begin
|
||||
vstActions.NodeDataSize := SizeOf(TNodeInfo);
|
||||
AddNode(-1, 'Target Area');
|
||||
AddNode(0, 'Copy/Move');
|
||||
AddNode(1, 'Modify altitude');
|
||||
AddNode(2, 'Draw terrain');
|
||||
AddNode(3, 'Delete statics');
|
||||
AddNode(4, 'Insert statics');
|
||||
vstActions.Selected[vstActions.GetFirst] := True;
|
||||
|
||||
vstArea.NodeDataSize := SizeOf(TRect);
|
||||
|
||||
pbArea.Width := frmRadarMap.Radar.Width;
|
||||
pbArea.Height := frmRadarMap.Radar.Height;
|
||||
seX1.MaxValue := ResMan.Landscape.CellWidth;
|
||||
seX2.MaxValue := ResMan.Landscape.CellWidth;
|
||||
seY1.MaxValue := ResMan.Landscape.CellHeight;
|
||||
seY2.MaxValue := ResMan.Landscape.CellHeight;
|
||||
|
||||
vdtTerrainTiles.NodeDataSize := SizeOf(TTileInfo);
|
||||
vdtInsertStaticsTiles.NodeDataSize := SizeOf(TTileInfo);
|
||||
vdtDeleteStaticsTiles.NodeDataSize := SizeOf(TTileInfo);
|
||||
|
||||
seCMOffsetX.MinValue := -ResMan.Landscape.CellWidth;
|
||||
seCMOffsetX.MaxValue := ResMan.Landscape.CellWidth;
|
||||
seCMOffsetY.MinValue := -ResMan.Landscape.CellHeight;
|
||||
seCMOffsetY.MaxValue := ResMan.Landscape.CellHeight;
|
||||
|
||||
frmRadarMap.Dependencies.Add(pbArea);
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmRadarMap.Dependencies.Remove(pbArea);
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.pbAreaMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
node, match: PVirtualNode;
|
||||
nodeInfo: ^TRect;
|
||||
p: TPoint;
|
||||
begin
|
||||
FAreaMove := [];
|
||||
p := Point(X * 8, Y * 8);
|
||||
match := nil;
|
||||
node := vstArea.GetFirst;
|
||||
while node <> nil do
|
||||
begin
|
||||
nodeInfo := vstArea.GetNodeData(node);
|
||||
if PtInRect(nodeInfo^, p) then
|
||||
match := node;
|
||||
node := vstArea.GetNext(node);
|
||||
end;
|
||||
if match <> nil then
|
||||
begin
|
||||
nodeInfo := vstArea.GetNodeData(match);
|
||||
if p.x - nodeInfo^.Left <= 64 then Include(FAreaMove, amLeft);
|
||||
if p.y - nodeInfo^.Top <= 64 then Include(FAreaMove, amTop);
|
||||
if nodeInfo^.Right - p.x <= 64 then Include(FAreaMove, amRight);
|
||||
if nodeInfo^.Bottom - p.y <= 64 then Include(FAreaMove, amBottom);
|
||||
if FAreaMove = [] then
|
||||
FAreaMove := [amLeft, amTop, amRight, amBottom];
|
||||
end else
|
||||
begin
|
||||
match := vstArea.AddChild(nil);
|
||||
nodeInfo := vstArea.GetNodeData(match);
|
||||
nodeInfo^.Left := p.x;
|
||||
nodeInfo^.Top := p.y;
|
||||
nodeInfo^.Right := p.x;
|
||||
nodeInfo^.Bottom := p.y;
|
||||
FAreaMove := [amRight, amBottom];
|
||||
end;
|
||||
vstArea.ClearSelection;
|
||||
vstArea.Selected[match] := True;
|
||||
FLastX := X;
|
||||
FLastY := Y;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.pbAreaMouseMove(Sender: TObject;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
node: PVirtualNode;
|
||||
nodeInfo: ^TRect;
|
||||
offsetX, offsetY: Integer;
|
||||
begin
|
||||
if (ssLeft in Shift) and (vstArea.GetFirstSelected <> nil) then
|
||||
begin
|
||||
offsetX := (X - FLastX) * 8;
|
||||
offsetY := (Y - FLastY) * 8;
|
||||
if amLeft in FAreaMove then seX1.Value := seX1.Value + offsetX;
|
||||
if amRight in FAreaMove then seX2.Value := seX2.Value + offsetX;
|
||||
if amTop in FAreaMove then seY1.Value := seY1.Value + offsetY;
|
||||
if amBottom in FAreaMove then seY2.Value := seY2.Value + offsetY;
|
||||
FLastX := X;
|
||||
FLastY := Y;
|
||||
seX1Change(nil);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnAddAreaClick(Sender: TObject);
|
||||
var
|
||||
node: PVirtualNode;
|
||||
nodeInfo: ^TRect;
|
||||
begin
|
||||
node := vstArea.AddChild(nil);
|
||||
nodeInfo := vstArea.GetNodeData(node);
|
||||
nodeInfo^.Left := 0;
|
||||
nodeInfo^.Top := 0;
|
||||
nodeInfo^.Right := 0;
|
||||
nodeInfo^.Bottom := 0;
|
||||
vstArea.ClearSelection;
|
||||
vstArea.Selected[node] := True;
|
||||
vstArea.FocusedNode := node;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.FormShow(Sender: TObject);
|
||||
begin
|
||||
SetWindowParent(Handle, frmMain.Handle);
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnClearDStaticsTilesClick(Sender: TObject);
|
||||
begin
|
||||
vdtDeleteStaticsTiles.Clear;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnClearIStaticsTilesClick(Sender: TObject);
|
||||
begin
|
||||
vdtInsertStaticsTiles.Clear;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnClearTerrainClick(Sender: TObject);
|
||||
begin
|
||||
vdtTerrainTiles.Clear;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnDeleteDStaticsTilesClick(Sender: TObject);
|
||||
begin
|
||||
vdtDeleteStaticsTiles.DeleteSelectedNodes;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnDeleteIStaticsTilesClick(Sender: TObject);
|
||||
begin
|
||||
vdtInsertStaticsTiles.DeleteSelectedNodes;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnDeleteTerrainClick(Sender: TObject);
|
||||
begin
|
||||
vdtTerrainTiles.DeleteSelectedNodes;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnExecuteClick(Sender: TObject);
|
||||
var
|
||||
packet: TPacket;
|
||||
stream: TEnhancedMemoryStream;
|
||||
areaCount: Byte;
|
||||
i: Integer;
|
||||
node: PVirtualNode;
|
||||
areaInfo: ^TRect;
|
||||
begin
|
||||
packet := TPacket.Create($0E, 0);
|
||||
stream := packet.Stream;
|
||||
stream.Position := stream.Size;
|
||||
|
||||
//Area
|
||||
areaCount := Min(vstArea.RootNodeCount, 255);
|
||||
stream.WriteByte(areaCount);
|
||||
if areaCount = 0 then Exit;
|
||||
i := 0;
|
||||
node := vstArea.GetFirst;
|
||||
while (node <> nil) and (i < areaCount) do
|
||||
begin
|
||||
areaInfo := vstArea.GetNodeData(node);
|
||||
stream.WriteWord(Min(areaInfo^.Left, areaInfo^.Right));
|
||||
stream.WriteWord(Min(areaInfo^.Top, areaInfo^.Bottom));
|
||||
stream.WriteWord(Max(areaInfo^.Left, areaInfo^.Right));
|
||||
stream.WriteWord(Max(areaInfo^.Top, areaInfo^.Bottom));
|
||||
node := vstArea.GetNext(node);
|
||||
Inc(i);
|
||||
end;
|
||||
|
||||
//Copy/Move
|
||||
node := FindNode(0);
|
||||
if vstActions.CheckState[node] = csCheckedNormal then
|
||||
begin
|
||||
stream.WriteBoolean(True);
|
||||
stream.WriteByte(rgCMAction.ItemIndex);
|
||||
stream.WriteInteger(seCMOffsetX.Value);
|
||||
stream.WriteInteger(seCMOffsetY.Value);
|
||||
stream.WriteBoolean(cbCMEraseTarget.Checked);
|
||||
end else
|
||||
stream.WriteBoolean(False);
|
||||
|
||||
//Modify altitude
|
||||
node := FindNode(1);
|
||||
if vstActions.CheckState[node] = csCheckedNormal then
|
||||
begin
|
||||
stream.WriteBoolean(True);
|
||||
if rbSetTerrainAltitude.Checked then
|
||||
begin
|
||||
stream.WriteByte(1);
|
||||
stream.WriteShortInt(Min(seTerrainAltitude1.Value, seTerrainAltitude2.Value));
|
||||
stream.WriteShortInt(Max(seTerrainAltitude1.Value, seTerrainAltitude2.Value));
|
||||
end else
|
||||
begin
|
||||
stream.WriteByte(2);
|
||||
stream.WriteShortInt(seRelativeAltitude.Value);
|
||||
end;
|
||||
end else
|
||||
stream.WriteBoolean(False);
|
||||
|
||||
//Draw terrain
|
||||
node := FindNode(2);
|
||||
if vstActions.CheckState[node] = csCheckedNormal then
|
||||
begin
|
||||
stream.WriteBoolean(True);
|
||||
SerializeTiles(vdtTerrainTiles, stream);
|
||||
end else
|
||||
stream.WriteBoolean(False);
|
||||
|
||||
//Delete statics
|
||||
node := FindNode(3);
|
||||
if vstActions.CheckState[node] = csCheckedNormal then
|
||||
begin
|
||||
stream.WriteBoolean(True);
|
||||
SerializeTiles(vdtDeleteStaticsTiles, stream);
|
||||
stream.WriteShortInt(Min(seDeleteStaticsZ1.Value, seDeleteStaticsZ2.Value));
|
||||
stream.WriteShortInt(Max(seDeleteStaticsZ1.Value, seDeleteStaticsZ2.Value));
|
||||
end else
|
||||
stream.WriteBoolean(False);
|
||||
|
||||
//Insert statics
|
||||
node := FindNode(4);
|
||||
if vstActions.CheckState[node] = csCheckedNormal then
|
||||
begin
|
||||
stream.WriteBoolean(True);
|
||||
SerializeTiles(vdtInsertStaticsTiles, stream);
|
||||
stream.WriteByte(seStaticsProbability.Value);
|
||||
if rbPlaceStaticsOnZ.Checked then
|
||||
begin
|
||||
stream.WriteByte(3);
|
||||
stream.WriteShortInt(seInsertStaticsZ.Value);
|
||||
end else if rbPlaceStaticsOnTerrain.Checked then
|
||||
stream.WriteByte(1)
|
||||
else
|
||||
stream.WriteByte(2);
|
||||
end else
|
||||
stream.WriteBoolean(False);
|
||||
|
||||
dmNetwork.Send(TCompressedPacket.Create(packet));
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.pbAreaPaint(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
node: PVirtualNode;
|
||||
nodeInfo: ^TRect;
|
||||
begin
|
||||
DisplayImage(pbArea.Canvas, 0, 0, frmRadarMap.Radar);
|
||||
pbArea.Canvas.Pen.Color := clRed;
|
||||
pbArea.Canvas.Brush.Color := clMaroon;
|
||||
pbArea.Canvas.Brush.Style := bsFDiagonal;
|
||||
node := vstArea.GetFirst;
|
||||
while node <> nil do
|
||||
begin
|
||||
if vstArea.Selected[node] then
|
||||
begin
|
||||
pbArea.Canvas.Pen.Width := 2;
|
||||
pbArea.Canvas.Pen.Style := psSolid;
|
||||
//pbArea.Canvas.Brush.Color := clRed;
|
||||
end else
|
||||
begin
|
||||
pbArea.Canvas.Pen.Width := 1;
|
||||
pbArea.Canvas.Pen.Style := psDot;
|
||||
//pbArea.Canvas.Brush.Color := clMaroon;
|
||||
end;
|
||||
nodeInfo := vstArea.GetNodeData(node);
|
||||
pbArea.Canvas.Rectangle(nodeInfo^.Left div 8, nodeInfo^.Top div 8,
|
||||
nodeInfo^.Right div 8 + 1, nodeInfo^.Bottom div 8 + 1);
|
||||
node := vstArea.GetNext(node);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnDeleteAreaClick(Sender: TObject);
|
||||
begin
|
||||
vstArea.DeleteSelectedNodes;
|
||||
vstAreaChange(vstArea, nil);
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.btnClearAreaClick(Sender: TObject);
|
||||
begin
|
||||
vstArea.Clear;
|
||||
vstAreaChange(vstArea, nil);
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.seX1Change(Sender: TObject);
|
||||
var
|
||||
node: PVirtualNode;
|
||||
nodeInfo: ^TRect;
|
||||
begin
|
||||
node := vstArea.GetFirstSelected;
|
||||
if node <> nil then
|
||||
begin
|
||||
nodeInfo := vstArea.GetNodeData(node);
|
||||
nodeInfo^.Left := seX1.Value;
|
||||
nodeInfo^.Right := seX2.Value;
|
||||
nodeInfo^.Top := seY1.Value;
|
||||
nodeInfo^.Bottom := seY2.Value;
|
||||
vstArea.InvalidateNode(node);
|
||||
pbArea.Repaint;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.vdtTerrainTilesDragDrop(Sender: TBaseVirtualTree;
|
||||
Source: TObject; DataObject: IDataObject; Formats: TFormatArray;
|
||||
Shift: TShiftState; Pt: TPoint; var Effect: Integer; Mode: TDropMode);
|
||||
var
|
||||
sourceTree: TVirtualDrawTree;
|
||||
selected, node: PVirtualNode;
|
||||
sourceTileInfo, targetTileInfo: PTileInfo;
|
||||
begin
|
||||
sourceTree := Source as TVirtualDrawTree;
|
||||
if (sourceTree <> Sender) and (sourceTree <> nil) and
|
||||
(sourceTree.Tag = 1) then
|
||||
begin
|
||||
Sender.BeginUpdate;
|
||||
selected := sourceTree.GetFirstSelected;
|
||||
while selected <> nil do
|
||||
begin
|
||||
sourceTileInfo := sourceTree.GetNodeData(selected);
|
||||
if ((Sender = vdtTerrainTiles) and (sourceTileInfo^.ID < $4000)) or
|
||||
((Sender = vdtInsertStaticsTiles) and (sourceTileInfo^.ID > $3FFF)) or
|
||||
((Sender = vdtDeleteStaticsTiles) and (sourceTileInfo^.ID > $3FFF)) then
|
||||
begin
|
||||
node := Sender.AddChild(nil);
|
||||
targetTileInfo := Sender.GetNodeData(node);
|
||||
targetTileInfo^.ID := sourceTileInfo^.ID;
|
||||
end;
|
||||
selected := sourceTree.GetNextSelected(selected);
|
||||
end;
|
||||
Sender.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.vdtTerrainTilesDragOver(Sender: TBaseVirtualTree;
|
||||
Source: TObject; Shift: TShiftState; State: TDragState; Pt: TPoint;
|
||||
Mode: TDropMode; var Effect: Integer; var Accept: Boolean);
|
||||
begin
|
||||
if (Source <> Sender) and (Source is TVirtualDrawTree) and
|
||||
(TVirtualDrawTree(Source).Tag = 1) then
|
||||
begin
|
||||
Accept := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.vdtTerrainTilesDrawNode(
|
||||
Sender: TBaseVirtualTree; const PaintInfo: TVTPaintInfo);
|
||||
begin
|
||||
frmMain.vdtTilesDrawNode(Sender, PaintInfo);
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.vstActionsChange(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode);
|
||||
var
|
||||
nodeInfo: PNodeInfo;
|
||||
begin
|
||||
if Sender.Selected[Node] then
|
||||
begin
|
||||
nodeInfo := Sender.GetNodeData(Node);
|
||||
nbActions.PageIndex := nodeInfo^.ActionID + 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.vstActionsGetText(
|
||||
Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
|
||||
TextType: TVSTTextType; var CellText: WideString);
|
||||
var
|
||||
nodeInfo: PNodeInfo;
|
||||
begin
|
||||
nodeInfo := Sender.GetNodeData(Node);
|
||||
CellText := nodeInfo^.Caption;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.vstActionsPaintText(Sender: TBaseVirtualTree;
|
||||
const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||
TextType: TVSTTextType);
|
||||
begin
|
||||
if Sender.Selected[Node] then
|
||||
TargetCanvas.Font.Style := TargetCanvas.Font.Style + [fsBold];
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.vstAreaChange(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode);
|
||||
var
|
||||
nodeInfo: ^TRect;
|
||||
selected: Boolean;
|
||||
begin
|
||||
selected := (Node <> nil) and Sender.Selected[Node];
|
||||
btnDeleteArea.Enabled := selected;
|
||||
lblX.Enabled := selected;
|
||||
lblY.Enabled := selected;
|
||||
seX1.Enabled := selected;
|
||||
seX2.Enabled := selected;
|
||||
seY1.Enabled := selected;
|
||||
seY2.Enabled := selected;
|
||||
if selected then
|
||||
begin
|
||||
nodeInfo := Sender.GetNodeData(Node);
|
||||
seX1.Value := nodeInfo^.Left;
|
||||
seX2.Value := nodeInfo^.Right;
|
||||
seY1.Value := nodeInfo^.Top;
|
||||
seY2.Value := nodeInfo^.Bottom;
|
||||
end;
|
||||
pbArea.Repaint;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.vstAreaGetText(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
|
||||
var CellText: WideString);
|
||||
var
|
||||
nodeInfo: ^TRect;
|
||||
begin
|
||||
nodeInfo := Sender.GetNodeData(Node);
|
||||
CellText := Format('(%d, %d), (%d, %d)', [nodeInfo^.Left, nodeInfo^.Top,
|
||||
nodeInfo^.Right, nodeInfo^.Bottom]);
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.AddNode(AActionID: Integer; ACaption: string);
|
||||
var
|
||||
node: PVirtualNode;
|
||||
nodeInfo: PNodeInfo;
|
||||
begin
|
||||
node := vstActions.AddChild(nil);
|
||||
nodeInfo := vstActions.GetNodeData(node);
|
||||
nodeInfo^.ActionID := AActionID;
|
||||
nodeInfo^.Caption := ACaption;
|
||||
if AActionID > -1 then
|
||||
vstActions.CheckType[node] := ctCheckBox;
|
||||
end;
|
||||
|
||||
function TfrmLargeScaleCommand.FindNode(AActionID: Integer): PVirtualNode;
|
||||
var
|
||||
node: PVirtualNode;
|
||||
nodeInfo: PNodeInfo;
|
||||
begin
|
||||
Result := nil;
|
||||
node := vstActions.GetFirst;
|
||||
while (node <> nil) and (Result = nil) do
|
||||
begin
|
||||
nodeInfo := vstActions.GetNodeData(node);
|
||||
if nodeInfo^.ActionID = AActionID then
|
||||
Result := node;
|
||||
node := vstActions.GetNext(node);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLargeScaleCommand.SerializeTiles(ATileList: TVirtualDrawTree;
|
||||
AStream: TEnhancedMemoryStream);
|
||||
var
|
||||
node: PVirtualNode;
|
||||
tileInfo: PTileInfo;
|
||||
begin
|
||||
AStream.WriteWord(ATileList.RootNodeCount);
|
||||
node := ATileList.GetFirst;
|
||||
while node <> nil do
|
||||
begin
|
||||
tileInfo := ATileList.GetNodeData(node);
|
||||
AStream.WriteWord(tileInfo^.ID);
|
||||
node := ATileList.GetNext(node);
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmLargeScaleCommand.lrs}
|
||||
|
||||
end.
|
||||
|
||||
632
Client/UfrmLogin.lfm
Normal file
632
Client/UfrmLogin.lfm
Normal file
@@ -0,0 +1,632 @@
|
||||
object frmLogin: TfrmLogin
|
||||
Left = 290
|
||||
Height = 265
|
||||
Top = 171
|
||||
Width = 489
|
||||
HorzScrollBar.Page = 488
|
||||
VertScrollBar.Page = 264
|
||||
ActiveControl = edHost
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'UO CentrED'
|
||||
ClientHeight = 265
|
||||
ClientWidth = 489
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
ShowInTaskBar = stAlways
|
||||
object lblCopyright: TLabel
|
||||
Height = 17
|
||||
Top = 248
|
||||
Width = 489
|
||||
Align = alBottom
|
||||
Alignment = taCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object gbConnection: TGroupBox
|
||||
Left = 8
|
||||
Height = 128
|
||||
Top = 8
|
||||
Width = 321
|
||||
Caption = 'Connection'
|
||||
ClientHeight = 128
|
||||
ClientWidth = 321
|
||||
TabOrder = 0
|
||||
object lblHost: TLabel
|
||||
Left = 30
|
||||
Height = 14
|
||||
Top = 9
|
||||
Width = 34
|
||||
Caption = 'Host:'
|
||||
ParentColor = False
|
||||
end
|
||||
object lblUsername: TLabel
|
||||
Left = 30
|
||||
Height = 14
|
||||
Top = 43
|
||||
Width = 69
|
||||
Caption = 'Username:'
|
||||
ParentColor = False
|
||||
end
|
||||
object lblPassword: TLabel
|
||||
Left = 30
|
||||
Height = 14
|
||||
Top = 77
|
||||
Width = 65
|
||||
Caption = 'Password:'
|
||||
ParentColor = False
|
||||
end
|
||||
object imgHost: TImage
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 9
|
||||
Width = 16
|
||||
AutoSize = True
|
||||
Picture.Data = {
|
||||
07545069786D61702E0A00002F2A2058504D202A2F0A73746174696320636861
|
||||
72202A64756D6D795B5D3D7B0A223136203136203132342032222C0A22517420
|
||||
63204E6F6E65222C0A22236E20632023333739343337222C0A22236D20632023
|
||||
343261313362222C0A22236620632023353661393530222C0A22233520632023
|
||||
363036303630222C0A22233420632023363336333633222C0A22235920632023
|
||||
363436343634222C0A22233320632023363736373637222C0A22235420632023
|
||||
363836383638222C0A22233220632023366236623662222C0A22234920632023
|
||||
366436643664222C0A22233120632023373037303730222C0A22237920632023
|
||||
373337333733222C0A22233020632023373437343734222C0A22237020632023
|
||||
373837383738222C0A22235A20632023373937393739222C0A22236820632023
|
||||
376537653765222C0A22232E20632023383438343834222C0A222E3020632023
|
||||
386138613861222C0A222E3220632023386238623862222C0A222E5A20632023
|
||||
386438643864222C0A222E5920632023386638663866222C0A222E5420632023
|
||||
393139313931222C0A222E4720632023393139313932222C0A222E4620632023
|
||||
393339333934222C0A222E4520632023393539353936222C0A222E4420632023
|
||||
393739373938222C0A222E4920632023393839383938222C0A22234A20632023
|
||||
396239623962222C0A222E7A20632023396539653965222C0A22237A20632023
|
||||
613261326132222C0A22235520632023613361336133222C0A22236520632023
|
||||
613463386130222C0A222E7020632023613561356135222C0A22237120632023
|
||||
613861386138222C0A222E6720632023616261626162222C0A22235220632023
|
||||
616561666237222C0A22235120632023616562316239222C0A22236920632023
|
||||
616661666166222C0A22234720632023616662316239222C0A222E6620632023
|
||||
623062306230222C0A22235020632023623062316239222C0A22234620632023
|
||||
623162326261222C0A22237720632023623162336262222C0A22234520632023
|
||||
623262346262222C0A22234B20632023623362336233222C0A22237620632023
|
||||
623362346262222C0A22234F20632023623362356264222C0A22234420632023
|
||||
623462356263222C0A22237520632023623462366264222C0A22232320632023
|
||||
623562356235222C0A22234320632023623562366265222C0A222E6520632023
|
||||
623662366236222C0A22237420632023623662376265222C0A22236C20632023
|
||||
623662386265222C0A22237320632023623762396330222C0A222E3820632023
|
||||
623862396330222C0A22236420632023623962616331222C0A222E3720632023
|
||||
623962626331222C0A22236320632023626162626332222C0A222E6420632023
|
||||
626262626262222C0A222E3620632023626262636333222C0A222E5220632023
|
||||
626262646333222C0A222E3520632023626362656334222C0A22234E20632023
|
||||
626462666335222C0A222E5120632023626562666335222C0A222E3420632023
|
||||
626562666336222C0A222E5020632023626663316336222C0A222E6320632023
|
||||
633063306330222C0A222E5820632023633063316337222C0A222E7820632023
|
||||
633163316337222C0A222E4F20632023633163326338222C0A222E7720632023
|
||||
633163336338222C0A222E4E20632023633263336338222C0A222E7620632023
|
||||
633363346361222C0A222E6220632023633463346334222C0A22235620632023
|
||||
633463356336222C0A222E4320632023633463366362222C0A222E7520632023
|
||||
633563366362222C0A222E4A20632023633663366336222C0A222E6120632023
|
||||
633963396339222C0A222E7420632023633963616366222C0A222E7120632023
|
||||
636263626362222C0A222E6820632023636363636363222C0A222E2320632023
|
||||
636463646364222C0A22235320632023636463656433222C0A22234820632023
|
||||
636563666434222C0A22237820632023636664306434222C0A22236F20632023
|
||||
643064316436222C0A22236720632023643164336437222C0A22234220632023
|
||||
643264326434222C0A222E3920632023643364336437222C0A22237220632023
|
||||
643364346435222C0A22235720632023643364346439222C0A22234C20632023
|
||||
643464346434222C0A222E3120632023643464356439222C0A22236B20632023
|
||||
643564356437222C0A222E5320632023643564366461222C0A222E4820632023
|
||||
643664376462222C0A22236220632023643864386439222C0A222E7920632023
|
||||
643864396463222C0A222E3320632023643964396461222C0A222E6E20632023
|
||||
646264626465222C0A222E6D20632023646264636466222C0A222E6920632023
|
||||
646364636463222C0A222E5720632023646364636464222C0A222E6C20632023
|
||||
646364636466222C0A222E6B20632023646364656531222C0A222E4D20632023
|
||||
646464646464222C0A22236120632023646564656465222C0A222E7220632023
|
||||
646664666466222C0A22234D20632023646664666531222C0A222E5620632023
|
||||
653065306530222C0A222E4C20632023653165316531222C0A222E4220632023
|
||||
653165316532222C0A222E6A20632023653365336536222C0A22235820632023
|
||||
653565356538222C0A222E4120632023653965396539222C0A222E7320632023
|
||||
656165616561222C0A22236A20632023656265626562222C0A222E5520632023
|
||||
656365636563222C0A222E6F20632023656365636565222C0A222E4B20632023
|
||||
656665666566222C0A22234120632023663066306630222C0A22517451745174
|
||||
5174517451745174517451745174517451745174517451745174222C0A225174
|
||||
51745174517451742E232E612E622E632E642E652E662E67517451745174222C
|
||||
0A2251745174517451742E682E692E6A2E6B2E6C2E6D2E6E2E6F2E7051745174
|
||||
5174222C0A225174517451742E712E722E732E742E752E762E772E782E792E7A
|
||||
517451745174222C0A22517451742E712E412E412E422E432E442E452E462E47
|
||||
2E482E49517451745174222C0A22517451742E4A2E4B2E4C2E4D2E4E2E4F2E50
|
||||
2E512E522E532E54517451745174222C0A22517451742E632E552E562E572E58
|
||||
2E472E592E5A2E302E312E32517451745174222C0A22517451742E642E552E72
|
||||
2E332E342E352E362E372E382E39232E517451745174222C0A22517451742323
|
||||
2E55236123622E52236323642365236623672368517451745174222C0A225174
|
||||
51742369236A2E4D236B2E372E38236C236D236E236F2370517451745174222C
|
||||
0A225174517423712E732E4D2372237323742375237623772378237951745174
|
||||
5174222C0A2251745174237A23412E5623422343234423452346234723482349
|
||||
517451745174222C0A2251745174234A234B234C234D234E234F235023512352
|
||||
23532354517451745174222C0A2251745174517451742E302355235623572348
|
||||
2353235323582359517451745174222C0A22517451745174517451745174235A
|
||||
233023312332233323342335517451745174222C0A2251745174517451745174
|
||||
51745174517451745174517451745174517451745174227D3B0A
|
||||
}
|
||||
end
|
||||
object imgUsername: TImage
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 43
|
||||
Width = 16
|
||||
AutoSize = True
|
||||
Picture.Data = {
|
||||
07545069786D61702E0A00002F2A2058504D202A2F0A73746174696320636861
|
||||
72202A64756D6D795B5D3D7B0A223136203136203132342032222C0A22517420
|
||||
63204E6F6E65222C0A222E3220632023316334366265222C0A222E5820632023
|
||||
316334386263222C0A22233420632023316633643966222C0A22235A20632023
|
||||
316634306130222C0A22236120632023316634396335222C0A222E3320632023
|
||||
316634636334222C0A22235920632023323035306233222C0A22233320632023
|
||||
323134316137222C0A22233220632023323234346162222C0A22233020632023
|
||||
323234356161222C0A22233120632023323234366163222C0A22235520632023
|
||||
323434396231222C0A22233520632023323434666232222C0A222E5120632023
|
||||
323533633661222C0A222E5720632023326433653638222C0A22235220632023
|
||||
333536306266222C0A22236D20632023343235303838222C0A22237820632023
|
||||
343338646666222C0A22236220632023343435343861222C0A22234D20632023
|
||||
346135656134222C0A222E6B20632023346232653133222C0A22237720632023
|
||||
346539376665222C0A22234B20632023353039666666222C0A22234920632023
|
||||
353339636665222C0A22237620632023353339656664222C0A22236A20632023
|
||||
353461306664222C0A22234A20632023353561336666222C0A22234820632023
|
||||
353761326665222C0A22234420632023353836363966222C0A22237520632023
|
||||
353961356665222C0A22236920632023353961386665222C0A22234720632023
|
||||
356161386665222C0A222E6420632023356233333135222C0A22234620632023
|
||||
356261636666222C0A222E7320632023356333333066222C0A22237420632023
|
||||
356461636665222C0A22236820632023356562316665222C0A222E3920632023
|
||||
356662366666222C0A22237120632023363062376666222C0A22235120632023
|
||||
363136313836222C0A22237320632023363162326665222C0A22235320632023
|
||||
363162396665222C0A22235420632023363262396665222C0A22237220632023
|
||||
363362366666222C0A222E3820632023363363306666222C0A22236720632023
|
||||
363462396665222C0A222E4120632023363633623131222C0A22236620632023
|
||||
363862666665222C0A222E3720632023363963396666222C0A222E7A20632023
|
||||
366234353232222C0A22235620632023366436343761222C0A22236520632023
|
||||
366463376665222C0A222E7820632023366534303135222C0A222E6A20632023
|
||||
373133653065222C0A222E7920632023373234343139222C0A222E3620632023
|
||||
373264346666222C0A222E7220632023373534313132222C0A22234C20632023
|
||||
373861656638222C0A22236B20632023376162376666222C0A222E6320632023
|
||||
376434323131222C0A22236C20632023383061396665222C0A22232E20632023
|
||||
383063316666222C0A22237920632023383238666263222C0A22234520632023
|
||||
383462626635222C0A222E7120632023383534633135222C0A222E7420632023
|
||||
383733653063222C0A222E6920632023383734613066222C0A222E6F20632023
|
||||
383734623066222C0A222E7020632023383734623131222C0A222E6220632023
|
||||
386134383066222C0A222E6E20632023386134613066222C0A222E2320632023
|
||||
386434383132222C0A222E6120632023393034623130222C0A222E4A20632023
|
||||
393235623261222C0A222E6820632023393335333131222C0A22237020632023
|
||||
393439656233222C0A222E6520632023393634653131222C0A222E6C20632023
|
||||
393734623066222C0A22236420632023393864316666222C0A222E6720632023
|
||||
393935383132222C0A222E5020632023396136323264222C0A222E6620632023
|
||||
396235383132222C0A222E4220632023396235653166222C0A222E6D20632023
|
||||
396635383132222C0A222E3520632023613465346666222C0A222E4920632023
|
||||
613736383233222C0A222E5220632023613736643334222C0A222E3020632023
|
||||
613837623464222C0A222E5A20632023613937623465222C0A22236320632023
|
||||
616263386663222C0A222E5620632023616537343334222C0A222E7520632023
|
||||
623839373763222C0A222E3120632023633364366633222C0A22232320632023
|
||||
633664376636222C0A22234120632023633737343239222C0A222E7720632023
|
||||
633839633731222C0A22234F20632023636137373261222C0A22235020632023
|
||||
636437393235222C0A22236E20632023636537633238222C0A22235720632023
|
||||
636537653265222C0A22234220632023643137643239222C0A222E4620632023
|
||||
643161393766222C0A22235820632023643361323664222C0A222E5920632023
|
||||
643465326634222C0A222E3420632023643665346636222C0A222E4720632023
|
||||
646662353839222C0A222E7620632023653462373861222C0A222E4520632023
|
||||
653562623865222C0A22236F20632023656162333738222C0A222E4C20632023
|
||||
656163636162222C0A22237A20632023656462383765222C0A22234320632023
|
||||
656562613832222C0A222E4B20632023656563616136222C0A222E4F20632023
|
||||
656563646137222C0A222E4820632023656564666364222C0A22234E20632023
|
||||
656662633833222C0A222E4420632023663163353937222C0A222E5520632023
|
||||
663663666135222C0A222E4D20632023663664306137222C0A222E4E20632023
|
||||
663664306138222C0A222E5420632023663764346166222C0A222E4320632023
|
||||
663765386439222C0A222E5320632023663863633963222C0A22517451745174
|
||||
5174517451745174517451745174517451745174517451745174222C0A225174
|
||||
517451745174517451742E232E612E622E632E6451745174517451745174222C
|
||||
0A22517451745174517451742E652E662E672E682E692E6A2E6B517451745174
|
||||
5174222C0A2251745174517451742E6C2E6D2E6E2E6F2E702E712E722E735174
|
||||
517451745174222C0A2251745174517451742E742E752E762E772E782E792E7A
|
||||
2E415174517451745174222C0A2251745174517451742E422E432E442E452E46
|
||||
2E472E482E495174517451745174222C0A2251745174517451742E4A2E4B2E4C
|
||||
2E4D2E4E2E4C2E4F2E505174517451745174222C0A2251745174517451742E51
|
||||
2E522E532E542E542E552E562E575174517451745174222C0A22517451745174
|
||||
51742E582E592E5A2E302E302E5A2E312E325174517451745174222C0A225174
|
||||
517451742E332E342E352E362E372E382E39232E23232361517451745174222C
|
||||
0A225174517423622363236423652366236723682369236A236B236C236D5174
|
||||
5174222C0A225174236E236F2370237123722373237423752376237723782379
|
||||
237A23415174222C0A22517423422343234423452346234723482349234A234B
|
||||
234C234D234E234F5174222C0A22517451742350235123522353235423542354
|
||||
2353235323552356235723585174222C0A2251745174517451742359235A2330
|
||||
233123322333233423355174517451745174222C0A2251745174517451745174
|
||||
51745174517451745174517451745174517451745174227D3B0A
|
||||
}
|
||||
end
|
||||
object imgPassword: TImage
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 77
|
||||
Width = 16
|
||||
AutoSize = True
|
||||
Picture.Data = {
|
||||
07545069786D6170DE0800002F2A2058504D202A2F0A73746174696320636861
|
||||
72202A64756D6D795B5D3D7B0A223136203136203130332032222C0A22517420
|
||||
63204E6F6E65222C0A22236F20632023623238383338222C0A22237620632023
|
||||
623538623339222C0A22234220632023623738643339222C0A22236420632023
|
||||
623838333333222C0A222E4E20632023626138363334222C0A22234820632023
|
||||
626139303361222C0A222E5820632023626238383335222C0A222E3820632023
|
||||
626638623335222C0A22236720632023633138653336222C0A22234B20632023
|
||||
633239353362222C0A22234120632023633838383331222C0A222E6B20632023
|
||||
633839353339222C0A22234720632023633938613332222C0A22236320632023
|
||||
636138613332222C0A22237520632023636138623332222C0A22236E20632023
|
||||
636238623332222C0A22234A20632023636339303333222C0A22234920632023
|
||||
643139363336222C0A222E4420632023643637633239222C0A22236520632023
|
||||
643637643239222C0A222E4D20632023643637663239222C0A222E5720632023
|
||||
643738313262222C0A222E3720632023643738323262222C0A22236620632023
|
||||
643838353263222C0A222E7720632023646139303330222C0A222E7120632023
|
||||
646439383332222C0A222E6A20632023646661313339222C0A222E6620632023
|
||||
646661623432222C0A22234320632023653161633432222C0A222E3420632023
|
||||
653361393365222C0A222E6F20632023653361633432222C0A222E2320632023
|
||||
653362303434222C0A222E4F20632023653362323435222C0A222E4520632023
|
||||
656163343666222C0A222E5020632023656163353736222C0A22237220632023
|
||||
656563353238222C0A22236B20632023656563383238222C0A22232320632023
|
||||
656663393262222C0A222E5620632023656663393332222C0A222E4B20632023
|
||||
656663643334222C0A222E4220632023663063653338222C0A222E3120632023
|
||||
663064323238222C0A22237120632023663164313339222C0A222E4720632023
|
||||
663164313364222C0A22237820632023663164363433222C0A222E5520632023
|
||||
663263653363222C0A222E5220632023663264363339222C0A222E4120632023
|
||||
663264363437222C0A22236120632023663364363364222C0A222E4A20632023
|
||||
663364373530222C0A22232E20632023663364383465222C0A222E7420632023
|
||||
663364613862222C0A22236C20632023663464373431222C0A22236A20632023
|
||||
663464383433222C0A222E3220632023663564343337222C0A22237920632023
|
||||
663564623438222C0A222E5320632023663564623464222C0A222E4820632023
|
||||
663564623564222C0A222E7520632023663564643439222C0A22237A20632023
|
||||
663565313832222C0A22237320632023663664633465222C0A222E4920632023
|
||||
663664663639222C0A222E3320632023663665303833222C0A22234520632023
|
||||
663665313766222C0A222E3020632023663665343762222C0A22236220632023
|
||||
663765313861222C0A22237420632023663765323835222C0A22236D20632023
|
||||
663765323839222C0A222E5420632023663765343635222C0A222E6C20632023
|
||||
663765343765222C0A222E4620632023663765353830222C0A222E7220632023
|
||||
663765353831222C0A222E7A20632023663765353832222C0A22234620632023
|
||||
663765363966222C0A22234420632023663765626334222C0A222E7920632023
|
||||
663865373839222C0A222E6720632023663865373864222C0A222E6D20632023
|
||||
663865393934222C0A222E6E20632023663865396263222C0A222E3920632023
|
||||
663965616162222C0A222E6320632023663965623965222C0A222E6820632023
|
||||
663965636131222C0A222E5120632023666165656163222C0A22236920632023
|
||||
666165656230222C0A22237020632023666165666262222C0A222E4C20632023
|
||||
666265663835222C0A222E5A20632023666266316262222C0A222E7320632023
|
||||
666266316263222C0A222E6420632023666266326265222C0A22237720632023
|
||||
666266346336222C0A222E3520632023666366336130222C0A222E3620632023
|
||||
666366356139222C0A222E4320632023666366356165222C0A222E6220632023
|
||||
666366356365222C0A222E7820632023666366376435222C0A222E6120632023
|
||||
666366386465222C0A222E7620632023666466386331222C0A222E7020632023
|
||||
666566636565222C0A22236820632023666566636630222C0A222E5920632023
|
||||
666566636631222C0A222E6520632023666666666665222C0A222E6920632023
|
||||
666666666666222C0A22517451745174517451745174517451742E232E232E23
|
||||
2E235174517451745174222C0A2251745174517451745174517451742E232E23
|
||||
2E612E612E232E23517451745174222C0A225174517451745174517451742E23
|
||||
2E232E622E632E642E652E232E6651745174222C0A2251745174517451745174
|
||||
2E232E232E622E672E682E232E232E692E6A2E6B5174222C0A22517451745174
|
||||
517451742E232E612E672E6C2E6D2E6E2E232E6F2E702E712E6B222C0A225174
|
||||
51745174517451742E232E642E6C2E6C2E722E6D2E732E742E752E762E77222C
|
||||
0A22517451745174517451742E232E782E792E6C2E6C2E6C2E7A2E412E422E43
|
||||
2E44222C0A22517451745174517451742E232E452E462E472E482E492E4A2E4B
|
||||
2E4C2E4D2E4E222C0A22517451742E232E232E4F2E502E512E522E532E542E55
|
||||
2E562E4C2E572E585174222C0A22517451742E232E592E5A2E302E312E322E33
|
||||
2E342E352E362E372E3851745174222C0A222E232E232E232E39232E23232361
|
||||
236223632364236523662367517451745174222C0A222E2323682369236A236B
|
||||
236C236D236E236F5174517451745174517451745174222C0A222E2323702371
|
||||
2372237323742375237651745174517451745174517451745174222C0A222E23
|
||||
237723782379237A23412342517451745174517451745174517451745174222C
|
||||
0A22234323442345234623472348517451745174517451745174517451745174
|
||||
5174222C0A2251742349234A236E234B51745174517451745174517451745174
|
||||
517451745174227D3B0A
|
||||
}
|
||||
end
|
||||
object edHost: TEdit
|
||||
Left = 101
|
||||
Height = 23
|
||||
Top = 5
|
||||
Width = 137
|
||||
TabOrder = 0
|
||||
Text = 'localhost'
|
||||
end
|
||||
object edUsername: TEdit
|
||||
Left = 101
|
||||
Height = 23
|
||||
Top = 39
|
||||
Width = 201
|
||||
TabOrder = 2
|
||||
end
|
||||
object edPassword: TEdit
|
||||
Left = 101
|
||||
Height = 23
|
||||
Top = 73
|
||||
Width = 201
|
||||
EchoMode = emPassword
|
||||
PasswordChar = '*'
|
||||
TabOrder = 3
|
||||
end
|
||||
object edPort: TSpinEdit
|
||||
Left = 246
|
||||
Height = 23
|
||||
Top = 5
|
||||
Width = 56
|
||||
MaxValue = 65565
|
||||
MinValue = 1024
|
||||
TabOrder = 1
|
||||
Value = 2597
|
||||
end
|
||||
end
|
||||
object gbActions: TGroupBox
|
||||
Left = 336
|
||||
Height = 96
|
||||
Top = 8
|
||||
Width = 145
|
||||
ClientHeight = 96
|
||||
ClientWidth = 145
|
||||
TabOrder = 2
|
||||
object btnOK: TButton
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 5
|
||||
Width = 128
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = '&OK'
|
||||
Default = True
|
||||
OnClick = btnOKClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object btnCancel: TButton
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 39
|
||||
Width = 128
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = '&Cancel'
|
||||
ModalResult = 2
|
||||
OnClick = btnCancelClick
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object gbData: TGroupBox
|
||||
Left = 8
|
||||
Height = 97
|
||||
Top = 144
|
||||
Width = 321
|
||||
Caption = 'Data files'
|
||||
ClientHeight = 97
|
||||
ClientWidth = 321
|
||||
TabOrder = 1
|
||||
object lblData: TLabel
|
||||
Left = 7
|
||||
Height = 32
|
||||
Top = 8
|
||||
Width = 304
|
||||
AutoSize = False
|
||||
Caption = 'Select the directory containing art.mul, artidx.mul, hues.mul, tiledata.mul, texmaps.mul and texidx.mul.'
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
object edData: TDirectoryEdit
|
||||
Left = 7
|
||||
Height = 23
|
||||
Top = 48
|
||||
Width = 280
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
ParentColor = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 336
|
||||
Height = 81
|
||||
Top = 112
|
||||
Width = 145
|
||||
Caption = 'Profiles'
|
||||
ClientHeight = 81
|
||||
ClientWidth = 145
|
||||
TabOrder = 3
|
||||
object btnSaveProfile: TSpeedButton
|
||||
Left = 86
|
||||
Height = 22
|
||||
Hint = 'Save profile'
|
||||
Top = 32
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
010C00002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A223136203136203135332032222C0A222E2E2063204E6F
|
||||
6E65222C0A222E2C20632023333636424243222C0A222E2D2063202333363642
|
||||
4242222C0A222E2A20632023333636414242222C0A222E612063202333393643
|
||||
4243222C0A222E6220632023334236454244222C0A222E632063202333413644
|
||||
4242222C0A222E6420632023333836424242222C0A222E652063202333453730
|
||||
4242222C0A222E6620632023443145304636222C0A222E672063202344314530
|
||||
4637222C0A222E6820632023463846424645222C0A222E692063202346374642
|
||||
4645222C0A222E6A20632023463646394644222C0A222E6B2063202346304635
|
||||
4643222C0A222E6C20632023454146304641222C0A222E6D2063202345444632
|
||||
4642222C0A222E6E20632023463746414644222C0A222E6F2063202345424631
|
||||
4642222C0A222E7020632023444645394638222C0A222E712063202342444430
|
||||
4543222C0A222E7220632023354538394339222C0A222E732063202344314446
|
||||
4636222C0A222E7420632023383041414539222C0A222E752063202346364641
|
||||
4645222C0A222E7620632023463646414644222C0A222E772063202336343843
|
||||
4338222C0A222E7820632023454546334642222C0A222E792063202345414631
|
||||
4642222C0A222E7A20632023463246364643222C0A222E412063202346314636
|
||||
4643222C0A222E4220632023453245434639222C0A222E432063202344424537
|
||||
4638222C0A222E4420632023424144304545222C0A222E452063202344304446
|
||||
4636222C0A222E4620632023374541384538222C0A222E472063202345394631
|
||||
4641222C0A222E4820632023454546344642222C0A222E492063202345384630
|
||||
4641222C0A222E4A20632023444445384638222C0A222E4B2063202344424536
|
||||
4637222C0A222E4C20632023374141334531222C0A222E4D2063202343334435
|
||||
4546222C0A222E4E20632023333536394237222C0A222E4F2063202343434444
|
||||
4635222C0A222E5020632023374541384537222C0A222E512063202336363844
|
||||
4339222C0A222E5220632023453946304641222C0A222E532063202346334638
|
||||
4644222C0A222E5420632023463846414645222C0A222E552063202345464634
|
||||
4643222C0A222E5620632023444645394639222C0A222E572063202344424537
|
||||
4637222C0A222E5820632023443945354637222C0A222E592063202337384132
|
||||
4530222C0A222E5A20632023413943324537222C0A222E302063202333353638
|
||||
4236222C0A222E3120632023433944434634222C0A222E322063202337444137
|
||||
4537222C0A222E3320632023453145434639222C0A222E342063202345334544
|
||||
4639222C0A222E3520632023454546344643222C0A222E362063202346334637
|
||||
4644222C0A222E3720632023453545444641222C0A222E382063202344384535
|
||||
4636222C0A222E3920632023373741304445222C0A222E402063202341344245
|
||||
4534222C0A222E2320632023333436374234222C0A222E3B2063202343374439
|
||||
4634222C0A222E3A20632023374441364536222C0A222E3D2063202336353844
|
||||
4339222C0A222E2B20632023363738454339222C0A222E252063202336433932
|
||||
4342222C0A222E2420632023364439324342222C0A222E282063202336393930
|
||||
4341222C0A222E2920632023363538434338222C0A222E5B2063202337343943
|
||||
4441222C0A222E5D20632023394642414531222C0A222C2E2063202333343636
|
||||
4233222C0A222C2C20632023433544384632222C0A222C2D2063202337424134
|
||||
4533222C0A222C2A20632023374141334533222C0A222C612063202337414134
|
||||
4533222C0A222C6220632023374241344532222C0A222C632063202337424133
|
||||
4532222C0A222C6420632023374241334531222C0A222C652063202337394132
|
||||
4531222C0A222C6620632023373741304446222C0A222C672063202337363946
|
||||
4445222C0A222C6820632023373439454444222C0A222C692063202337323943
|
||||
4442222C0A222C6A20632023373439444443222C0A222C6B2063202339414235
|
||||
4444222C0A222C6C20632023333436354231222C0A222C6D2063202343324435
|
||||
4632222C0A222C6E20632023373841314530222C0A222C6F2063202337353945
|
||||
4445222C0A222C7020632023373339424441222C0A222C712063202337333942
|
||||
4439222C0A222C7220632023393542304441222C0A222C732063202333333634
|
||||
4146222C0A222C7420632023424544324630222C0A222C752063202337414133
|
||||
4532222C0A222C7620632023373739464445222C0A222C772063202337363946
|
||||
4444222C0A222C7820632023373239424439222C0A222C792063202337313939
|
||||
4438222C0A222C7A20632023373039394436222C0A222C412063202338454142
|
||||
4435222C0A222C4220632023333336334144222C0A222C432063202333363641
|
||||
4241222C0A222C4420632023424244304546222C0A222C452063202337414132
|
||||
4532222C0A222C4620632023364439364433222C0A222C472063202338414137
|
||||
4432222C0A222C4820632023333236324142222C0A222C492063202342384345
|
||||
4546222C0A222C4A20632023463746414645222C0A222C4B2063202338384330
|
||||
3632222C0A222C4C20632023364139334346222C0A222C4D2063202338344133
|
||||
4345222C0A222C4E20632023333236314141222C0A222C4F2063202333383643
|
||||
4242222C0A222C5020632023423643434545222C0A222C512063202337414132
|
||||
4531222C0A222C5220632023433244434246222C0A222C532063202336383930
|
||||
4344222C0A222C5420632023383139454343222C0A222C552063202333323631
|
||||
4138222C0A222C5620632023333736424241222C0A222C572063202342334341
|
||||
4544222C0A222C5820632023374141324530222C0A222C592063202336353844
|
||||
4341222C0A222C5A20632023374339424339222C0A222C302063202333313630
|
||||
4137222C0A222C3120632023333536414241222C0A222C322063202341444336
|
||||
4542222C0A222C3320632023414443354541222C0A222C342063202337433941
|
||||
4338222C0A222C3520632023373939384337222C0A222C362063202333353639
|
||||
4239222C0A222C3720632023333536394238222C0A222C382063202333353638
|
||||
4237222C0A222C3920632023333536384235222C0A222C402063202333343636
|
||||
4232222C0A222C2320632023333336354230222C0A222C3B2063202333333634
|
||||
4145222C0A222C3A20632023333236334143222C0A222C3D2063202333323632
|
||||
4141222C0A222C2B20632023333236314139222C0A222C252063202333313630
|
||||
4138222C0A222C2420632023333136304136222C0A222C282063202333313631
|
||||
4138222C0A222E2E2E2C2E2C2E2C2E2C2E2D2E2D2E2A2E2A2E612E622E632E64
|
||||
2E652E2E2E2E222C0A222E2C2E662E672E682E692E6A2E6B2E6C2E6D2E6A2E6E
|
||||
2E6F2E702E712E722E2E222C0A222E2C2E732E742E752E762E772E782E792E7A
|
||||
2E682E412E422E432E442E712E65222C0A222E2C2E452E462E412E412E772E47
|
||||
2E482E6E2E6A2E492E4A2E4B2E4C2E4D2E4E222C0A222E2C2E4F2E502E492E49
|
||||
2E512E522E532E542E552E562E572E582E592E5A2E30222C0A222E2D2E312E32
|
||||
2E332E332E342E352E6E2E362E372E572E582E382E392E402E23222C0A222E2D
|
||||
2E3B2E3A2E772E3D2E2B2E252E242E282E292E772E772E772E5B2E5D2C2E222C
|
||||
0A222E2A2C2C2C2D2C2A2C612C622C632C642C652C662C672C682C692C6A2C6B
|
||||
2C6C222C0A222E2A2C6D2C2A2C2A2C632C632C622C652C6E2E392C6F2C6A2C70
|
||||
2C712C722C73222C0A222E2A2C742C752C752E4C2C632C642C6E2C762C772C6A
|
||||
2C782C792C7A2C412C42222C0A222C432C442C452E682E682E682E682E682E68
|
||||
2E682E682E682E682C462C472C48222C0A222E642C492C652C4A2C4B2C4B2C4B
|
||||
2C4B2C4B2C4B2C4B2C4B2E6A2C4C2C4D2C4E222C0A222C4F2C502C512C4A2C52
|
||||
2C522C522C522C522C522C522C522E6A2C532C542C55222C0A222C562C572C58
|
||||
2C4A2C4B2C4B2C4B2C4B2C4B2C4B2C4B2C4B2E6A2C592C5A2C30222C0A222C31
|
||||
2C322C332E682E682E682E682E682E682E682E682E682E682C342C352C30222C
|
||||
0A222C432C362C372C382C392E232C402C232C3B2C3A2C3D2C2B2C252C302C24
|
||||
2C28227D0A
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnSaveProfileClick
|
||||
ShowCaption = False
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object btnDeleteProfile: TSpeedButton
|
||||
Left = 111
|
||||
Height = 22
|
||||
Hint = 'Delete profile'
|
||||
Top = 32
|
||||
Width = 23
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
100800002F2A2058504D202A2F0A7374617469632063686172202A6772617068
|
||||
69635B5D203D207B0A2231362031362039302032222C0A222E2E2063204E6F6E
|
||||
65222C0A222E2C20632023464637373741222C0A222E2D206320234645373637
|
||||
39222C0A222E2A20632023463836313634222C0A222E61206320234639363836
|
||||
41222C0A222E6220632023463335313534222C0A222E63206320234646374538
|
||||
31222C0A222E6420632023464537453831222C0A222E65206320234644373137
|
||||
34222C0A222E6620632023463835463632222C0A222E67206320234642364436
|
||||
46222C0A222E6820632023464637433745222C0A222E69206320234645373137
|
||||
34222C0A222E6A20632023464537413744222C0A222E6B206320234646383738
|
||||
41222C0A222E6C20632023464437393743222C0A222E6D206320234642363936
|
||||
43222C0A222E6E20632023463835453631222C0A222E6F206320234641364336
|
||||
45222C0A222E7020632023464637413744222C0A222E71206320234637354636
|
||||
31222C0A222E7220632023463034363439222C0A222E73206320234643364236
|
||||
45222C0A222E7420632023464437343737222C0A222E75206320234646383238
|
||||
36222C0A222E7620632023464337333736222C0A222E77206320234638363236
|
||||
34222C0A222E7820632023463735443630222C0A222E79206320234641364136
|
||||
44222C0A222E7A20632023464637393742222C0A222E41206320234546343534
|
||||
38222C0A222E4220632023463936333636222C0A222E43206320234642364437
|
||||
30222C0A222E4420632023464637453830222C0A222E45206320234646374237
|
||||
45222C0A222E4620632023464637393743222C0A222E47206320234646373737
|
||||
39222C0A222E4820632023463735433545222C0A222E49206320234546343434
|
||||
37222C0A222E4A20632023463635413544222C0A222E4B206320234646373937
|
||||
44222C0A222E4C20632023464635423545222C0A222E4D206320234646353835
|
||||
42222C0A222E4E20632023464637343736222C0A222E4F206320234546343334
|
||||
36222C0A222E5020632023463735423544222C0A222E51206320234646373637
|
||||
39222C0A222E5220632023464635363539222C0A222E53206320234646353435
|
||||
37222C0A222E5420632023464637303732222C0A222E55206320234630343634
|
||||
38222C0A222E5620632023463635413543222C0A222E57206320234641363436
|
||||
37222C0A222E5820632023464637323734222C0A222E59206320234646373037
|
||||
33222C0A222E5A20632023464636453730222C0A222E30206320234646364336
|
||||
45222C0A222E3120632023463735353537222C0A222E32206320234545334433
|
||||
46222C0A222E3320632023463635393542222C0A222E34206320234641363336
|
||||
36222C0A222E3520632023464637313734222C0A222E36206320234636353835
|
||||
41222C0A222E3720632023454534313433222C0A222E38206320234543334333
|
||||
45222C0A222E3920632023463434443530222C0A222E40206320234646363736
|
||||
38222C0A222E2320632023463534453530222C0A222E3B206320234542333433
|
||||
36222C0A222E3A20632023463635383542222C0A222E3D206320234641363236
|
||||
35222C0A222E2B20632023464637303731222C0A222E25206320234636353635
|
||||
39222C0A222E2420632023454534303432222C0A222E28206320234539333233
|
||||
35222C0A222E2920632023463234353437222C0A222E5B206320234646363236
|
||||
33222C0A222E5D20632023463434383441222C0A222C2E206320234539324432
|
||||
46222C0A222C2C20632023463535363538222C0A222C2D206320234641363136
|
||||
33222C0A222C2A20632023463635353538222C0A222C61206320234544334634
|
||||
31222C0A222C6220632023453632413243222C0A222C63206320234631334634
|
||||
31222C0A222C6420632023463634413443222C0A222C65206320234541324633
|
||||
31222C0A222C6620632023463234433446222C0A222C67206320234544334534
|
||||
30222C0A222C6820632023453432323234222C0A222E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E
|
||||
2E2E2E2E2C2E2D2E2E2E2E2E2E2E2E2E2E2E2E2E2A2E612E622E2E2E2E222C0A
|
||||
222E2E2E2E2E2C2E632E642E652E2E2E2E2E2E2E2E2E662E672E682E662E2E2E
|
||||
2E222C0A222E2E2E2E2E692E6A2E6B2E6C2E6D2E2E2E2E2E6E2E6F2E702E712E
|
||||
722E2E2E2E222C0A222E2E2E2E2E2E2E732E742E752E762E772E782E792E7A2E
|
||||
782E412E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E422E432E442E452E462E
|
||||
472E482E492E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E4A2E4B2E
|
||||
4C2E4D2E4E2E4F2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E
|
||||
502E512E522E532E542E552E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E
|
||||
2E2E562E572E582E592E5A2E302E312E322E2E2E2E2E2E2E2E222C0A222E2E2E
|
||||
2E2E2E2E332E342E352E362E372E382E392E402E232E3B2E2E2E2E2E2E222C0A
|
||||
222E2E2E2E2E3A2E3D2E2B2E252E242E2E2E2E2E282E292E5B2E5D2C2E2E2E2E
|
||||
2E222C0A222E2E2E2E2C2C2C2D2C2A2C612E2E2E2E2E2E2E2E2C622C632C642C
|
||||
652E2E2E2E222C0A222E2E2E2E2E2E2C662C672E2E2E2E2E2E2E2E2E2E2E2E2C
|
||||
682C652E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = btnDeleteProfileClick
|
||||
ShowCaption = False
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object cbProfile: TComboBox
|
||||
Left = 6
|
||||
Height = 21
|
||||
Top = 8
|
||||
Width = 128
|
||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
||||
MaxLength = 0
|
||||
OnChange = cbProfileChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
187
Client/UfrmLogin.pas
Normal file
187
Client/UfrmLogin.pas
Normal file
@@ -0,0 +1,187 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmLogin;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
ExtCtrls, Spin, EditBtn, Buttons, IniFiles;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmLogin }
|
||||
|
||||
TfrmLogin = class(TForm)
|
||||
btnOK: TButton;
|
||||
btnCancel: TButton;
|
||||
cbProfile: TComboBox;
|
||||
edData: TDirectoryEdit;
|
||||
edHost: TEdit;
|
||||
edUsername: TEdit;
|
||||
edPassword: TEdit;
|
||||
gbConnection: TGroupBox;
|
||||
gbData: TGroupBox;
|
||||
gbActions: TGroupBox;
|
||||
GroupBox1: TGroupBox;
|
||||
imgHost: TImage;
|
||||
imgUsername: TImage;
|
||||
imgPassword: TImage;
|
||||
lblCopyright: TLabel;
|
||||
lblHost: TLabel;
|
||||
lblUsername: TLabel;
|
||||
lblPassword: TLabel;
|
||||
edPort: TSpinEdit;
|
||||
lblData: TLabel;
|
||||
btnSaveProfile: TSpeedButton;
|
||||
btnDeleteProfile: TSpeedButton;
|
||||
procedure btnCancelClick(Sender: TObject);
|
||||
procedure btnDeleteProfileClick(Sender: TObject);
|
||||
procedure btnOKClick(Sender: TObject);
|
||||
procedure btnSaveProfileClick(Sender: TObject);
|
||||
procedure cbProfileChange(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
protected
|
||||
FProfilePath: string;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmLogin: TfrmLogin;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UdmNetwork;
|
||||
|
||||
{$I version.inc}
|
||||
|
||||
{ TfrmLogin }
|
||||
|
||||
procedure TfrmLogin.btnCancelClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmLogin.btnDeleteProfileClick(Sender: TObject);
|
||||
begin
|
||||
if cbProfile.ItemIndex > -1 then
|
||||
begin
|
||||
DeleteFile(FProfilePath + cbProfile.Text + '.ini');
|
||||
cbProfile.Items.Delete(cbProfile.ItemIndex);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLogin.btnOKClick(Sender: TObject);
|
||||
var
|
||||
path: string;
|
||||
begin
|
||||
path := IncludeTrailingPathDelimiter(edData.Text);
|
||||
if (not FileExists(path + 'art.mul')) or
|
||||
(not FileExists(path + 'artidx.mul')) or
|
||||
(not FileExists(path + 'hues.mul')) or
|
||||
(not FileExists(path + 'tiledata.mul')) or
|
||||
(not FileExists(path + 'texmaps.mul')) or
|
||||
(not FileExists(path + 'texidx.mul')) then
|
||||
begin
|
||||
MessageDlg('Incorrect directory', 'The data path you specified does not seem to be correct.', mtWarning, [mbOK], 0);
|
||||
edData.SetFocus;
|
||||
Exit;
|
||||
end else
|
||||
ModalResult := mrOK;
|
||||
end;
|
||||
|
||||
procedure TfrmLogin.btnSaveProfileClick(Sender: TObject);
|
||||
var
|
||||
profileName: string;
|
||||
profile: TIniFile;
|
||||
begin
|
||||
profileName := cbProfile.Text;
|
||||
if InputQuery('Save profile', 'Enter the name of the profile:', profileName) then
|
||||
begin
|
||||
profile := TIniFile.Create(FProfilePath + profileName + '.ini');
|
||||
profile.WriteString('Connection', 'Host', edHost.Text);
|
||||
profile.WriteInteger('Connection', 'Port', edPort.Value);
|
||||
profile.WriteString('Connection', 'Username', edUsername.Text);
|
||||
profile.WriteString('Data', 'Path', edData.Text);
|
||||
profile.Free;
|
||||
cbProfile.ItemIndex := cbProfile.Items.IndexOf(profileName);
|
||||
if cbProfile.ItemIndex = -1 then
|
||||
begin
|
||||
cbProfile.Items.Add(profileName);
|
||||
cbProfile.ItemIndex := cbProfile.Items.Count - 1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLogin.cbProfileChange(Sender: TObject);
|
||||
var
|
||||
profile: TIniFile;
|
||||
begin
|
||||
if cbProfile.ItemIndex > -1 then
|
||||
begin
|
||||
profile := TIniFile.Create(FProfilePath + cbProfile.Text + '.ini');
|
||||
edHost.Text := profile.ReadString('Connection', 'Host', '');
|
||||
edPort.Value := profile.ReadInteger('Connection', 'Port', 2597);
|
||||
edUsername.Text := profile.ReadString('Connection', 'Username', '');
|
||||
edPassword.Text := '';
|
||||
edData.Text := profile.ReadString('Data', 'Path', '');
|
||||
edPassword.SetFocus;
|
||||
profile.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLogin.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
if ModalResult <> mrOK then
|
||||
dmNetwork.CheckClose(Self);
|
||||
end;
|
||||
|
||||
procedure TfrmLogin.FormCreate(Sender: TObject);
|
||||
var
|
||||
searchRec: TSearchRec;
|
||||
begin
|
||||
lblCopyright.Caption := Format('UO CentrED Client Version %s (c) %s', [ProductVersion, Copyright]);
|
||||
|
||||
FProfilePath := IncludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)) + 'Profiles' + PathDelim;
|
||||
if FindFirst(FProfilePath + '*.ini', faAnyFile, searchRec) = 0 then
|
||||
begin
|
||||
repeat
|
||||
cbProfile.Items.Add(ChangeFileExt(searchRec.Name, ''));
|
||||
until FindNext(searchRec) <> 0;
|
||||
end;
|
||||
FindClose(searchRec);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmLogin.lrs}
|
||||
|
||||
end.
|
||||
|
||||
2335
Client/UfrmMain.lfm
Normal file
2335
Client/UfrmMain.lfm
Normal file
File diff suppressed because it is too large
Load Diff
2129
Client/UfrmMain.pas
Normal file
2129
Client/UfrmMain.pas
Normal file
File diff suppressed because it is too large
Load Diff
54
Client/UfrmRadar.lfm
Normal file
54
Client/UfrmRadar.lfm
Normal file
@@ -0,0 +1,54 @@
|
||||
object frmRadarMap: TfrmRadarMap
|
||||
Left = 290
|
||||
Height = 360
|
||||
Top = 171
|
||||
Width = 479
|
||||
HorzScrollBar.Page = 478
|
||||
VertScrollBar.Page = 359
|
||||
Caption = 'Radar Map (1:8)'
|
||||
ClientHeight = 360
|
||||
ClientWidth = 479
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnResize = FormResize
|
||||
Position = poOwnerFormCenter
|
||||
ShowInTaskBar = stAlways
|
||||
object pnlBottom: TPanel
|
||||
Height = 21
|
||||
Top = 339
|
||||
Width = 479
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 21
|
||||
ClientWidth = 479
|
||||
TabOrder = 0
|
||||
object lblPosition: TLabel
|
||||
Left = 8
|
||||
Height = 21
|
||||
Width = 38
|
||||
Align = alLeft
|
||||
BorderSpacing.Left = 8
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object sbMain: TScrollBox
|
||||
Height = 339
|
||||
Width = 479
|
||||
HorzScrollBar.Page = 474
|
||||
HorzScrollBar.Range = 292
|
||||
VertScrollBar.Page = 334
|
||||
VertScrollBar.Range = 202
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object pbRadar: TPaintBox
|
||||
Height = 202
|
||||
Width = 292
|
||||
OnMouseDown = pbRadarMouseDown
|
||||
OnMouseMove = pbRadarMouseMove
|
||||
OnMouseLeave = pbRadarMouseLeave
|
||||
OnPaint = pbRadarPaint
|
||||
end
|
||||
end
|
||||
end
|
||||
246
Client/UfrmRadar.pas
Normal file
246
Client/UfrmRadar.pas
Normal file
@@ -0,0 +1,246 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmRadar;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
ImagingClasses, ImagingComponents, ImagingTypes, UEnhancedMemoryStream, crc,
|
||||
StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
TRadarColorMap = array of Word;
|
||||
|
||||
{ TfrmRadarMap }
|
||||
|
||||
TfrmRadarMap = class(TForm)
|
||||
lblPosition: TLabel;
|
||||
pbRadar: TPaintBox;
|
||||
pnlBottom: TPanel;
|
||||
sbMain: TScrollBox;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormResize(Sender: TObject);
|
||||
procedure pbRadarMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure pbRadarMouseLeave(Sender: TObject);
|
||||
procedure pbRadarMouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
procedure pbRadarPaint(Sender: TObject);
|
||||
protected
|
||||
FRadar: TSingleImage;
|
||||
FRadarDependencies: TList;
|
||||
procedure OnRadarHandlingPacket(ABuffer: TEnhancedMemoryStream);
|
||||
procedure RefreshRadar(ARadarMap: TRadarColorMap);
|
||||
procedure RepaintRadar;
|
||||
public
|
||||
property Radar: TSingleImage read FRadar;
|
||||
property Dependencies: TList read FRadarDependencies;
|
||||
end;
|
||||
|
||||
var
|
||||
frmRadarMap: TfrmRadarMap;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UdmNetwork, UGameResources, UPacketHandlers, UPackets, UfrmInitialize,
|
||||
UfrmMain, UGraphicHelper;
|
||||
|
||||
{ TfrmRadarMap }
|
||||
|
||||
procedure TfrmRadarMap.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FRadar := TSingleImage.CreateFromParams(ResMan.Landscape.Width,
|
||||
ResMan.Landscape.Height, ifA8R8G8B8);
|
||||
pbRadar.Width := FRadar.Width;
|
||||
pbRadar.Height := FRadar.Height;
|
||||
sbMain.ClientWidth := FRadar.Width;
|
||||
sbMain.ClientHeight := FRadar.Height;
|
||||
ClientWidth := sbMain.Width + sbMain.VertScrollBar.Size;
|
||||
ClientHeight := sbMain.Height + sbMain.HorzScrollBar.Size + pnlBottom.Height;
|
||||
Constraints.MaxWidth := Width;
|
||||
Constraints.MaxHeight := Height;
|
||||
|
||||
FRadarDependencies := TList.Create;
|
||||
|
||||
RegisterPacketHandler($0D, TPacketHandler.Create(0, @OnRadarHandlingPacket));
|
||||
|
||||
dmNetwork.Send(TRequestRadarChecksumPacket.Create);
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.FormDestroy(Sender: TObject);
|
||||
var
|
||||
radarMap: TRadarColorMap;
|
||||
x, y: Integer;
|
||||
radarMapFile: TFileStream;
|
||||
begin
|
||||
RegisterPacketHandler($0D, nil);
|
||||
|
||||
SetLength(radarMap, FRadar.Width * FRadar.Height);
|
||||
for x := 0 to FRadar.Width - 1 do
|
||||
for y := 0 to FRadar.Height - 1 do
|
||||
radarMap[x * FRadar.Height + y] := EncodeUOColor(PInteger(FRadar.PixelPointers[x, y])^);
|
||||
|
||||
radarMapFile := TFileStream.Create(IncludeTrailingPathDelimiter(
|
||||
ExtractFilePath(Application.ExeName)) + 'RadarMap.cache', fmCreate);
|
||||
radarMapFile.Write(radarMap[0], Length(radarMap) * SizeOf(Word));
|
||||
radarMapFile.Free;
|
||||
|
||||
if FRadarDependencies <> nil then FreeAndNil(FRadarDependencies);
|
||||
if FRadar <> nil then FreeAndNil(FRadar);
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.FormResize(Sender: TObject);
|
||||
begin
|
||||
sbMain.AutoScroll := (Width < Constraints.MaxWidth) or (Height < Constraints.MaxHeight);
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.pbRadarMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
frmMain.SetPos(X * 8, Y * 8);
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.pbRadarMouseLeave(Sender: TObject);
|
||||
begin
|
||||
lblPosition.Caption := '';
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.pbRadarMouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
begin
|
||||
lblPosition.Caption := Format('X: %d, Y: %d', [X * 8, Y * 8]);
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.pbRadarPaint(Sender: TObject);
|
||||
var
|
||||
posX, posY: Word;
|
||||
begin
|
||||
DisplayImage(pbRadar.Canvas, 0, 0, FRadar);
|
||||
posX := frmMain.X div 8;
|
||||
posY := frmMain.Y div 8;
|
||||
pbRadar.Canvas.Pen.Color := clBlack;
|
||||
pbRadar.Canvas.Pen.Style := psSolid;
|
||||
pbRadar.Canvas.Brush.Color := clRed;
|
||||
pbRadar.Canvas.Brush.Style := bsSolid;
|
||||
pbRadar.Canvas.Ellipse(posX - 3, posY - 3, posX + 3, posY + 3);
|
||||
{pbRadar.Canvas.Pen.Color := clRed;
|
||||
pbRadar.Canvas.Pen.Style := psDash;
|
||||
pbRadar.Canvas.Line(0, posY, pbRadar.Width, posY);
|
||||
pbRadar.Canvas.Line(posX, 0, posX, pbRadar.Height);}
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.OnRadarHandlingPacket(ABuffer: TEnhancedMemoryStream);
|
||||
var
|
||||
subID: Byte;
|
||||
checksum, realChecksum: Cardinal;
|
||||
radarMapFile: TFileStream;
|
||||
radarMapFileName: string;
|
||||
radarMap: TRadarColorMap;
|
||||
x, y: Integer;
|
||||
begin
|
||||
subID := ABuffer.ReadByte;
|
||||
case subID of
|
||||
$01: //checksum
|
||||
begin
|
||||
checksum := ABuffer.ReadCardinal;
|
||||
realChecksum := crc32(0, nil, 0);
|
||||
radarMapFileName := IncludeTrailingPathDelimiter(ExtractFilePath(
|
||||
Application.ExeName)) + 'RadarMap.cache';
|
||||
if FileExists(radarMapFileName) then
|
||||
begin
|
||||
radarMapFile := TFileStream.Create(radarMapFileName, fmOpenRead);
|
||||
SetLength(radarMap, radarMapFile.Size div SizeOf(Word));
|
||||
radarMapFile.Read(radarMap[0], radarMapFile.Size);
|
||||
radarMapFile.Free;
|
||||
|
||||
realChecksum := crc32(realChecksum, @radarMap[0], Length(radarMap) * SizeOf(Word));
|
||||
end;
|
||||
|
||||
if checksum <> realChecksum then
|
||||
begin
|
||||
frmInitialize.lblStatus.Caption := 'Updating Radar Map';
|
||||
frmInitialize.Show;
|
||||
frmInitialize.SetModal;
|
||||
//frmMain.Enabled := False;
|
||||
dmNetwork.Send(TRequestRadarMapPacket.Create);
|
||||
end else
|
||||
RefreshRadar(radarMap);
|
||||
end;
|
||||
$02: //radar map
|
||||
begin
|
||||
SetLength(radarMap, (ABuffer.Size - ABuffer.Position) div SizeOf(Word));
|
||||
ABuffer.Read(radarMap[0], Length(radarMap) * SizeOf(Word));
|
||||
RefreshRadar(radarMap);
|
||||
//frmMain.Enabled := True;
|
||||
frmInitialize.UnsetModal;
|
||||
frmInitialize.Hide;
|
||||
end;
|
||||
$03: //update radar
|
||||
begin
|
||||
x := ABuffer.ReadWord;
|
||||
y := ABuffer.ReadWord;
|
||||
PInteger(FRadar.PixelPointers[x, y])^ := DecodeUOColor(ABuffer.ReadWord);
|
||||
RepaintRadar;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.RefreshRadar(ARadarMap: TRadarColorMap);
|
||||
var
|
||||
x, y: Integer;
|
||||
begin
|
||||
for x := 0 to FRadar.Width - 1 do
|
||||
for y := 0 to FRadar.Height - 1 do
|
||||
PInteger(FRadar.PixelPointers[x, y])^ := DecodeUOColor(ARadarMap[x * FRadar.Height + y]);
|
||||
RepaintRadar;
|
||||
end;
|
||||
|
||||
procedure TfrmRadarMap.RepaintRadar;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
pbRadar.Repaint;
|
||||
for i := 0 to FRadarDependencies.Count - 1 do
|
||||
TWinControl(FRadarDependencies.Items[i]).Repaint;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmRadar.lrs}
|
||||
|
||||
end.
|
||||
|
||||
64
Client/UfrmTileInfo.lfm
Normal file
64
Client/UfrmTileInfo.lfm
Normal file
@@ -0,0 +1,64 @@
|
||||
object frmTileInfo: TfrmTileInfo
|
||||
Left = 290
|
||||
Height = 107
|
||||
Top = 171
|
||||
Width = 250
|
||||
HorzScrollBar.Page = 249
|
||||
VertScrollBar.Page = 106
|
||||
AutoSize = True
|
||||
BorderIcons = []
|
||||
BorderStyle = bsNone
|
||||
Caption = 'Tile info'
|
||||
ClientHeight = 107
|
||||
ClientWidth = 250
|
||||
Color = clInfoBk
|
||||
Constraints.MinWidth = 250
|
||||
Font.Color = clInfoText
|
||||
FormStyle = fsStayOnTop
|
||||
OnShow = FormShow
|
||||
object lblTileID: TLabel
|
||||
Left = 8
|
||||
Height = 17
|
||||
Top = 27
|
||||
Width = 234
|
||||
Align = alTop
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Right = 8
|
||||
BorderSpacing.Bottom = 8
|
||||
Font.Color = clInfoText
|
||||
Font.Style = [fsItalic]
|
||||
ParentColor = False
|
||||
end
|
||||
object lblFlags: TLabel
|
||||
Left = 8
|
||||
Height = 47
|
||||
Top = 52
|
||||
Width = 234
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 8
|
||||
Font.Color = clInfoText
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
object lblName: TLabel
|
||||
Left = 8
|
||||
Height = 17
|
||||
Top = 8
|
||||
Width = 234
|
||||
Align = alTop
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
BorderSpacing.Bottom = 2
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
end
|
||||
object tmHide: TTimer
|
||||
Enabled = False
|
||||
Interval = 5000
|
||||
OnTimer = tmHideTimer
|
||||
left = 216
|
||||
top = 8
|
||||
end
|
||||
end
|
||||
186
Client/UfrmTileInfo.pas
Normal file
186
Client/UfrmTileInfo.pas
Normal file
@@ -0,0 +1,186 @@
|
||||
(*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* http://www.opensource.org/licenses/cddl1.php.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at
|
||||
* http://www.opensource.org/licenses/cddl1.php. If applicable,
|
||||
* add the following below this CDDL HEADER, with the fields enclosed
|
||||
* by brackets "[]" replaced with your own identifying * information:
|
||||
* Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*
|
||||
*
|
||||
* Portions Copyright 2007 Andreas Schneider
|
||||
*)
|
||||
unit UfrmTileInfo;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
ExtCtrls, LCLIntf, LCLType, LMessages, strutils;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmTileInfo }
|
||||
|
||||
TfrmTileInfo = class(TForm)
|
||||
lblName: TLabel;
|
||||
lblFlags: TLabel;
|
||||
lblTileID: TLabel;
|
||||
tmHide: TTimer;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure tmHideTimer(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
procedure Update(ATileID: Word);
|
||||
//procedure Show; overload; reintroduce;
|
||||
procedure Show(ATileID: Word); overload;
|
||||
end;
|
||||
|
||||
var
|
||||
frmTileInfo: TfrmTileInfo;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UGameResources, UTiledata;
|
||||
|
||||
{ TfrmTileInfo }
|
||||
|
||||
procedure TfrmTileInfo.tmHideTimer(Sender: TObject);
|
||||
begin
|
||||
tmHide.Enabled := False;
|
||||
Hide;
|
||||
end;
|
||||
|
||||
procedure TfrmTileInfo.FormShow(Sender: TObject);
|
||||
begin
|
||||
tmHide.Enabled := True;
|
||||
Left := Mouse.CursorPos.x + 8;
|
||||
Top := Mouse.CursorPos.y + 8;
|
||||
end;
|
||||
|
||||
procedure TfrmTileInfo.Update(ATileID: Word);
|
||||
var
|
||||
tileData: TTiledata;
|
||||
prefix, flags: string;
|
||||
|
||||
procedure UpdateFlags(AFlag: LongWord; AName: string);
|
||||
begin
|
||||
if tileData.HasFlag(AFlag) then
|
||||
begin
|
||||
if flags <> '' then
|
||||
flags := flags + ', ' + AName
|
||||
else
|
||||
flags := AName;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
if Visible then
|
||||
begin
|
||||
Left := Mouse.CursorPos.x + 8;
|
||||
Top := Mouse.CursorPos.y + 8;
|
||||
end;
|
||||
|
||||
flags := '';
|
||||
|
||||
if ATileID < $4000 then
|
||||
begin
|
||||
tileData := ResMan.Tiledata.LandTiles[ATileID];
|
||||
if TLandTiledata(tileData).TextureID > 0 then
|
||||
flags := 'Stretchable';
|
||||
end else
|
||||
begin
|
||||
Dec(ATileID, $4000);
|
||||
tileData := ResMan.Tiledata.StaticTiles[ATileID];
|
||||
end;
|
||||
|
||||
if tileData.HasFlag(tdfArticleA) then
|
||||
prefix := 'a '
|
||||
else if tileData.HasFlag(tdfArticleAn) then
|
||||
prefix := 'an '
|
||||
else
|
||||
prefix := '';
|
||||
|
||||
lblName.Caption := AnsiProperCase(Format('%s%s', [prefix, tileData.TileName]), [' ']);
|
||||
lblTileID.Caption := Format('Tile ID: $%x (%0:d)', [ATileID]);
|
||||
|
||||
UpdateFlags(tdfBackground, 'Background');
|
||||
UpdateFlags(tdfWeapon, 'Weapon');
|
||||
UpdateFlags(tdfTransparent, 'Transparent');
|
||||
UpdateFlags(tdfTranslucent, 'Translucent');
|
||||
UpdateFlags(tdfWall, 'Wall');
|
||||
UpdateFlags(tdfDamaging, 'Damaging');
|
||||
UpdateFlags(tdfImpassable, 'Impassable');
|
||||
UpdateFlags(tdfWet, 'Wet');
|
||||
UpdateFlags(tdfSurface, 'Surface');
|
||||
UpdateFlags(tdfBridge, 'Bridge');
|
||||
UpdateFlags(tdfGeneric, 'Generic');
|
||||
UpdateFlags(tdfWindow, 'Window');
|
||||
UpdateFlags(tdfNoShoot, 'NoShoot');
|
||||
UpdateFlags(tdfInternal, 'Internal');
|
||||
UpdateFlags(tdfFoliage, 'Foliage');
|
||||
UpdateFlags(tdfPartialHue, 'PartialHue');
|
||||
UpdateFlags(tdfMap, 'Map');
|
||||
UpdateFlags(tdfContainer, 'Container');
|
||||
UpdateFlags(tdfWearable, 'Wearable');
|
||||
UpdateFlags(tdfLightSource, 'Lightsource');
|
||||
UpdateFlags(tdfAnimation, 'Animation');
|
||||
UpdateFlags(tdfNoDiagonal, 'NoDiagonal');
|
||||
UpdateFlags(tdfArmor, 'Armor');
|
||||
UpdateFlags(tdfRoof, 'Roof');
|
||||
UpdateFlags(tdfDoor, 'Door');
|
||||
UpdateFlags(tdfStairBack, 'StairBack');
|
||||
UpdateFlags(tdfStairRight, 'StairRight');
|
||||
|
||||
lblFlags.Caption := Format('Flags = [%s]', [flags]);
|
||||
|
||||
if tmHide.Enabled then
|
||||
begin
|
||||
tmHide.Enabled := False;
|
||||
tmHide.Enabled := True; //Refresh timer
|
||||
end;
|
||||
end;
|
||||
|
||||
{procedure TfrmTileInfo.Show;
|
||||
begin
|
||||
ShowWindow(Handle, SW_SHOWNOACTIVATE);
|
||||
Include(FormState, fsVisible);
|
||||
VisibleChanging;
|
||||
try
|
||||
Perform(CM_VISIBLECHANGED, WParam(Ord(True)), 0);
|
||||
AdjustSize;
|
||||
RequestAlign;
|
||||
finally
|
||||
VisibleChanged;
|
||||
end;
|
||||
//FormShow(Self);
|
||||
end;}
|
||||
|
||||
procedure TfrmTileInfo.Show(ATileID: Word);
|
||||
begin
|
||||
Update(ATileID);
|
||||
Show;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmTileInfo.lrs}
|
||||
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user