Add edit-undo history to tileset metatile editing

This commit is contained in:
Marcus Huderle
2018-10-06 17:07:36 -05:00
parent 888270f3ef
commit e42c2e1a81
7 changed files with 149 additions and 14 deletions

View File

@@ -18,6 +18,14 @@ Metatile* Metatile::copy() {
return copy;
}
void Metatile::copyInPlace(Metatile *other) {
this->behavior = other->behavior;
this->layerType = other->layerType;
for (int i = 0; i < this->tiles->length(); i++) {
(*this->tiles)[i] = other->tiles->at(i);
}
}
int Metatile::getBlockIndex(int index) {
if (index < Project::getNumMetatilesPrimary()) {
return index;