mirror of
https://github.com/huderlem/porymap.git
synced 2026-10-01 12:26:37 -05:00
Add ability to save tileset changes
This commit is contained in:
@@ -13,6 +13,7 @@ public:
|
||||
uint8_t behavior;
|
||||
uint8_t layerType;
|
||||
|
||||
Metatile *copy();
|
||||
static int getBlockIndex(int);
|
||||
};
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ public:
|
||||
QList<Metatile*> *metatiles = nullptr;
|
||||
QList<QList<QRgb>> *palettes = nullptr;
|
||||
|
||||
Tileset* copy();
|
||||
|
||||
static Tileset* getBlockTileset(int, Tileset*, Tileset*);
|
||||
static Metatile* getMetatile(int, Tileset*, Tileset*);
|
||||
static QList<QList<QRgb>> getBlockPalettes(Tileset*, Tileset*);
|
||||
|
||||
@@ -68,8 +68,8 @@ public:
|
||||
void updateDiveMap(QString mapName);
|
||||
void updateEmergeMap(QString mapName);
|
||||
void setSelectedConnectionFromMap(QString mapName);
|
||||
void updatePrimaryTileset(QString tilesetLabel);
|
||||
void updateSecondaryTileset(QString tilesetLabel);
|
||||
void updatePrimaryTileset(QString tilesetLabel, bool forceLoad = false);
|
||||
void updateSecondaryTileset(QString tilesetLabel, bool forceLoad = false);
|
||||
void toggleBorderVisibility(bool visible);
|
||||
Tileset *getCurrentMapPrimaryTileset();
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ private slots:
|
||||
void onLoadMapRequested(QString, QString);
|
||||
void onMapChanged(Map *map);
|
||||
void onMapNeedsRedrawing();
|
||||
void onTilesetsSaved(QString, QString);
|
||||
|
||||
void on_action_Save_triggered();
|
||||
void on_tabWidget_2_currentChanged(int index);
|
||||
|
||||
@@ -48,8 +48,8 @@ public:
|
||||
Map* getMap(QString);
|
||||
|
||||
QMap<QString, Tileset*> *tileset_cache = nullptr;
|
||||
Tileset* loadTileset(QString);
|
||||
Tileset* getTileset(QString);
|
||||
Tileset* loadTileset(QString, Tileset *tileset = nullptr);
|
||||
Tileset* getTileset(QString, bool forceLoad = false);
|
||||
|
||||
Blockdata* readBlockdata(QString);
|
||||
void loadBlockdata(Map*);
|
||||
|
||||
@@ -55,13 +55,16 @@ private:
|
||||
int paletteId;
|
||||
bool tileXFlip;
|
||||
bool tileYFlip;
|
||||
QString primaryTilesetLabel;
|
||||
QString secondaryTilesetLabel;
|
||||
Tileset *primaryTileset;
|
||||
Tileset *secondaryTileset;
|
||||
QGraphicsScene *metatilesScene = nullptr;
|
||||
QGraphicsScene *tilesScene = nullptr;
|
||||
QGraphicsScene *selectedTileScene = nullptr;
|
||||
QGraphicsPixmapItem *selectedTilePixmapItem = nullptr;
|
||||
QGraphicsScene *metatileLayersScene = nullptr;
|
||||
|
||||
signals:
|
||||
void tilesetsSaved(QString, QString);
|
||||
};
|
||||
|
||||
#endif // TILESETEDITOR_H
|
||||
|
||||
@@ -26,8 +26,8 @@ protected:
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent*);
|
||||
|
||||
private:
|
||||
Tileset *primaryTileset;
|
||||
Tileset *secondaryTileset;
|
||||
Tileset *primaryTileset = nullptr;
|
||||
Tileset *secondaryTileset = nullptr;
|
||||
uint16_t selectedMetatile;
|
||||
int numMetatilesWide;
|
||||
void updateSelectedMetatile();
|
||||
|
||||
Reference in New Issue
Block a user