Skip to content

Commit

Permalink
Map Editor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
RetroNick2020 committed May 27, 2023
1 parent e6c9c2e commit 73a7d4f
Show file tree
Hide file tree
Showing 7 changed files with 287 additions and 175 deletions.
6 changes: 5 additions & 1 deletion mapcore.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ interface

RMMapSig = 'RMM';
RMMapVersion = 2;

TileClear = -1;
TileMissing = -2;

type

TileRec = packed Record
Expand Down Expand Up @@ -230,7 +234,7 @@ procedure TMapCoreBase.ClearMap(index, value : integer);
begin
For i:=0 to DefMaxMapHeight-1 do
begin
// Map[index].Tile[i,j].ImageUID:=0;
// Map[index].Tile[i,j].ImageUID:='';
Map[index].Tile[i,j].ImageIndex:=value;
end;
end;
Expand Down
26 changes: 20 additions & 6 deletions mapeditor.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ object MapEdit: TMapEdit
ClientHeight = 662
ClientWidth = 1130
Menu = MainMenu1
OnActivate = FormActivate
OnClose = FormClose
OnCreate = FormCreate
OnShow = FormShow
Expand Down Expand Up @@ -87,6 +88,7 @@ object MapEdit: TMapEdit
Caption = 'LeftBottomPanel'
ClientHeight = 482
ClientWidth = 216
ParentColor = False
ParentFont = False
TabOrder = 2
object TileListView: TListView
Expand Down Expand Up @@ -124,6 +126,7 @@ object MapEdit: TMapEdit
Caption = 'RightPanel'
ClientHeight = 662
ClientWidth = 188
ParentColor = False
ParentFont = False
TabOrder = 0
object MapListView: TListView
Expand Down Expand Up @@ -255,34 +258,39 @@ object MapEdit: TMapEdit
Caption = 'MiddlePanel'
ClientHeight = 560
ClientWidth = 706
ParentColor = False
ParentFont = False
TabOrder = 5
object MapScrollBox: TScrollBox
Left = 1
Height = 558
Top = 1
Width = 704
HorzScrollBar.Page = 90
HorzScrollBar.Increment = 10
HorzScrollBar.Page = 105
HorzScrollBar.Tracking = True
VertScrollBar.Page = 90
VertScrollBar.Increment = 10
VertScrollBar.Page = 105
VertScrollBar.Tracking = True
Align = alClient
BorderStyle = bsNone
ClientHeight = 558
ClientWidth = 704
ParentFont = False
TabOrder = 0
object MapImage: TImage
object MapPaintBox: TPaintBox
AnchorSideLeft.Control = MapScrollBox
AnchorSideTop.Control = MapScrollBox
Left = 0
Height = 90
Height = 105
Top = 0
Width = 90
Width = 105
Color = clRed
ParentColor = False
OnMouseDown = MapImageMouseDown
OnMouseLeave = MapImageMouseLeave
OnMouseMove = MapImageMouseMove
OnMouseUp = MapImageMouseUp
OnPaint = MapPaintBoxPaint
end
end
end
Expand Down Expand Up @@ -430,4 +438,10 @@ object MapEdit: TMapEdit
OnClick = MenuMapPropsClick
end
end
object TileImageList: TImageList
Height = 256
Width = 256
Left = 156
Top = 210
end
end
Loading

0 comments on commit 73a7d4f

Please sign in to comment.