- Several code cleanups
- Fixed TArt.RefreshBuffer using the wrong variable (j <> i) - Suppressed some hints
This commit is contained in:
parent
13264d3251
commit
c41fd3be95
|
@ -13,7 +13,7 @@ object frmFilter: TfrmFilter
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
LCLVersion = '0.9.27'
|
LCLVersion = '0.9.29'
|
||||||
object rgFilterType: TRadioGroup
|
object rgFilterType: TRadioGroup
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 40
|
Height = 40
|
||||||
|
@ -31,8 +31,8 @@ object frmFilter: TfrmFilter
|
||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 2
|
ChildSizing.ControlsPerLine = 2
|
||||||
ClientHeight = 26
|
ClientHeight = 22
|
||||||
ClientWidth = 222
|
ClientWidth = 220
|
||||||
Columns = 2
|
Columns = 2
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
|
@ -50,8 +50,8 @@ object frmFilter: TfrmFilter
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
Caption = 'Tile filter'
|
Caption = 'Tile filter'
|
||||||
ClientHeight = 245
|
ClientHeight = 241
|
||||||
ClientWidth = 222
|
ClientWidth = 220
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
AnchorSideLeft.Control = GroupBox1
|
AnchorSideLeft.Control = GroupBox1
|
||||||
|
@ -60,9 +60,9 @@ object frmFilter: TfrmFilter
|
||||||
AnchorSideRight.Control = GroupBox1
|
AnchorSideRight.Control = GroupBox1
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 30
|
Height = 27
|
||||||
Top = 30
|
Top = 27
|
||||||
Width = 214
|
Width = 212
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
Caption = 'Drag and Drop static tiles from the tile list on this list to add them to the filter.'
|
Caption = 'Drag and Drop static tiles from the tile list on this list to add them to the filter.'
|
||||||
|
@ -79,7 +79,7 @@ object frmFilter: TfrmFilter
|
||||||
Left = 30
|
Left = 30
|
||||||
Height = 22
|
Height = 22
|
||||||
Hint = 'Clear'
|
Hint = 'Clear'
|
||||||
Top = 219
|
Top = 215
|
||||||
Width = 22
|
Width = 22
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
|
@ -131,7 +131,7 @@ object frmFilter: TfrmFilter
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 22
|
Height = 22
|
||||||
Hint = 'Delete'
|
Hint = 'Delete'
|
||||||
Top = 219
|
Top = 215
|
||||||
Width = 22
|
Width = 22
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
|
@ -187,9 +187,9 @@ object frmFilter: TfrmFilter
|
||||||
AnchorSideBottom.Control = btnDelete
|
AnchorSideBottom.Control = btnDelete
|
||||||
Cursor = 63
|
Cursor = 63
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 151
|
Height = 153
|
||||||
Top = 64
|
Top = 58
|
||||||
Width = 214
|
Width = 212
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
|
@ -226,9 +226,9 @@ object frmFilter: TfrmFilter
|
||||||
AnchorSideLeft.Control = GroupBox1
|
AnchorSideLeft.Control = GroupBox1
|
||||||
AnchorSideTop.Control = GroupBox1
|
AnchorSideTop.Control = GroupBox1
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 22
|
Height = 19
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 85
|
Width = 78
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
Caption = 'Filter active'
|
Caption = 'Filter active'
|
||||||
OnChange = cbTileFilterChange
|
OnChange = cbTileFilterChange
|
||||||
|
@ -243,14 +243,14 @@ object frmFilter: TfrmFilter
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
Caption = 'Hue filter'
|
Caption = 'Hue filter'
|
||||||
ClientHeight = 154
|
ClientHeight = 150
|
||||||
ClientWidth = 222
|
ClientWidth = 220
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object cbHueFilter: TCheckBox
|
object cbHueFilter: TCheckBox
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 22
|
Height = 19
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 214
|
Width = 212
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
Caption = 'Filter active'
|
Caption = 'Filter active'
|
||||||
|
@ -260,9 +260,9 @@ object frmFilter: TfrmFilter
|
||||||
object vdtHues: TVirtualDrawTree
|
object vdtHues: TVirtualDrawTree
|
||||||
Cursor = 63
|
Cursor = 63
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 120
|
Height = 119
|
||||||
Top = 30
|
Top = 27
|
||||||
Width = 214
|
Width = 212
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
|
@ -280,7 +280,7 @@ object frmFilter: TfrmFilter
|
||||||
item
|
item
|
||||||
Position = 2
|
Position = 2
|
||||||
Text = 'Name'
|
Text = 'Name'
|
||||||
Width = 154
|
Width = 150
|
||||||
end>
|
end>
|
||||||
Header.DefaultHeight = 17
|
Header.DefaultHeight = 17
|
||||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
||||||
|
|
|
@ -32,7 +32,7 @@ interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||||
ExtCtrls, VirtualTrees, LCLIntf, LMessages, Buttons, UPlatformTypes, UStatics,
|
ExtCtrls, VirtualTrees, LCLIntf, LMessages, Buttons, UPlatformTypes, UStatics,
|
||||||
PairSplitter, Menus;
|
Menus;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
|
|
@ -497,6 +497,7 @@ end;
|
||||||
function TSeperatedStaticBlock.Clone: TSeperatedStaticBlock;
|
function TSeperatedStaticBlock.Clone: TSeperatedStaticBlock;
|
||||||
begin
|
begin
|
||||||
raise Exception.Create('TSeperatedStaticBlock.Clone is not implemented (yet).');
|
raise Exception.Create('TSeperatedStaticBlock.Clone is not implemented (yet).');
|
||||||
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSeperatedStaticBlock.GetSize: Integer;
|
function TSeperatedStaticBlock.GetSize: Integer;
|
||||||
|
@ -1375,7 +1376,6 @@ function TScreenBuffer.Find(AScreenPosition: TPoint): PBlockInfo;
|
||||||
var
|
var
|
||||||
current: PBlockInfo;
|
current: PBlockInfo;
|
||||||
buff: array[0..3] of GLuint;
|
buff: array[0..3] of GLuint;
|
||||||
hits: GLint;
|
|
||||||
begin
|
begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
current := FShortCuts[0];
|
current := FShortCuts[0];
|
||||||
|
@ -1586,8 +1586,6 @@ end;
|
||||||
{ TGLText }
|
{ TGLText }
|
||||||
|
|
||||||
constructor TGLText.Create(AFont: TGLFont; AText: String);
|
constructor TGLText.Create(AFont: TGLFont; AText: String);
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
begin
|
||||||
FFont := AFont;
|
FFont := AFont;
|
||||||
FText := AText;
|
FText := AText;
|
||||||
|
@ -1598,7 +1596,6 @@ end;
|
||||||
procedure TGLText.Render(AScreenRect: TRect);
|
procedure TGLText.Render(AScreenRect: TRect);
|
||||||
var
|
var
|
||||||
x, y: Integer;
|
x, y: Integer;
|
||||||
i: Integer;
|
|
||||||
begin
|
begin
|
||||||
y := AScreenRect.Top + (AScreenRect.Bottom - AScreenRect.Top - FHeight) div 2;
|
y := AScreenRect.Top + (AScreenRect.Bottom - AScreenRect.Top - FHeight) div 2;
|
||||||
x := AScreenRect.Left + (AScreenRect.Right - AScreenRect.Left - FWidth) div 2;
|
x := AScreenRect.Left + (AScreenRect.Right - AScreenRect.Left - FWidth) div 2;
|
||||||
|
|
|
@ -56,11 +56,11 @@ procedure RegisterPacketHandler(AID: Byte; APacketHandler: TPacketHandler);
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
UPackets, UAdminHandling;
|
UAdminHandling;
|
||||||
|
|
||||||
procedure RegisterPacketHandler(AID: Byte; APacketHandler: TPacketHandler);
|
procedure RegisterPacketHandler(AID: Byte; APacketHandler: TPacketHandler);
|
||||||
begin
|
begin
|
||||||
if Assigned(PacketHandlers[AID]) then FreeAndNil(PacketHandlers[AID]);
|
FreeAndNil(PacketHandlers[AID]);
|
||||||
PacketHandlers[AID] := APacketHandler;
|
PacketHandlers[AID] := APacketHandler;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ unit UPackets;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, dzlib, UEnhancedMemoryStream, UPacket, UMap, UStatics;
|
Classes, dzlib, UEnhancedMemoryStream, UPacket, UStatics;
|
||||||
|
|
||||||
type
|
type
|
||||||
TBlockCoords = packed record
|
TBlockCoords = packed record
|
||||||
|
@ -195,8 +195,6 @@ end;
|
||||||
{ TRequestBlocksPacket }
|
{ TRequestBlocksPacket }
|
||||||
|
|
||||||
constructor TRequestBlocksPacket.Create(ACoords: TBlockCoordsArray);
|
constructor TRequestBlocksPacket.Create(ACoords: TBlockCoordsArray);
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
begin
|
||||||
inherited Create($04, 0);
|
inherited Create($04, 0);
|
||||||
FStream.Write(ACoords[0], Length(ACoords) * SizeOf(TBlockCoords));
|
FStream.Write(ACoords[0], Length(ACoords) * SizeOf(TBlockCoords));
|
||||||
|
|
|
@ -36,7 +36,7 @@ type
|
||||||
|
|
||||||
{ TResourceManager }
|
{ TResourceManager }
|
||||||
|
|
||||||
TResourceManager = class(TObject)
|
TResourceManager = class
|
||||||
constructor Create(AFileName: string);
|
constructor Create(AFileName: string);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -5,7 +5,7 @@ object frmMain: TfrmMain
|
||||||
Width = 766
|
Width = 766
|
||||||
ActiveControl = oglGameWindow
|
ActiveControl = oglGameWindow
|
||||||
Caption = 'UO CentrED'
|
Caption = 'UO CentrED'
|
||||||
ClientHeight = 580
|
ClientHeight = 583
|
||||||
ClientWidth = 766
|
ClientWidth = 766
|
||||||
Constraints.MinHeight = 603
|
Constraints.MinHeight = 603
|
||||||
Constraints.MinWidth = 766
|
Constraints.MinWidth = 766
|
||||||
|
@ -23,7 +23,7 @@ object frmMain: TfrmMain
|
||||||
object pnlBottom: TPanel
|
object pnlBottom: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 31
|
Height = 31
|
||||||
Top = 549
|
Top = 552
|
||||||
Width = 766
|
Width = 766
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
|
@ -34,7 +34,7 @@ object frmMain: TfrmMain
|
||||||
Left = 11
|
Left = 11
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 11
|
Width = 10
|
||||||
Caption = 'X:'
|
Caption = 'X:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
|
@ -42,7 +42,7 @@ object frmMain: TfrmMain
|
||||||
Left = 88
|
Left = 88
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 10
|
Width = 9
|
||||||
Caption = 'Y:'
|
Caption = 'Y:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
|
@ -55,10 +55,10 @@ object frmMain: TfrmMain
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object lblTip: TLabel
|
object lblTip: TLabel
|
||||||
Left = 528
|
Left = 534
|
||||||
Height = 31
|
Height = 31
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 230
|
Width = 224
|
||||||
Align = alRight
|
Align = alRight
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
|
@ -67,10 +67,10 @@ object frmMain: TfrmMain
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object lblTipC: TLabel
|
object lblTipC: TLabel
|
||||||
Left = 498
|
Left = 511
|
||||||
Height = 31
|
Height = 31
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 23
|
||||||
Align = alRight
|
Align = alRight
|
||||||
Caption = 'Tip: '
|
Caption = 'Tip: '
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
|
@ -81,7 +81,7 @@ object frmMain: TfrmMain
|
||||||
end
|
end
|
||||||
object edX: TSpinEdit
|
object edX: TSpinEdit
|
||||||
Left = 24
|
Left = 24
|
||||||
Height = 19
|
Height = 21
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 55
|
Width = 55
|
||||||
MaxValue = 100000
|
MaxValue = 100000
|
||||||
|
@ -89,7 +89,7 @@ object frmMain: TfrmMain
|
||||||
end
|
end
|
||||||
object edY: TSpinEdit
|
object edY: TSpinEdit
|
||||||
Left = 104
|
Left = 104
|
||||||
Height = 19
|
Height = 21
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 52
|
Width = 52
|
||||||
MaxValue = 100000
|
MaxValue = 100000
|
||||||
|
@ -108,7 +108,7 @@ object frmMain: TfrmMain
|
||||||
end
|
end
|
||||||
object pcLeft: TPageControl
|
object pcLeft: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 525
|
Height = 528
|
||||||
Top = 24
|
Top = 24
|
||||||
Width = 224
|
Width = 224
|
||||||
ActivePage = tsTiles
|
ActivePage = tsTiles
|
||||||
|
@ -117,13 +117,13 @@ object frmMain: TfrmMain
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object tsTiles: TTabSheet
|
object tsTiles: TTabSheet
|
||||||
Caption = 'Tiles'
|
Caption = 'Tiles'
|
||||||
ClientHeight = 492
|
ClientHeight = 502
|
||||||
ClientWidth = 218
|
ClientWidth = 216
|
||||||
object lblFilter: TLabel
|
object lblFilter: TLabel
|
||||||
AnchorSideLeft.Control = cbTerrain
|
AnchorSideLeft.Control = cbTerrain
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = cbTerrain
|
AnchorSideTop.Control = cbTerrain
|
||||||
Left = 81
|
Left = 75
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 30
|
Width = 30
|
||||||
|
@ -140,9 +140,9 @@ object frmMain: TfrmMain
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = spTileList
|
AnchorSideBottom.Control = spTileList
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 242
|
Height = 258
|
||||||
Top = 56
|
Top = 50
|
||||||
Width = 210
|
Width = 208
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
|
@ -194,13 +194,13 @@ object frmMain: TfrmMain
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 189
|
Height = 189
|
||||||
Top = 303
|
Top = 313
|
||||||
Width = 218
|
Width = 216
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
Caption = 'Random pool'
|
Caption = 'Random pool'
|
||||||
ClientHeight = 175
|
ClientHeight = 171
|
||||||
ClientWidth = 216
|
ClientWidth = 212
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object btnAddRandom: TSpeedButton
|
object btnAddRandom: TSpeedButton
|
||||||
AnchorSideLeft.Control = gbRandom
|
AnchorSideLeft.Control = gbRandom
|
||||||
|
@ -360,10 +360,10 @@ object frmMain: TfrmMain
|
||||||
object btnRandomPresetSave: TSpeedButton
|
object btnRandomPresetSave: TSpeedButton
|
||||||
AnchorSideTop.Control = cbRandomPreset
|
AnchorSideTop.Control = cbRandomPreset
|
||||||
AnchorSideRight.Control = btnRandomPresetDelete
|
AnchorSideRight.Control = btnRandomPresetDelete
|
||||||
Left = 164
|
Left = 160
|
||||||
Height = 22
|
Height = 22
|
||||||
Hint = 'Save Preset'
|
Hint = 'Save Preset'
|
||||||
Top = 142
|
Top = 146
|
||||||
Width = 22
|
Width = 22
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
|
@ -414,10 +414,10 @@ object frmMain: TfrmMain
|
||||||
AnchorSideTop.Control = btnRandomPresetSave
|
AnchorSideTop.Control = btnRandomPresetSave
|
||||||
AnchorSideRight.Control = gbRandom
|
AnchorSideRight.Control = gbRandom
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 190
|
Left = 186
|
||||||
Height = 22
|
Height = 22
|
||||||
Hint = 'Delete Preset'
|
Hint = 'Delete Preset'
|
||||||
Top = 142
|
Top = 146
|
||||||
Width = 22
|
Width = 22
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
|
@ -474,9 +474,9 @@ object frmMain: TfrmMain
|
||||||
AnchorSideBottom.Control = cbRandomPreset
|
AnchorSideBottom.Control = cbRandomPreset
|
||||||
Cursor = 63
|
Cursor = 63
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 114
|
Height = 118
|
||||||
Top = 24
|
Top = 24
|
||||||
Width = 208
|
Width = 204
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Top = 2
|
BorderSpacing.Top = 2
|
||||||
|
@ -522,14 +522,14 @@ object frmMain: TfrmMain
|
||||||
AnchorSideBottom.Control = gbRandom
|
AnchorSideBottom.Control = gbRandom
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 29
|
Height = 21
|
||||||
Top = 142
|
Top = 146
|
||||||
Width = 156
|
Width = 152
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
BorderSpacing.Bottom = 4
|
BorderSpacing.Bottom = 4
|
||||||
ItemHeight = 0
|
ItemHeight = 13
|
||||||
OnChange = cbRandomPresetChange
|
OnChange = cbRandomPresetChange
|
||||||
Sorted = True
|
Sorted = True
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
|
@ -543,8 +543,8 @@ object frmMain: TfrmMain
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 5
|
Height = 5
|
||||||
Top = 298
|
Top = 308
|
||||||
Width = 218
|
Width = 216
|
||||||
Align = alNone
|
Align = alNone
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
ResizeAnchor = akBottom
|
ResizeAnchor = akBottom
|
||||||
|
@ -554,10 +554,10 @@ object frmMain: TfrmMain
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = vdtTiles
|
AnchorSideBottom.Control = vdtTiles
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 110
|
Left = 108
|
||||||
Height = 19
|
Height = 21
|
||||||
Hint = 'Append S or T to restrict the search to Statics or Terrain.'
|
Hint = 'Append S or T to restrict the search to Statics or Terrain.'
|
||||||
Top = 271
|
Top = 279
|
||||||
Width = 96
|
Width = 96
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
|
@ -576,10 +576,10 @@ object frmMain: TfrmMain
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = tsTiles
|
AnchorSideRight.Control = tsTiles
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 81
|
Left = 75
|
||||||
Height = 19
|
Height = 21
|
||||||
Top = 22
|
Top = 22
|
||||||
Width = 121
|
Width = 125
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Right = 16
|
BorderSpacing.Right = 16
|
||||||
OnEditingDone = edFilterEditingDone
|
OnEditingDone = edFilterEditingDone
|
||||||
|
@ -590,10 +590,10 @@ object frmMain: TfrmMain
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = cbTerrain
|
AnchorSideTop.Control = cbTerrain
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 4
|
Left = 5
|
||||||
Height = 22
|
Height = 19
|
||||||
Top = 30
|
Top = 27
|
||||||
Width = 60
|
Width = 53
|
||||||
Caption = 'Statics'
|
Caption = 'Statics'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = cbStaticsChange
|
OnChange = cbStaticsChange
|
||||||
|
@ -604,9 +604,9 @@ object frmMain: TfrmMain
|
||||||
AnchorSideLeft.Control = tsTiles
|
AnchorSideLeft.Control = tsTiles
|
||||||
AnchorSideTop.Control = tsTiles
|
AnchorSideTop.Control = tsTiles
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 22
|
Height = 19
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 61
|
Width = 55
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Terrain'
|
Caption = 'Terrain'
|
||||||
|
@ -618,26 +618,25 @@ object frmMain: TfrmMain
|
||||||
end
|
end
|
||||||
object tsClients: TTabSheet
|
object tsClients: TTabSheet
|
||||||
Caption = 'Clients'
|
Caption = 'Clients'
|
||||||
ClientHeight = 492
|
ClientHeight = 499
|
||||||
ClientWidth = 218
|
ClientWidth = 216
|
||||||
object lbClients: TListBox
|
object lbClients: TListBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 492
|
Height = 499
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 218
|
Width = 216
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnDblClick = mnuGoToClientClick
|
OnDblClick = mnuGoToClientClick
|
||||||
PopupMenu = pmClients
|
PopupMenu = pmClients
|
||||||
Sorted = True
|
Sorted = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TopIndex = -1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tsLocations: TTabSheet
|
object tsLocations: TTabSheet
|
||||||
Caption = 'Locations'
|
Caption = 'Locations'
|
||||||
ClientHeight = 492
|
ClientHeight = 499
|
||||||
ClientWidth = 218
|
ClientWidth = 216
|
||||||
object btnClearLocations: TSpeedButton
|
object btnClearLocations: TSpeedButton
|
||||||
AnchorSideLeft.Control = btnDeleteLocation
|
AnchorSideLeft.Control = btnDeleteLocation
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
@ -645,7 +644,7 @@ object frmMain: TfrmMain
|
||||||
Left = 125
|
Left = 125
|
||||||
Height = 22
|
Height = 22
|
||||||
Hint = 'Clear'
|
Hint = 'Clear'
|
||||||
Top = 466
|
Top = 473
|
||||||
Width = 23
|
Width = 23
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
|
@ -698,7 +697,7 @@ object frmMain: TfrmMain
|
||||||
Left = 98
|
Left = 98
|
||||||
Height = 22
|
Height = 22
|
||||||
Hint = 'Delete'
|
Hint = 'Delete'
|
||||||
Top = 466
|
Top = 473
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Bottom = 4
|
BorderSpacing.Bottom = 4
|
||||||
|
@ -750,7 +749,7 @@ object frmMain: TfrmMain
|
||||||
Left = 71
|
Left = 71
|
||||||
Height = 22
|
Height = 22
|
||||||
Hint = 'Add'
|
Hint = 'Add'
|
||||||
Top = 466
|
Top = 473
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
|
@ -804,9 +803,9 @@ object frmMain: TfrmMain
|
||||||
AnchorSideBottom.Control = btnDeleteLocation
|
AnchorSideBottom.Control = btnDeleteLocation
|
||||||
Cursor = 63
|
Cursor = 63
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 458
|
Height = 465
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 210
|
Width = 208
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
|
@ -821,7 +820,7 @@ object frmMain: TfrmMain
|
||||||
item
|
item
|
||||||
Position = 1
|
Position = 1
|
||||||
Text = 'Name'
|
Text = 'Name'
|
||||||
Width = 131
|
Width = 129
|
||||||
end>
|
end>
|
||||||
Header.DefaultHeight = 17
|
Header.DefaultHeight = 17
|
||||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoVisible]
|
||||||
|
@ -1029,7 +1028,7 @@ object frmMain: TfrmMain
|
||||||
AnchorSideBottom.Control = spChat
|
AnchorSideBottom.Control = spChat
|
||||||
Left = 224
|
Left = 224
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 413
|
Top = 416
|
||||||
Width = 542
|
Width = 542
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
@ -1042,7 +1041,7 @@ object frmMain: TfrmMain
|
||||||
Left = 10
|
Left = 10
|
||||||
Height = 18
|
Height = 18
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 104
|
Width = 101
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Chat and Messages'
|
Caption = 'Chat and Messages'
|
||||||
|
@ -1063,7 +1062,7 @@ object frmMain: TfrmMain
|
||||||
AnchorSideBottom.Control = pnlBottom
|
AnchorSideBottom.Control = pnlBottom
|
||||||
Left = 224
|
Left = 224
|
||||||
Height = 109
|
Height = 109
|
||||||
Top = 440
|
Top = 443
|
||||||
Width = 542
|
Width = 542
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
|
@ -1074,7 +1073,7 @@ object frmMain: TfrmMain
|
||||||
object vstChat: TVirtualStringTree
|
object vstChat: TVirtualStringTree
|
||||||
Cursor = 63
|
Cursor = 63
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 90
|
Height = 88
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 542
|
Width = 542
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
@ -1112,8 +1111,8 @@ object frmMain: TfrmMain
|
||||||
end
|
end
|
||||||
object edChat: TEdit
|
object edChat: TEdit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 19
|
Height = 21
|
||||||
Top = 90
|
Top = 88
|
||||||
Width = 542
|
Width = 542
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
OnKeyPress = edChatKeyPress
|
OnKeyPress = edChatKeyPress
|
||||||
|
@ -1128,7 +1127,7 @@ object frmMain: TfrmMain
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 224
|
Left = 224
|
||||||
Height = 5
|
Height = 5
|
||||||
Top = 435
|
Top = 438
|
||||||
Width = 542
|
Width = 542
|
||||||
Align = alNone
|
Align = alNone
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
@ -1145,7 +1144,7 @@ object frmMain: TfrmMain
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = pnlChatHeader
|
AnchorSideBottom.Control = pnlChatHeader
|
||||||
Left = 224
|
Left = 224
|
||||||
Height = 389
|
Height = 392
|
||||||
Top = 24
|
Top = 24
|
||||||
Width = 542
|
Width = 542
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
|
|
@ -607,8 +607,6 @@ end;
|
||||||
procedure TfrmMain.oglGameWindowMouseUp(Sender: TObject; Button: TMouseButton;
|
procedure TfrmMain.oglGameWindowMouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
var
|
var
|
||||||
node: PVirtualNode;
|
|
||||||
tileInfo: PTileInfo;
|
|
||||||
map: TMapCell;
|
map: TMapCell;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
z: ShortInt;
|
z: ShortInt;
|
||||||
|
@ -923,7 +921,7 @@ end;
|
||||||
procedure TfrmMain.btnRandomPresetSaveClick(Sender: TObject);
|
procedure TfrmMain.btnRandomPresetSaveClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
presetName: string;
|
presetName: string;
|
||||||
i, index: Integer;
|
i: Integer;
|
||||||
preset, tile: TDOMElement;
|
preset, tile: TDOMElement;
|
||||||
children: TDOMNodeList;
|
children: TDOMNodeList;
|
||||||
tileNode: PVirtualNode;
|
tileNode: PVirtualNode;
|
||||||
|
@ -2047,7 +2045,7 @@ end;
|
||||||
procedure TfrmMain.PrepareScreenBlock(ABlockInfo: PBlockInfo);
|
procedure TfrmMain.PrepareScreenBlock(ABlockInfo: PBlockInfo);
|
||||||
|
|
||||||
procedure GetLandAlt(const AX, AY: Integer; const ADefaultZ,
|
procedure GetLandAlt(const AX, AY: Integer; const ADefaultZ,
|
||||||
ADefaultRaw: SmallInt; var Z, RawZ: SmallInt);
|
ADefaultRaw: SmallInt; out Z, RawZ: SmallInt);
|
||||||
var
|
var
|
||||||
cell: TMapCell;
|
cell: TMapCell;
|
||||||
begin
|
begin
|
||||||
|
@ -2547,7 +2545,7 @@ begin
|
||||||
virtualTile.Y := tileY;
|
virtualTile.Y := tileY;
|
||||||
virtualTile.Z := frmVirtualLayer.seZ.Value;
|
virtualTile.Z := frmVirtualLayer.seZ.Value;
|
||||||
virtualTile.Priority := virtualTile.Z;
|
virtualTile.Priority := virtualTile.Z;
|
||||||
virtualTile.PriorityBonus := MaxInt;
|
virtualTile.PriorityBonus := High(ShortInt);
|
||||||
|
|
||||||
Inc(i);
|
Inc(i);
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* CDDL HEADER END
|
* CDDL HEADER END
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Portions Copyright 2007 Andreas Schneider
|
* Portions Copyright 2009 Andreas Schneider
|
||||||
*)
|
*)
|
||||||
unit UfrmTileInfo;
|
unit UfrmTileInfo;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||||
ExtCtrls, LCLIntf, LCLType, LMessages, strutils;
|
ExtCtrls, LCLIntf, LCLType, strutils;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -48,7 +48,6 @@ type
|
||||||
{ private declarations }
|
{ private declarations }
|
||||||
public
|
public
|
||||||
procedure Update(ATileID: Word);
|
procedure Update(ATileID: Word);
|
||||||
//procedure Show; overload; reintroduce;
|
|
||||||
procedure Show(ATileID: Word); overload;
|
procedure Show(ATileID: Word); overload;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -158,21 +157,6 @@ begin
|
||||||
end;
|
end;
|
||||||
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);
|
procedure TfrmTileInfo.Show(ATileID: Word);
|
||||||
begin
|
begin
|
||||||
Update(ATileID);
|
Update(ATileID);
|
||||||
|
|
|
@ -5,7 +5,7 @@ unit Logging;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
MultiLog, IPCChannel;
|
MultiLog{$IFNDEF NoLogging}, IPCChannel{$ENDIF};
|
||||||
|
|
||||||
const
|
const
|
||||||
lcAll = [0..31]; //all logging classes
|
lcAll = [0..31]; //all logging classes
|
||||||
|
|
|
@ -28,8 +28,8 @@ unit UMulManager;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, UMulProvider, UTileDataProvider, UArtProvider, UGumpProvider,
|
SysUtils, UTileDataProvider, UArtProvider, UGumpProvider, UTexmapProvider,
|
||||||
UTexmapProvider, UHueProvider, URadarProvider, UAnimDataProvider;
|
UHueProvider, URadarProvider, UAnimDataProvider;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* CDDL HEADER END
|
* CDDL HEADER END
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Portions Copyright 2007 Andreas Schneider
|
* Portions Copyright 2009 Andreas Schneider
|
||||||
*)
|
*)
|
||||||
unit URadarProvider;
|
unit URadarProvider;
|
||||||
|
|
||||||
|
@ -33,7 +33,10 @@ uses
|
||||||
SysUtils, Classes, UBufferedStreams;
|
SysUtils, Classes, UBufferedStreams;
|
||||||
|
|
||||||
type
|
type
|
||||||
TRadarProvider = class(TObject)
|
|
||||||
|
{ TRadarProvider }
|
||||||
|
|
||||||
|
TRadarProvider = class
|
||||||
constructor Create; overload; virtual;
|
constructor Create; overload; virtual;
|
||||||
constructor Create(AData: TStream; AReadOnly: Boolean = False); overload; virtual;
|
constructor Create(AData: TStream; AReadOnly: Boolean = False); overload; virtual;
|
||||||
constructor Create(AData: string; AReadOnly: Boolean = False); overload; virtual;
|
constructor Create(AData: string; AReadOnly: Boolean = False); overload; virtual;
|
||||||
|
@ -77,18 +80,18 @@ end;
|
||||||
|
|
||||||
destructor TRadarProvider.Destroy;
|
destructor TRadarProvider.Destroy;
|
||||||
begin
|
begin
|
||||||
if Assigned(FData) then FreeAndNil(FData);
|
FreeAndNil(FData);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRadarProvider.GetColor(AID: Integer): Word;
|
function TRadarProvider.GetColor(AID: Integer): Word;
|
||||||
begin
|
begin
|
||||||
|
Result := 0;
|
||||||
if (AID >= 0) and (AID < $10000) then
|
if (AID >= 0) and (AID < $10000) then
|
||||||
begin
|
begin
|
||||||
FData.Position := SizeOf(Word) * AID;
|
FData.Position := SizeOf(Word) * AID;
|
||||||
FData.Read(Result, SizeOf(Word));
|
FData.Read(Result, SizeOf(Word));
|
||||||
end else
|
end;
|
||||||
Result := 0;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRadarProvider.SetColor(AID: Integer; AColor: Word);
|
procedure TRadarProvider.SetColor(AID: Integer; AColor: Word);
|
||||||
|
|
|
@ -156,7 +156,9 @@ begin
|
||||||
block.Position := lookup[iCurrentHeight];
|
block.Position := lookup[iCurrentHeight];
|
||||||
iCurrentWidth := 0;
|
iCurrentWidth := 0;
|
||||||
P := FGraphic.Bits + iCurrentHeight * width * 2;
|
P := FGraphic.Bits + iCurrentHeight * width * 2;
|
||||||
while (block.Read(offset, SizeOf(Word)) = SizeOf(Word)) and (block.Read(run, SizeOf(Word)) = SizeOf(Word)) and (offset + run <> 0) do
|
while (block.Read(offset, SizeOf(Word)) = SizeOf(Word)) and
|
||||||
|
(block.Read(run, SizeOf(Word)) = SizeOf(Word)) and
|
||||||
|
(offset + run <> 0) do
|
||||||
begin
|
begin
|
||||||
inc(iCurrentWidth, offset);
|
inc(iCurrentWidth, offset);
|
||||||
for i := 0 to run - 1 do
|
for i := 0 to run - 1 do
|
||||||
|
@ -231,7 +233,7 @@ end;
|
||||||
procedure TArt.RefreshBuffer;
|
procedure TArt.RefreshBuffer;
|
||||||
var
|
var
|
||||||
argbGraphic: TSingleImage;
|
argbGraphic: TSingleImage;
|
||||||
i, j, x, y, lineWidth, start: Integer;
|
i, x, y, lineWidth, start: Integer;
|
||||||
iCurrentHeight, iCurrentWidth: Integer;
|
iCurrentHeight, iCurrentWidth: Integer;
|
||||||
width, height: SmallInt;
|
width, height: SmallInt;
|
||||||
color, run, offset: Word;
|
color, run, offset: Word;
|
||||||
|
@ -251,14 +253,14 @@ begin
|
||||||
for i := 1 to 22 do
|
for i := 1 to 22 do
|
||||||
begin
|
begin
|
||||||
Dec(x);
|
Dec(x);
|
||||||
FBuffer.Write(PWordArray(argbGraphic.Bits + y * 44 * 2)^[x + j], lineWidth);
|
FBuffer.Write(PWordArray(argbGraphic.Bits + y * 44 * 2)^[x + i], lineWidth);
|
||||||
Inc(y);
|
Inc(y);
|
||||||
Inc(lineWidth, 2);
|
Inc(lineWidth, 2);
|
||||||
end;
|
end;
|
||||||
for i := 1 to 22 do
|
for i := 1 to 22 do
|
||||||
begin
|
begin
|
||||||
Dec(lineWidth, 2);
|
Dec(lineWidth, 2);
|
||||||
FBuffer.Write(PWordArray(argbGraphic.Bits + y * 44 * 2)^[x + j], lineWidth);
|
FBuffer.Write(PWordArray(argbGraphic.Bits + y * 44 * 2)^[x + i], lineWidth);
|
||||||
Inc(x);
|
Inc(x);
|
||||||
Inc(y);
|
Inc(y);
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* CDDL HEADER END
|
* CDDL HEADER END
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Portions Copyright 2007 Andreas Schneider
|
* Portions Copyright 2009 Andreas Schneider
|
||||||
*)
|
*)
|
||||||
unit UHue;
|
unit UHue;
|
||||||
|
|
||||||
|
@ -30,10 +30,14 @@ unit UHue;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, Graphics, UMulBlock, UGraphicHelper;
|
SysUtils, Classes, Graphics, UMulBlock;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
TColorTable = array[0..31] of Word;
|
TColorTable = array[0..31] of Word;
|
||||||
|
|
||||||
|
{ THue }
|
||||||
|
|
||||||
THue = class(TMulBlock)
|
THue = class(TMulBlock)
|
||||||
constructor Create(AData: TStream);
|
constructor Create(AData: TStream);
|
||||||
function Clone: THue; override;
|
function Clone: THue; override;
|
||||||
|
@ -52,7 +56,11 @@ type
|
||||||
property TableEnd: Word read FTableEnd write FTableEnd;
|
property TableEnd: Word read FTableEnd write FTableEnd;
|
||||||
property Name: string read GetName write SetName;
|
property Name: string read GetName write SetName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
THueEntries = array[0..7] of THue;
|
THueEntries = array[0..7] of THue;
|
||||||
|
|
||||||
|
{ THueGroup }
|
||||||
|
|
||||||
THueGroup = class(TMulBlock)
|
THueGroup = class(TMulBlock)
|
||||||
constructor Create(AData: TStream);
|
constructor Create(AData: TStream);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
@ -92,7 +100,7 @@ var
|
||||||
color: Word;
|
color: Word;
|
||||||
begin
|
begin
|
||||||
SetLength(FName, 20);
|
SetLength(FName, 20);
|
||||||
if Assigned(AData) then
|
if AData <> nil then
|
||||||
begin
|
begin
|
||||||
buffer := TMemoryStream.Create;
|
buffer := TMemoryStream.Create;
|
||||||
buffer.CopyFrom(AData, 88);
|
buffer.CopyFrom(AData, 88);
|
||||||
|
@ -158,7 +166,7 @@ var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
buffer: TMemoryStream;
|
buffer: TMemoryStream;
|
||||||
begin
|
begin
|
||||||
if Assigned(AData) then
|
if AData <> nil then
|
||||||
begin
|
begin
|
||||||
buffer := TMemoryStream.Create;
|
buffer := TMemoryStream.Create;
|
||||||
buffer.CopyFrom(AData, 708);
|
buffer.CopyFrom(AData, 708);
|
||||||
|
@ -170,7 +178,7 @@ begin
|
||||||
for i := 0 to 7 do
|
for i := 0 to 7 do
|
||||||
FHueEntries[i] := THue.Create(buffer);
|
FHueEntries[i] := THue.Create(buffer);
|
||||||
|
|
||||||
if Assigned(buffer) then FreeAndNil(buffer);
|
buffer.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor THueGroup.Destroy;
|
destructor THueGroup.Destroy;
|
||||||
|
@ -178,9 +186,8 @@ var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
for i := 0 to 7 do
|
for i := 0 to 7 do
|
||||||
if Assigned(FHueEntries[i]) then
|
FreeAndNil(FHueEntries[i]);
|
||||||
FreeAndNil(FHueEntries[i]);
|
inherited Destroy;
|
||||||
inherited;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function THueGroup.GetHueEntry(AIndex: Integer): THue;
|
function THueGroup.GetHueEntry(AIndex: Integer): THue;
|
||||||
|
@ -195,7 +202,7 @@ end;
|
||||||
|
|
||||||
procedure THueGroup.SetHueEntry(AIndex: Integer; AValue: THue);
|
procedure THueGroup.SetHueEntry(AIndex: Integer; AValue: THue);
|
||||||
begin
|
begin
|
||||||
if Assigned(FHueEntries[AIndex]) then FreeAndNil(FHueEntries[AIndex]);
|
FreeAndNil(FHueEntries[AIndex]);
|
||||||
FHueEntries[AIndex] := AValue;
|
FHueEntries[AIndex] := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ unit UMap;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, fgl, UMulBlock, UWorldItem;
|
SysUtils, Classes, fgl, UWorldItem;
|
||||||
|
|
||||||
const
|
const
|
||||||
MapCellSize = 3;
|
MapCellSize = 3;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* CDDL HEADER END
|
* CDDL HEADER END
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Portions Copyright 2007 Andreas Schneider
|
* Portions Copyright 2009 Andreas Schneider
|
||||||
*)
|
*)
|
||||||
unit UMulBlock;
|
unit UMulBlock;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ type
|
||||||
|
|
||||||
{ TMulBlockEventHandler }
|
{ TMulBlockEventHandler }
|
||||||
|
|
||||||
TMulBlockEventHandler = class(TObject)
|
TMulBlockEventHandler = class
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
protected
|
protected
|
||||||
|
@ -51,7 +51,7 @@ type
|
||||||
|
|
||||||
{ TMulBlock }
|
{ TMulBlock }
|
||||||
|
|
||||||
TMulBlock = class(TObject)
|
TMulBlock = class
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -210,8 +210,6 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TStaticBlock.Destroy;
|
destructor TStaticBlock.Destroy;
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
begin
|
||||||
FreeAndNil(FItems);
|
FreeAndNil(FItems);
|
||||||
inherited;
|
inherited;
|
||||||
|
|
Loading…
Reference in New Issue