diff --git a/Client/CentrED.lpi b/Client/CentrED.lpi
index 6b6455a..18079de 100644
--- a/Client/CentrED.lpi
+++ b/Client/CentrED.lpi
@@ -25,7 +25,7 @@
-
+
@@ -50,7 +50,7 @@
-
+
@@ -74,7 +74,7 @@
-
+
@@ -99,7 +99,7 @@
-
+
@@ -431,7 +431,7 @@
-
+
@@ -455,7 +455,6 @@
-
diff --git a/Client/UfrmMain.lfm b/Client/UfrmMain.lfm
index ddb7ebd..5b680ee 100644
--- a/Client/UfrmMain.lfm
+++ b/Client/UfrmMain.lfm
@@ -858,11 +858,11 @@ object frmMain: TfrmMain
object tbSeparator1: TToolButton
Left = 24
Top = 2
- Width = 4
+ Width = 5
Style = tbsDivider
end
object tbSelect: TToolButton
- Left = 28
+ Left = 29
Top = 2
Action = acSelect
Grouped = True
@@ -871,7 +871,7 @@ object frmMain: TfrmMain
Style = tbsCheck
end
object tbDrawTile: TToolButton
- Left = 51
+ Left = 52
Top = 2
Action = acDraw
Grouped = True
@@ -880,7 +880,7 @@ object frmMain: TfrmMain
Style = tbsCheck
end
object tbMoveTile: TToolButton
- Left = 74
+ Left = 75
Top = 2
Action = acMove
Grouped = True
@@ -889,7 +889,7 @@ object frmMain: TfrmMain
Style = tbsCheck
end
object tbElevateTile: TToolButton
- Left = 97
+ Left = 98
Top = 2
Action = acElevate
Grouped = True
@@ -898,7 +898,7 @@ object frmMain: TfrmMain
Style = tbsCheck
end
object tbDeleteTile: TToolButton
- Left = 120
+ Left = 121
Top = 2
Action = acDelete
Grouped = True
@@ -907,7 +907,7 @@ object frmMain: TfrmMain
Style = tbsCheck
end
object tbSetHue: TToolButton
- Left = 143
+ Left = 144
Top = 2
Action = acHue
Grouped = True
@@ -916,28 +916,28 @@ object frmMain: TfrmMain
Style = tbsCheck
end
object tbSeparator3: TToolButton
- Left = 193
+ Left = 195
Top = 2
- Width = 4
+ Width = 5
Caption = 'tbSeparator3'
Style = tbsDivider
end
object tbBoundaries: TToolButton
- Left = 197
+ Left = 200
Top = 2
Action = acBoundaries
ParentShowHint = False
ShowHint = True
end
object tbSeparator4: TToolButton
- Left = 266
+ Left = 269
Top = 2
- Width = 4
+ Width = 5
Caption = 'tbSeparator4'
Style = tbsDivider
end
object tbTerrain: TToolButton
- Left = 270
+ Left = 274
Hint = 'Show Terrain'
Top = 2
Caption = 'Terrain'
@@ -949,7 +949,7 @@ object frmMain: TfrmMain
Style = tbsCheck
end
object tbStatics: TToolButton
- Left = 293
+ Left = 297
Hint = 'Show Statics'
Top = 2
Caption = 'Statics'
@@ -961,14 +961,14 @@ object frmMain: TfrmMain
Style = tbsCheck
end
object tbSeparator5: TToolButton
- Left = 420
+ Left = 424
Top = 2
- Width = 4
+ Width = 5
Caption = 'tbSeparator5'
Style = tbsDivider
end
object tbRadarMap: TToolButton
- Left = 424
+ Left = 429
Hint = 'Radar Map'
Top = 2
Caption = 'Radar Map'
@@ -978,49 +978,49 @@ object frmMain: TfrmMain
ShowHint = True
end
object tbVirtualLayer: TToolButton
- Left = 220
+ Left = 223
Top = 2
Action = acVirtualLayer
end
object tbFilter: TToolButton
- Left = 243
+ Left = 246
Top = 2
Action = acFilter
OnMouseMove = tbFilterMouseMove
Style = tbsCheck
end
object tbFlat: TToolButton
- Left = 385
+ Left = 389
Top = 2
Action = acFlat
DropdownMenu = pmFlatViewSettings
Style = tbsDropDown
end
object tbNoDraw: TToolButton
- Left = 316
+ Left = 320
Top = 2
Action = acNoDraw
Style = tbsCheck
end
object tbSeparator2: TToolButton
- Left = 166
+ Left = 167
Top = 2
- Width = 4
+ Width = 5
Caption = 'tbSeparator2'
Style = tbsDivider
end
object tbUndo: TToolButton
- Left = 170
+ Left = 172
Top = 2
Action = acUndo
end
object tbLightlevel: TToolButton
- Left = 362
+ Left = 366
Top = 2
Action = acLightlevel
end
object tbWalkable: TToolButton
- Left = 339
+ Left = 343
Top = 2
Action = acWalkable
Style = tbsCheck
diff --git a/Client/UfrmMain.pas b/Client/UfrmMain.pas
index 8cce253..b7f0ff0 100644
--- a/Client/UfrmMain.pas
+++ b/Client/UfrmMain.pas
@@ -646,7 +646,7 @@ var
blockInfo: PBlockInfo;
targetRect: TRect;
offsetX, offsetY: Integer;
- tile: TWorldItem;
+ item: TWorldItem;
tileX, tileY, newX, newY: Word;
targetBlocks: TBlockInfoList;
targetTile: TWorldItem;
@@ -704,13 +704,13 @@ begin
end;
Logger.Send([lcClient, lcDebug], 'Virtual tiles', FVirtualTiles.Count);
- for tile in FVirtualTiles do
+ for item in FVirtualTiles do
begin
- if tile is TGhostTile then
+ if item is TGhostTile then
begin
- dmNetwork.Send(TInsertStaticPacket.Create(tile.X, tile.Y, tile.Z,
- tile.TileID, TGhostTile(tile).Hue));
- FUndoList.Add(TDeleteStaticPacket.Create(TGhostTile(tile)));
+ dmNetwork.Send(TInsertStaticPacket.Create(item.X, item.Y, item.Z,
+ item.TileID, TGhostTile(item).Hue));
+ FUndoList.Add(TDeleteStaticPacket.Create(TGhostTile(item)));
end;
end;
end else if (SelectedTile <> targetTile) or targetTile.CanBeEdited then
@@ -744,75 +744,75 @@ begin
end;
end;
- if acMove.Checked then //***** Move tile *****//
+ if acMove.Checked then //***** Move item *****//
begin
offsetX := frmMoveSettings.GetOffsetX;
offsetY := frmMoveSettings.GetOffsetY;
for blockInfo in targetBlocks do
begin
- tile := blockInfo^.Item;
- if tile is TStaticItem then
+ item := blockInfo^.Item;
+ if item is TStaticItem then
begin
- newX := EnsureRange(tile.X + offsetX, 0, FLandscape.CellWidth - 1);
- newY := EnsureRange(tile.Y + offsetY, 0, FLandscape.CellHeight - 1);
- FUndoList.Add(TMoveStaticPacket.Create(newX, newY, tile.Z,
- tile.TileID, TStaticItem(tile).Hue, tile.X, tile.Y));
- dmNetwork.Send(TMoveStaticPacket.Create(TStaticItem(tile),
+ newX := EnsureRange(item.X + offsetX, 0, FLandscape.CellWidth - 1);
+ newY := EnsureRange(item.Y + offsetY, 0, FLandscape.CellHeight - 1);
+ FUndoList.Add(TMoveStaticPacket.Create(newX, newY, item.Z,
+ item.TileID, TStaticItem(item).Hue, item.X, item.Y));
+ dmNetwork.Send(TMoveStaticPacket.Create(TStaticItem(item),
newX, newY));
end;
end;
- end else if acElevate.Checked then //***** Elevate tile *****//
+ end else if acElevate.Checked then //***** Elevate item *****//
begin
for blockInfo in targetBlocks do
begin
- tile := blockInfo^.Item;
+ item := blockInfo^.Item;
z := frmElevateSettings.seZ.Value;
if frmElevateSettings.rbRaise.Checked then
- z := EnsureRange(tile.Z + z, -128, 127)
+ z := EnsureRange(item.Z + z, -128, 127)
else if frmElevateSettings.rbLower.Checked then
- z := EnsureRange(tile.Z - z, -128, 127);
+ z := EnsureRange(item.Z - z, -128, 127);
- if tile is TMapCell then
+ if item is TMapCell then
begin
if frmElevateSettings.cbRandomHeight.Checked then
Inc(z, Random(frmElevateSettings.seRandomHeight.Value));
- FUndoList.Add(TDrawMapPacket.Create(tile.X, tile.Y, tile.Z,
- tile.TileID));
- dmNetwork.Send(TDrawMapPacket.Create(tile.X, tile.Y, z,
- tile.TileID));
+ FUndoList.Add(TDrawMapPacket.Create(item.X, item.Y, item.Z,
+ item.TileID));
+ dmNetwork.Send(TDrawMapPacket.Create(item.X, item.Y, z,
+ item.TileID));
end else
begin
- FUndoList.Add(TElevateStaticPacket.Create(tile.X, tile.Y,
- z, tile.TileID, TStaticItem(tile).Hue, tile.Z));
- dmNetwork.Send(TElevateStaticPacket.Create(TStaticItem(tile), z));
+ FUndoList.Add(TElevateStaticPacket.Create(item.X, item.Y,
+ z, item.TileID, TStaticItem(item).Hue, item.Z));
+ dmNetwork.Send(TElevateStaticPacket.Create(TStaticItem(item), z));
end;
end;
- end else if acDelete.Checked then //***** Delete tile *****//
+ end else if acDelete.Checked then //***** Delete item *****//
begin
for blockInfo in targetBlocks do
begin
- tile := blockInfo^.Item;
- if tile is TStaticItem then
+ item := blockInfo^.Item;
+ if item is TStaticItem then
begin
- FUndoList.Add(TInsertStaticPacket.Create(tile.X, tile.Y,
- tile.Z, tile.TileID, TStaticItem(tile).Hue));
- dmNetwork.Send(TDeleteStaticPacket.Create(TStaticItem(tile)));
+ FUndoList.Add(TInsertStaticPacket.Create(item.X, item.Y,
+ item.Z, item.TileID, TStaticItem(item).Hue));
+ dmNetwork.Send(TDeleteStaticPacket.Create(TStaticItem(item)));
end;
end;
- end else if acHue.Checked then //***** Hue tile *****//
+ end else if acHue.Checked then //***** Hue item *****//
begin
for blockInfo in targetBlocks do
begin
- tile := blockInfo^.Item;
+ item := blockInfo^.Item;
- if blockInfo^.HueOverride and (tile is TStaticItem) then
+ if blockInfo^.HueOverride and (item is TStaticItem) then
begin
- if TStaticItem(tile).Hue <> blockInfo^.Hue then
+ if TStaticItem(item).Hue <> blockInfo^.Hue then
begin
- FUndoList.Add(THueStaticPacket.Create(tile.X, tile.Y, tile.Z,
- tile.TileID, blockInfo^.Hue, TStaticItem(tile).Hue));
- dmNetwork.Send(THueStaticPacket.Create(TStaticItem(tile),
+ FUndoList.Add(THueStaticPacket.Create(item.X, item.Y, item.Z,
+ item.TileID, blockInfo^.Hue, TStaticItem(item).Hue));
+ dmNetwork.Send(THueStaticPacket.Create(TStaticItem(item),
blockInfo^.Hue));
end;
end;
@@ -978,7 +978,7 @@ procedure TfrmMain.btnRandomPresetSaveClick(Sender: TObject);
var
presetName: string;
i: Integer;
- preset, tile: TDOMElement;
+ presetElement, tileElement: TDOMElement;
children: TDOMNodeList;
tileNode: PVirtualNode;
tileInfo: PTileInfo;
@@ -986,31 +986,31 @@ begin
presetName := cbRandomPreset.Text;
if InputQuery('Save Preset', 'Enter the name of the preset:', presetName) then
begin
- preset := FindRandomPreset(presetName);
- if preset = nil then
+ presetElement := FindRandomPreset(presetName);
+ if presetElement = nil then
begin
- preset := FRandomPresetsDoc.CreateElement('Preset');
- preset.AttribStrings['Name'] := presetName;
- FRandomPresetsDoc.DocumentElement.AppendChild(preset);
- cbRandomPreset.Items.AddObject(presetName, preset);
+ presetElement := FRandomPresetsDoc.CreateElement('Preset');
+ presetElement.AttribStrings['Name'] := presetName;
+ FRandomPresetsDoc.DocumentElement.AppendChild(presetElement);
+ cbRandomPreset.Items.AddObject(presetName, presetElement);
end else
begin
- children := preset.ChildNodes;
+ children := presetElement.ChildNodes;
for i := children.Count - 1 downto 0 do
- preset.RemoveChild(children[i]);
+ presetElement.RemoveChild(children[i]);
end;
tileNode := vdtRandom.GetFirst;
while tileNode <> nil do
begin
tileInfo := vdtRandom.GetNodeData(tileNode);
- tile := FRandomPresetsDoc.CreateElement('Tile');
- tile.AttribStrings['ID'] := IntToStr(tileInfo^.ID);
- preset.AppendChild(tile);
+ tileElement := FRandomPresetsDoc.CreateElement('Tile');
+ tileElement.AttribStrings['ID'] := IntToStr(tileInfo^.ID);
+ presetElement.AppendChild(tileElement);
tileNode := vdtRandom.GetNext(tileNode);
end;
- cbRandomPreset.ItemIndex := cbRandomPreset.Items.IndexOfObject(preset);
+ cbRandomPreset.ItemIndex := cbRandomPreset.Items.IndexOfObject(presetElement);
SaveRandomPresets;
end;
@@ -1018,7 +1018,7 @@ end;
procedure TfrmMain.cbRandomPresetChange(Sender: TObject);
var
- preset, tile: TDOMElement;
+ presetElement, tileElement: TDOMElement;
tiles: TDOMNodeList;
tileNode: PVirtualNode;
tileInfo: PTileInfo;
@@ -1027,13 +1027,13 @@ begin
if cbRandomPreset.ItemIndex > -1 then
begin
vdtRandom.Clear;
- preset := TDOMElement(cbRandomPreset.Items.Objects[cbRandomPreset.ItemIndex]);
- tiles := preset.ChildNodes;
+ presetElement := TDOMElement(cbRandomPreset.Items.Objects[cbRandomPreset.ItemIndex]);
+ tiles := presetElement.ChildNodes;
for i := 0 to tiles.Count - 1 do
begin
- tile := TDOMElement(tiles[i]);
- if (tile.NodeName = 'Tile') and
- TryStrToInt(tile.AttribStrings['ID'], id) and
+ tileElement := TDOMElement(tiles[i]);
+ if (tileElement.NodeName = 'Tile') and
+ TryStrToInt(tileElement.AttribStrings['ID'], id) and
(id < FLandscape.MaxStaticID + $4000) then
begin
tileNode := vdtRandom.AddChild(nil);