mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 23:25:09 -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; }
|
||||
|
||||
@@ -97,7 +97,8 @@ private:
|
||||
void buildUpdateConfigDialog();
|
||||
poryjson::Json buildDefaultJson();
|
||||
poryjson::Json getJsonFromAlias(QString alias);
|
||||
bool loadRegionMapData();
|
||||
|
||||
bool modified();
|
||||
|
||||
void initShortcuts();
|
||||
void displayRegionMap();
|
||||
@@ -135,6 +136,8 @@ private slots:
|
||||
void on_spinBox_RM_Entry_y_valueChanged(int);
|
||||
void on_spinBox_RM_Entry_width_valueChanged(int);
|
||||
void on_spinBox_RM_Entry_height_valueChanged(int);
|
||||
void on_spinBox_RM_LayoutWidth_valueChanged(int);
|
||||
void on_spinBox_RM_LayoutHeight_valueChanged(int);
|
||||
void on_spinBox_tilePalette_valueChanged(int);
|
||||
void on_checkBox_tileHFlip_stateChanged(int);
|
||||
void on_checkBox_tileVFlip_stateChanged(int);
|
||||
|
||||
Reference in New Issue
Block a user