mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-12 03:45:51 -05:00
Add a way to name metatiles, for use in c code
Metatiles can be given a name. The name becomes a constant in includes/contstants/metatile_labels.h. The plan is to be able to reference metatiles in code using a macro like `METATILE(Building, TV_ON, Primary)`, which will evaluate to the value 0x003, or `METATILE(BrendansMaysHouse, MOVING_BOX_OPEN, Secondary)`, which will evaluate to the value 0x270.
This commit is contained in:
@@ -12,6 +12,7 @@ Metatile* Metatile::copy() {
|
||||
copy->behavior = this->behavior;
|
||||
copy->layerType = this->layerType;
|
||||
copy->tiles = new QList<Tile>;
|
||||
copy->label = this->label;
|
||||
for (Tile tile : *this->tiles) {
|
||||
copy->tiles->append(tile);
|
||||
}
|
||||
@@ -21,6 +22,7 @@ Metatile* Metatile::copy() {
|
||||
void Metatile::copyInPlace(Metatile *other) {
|
||||
this->behavior = other->behavior;
|
||||
this->layerType = other->layerType;
|
||||
this->label = other->label;
|
||||
for (int i = 0; i < this->tiles->length(); i++) {
|
||||
(*this->tiles)[i] = other->tiles->at(i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user