Add ability to save tileset changes

This commit is contained in:
Marcus Huderle
2018-10-02 19:01:15 -05:00
parent 428548b7e1
commit 8d38783833
14 changed files with 97 additions and 40 deletions

View File

@@ -7,6 +7,17 @@ Metatile::Metatile()
tiles = new QList<Tile>;
}
Metatile* Metatile::copy() {
Metatile *copy = new Metatile;
copy->behavior = this->behavior;
copy->layerType = this->layerType;
copy->tiles = new QList<Tile>;
for (Tile tile : *this->tiles) {
copy->tiles->append(tile);
}
return copy;
}
int Metatile::getBlockIndex(int index) {
if (index < Project::getNumMetatilesPrimary()) {
return index;