mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-20 15:46:50 -05:00
add history for region map layout size and mapsec entry edits
This commit is contained in:
@@ -21,10 +21,11 @@ class Project;
|
||||
|
||||
struct LayoutSquare
|
||||
{
|
||||
LayoutSquare() : map_section("MAPSEC_NONE"), x(-1), y(-1), has_map(false) {}
|
||||
QString map_section;
|
||||
int x;
|
||||
int y;
|
||||
bool has_map = false;
|
||||
bool has_map;
|
||||
};
|
||||
|
||||
struct MapSectionEntry
|
||||
@@ -54,6 +55,7 @@ public:
|
||||
|
||||
void setEntries(tsl::ordered_map<QString, MapSectionEntry> *entries) { this->region_map_entries = entries; }
|
||||
MapSectionEntry getEntry(QString section);
|
||||
void setEntry(QString section, MapSectionEntry entry);
|
||||
|
||||
void save();
|
||||
void saveTilemap();
|
||||
@@ -98,6 +100,9 @@ public:
|
||||
QList<LayoutSquare> getLayout(QString layer);
|
||||
void setLayout(QString layer, QList<LayoutSquare> layout);
|
||||
|
||||
QMap<QString, QList<LayoutSquare>> getAllLayouts();
|
||||
void setAllLayouts(QMap<QString, QList<LayoutSquare>> newLayouts);
|
||||
|
||||
QStringList getLayers() { return this->layout_layers; }
|
||||
void setLayer(QString layer) { this->current_layer = layer; }
|
||||
QString getLayer() { return this->current_layer; }
|
||||
@@ -114,6 +119,10 @@ public:
|
||||
int tilemapSize() { return this->tilemap_width * this->tilemap_height; }
|
||||
int tilemapBytes();
|
||||
|
||||
int layoutWidth() { return this->layout_width; }
|
||||
int layoutHeight() { return this->layout_height; }
|
||||
void setLayoutDimensions(int width, int height, bool update = true);
|
||||
|
||||
int tilemapToLayoutIndex(int index);
|
||||
|
||||
TilemapFormat tilemapFormat() { return this->tilemap_format; }
|
||||
|
||||
Reference in New Issue
Block a user