diff --git a/docsrc/manual/project-files.rst b/docsrc/manual/project-files.rst
index 30f0acc89..e4f0479b5 100644
--- a/docsrc/manual/project-files.rst
+++ b/docsrc/manual/project-files.rst
@@ -59,7 +59,6 @@ The filepath that Porymap expects for each file can be overridden on the ``Files
include/constants/event_object_movement.h, yes, no, ``constants_obj_event_movement``,
include/constants/event_objects.h, yes, no, ``constants_obj_events``,
include/constants/event_bg.h, yes, no, ``constants_event_bg``,
- include/constants/region_map_sections.h, yes, no, ``constants_region_map_sections``,
include/constants/metatile_labels.h, yes, yes, ``constants_metatile_labels``,
include/constants/metatile_behaviors.h, yes, no, ``constants_metatile_behaviors``,
include/constants/species.h, yes, no, ``constants_metatile_behaviors``, for the Wild Pokémon tab
@@ -122,7 +121,6 @@ In addition to these files, there are some specific symbol and macro names that
``define_map_empty``, ``UNDEFINED``, macro name after prefix for empty maps
``define_map_section_prefix``, ``MAPSEC_``, expected prefix for location macro names
``define_map_section_empty``, ``NONE``, macro name after prefix for empty region map sections
- ``define_map_section_count``, ``COUNT``, macro name after prefix for total number of region map sections
``define_species_prefix``, ``SPECIES_``, expected prefix for species macro names
``regex_behaviors``, ``\bMB_``, regex to find metatile behavior macro names
``regex_obj_event_gfx``, ``\bOBJ_EVENT_GFX_``, regex to find Object Event graphics ID macro names
diff --git a/forms/mainwindow.ui b/forms/mainwindow.ui
index 60dc95e7b..44d69d307 100644
--- a/forms/mainwindow.ui
+++ b/forms/mainwindow.ui
@@ -6,8 +6,8 @@
0
0
- 1287
- 903
+ 1298
+ 963
@@ -30,9 +30,9 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
-
+
true
@@ -42,168 +42,162 @@
0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 3
-
-
- 0
-
- -
-
-
- 0
-
-
- 3
-
-
- 3
-
-
- 3
-
-
-
-
-
- true
-
-
- <html><head/><body><p>Sort map list</p></body></html>
-
-
-
- :/icons/sort_alphabet.ico:/icons/sort_alphabet.ico
-
-
-
- 16
- 16
-
-
-
- QToolButton::InstantPopup
-
-
- Qt::ToolButtonIconOnly
-
-
- true
-
-
- Qt::NoArrow
-
-
-
- -
-
-
- <html><head/><body><p>Expand all map folders</p></body></html>
-
-
-
-
-
-
- :/icons/expand_all.ico:/icons/expand_all.ico
-
-
- QToolButton::InstantPopup
-
-
- true
-
-
-
- -
-
-
- <html><head/><body><p>Collapse all map list folders</p></body></html>
-
-
-
-
-
-
- :/icons/collapse_all.ico:/icons/collapse_all.ico
-
-
- QToolButton::InstantPopup
-
-
- true
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Preferred
-
-
-
- 12
- 20
-
-
-
-
- -
-
-
- true
-
-
-
-
-
- Filter maps...
-
-
- true
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 200
- 0
-
-
-
- QAbstractItemView::SingleSelection
-
-
- QAbstractItemView::SelectItems
-
-
- false
-
-
-
-
+
+ 0
+
+
+
+ Groups
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 3
+
+
+ 0
+
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 200
+ 0
+
+
+
+ QAbstractItemView::SelectionMode::SingleSelection
+
+
+ QAbstractItemView::SelectionBehavior::SelectItems
+
+
+ false
+
+
+
+
+
+
+
+ Areas
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 3
+
+
+ 0
+
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 200
+ 0
+
+
+
+ QAbstractItemView::SelectionMode::SingleSelection
+
+
+ QAbstractItemView::SelectionBehavior::SelectItems
+
+
+ false
+
+
+
+
+
+
+
+ Layouts
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 3
+
+
+ 0
+
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 200
+ 0
+
+
+
+ QAbstractItemView::SelectionMode::SingleSelection
+
+
+ QAbstractItemView::SelectionBehavior::SelectItems
+
+
+ false
+
+
+ false
+
+
+
+
+
@@ -236,7 +230,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -288,7 +282,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -298,10 +292,10 @@
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
1
@@ -325,10 +319,10 @@
-
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
@@ -377,10 +371,10 @@
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
@@ -401,10 +395,10 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- QFrame::Raised
+ QFrame::Shadow::Raised
@@ -585,7 +579,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -608,10 +602,10 @@
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
@@ -658,6 +652,9 @@
Metatiles
+
+ QLayout::SizeConstraint::SetNoConstraint
+
3
@@ -685,17 +682,17 @@
30
- Qt::Horizontal
+ Qt::Orientation::Horizontal
- -
+
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- QFrame::Plain
+ QFrame::Shadow::Plain
@@ -719,7 +716,7 @@
- Qt::Vertical
+ Qt::Orientation::Vertical
@@ -756,10 +753,10 @@
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- QFrame::Plain
+ QFrame::Shadow::Plain
true
@@ -769,7 +766,7 @@
0
0
- 423
+ 424
79
@@ -792,7 +789,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -814,17 +811,17 @@
<html><head/><body><p>The border is a 2x2 metatile which is repeated outside of the map layout's boundary. Draw on this border area to modify it.</p></body></html>
- Qt::ScrollBarAlwaysOff
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOff
- Qt::ScrollBarAlwaysOff
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOff
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -875,10 +872,10 @@
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- QFrame::Plain
+ QFrame::Shadow::Plain
true
@@ -888,7 +885,7 @@
0
0
- 423
+ 424
79
@@ -911,7 +908,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -936,17 +933,17 @@
- Qt::ScrollBarAlwaysOff
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOff
- Qt::ScrollBarAlwaysOff
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOff
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -970,19 +967,19 @@
- Qt::ScrollBarAlwaysOn
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOn
- Qt::ScrollBarAsNeeded
+ Qt::ScrollBarPolicy::ScrollBarAsNeeded
- QAbstractScrollArea::AdjustIgnored
+ QAbstractScrollArea::SizeAdjustPolicy::AdjustIgnored
true
- Qt::AlignHCenter|Qt::AlignTop
+ Qt::AlignmentFlag::AlignHCenter|Qt::AlignmentFlag::AlignTop
@@ -992,7 +989,7 @@
8
0
- 411
+ 412
446
@@ -1021,7 +1018,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1043,20 +1040,20 @@
- Qt::ScrollBarAlwaysOff
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOff
- Qt::ScrollBarAlwaysOff
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOff
- QAbstractScrollArea::AdjustIgnored
+ QAbstractScrollArea::SizeAdjustPolicy::AdjustIgnored
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1069,7 +1066,7 @@
-
- Qt::Vertical
+ Qt::Orientation::Vertical
@@ -1087,7 +1084,7 @@
- -
+
-
@@ -1096,23 +1093,23 @@
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
-
-
+
-
Primary Tileset
- -
+
-
- Qt::StrongFocus
+ Qt::FocusPolicy::StrongFocus
<html><head/><body><p>Primary Tileset</p><p>Defines the first 0x200 metatiles available for the map.</p></body></html>
@@ -1122,17 +1119,17 @@
- -
+
-
Secondary Tileset
- -
+
-
- Qt::StrongFocus
+ Qt::FocusPolicy::StrongFocus
<html><head/><body><p>Secondary Tileset</p><p>Defines the second 0x200 metatiles available for the map.</p></body></html>
@@ -1142,6 +1139,34 @@
+ -
+
+
+ QFrame::Shape::NoFrame
+
+
+ QFrame::Shadow::Raised
+
+
+
+ 2
+
+
+ 2
+
+
-
+
+
+ Layout
+
+
+
+
+
+
+ -
+
+
@@ -1162,7 +1187,7 @@
- QLayout::SetDefaultConstraint
+ QLayout::SizeConstraint::SetDefaultConstraint
3
@@ -1193,8 +1218,8 @@
0
0
- 427
- 594
+ 428
+ 633
@@ -1216,7 +1241,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1241,17 +1266,17 @@
- Qt::ScrollBarAlwaysOff
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOff
- Qt::ScrollBarAlwaysOff
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOff
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1264,7 +1289,7 @@
-
- Qt::Vertical
+ Qt::Orientation::Vertical
@@ -1290,7 +1315,7 @@
30
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1306,17 +1331,17 @@
50
- Qt::Horizontal
+ Qt::Orientation::Horizontal
-
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
-
@@ -1342,7 +1367,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1403,7 +1428,7 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
true
@@ -1413,8 +1438,8 @@
0
0
- 382
- 699
+ 383
+ 744
@@ -1436,10 +1461,10 @@
<html><head/><body><p>No prefabs have been created for the currently-used tilesets. Create some by using the button above!</p><p>Prefabs are "prefabricated" metatile selections that are used for easy selecting of complicated map structures. For example, a useful prefab could be a building or tree formation, which would otherwise be annoying to paint with the regular metatile picker.</p></body></html>
- Qt::RichText
+ Qt::TextFormat::RichText
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
true
@@ -1512,10 +1537,10 @@
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- QFrame::Raised
+ QFrame::Shadow::Raised
0
@@ -1552,7 +1577,7 @@
:/icons/add.ico:/icons/add.ico
- Qt::ToolButtonTextBesideIcon
+ Qt::ToolButtonStyle::ToolButtonTextBesideIcon
@@ -1575,7 +1600,7 @@
:/icons/delete.ico:/icons/delete.ico
- Qt::ToolButtonTextBesideIcon
+ Qt::ToolButtonStyle::ToolButtonTextBesideIcon
false
@@ -1585,7 +1610,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1620,7 +1645,7 @@
There are no events on the current map.
- Qt::AlignCenter
+ Qt::AlignmentFlag::AlignCenter
@@ -1686,7 +1711,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1701,13 +1726,13 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
true
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
@@ -1715,7 +1740,7 @@
0
0
100
- 30
+ 16
@@ -1780,7 +1805,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1795,13 +1820,13 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
true
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
@@ -1809,7 +1834,7 @@
0
0
100
- 30
+ 16
@@ -1874,7 +1899,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1889,13 +1914,13 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
true
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
@@ -1903,7 +1928,7 @@
0
0
100
- 30
+ 16
@@ -1974,7 +1999,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -1989,13 +2014,13 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
true
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
@@ -2003,7 +2028,7 @@
0
0
100
- 30
+ 16
@@ -2068,7 +2093,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -2083,13 +2108,13 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
true
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
@@ -2097,7 +2122,7 @@
0
0
100
- 30
+ 16
@@ -2137,13 +2162,13 @@
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
true
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
@@ -2206,14 +2231,14 @@
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
- QFormLayout::FieldsStayAtSizeHint
+ QFormLayout::FieldGrowthPolicy::FieldsStayAtSizeHint
12
@@ -2417,10 +2442,10 @@
-
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
-
@@ -2433,10 +2458,10 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- QFrame::Plain
+ QFrame::Shadow::Plain
@@ -2468,7 +2493,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -2549,10 +2574,10 @@
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
-
@@ -2564,10 +2589,10 @@
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
@@ -2632,7 +2657,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -2717,7 +2742,7 @@
30
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -2733,7 +2758,7 @@
30
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -2765,7 +2790,7 @@
30
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -2796,7 +2821,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -2812,22 +2837,22 @@
false
- Qt::ScrollBarAsNeeded
+ Qt::ScrollBarPolicy::ScrollBarAsNeeded
- Qt::ScrollBarAsNeeded
+ Qt::ScrollBarPolicy::ScrollBarAsNeeded
- QAbstractScrollArea::AdjustIgnored
+ QAbstractScrollArea::SizeAdjustPolicy::AdjustIgnored
- QGraphicsView::NoDrag
+ QGraphicsView::DragMode::NoDrag
- QGraphicsView::AnchorUnderMouse
+ QGraphicsView::ViewportAnchor::AnchorUnderMouse
- QGraphicsView::AnchorUnderMouse
+ QGraphicsView::ViewportAnchor::AnchorUnderMouse
@@ -2838,10 +2863,10 @@
- QFrame::StyledPanel
+ QFrame::Shape::StyledPanel
- QFrame::Raised
+ QFrame::Shadow::Raised
-
@@ -2858,10 +2883,10 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- Qt::ScrollBarAlwaysOff
+ Qt::ScrollBarPolicy::ScrollBarAlwaysOff
true
@@ -2871,8 +2896,8 @@
0
0
- 365
- 651
+ 204
+ 16
@@ -2894,7 +2919,7 @@
-
- Qt::Vertical
+ Qt::Orientation::Vertical
@@ -2922,19 +2947,19 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- QFrame::Raised
+ QFrame::Shadow::Raised
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- QFrame::Plain
+ QFrame::Shadow::Plain
-
@@ -2947,7 +2972,7 @@
-
- QComboBox::AdjustToContents
+ QComboBox::SizeAdjustPolicy::AdjustToContents
@@ -2988,7 +3013,7 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -3040,8 +3065,8 @@
0
0
- 1287
- 22
+ 1298
+ 37
- QAction::ApplicationSpecificRole
+ QAction::MenuRole::ApplicationSpecificRole
@@ -3482,11 +3507,22 @@
QWidget
+
+ MapTree
+ QTreeView
+
+
NoScrollGraphicsView
QGraphicsView
+
+ MapListToolBar
+ QFrame
+
+ 1
+
diff --git a/forms/maplisttoolbar.ui b/forms/maplisttoolbar.ui
new file mode 100644
index 000000000..54eb48d08
--- /dev/null
+++ b/forms/maplisttoolbar.ui
@@ -0,0 +1,175 @@
+
+
+ MapListToolBar
+
+
+
+ 0
+ 0
+ 274
+ 32
+
+
+
+ Form
+
+
+
+ 0
+
+
+ 3
+
+
+ 3
+
+
+ 0
+
+
+ 3
+
+ -
+
+
+ Add a new folder to the list.
+
+
+
+
+
+
+ :/icons/folder_add.ico:/icons/folder_add.ico
+
+
+ QToolButton::ToolButtonPopupMode::InstantPopup
+
+
+ true
+
+
+
+ -
+
+
+ Hide empty folders in the list.
+
+
+
+ :/icons/folder_eye_open.ico
+ :/icons/folder_eye_closed.ico:/icons/folder_eye_open.ico
+
+
+ true
+
+
+ QToolButton::ToolButtonPopupMode::InstantPopup
+
+
+ true
+
+
+
+ -
+
+
+ Expand all folders in the list.
+
+
+
+
+
+
+ :/icons/expand_all.ico:/icons/expand_all.ico
+
+
+ QToolButton::ToolButtonPopupMode::InstantPopup
+
+
+ true
+
+
+
+ -
+
+
+ Collapse all folders in the list.
+
+
+
+
+
+
+ :/icons/collapse_all.ico:/icons/collapse_all.ico
+
+
+ QToolButton::ToolButtonPopupMode::InstantPopup
+
+
+ true
+
+
+
+ -
+
+
+ If enabled, folders may be renamed and items in the list may be rearranged.
+
+
+
+
+
+
+ :/icons/lock_edit.ico
+ :/icons/unlock_edit.ico:/icons/lock_edit.ico
+
+
+ true
+
+
+ QToolButton::ToolButtonPopupMode::InstantPopup
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Orientation::Horizontal
+
+
+ QSizePolicy::Policy::Preferred
+
+
+
+ 12
+ 19
+
+
+
+
+ -
+
+
+ true
+
+
+
+
+
+ Filter...
+
+
+ true
+
+
+
+
+
+
+
+
+
+
diff --git a/forms/newmappopup.ui b/forms/newmappopup.ui
index b102b1ccc..3a83073f8 100644
--- a/forms/newmappopup.ui
+++ b/forms/newmappopup.ui
@@ -7,7 +7,7 @@
0
0
410
- 621
+ 687
@@ -73,14 +73,14 @@
- -
+
-
Map Width
- -
+
-
<html><head/><body><p>Width (in blocks) of the new map.</p></body></html>
@@ -90,14 +90,14 @@
- -
+
-
Map Height
- -
+
-
<html><head/><body><p>Height (in blocks) of the new map.</p></body></html>
@@ -107,14 +107,14 @@
- -
+
-
Border Width
- -
+
-
<html><head/><body><p>Width (in blocks) of the new map's border.</p></body></html>
@@ -124,14 +124,14 @@
- -
+
-
Border Height
- -
+
-
<html><head/><body><p>Height (in blocks) of the new map's border.</p></body></html>
@@ -141,14 +141,14 @@
- -
+
-
Primary Tileset
- -
+
-
<html><head/><body><p>The primary tileset for the new map.</p></body></html>
@@ -158,14 +158,14 @@
- -
+
-
Secondary Tileset
- -
+
-
<html><head/><body><p>The secondary tileset for the new map.</p></body></html>
@@ -175,14 +175,14 @@
- -
+
-
Type
- -
+
-
<html><head/><body><p>The map type is a general attribute, which is used for many different things. For example. it determines whether biking or running is allowed.</p></body></html>
@@ -192,14 +192,14 @@
- -
+
-
Location
- -
+
-
<html><head/><body><p>The section of the region map which the map is grouped under. This also determines the name of the map that is displayed when the player enters it.</p></body></html>
@@ -209,14 +209,14 @@
- -
+
-
Song
- -
+
-
<html><head/><body><p>The default background music for this map.</p></body></html>
@@ -226,14 +226,14 @@
- -
+
-
Can Fly To
- -
+
-
<html><head/><body><p>Whether to add a heal location to the new map.</p></body></html>
@@ -243,14 +243,14 @@
- -
+
-
Show Location Name
- -
+
-
<html><head/><body><p>Whether or not to display the location name when the player enters the map.</p></body></html>
@@ -260,14 +260,14 @@
- -
+
-
Allow Running
- -
+
-
<html><head/><body><p>Allows the player to use Running Shoes</p></body></html>
@@ -277,14 +277,14 @@
- -
+
-
Allow Biking
- -
+
-
<html><head/><body><p>Allows the player to use a Bike</p></body></html>
@@ -294,14 +294,14 @@
- -
+
-
Allow Dig & Escape Rope
- -
+
-
<html><head/><body><p>Allows the player to use Dig or Escape Rope</p></body></html>
@@ -311,14 +311,14 @@
- -
+
-
Floor Number
- -
+
-
<html><head/><body><p>Floor number to be used for maps with elevators.</p></body></html>
@@ -328,6 +328,96 @@
+ -
+
+
+ false
+
+
+
+ -
+
+
+ Layout
+
+
+
+ -
+
+
-
+
+
+ Use Existing Layout
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
@@ -396,7 +486,7 @@
0
0
410
- 21
+ 22
diff --git a/include/config.h b/include/config.h
index b42bd4f8d..6b64b612c 100644
--- a/include/config.h
+++ b/include/config.h
@@ -22,12 +22,6 @@ static const QVersionNumber porymapVersion = QVersionNumber::fromString(PORYMAP_
#define CONFIG_BACKWARDS_COMPATABILITY
-enum MapSortOrder {
- Group = 0,
- Area = 1,
- Layout = 2,
-};
-
class KeyValueConfigBase
{
public:
@@ -56,7 +50,7 @@ class PorymapConfig: public KeyValueConfigBase
this->recentProjects.clear();
this->projectManuallyClosed = false;
this->reopenOnLaunch = true;
- this->mapSortOrder = MapSortOrder::Group;
+ this->mapListTab = 0;
this->prettyCursors = true;
this->mirrorConnectingMaps = true;
this->showDiveEmergeMaps = false;
@@ -107,7 +101,7 @@ class PorymapConfig: public KeyValueConfigBase
bool reopenOnLaunch;
bool projectManuallyClosed;
- MapSortOrder mapSortOrder;
+ int mapListTab;
bool prettyCursors;
bool mirrorConnectingMaps;
bool showDiveEmergeMaps;
@@ -219,7 +213,6 @@ enum ProjectIdentifier {
define_map_empty,
define_map_section_prefix,
define_map_section_empty,
- define_map_section_count,
define_species_prefix,
regex_behaviors,
regex_obj_event_gfx,
@@ -275,7 +268,6 @@ enum ProjectFilePath {
constants_obj_event_movement,
constants_obj_events,
constants_event_bg,
- constants_region_map_sections,
constants_metatile_labels,
constants_metatile_behaviors,
constants_species,
@@ -406,7 +398,7 @@ class UserConfig: public KeyValueConfigBase
reset();
}
virtual void reset() override {
- this->recentMap = QString();
+ this->recentMapOrLayout = QString();
this->useEncounterJson = true;
this->customScripts.clear();
this->readKeys.clear();
@@ -418,7 +410,7 @@ class UserConfig: public KeyValueConfigBase
QList getCustomScriptsEnabled();
QString projectDir;
- QString recentMap;
+ QString recentMapOrLayout;
bool useEncounterJson;
protected:
diff --git a/include/core/editcommands.h b/include/core/editcommands.h
index 40f0cd62e..5bf99784f 100644
--- a/include/core/editcommands.h
+++ b/include/core/editcommands.h
@@ -9,8 +9,8 @@
#include
#include
-class MapPixmapItem;
class Map;
+class Layout;
class Blockdata;
class Event;
class DraggablePixmapItem;
@@ -24,9 +24,9 @@ enum CommandId {
ID_PaintCollision,
ID_BucketFillCollision,
ID_MagicFillCollision,
- ID_ResizeMap,
+ ID_ResizeLayout,
ID_PaintBorder,
- ID_ScriptEditMap,
+ ID_ScriptEditLayout,
ID_EventMove,
ID_EventShift,
ID_EventCreate,
@@ -50,7 +50,7 @@ enum CommandId {
/// onto the map using the pencil tool.
class PaintMetatile : public QUndoCommand {
public:
- PaintMetatile(Map *map,
+ PaintMetatile(Layout *layout,
const Blockdata &oldMetatiles, const Blockdata &newMetatiles,
unsigned actionId, QUndoCommand *parent = nullptr);
@@ -61,7 +61,7 @@ class PaintMetatile : public QUndoCommand {
int id() const override { return CommandId::ID_PaintMetatile; }
private:
- Map *map;
+ Layout *layout;
Blockdata newMetatiles;
Blockdata oldMetatiles;
@@ -75,10 +75,10 @@ class PaintMetatile : public QUndoCommand {
/// on the metatile collision and elevation.
class PaintCollision : public PaintMetatile {
public:
- PaintCollision(Map *map,
+ PaintCollision(Layout *layout,
const Blockdata &oldCollision, const Blockdata &newCollision,
unsigned actionId, QUndoCommand *parent = nullptr)
- : PaintMetatile(map, oldCollision, newCollision, actionId, parent) {
+ : PaintMetatile(layout, oldCollision, newCollision, actionId, parent) {
setText("Paint Collision");
}
@@ -90,7 +90,7 @@ class PaintCollision : public PaintMetatile {
/// Implements a command to commit paint actions on the map border.
class PaintBorder : public QUndoCommand {
public:
- PaintBorder(Map *map,
+ PaintBorder(Layout *layout,
const Blockdata &oldBorder, const Blockdata &newBorder,
unsigned actionId, QUndoCommand *parent = nullptr);
@@ -101,7 +101,7 @@ class PaintBorder : public QUndoCommand {
int id() const override { return CommandId::ID_PaintBorder; }
private:
- Map *map;
+ Layout *layout;
Blockdata newBorder;
Blockdata oldBorder;
@@ -115,10 +115,10 @@ class PaintBorder : public QUndoCommand {
/// with the bucket tool onto the map.
class BucketFillMetatile : public PaintMetatile {
public:
- BucketFillMetatile(Map *map,
+ BucketFillMetatile(Layout *layout,
const Blockdata &oldMetatiles, const Blockdata &newMetatiles,
unsigned actionId, QUndoCommand *parent = nullptr)
- : PaintMetatile(map, oldMetatiles, newMetatiles, actionId, parent) {
+ : PaintMetatile(layout, oldMetatiles, newMetatiles, actionId, parent) {
setText("Bucket Fill Metatiles");
}
@@ -131,10 +131,10 @@ class BucketFillMetatile : public PaintMetatile {
/// on the metatile collision and elevation.
class BucketFillCollision : public PaintCollision {
public:
- BucketFillCollision(Map *map,
+ BucketFillCollision(Layout *layout,
const Blockdata &oldCollision, const Blockdata &newCollision,
QUndoCommand *parent = nullptr)
- : PaintCollision(map, oldCollision, newCollision, -1, parent) {
+ : PaintCollision(layout, oldCollision, newCollision, -1, parent) {
setText("Flood Fill Collision");
}
@@ -148,10 +148,10 @@ class BucketFillCollision : public PaintCollision {
/// with the bucket or paint tool onto the map.
class MagicFillMetatile : public PaintMetatile {
public:
- MagicFillMetatile(Map *map,
+ MagicFillMetatile(Layout *layout,
const Blockdata &oldMetatiles, const Blockdata &newMetatiles,
unsigned actionId, QUndoCommand *parent = nullptr)
- : PaintMetatile(map, oldMetatiles, newMetatiles, actionId, parent) {
+ : PaintMetatile(layout, oldMetatiles, newMetatiles, actionId, parent) {
setText("Magic Fill Metatiles");
}
@@ -163,10 +163,10 @@ class MagicFillMetatile : public PaintMetatile {
/// Implements a command to commit magic fill collision actions.
class MagicFillCollision : public PaintCollision {
public:
- MagicFillCollision(Map *map,
+ MagicFillCollision(Layout *layout,
const Blockdata &oldCollision, const Blockdata &newCollision,
QUndoCommand *parent = nullptr)
- : PaintCollision(map, oldCollision, newCollision, -1, parent) {
+ : PaintCollision(layout, oldCollision, newCollision, -1, parent) {
setText("Magic Fill Collision");
}
@@ -179,7 +179,7 @@ class MagicFillCollision : public PaintCollision {
/// Implements a command to commit metatile shift actions.
class ShiftMetatiles : public QUndoCommand {
public:
- ShiftMetatiles(Map *map,
+ ShiftMetatiles(Layout *layout,
const Blockdata &oldMetatiles, const Blockdata &newMetatiles,
unsigned actionId, QUndoCommand *parent = nullptr);
@@ -190,7 +190,7 @@ class ShiftMetatiles : public QUndoCommand {
int id() const override { return CommandId::ID_ShiftMetatiles; }
private:
- Map *map;
+ Layout *layout= nullptr;
Blockdata newMetatiles;
Blockdata oldMetatiles;
@@ -201,9 +201,9 @@ class ShiftMetatiles : public QUndoCommand {
/// Implements a command to commit a map or border resize action.
-class ResizeMap : public QUndoCommand {
+class ResizeLayout : public QUndoCommand {
public:
- ResizeMap(Map *map, QSize oldMapDimensions, QSize newMapDimensions,
+ ResizeLayout(Layout *layout, QSize oldLayoutDimensions, QSize newLayoutDimensions,
const Blockdata &oldMetatiles, const Blockdata &newMetatiles,
QSize oldBorderDimensions, QSize newBorderDimensions,
const Blockdata &oldBorder, const Blockdata &newBorder,
@@ -213,15 +213,15 @@ class ResizeMap : public QUndoCommand {
void redo() override;
bool mergeWith(const QUndoCommand *) override { return false; }
- int id() const override { return CommandId::ID_ResizeMap; }
+ int id() const override { return CommandId::ID_ResizeLayout; }
private:
- Map *map;
+ Layout *layout = nullptr;
- int oldMapWidth;
- int oldMapHeight;
- int newMapWidth;
- int newMapHeight;
+ int oldLayoutWidth;
+ int oldLayoutHeight;
+ int newLayoutWidth;
+ int newLayoutHeight;
int oldBorderWidth;
int oldBorderHeight;
@@ -351,10 +351,10 @@ class EventPaste : public EventDuplicate {
/// Implements a command to commit map edits from the scripting API.
/// The scripting api can edit map/border blocks and dimensions.
-class ScriptEditMap : public QUndoCommand {
+class ScriptEditLayout : public QUndoCommand {
public:
- ScriptEditMap(Map *map,
- QSize oldMapDimensions, QSize newMapDimensions,
+ ScriptEditLayout(Layout *layout,
+ QSize oldLayoutDimensions, QSize newLayoutDimensions,
const Blockdata &oldMetatiles, const Blockdata &newMetatiles,
QSize oldBorderDimensions, QSize newBorderDimensions,
const Blockdata &oldBorder, const Blockdata &newBorder,
@@ -364,10 +364,10 @@ class ScriptEditMap : public QUndoCommand {
void redo() override;
bool mergeWith(const QUndoCommand *) override { return false; }
- int id() const override { return CommandId::ID_ScriptEditMap; }
+ int id() const override { return CommandId::ID_ScriptEditLayout; }
private:
- Map *map;
+ Layout *layout = nullptr;
Blockdata newMetatiles;
Blockdata oldMetatiles;
@@ -375,10 +375,10 @@ class ScriptEditMap : public QUndoCommand {
Blockdata newBorder;
Blockdata oldBorder;
- int oldMapWidth;
- int oldMapHeight;
- int newMapWidth;
- int newMapHeight;
+ int oldLayoutWidth;
+ int oldLayoutHeight;
+ int newLayoutWidth;
+ int newLayoutHeight;
int oldBorderWidth;
int oldBorderHeight;
diff --git a/include/core/map.h b/include/core/map.h
index 2333c862a..acc52d908 100644
--- a/include/core/map.h
+++ b/include/core/map.h
@@ -25,7 +25,7 @@
// porymap will reflect changes to it, but the value is hard-coded in the projects at the moment
#define BORDER_DISTANCE 7
-class MapPixmapItem;
+class LayoutPixmapItem;
class CollisionPixmapItem;
class BorderMetatilesPixmapItem;
@@ -39,6 +39,7 @@ class Map : public QObject
public:
QString name;
QString constantName;
+
QString song;
QString layoutId;
QString location;
@@ -51,20 +52,22 @@ class Map : public QObject
bool allowEscaping;
int floorNumber = 0;
QString battle_scene;
+
QString sharedEventsMap = "";
QString sharedScriptsMap = "";
+
QStringList scriptsFileLabels;
QMap customHeaders;
- MapLayout *layout;
+
+ Layout *layout = nullptr;
+ void setLayout(Layout *layout);
+
bool isPersistedToFile = true;
bool hasUnsavedDataChanges = false;
+
bool needsLayoutDir = true;
bool needsHealLocation = false;
bool scriptsLoaded = false;
- QImage collision_image;
- QPixmap collision_pixmap;
- QImage image;
- QPixmap pixmap;
QMap> events;
QList ownedEvents; // for memory management
@@ -74,64 +77,34 @@ class Map : public QObject
void setName(QString mapName);
static QString mapConstantFromName(QString mapName, bool includePrefix = true);
+
int getWidth();
int getHeight();
int getBorderWidth();
int getBorderHeight();
- QPixmap render(bool ignoreCache = false, MapLayout *fromLayout = nullptr, QRect bounds = QRect(0, 0, -1, -1));
- QPixmap renderCollision(bool ignoreCache);
- bool mapBlockChanged(int i, const Blockdata &cache);
- bool borderBlockChanged(int i, const Blockdata &cache);
- void cacheBlockdata();
- void cacheCollision();
- bool getBlock(int x, int y, Block *out);
- void setBlock(int x, int y, Block block, bool enableScriptCallback = false);
- void setBlockdata(Blockdata blockdata, bool enableScriptCallback = false);
- uint16_t getBorderMetatileId(int x, int y);
- void setBorderMetatileId(int x, int y, uint16_t metatileId, bool enableScriptCallback = false);
- void setBorderBlockData(Blockdata blockdata, bool enableScriptCallback = false);
- void floodFillCollisionElevation(int x, int y, uint16_t collision, uint16_t elevation);
- void _floodFillCollisionElevation(int x, int y, uint16_t collision, uint16_t elevation);
- void magicFillCollisionElevation(int x, int y, uint16_t collision, uint16_t elevation);
+
QList getAllEvents() const;
QStringList getScriptLabels(Event::Group group = Event::Group::None);
+ QString getScriptsFilePath() const;
+ void openScript(QString label);
void removeEvent(Event *);
void addEvent(Event *);
+
void deleteConnections();
QList getConnections() const;
void removeConnection(MapConnection *);
void addConnection(MapConnection *);
void loadConnection(MapConnection *);
- QRect getConnectionRect(const QString &direction, MapLayout *fromLayout = nullptr);
- QPixmap renderConnection(const QString &direction, MapLayout *fromLayout = nullptr);
- QPixmap renderBorder(bool ignoreCache = false);
- void setDimensions(int newWidth, int newHeight, bool setNewBlockdata = true, bool enableScriptCallback = false);
- void setBorderDimensions(int newWidth, int newHeight, bool setNewBlockdata = true, bool enableScriptCallback = false);
- void clearBorderCache();
- void cacheBorder();
- bool hasUnsavedChanges();
- bool isWithinBounds(int x, int y);
- bool isWithinBorderBounds(int x, int y);
- void openScript(QString label);
- QString getScriptsFilePath() const;
-
- MapPixmapItem *mapItem = nullptr;
- void setMapItem(MapPixmapItem *item) { mapItem = item; }
-
- CollisionPixmapItem *collisionItem = nullptr;
- void setCollisionItem(CollisionPixmapItem *item) { collisionItem = item; }
-
- BorderMetatilesPixmapItem *borderItem = nullptr;
- void setBorderItem(BorderMetatilesPixmapItem *item) { borderItem = item; }
+ QRect getConnectionRect(const QString &direction, Layout *fromLayout = nullptr);
+ QPixmap renderConnection(const QString &direction, Layout *fromLayout = nullptr);
QUndoStack editHistory;
void modify();
void clean();
+ bool hasUnsavedChanges() const;
void pruneEditHistory();
private:
- void setNewDimensionsBlockdata(int newWidth, int newHeight);
- void setNewBorderDimensionsBlockdata(int newWidth, int newHeight);
void trackConnection(MapConnection*);
// MapConnections in 'ownedConnections' but not 'connections' persist in the edit history.
@@ -141,7 +114,6 @@ class Map : public QObject
signals:
void modified();
void mapDimensionsChanged(const QSize &size);
- void mapNeedsRedrawing();
void openScriptRequested(QString label);
void connectionAdded(MapConnection*);
void connectionRemoved(MapConnection*);
diff --git a/include/core/maplayout.h b/include/core/maplayout.h
index 13215fff0..b617002fa 100644
--- a/include/core/maplayout.h
+++ b/include/core/maplayout.h
@@ -7,41 +7,135 @@
#include
#include
#include
+#include
-class MapLayout {
+class Map;
+class LayoutPixmapItem;
+class CollisionPixmapItem;
+class BorderMetatilesPixmapItem;
+
+class Layout : public QObject {
+ Q_OBJECT
public:
- MapLayout() {}
+ Layout() {}
+
static QString layoutConstantFromName(QString mapName);
+
+ bool loaded = false;
+
QString id;
QString name;
+
int width;
int height;
int border_width;
int border_height;
+
QString border_path;
QString blockdata_path;
+
QString tileset_primary_label;
QString tileset_secondary_label;
+
Tileset *tileset_primary = nullptr;
Tileset *tileset_secondary = nullptr;
+
Blockdata blockdata;
+
+ QImage image;
+ QPixmap pixmap;
QImage border_image;
QPixmap border_pixmap;
+ QImage collision_image;
+ QPixmap collision_pixmap;
+
Blockdata border;
Blockdata cached_blockdata;
Blockdata cached_collision;
Blockdata cached_border;
struct {
Blockdata blocks;
- QSize mapDimensions;
+ QSize layoutDimensions;
Blockdata border;
QSize borderDimensions;
} lastCommitBlocks; // to track map changes
+ QList metatileLayerOrder;
+ QList metatileLayerOpacity;
+
+ LayoutPixmapItem *layoutItem = nullptr;
+ CollisionPixmapItem *collisionItem = nullptr;
+ BorderMetatilesPixmapItem *borderItem = nullptr;
+
+ QUndoStack editHistory;
+
+ // to simplify new layout settings transfer between functions
+ struct SimpleSettings {
+ QString id;
+ QString name;
+ int width;
+ int height;
+ QString tileset_primary_label;
+ QString tileset_secondary_label;
+ QString from_id = QString();
+ };
+
+public:
+ Layout *copy();
+ void copyFrom(Layout *other);
+
int getWidth();
int getHeight();
int getBorderWidth();
int getBorderHeight();
+
+ bool isWithinBounds(int x, int y);
+ bool isWithinBorderBounds(int x, int y);
+
+ bool getBlock(int x, int y, Block *out);
+ void setBlock(int x, int y, Block block, bool enableScriptCallback = false);
+ void setBlockdata(Blockdata blockdata, bool enableScriptCallback = false);
+
+ void setDimensions(int newWidth, int newHeight, bool setNewBlockdata = true, bool enableScriptCallback = false);
+ void setBorderDimensions(int newWidth, int newHeight, bool setNewBlockdata = true, bool enableScriptCallback = false);
+
+ void cacheBlockdata();
+ void cacheCollision();
+ void clearBorderCache();
+ void cacheBorder();
+
+ bool hasUnsavedChanges() const;
+
+ bool layoutBlockChanged(int i, const Blockdata &cache);
+
+ uint16_t getBorderMetatileId(int x, int y);
+ void setBorderMetatileId(int x, int y, uint16_t metatileId, bool enableScriptCallback = false);
+ void setBorderBlockData(Blockdata blockdata, bool enableScriptCallback = false);
+
+ void floodFillCollisionElevation(int x, int y, uint16_t collision, uint16_t elevation);
+ void _floodFillCollisionElevation(int x, int y, uint16_t collision, uint16_t elevation);
+ void magicFillCollisionElevation(int x, int y, uint16_t collision, uint16_t elevation);
+
+ QPixmap render(bool ignoreCache = false, Layout *fromLayout = nullptr, QRect bounds = QRect(0, 0, -1, -1));
+ QPixmap renderCollision(bool ignoreCache);
+ // QPixmap renderConnection(MapConnection, Layout *);
+ QPixmap renderBorder(bool ignoreCache = false);
+
+ QPixmap getLayoutItemPixmap();
+
+ void setLayoutItem(LayoutPixmapItem *item) { layoutItem = item; }
+ void setCollisionItem(CollisionPixmapItem *item) { collisionItem = item; }
+ void setBorderItem(BorderMetatilesPixmapItem *item) { borderItem = item; }
+
+private:
+ void setNewDimensionsBlockdata(int newWidth, int newHeight);
+ void setNewBorderDimensionsBlockdata(int newWidth, int newHeight);
+
+signals:
+ void layoutChanged(Layout *layout);
+ //void modified();
+ void layoutDimensionsChanged(const QSize &size);
+ void needsRedrawing();
};
#endif // MAPLAYOUT_H
diff --git a/include/core/mapparser.h b/include/core/mapparser.h
index 21e3074e4..4032154a5 100644
--- a/include/core/mapparser.h
+++ b/include/core/mapparser.h
@@ -10,7 +10,7 @@ class MapParser
{
public:
MapParser();
- MapLayout *parse(QString filepath, bool *error, Project *project);
+ Layout *parse(QString filepath, bool *error, Project *project);
};
#endif // MAPPARSER_H
diff --git a/include/core/regionmap.h b/include/core/regionmap.h
index bc05a84f7..822df79b3 100644
--- a/include/core/regionmap.h
+++ b/include/core/regionmap.h
@@ -57,8 +57,8 @@ class RegionMap : public QObject
bool loadLayout(poryjson::Json);
bool loadEntries();
- void setEntries(tsl::ordered_map *entries) { this->region_map_entries = entries; }
- void setEntries(tsl::ordered_map entries) { *(this->region_map_entries) = entries; }
+ void setEntries(QMap *entries) { this->region_map_entries = entries; }
+ void setEntries(const QMap &entries) { *(this->region_map_entries) = entries; }
void clearEntries() { this->region_map_entries->clear(); }
MapSectionEntry getEntry(QString section);
void setEntry(QString section, MapSectionEntry entry);
@@ -114,8 +114,6 @@ class RegionMap : public QObject
void setLayer(QString layer) { this->current_layer = layer; }
QString getLayer() { return this->current_layer; }
- QString fixCase(QString);
-
int padLeft() { return this->offset_left; }
int padTop() { return this->offset_top; }
int padRight() { return this->tilemap_width - this->layout_width - this->offset_left; }
@@ -149,14 +147,12 @@ class RegionMap : public QObject
const QString section_prefix;
const QString default_map_section;
- const QString count_map_section;
signals:
void mapNeedsDisplaying();
private:
- // TODO: defaults needed?
- tsl::ordered_map *region_map_entries = nullptr;
+ QMap *region_map_entries = nullptr;
QString alias = "";
diff --git a/include/core/regionmapeditcommands.h b/include/core/regionmapeditcommands.h
index 69bea2510..05b12bc3b 100644
--- a/include/core/regionmapeditcommands.h
+++ b/include/core/regionmapeditcommands.h
@@ -64,9 +64,9 @@ class EditLayout : public QUndoCommand {
/// Edit Layout Dimensions
-class ResizeLayout : public QUndoCommand {
+class ResizeRMLayout : public QUndoCommand {
public:
- ResizeLayout(RegionMap *map, int oldWidth, int oldHeight, int newWidth, int newHeight,
+ ResizeRMLayout(RegionMap *map, int oldWidth, int oldHeight, int newWidth, int newHeight,
QMap> oldLayouts, QMap> newLayouts, QUndoCommand *parent = nullptr);
void undo() override;
@@ -153,7 +153,7 @@ class ResizeTilemap : public EditTilemap {
/// ClearEntries
class ClearEntries : public QUndoCommand {
public:
- ClearEntries(RegionMap *map, tsl::ordered_map, QUndoCommand *parent = nullptr);
+ ClearEntries(RegionMap *map, QMap, QUndoCommand *parent = nullptr);
void undo() override;
void redo() override;
@@ -163,7 +163,7 @@ class ClearEntries : public QUndoCommand {
private:
RegionMap *map;
- tsl::ordered_map entries;
+ QMap entries;
};
#endif // REGIONMAPEDITCOMMANDS_H
diff --git a/include/core/wildmoninfo.h b/include/core/wildmoninfo.h
index 6c93d0d20..d0aa29dce 100644
--- a/include/core/wildmoninfo.h
+++ b/include/core/wildmoninfo.h
@@ -8,7 +8,7 @@
struct WildPokemon {
int minLevel = 5;
int maxLevel = 5;
- QString species = "SPECIES_NONE";
+ QString species = "SPECIES_NONE"; // TODO: Use define_species_prefix
};
struct WildMonInfo {
diff --git a/include/editor.h b/include/editor.h
index 88eec3074..f5e94d288 100644
--- a/include/editor.h
+++ b/include/editor.h
@@ -10,6 +10,7 @@
#include
#include
#include
+#include
#include "mapconnection.h"
#include "metatileselector.h"
@@ -21,7 +22,7 @@
#include "divingmappixmapitem.h"
#include "currentselectedmetatilespixmapitem.h"
#include "collisionpixmapitem.h"
-#include "mappixmapitem.h"
+#include "layoutpixmapitem.h"
#include "settings.h"
#include "gridsettings.h"
#include "movablerect.h"
@@ -46,18 +47,33 @@ class Editor : public QObject
public:
Ui::MainWindow* ui;
QObject *parent = nullptr;
+
QPointer project = nullptr;
- Map *map = nullptr;
+ QPointer