mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-20 07:36:31 -05:00
Prevent duplicate metatile pastes in the tileset editor
This commit is contained in:
@@ -54,4 +54,18 @@ public:
|
||||
static int getAttributesSize(BaseGameVersion version);
|
||||
};
|
||||
|
||||
inline bool operator==(const Metatile &a, const Metatile &b) {
|
||||
return a.behavior == b.behavior &&
|
||||
a.layerType == b.layerType &&
|
||||
a.encounterType == b.encounterType &&
|
||||
a.terrainType == b.terrainType &&
|
||||
a.unusedAttributes == b.unusedAttributes &&
|
||||
a.label == b.label &&
|
||||
a.tiles == b.tiles;
|
||||
}
|
||||
|
||||
inline bool operator!=(const Metatile &a, const Metatile &b) {
|
||||
return !(operator==(a, b));
|
||||
}
|
||||
|
||||
#endif // METATILE_H
|
||||
|
||||
@@ -22,4 +22,15 @@ public:
|
||||
static int getIndexInTileset(int);
|
||||
};
|
||||
|
||||
inline bool operator==(const Tile &a, const Tile &b) {
|
||||
return a.tileId == b.tileId &&
|
||||
a.xflip == b.xflip &&
|
||||
a.yflip == b.yflip &&
|
||||
a.palette == b.palette;
|
||||
}
|
||||
|
||||
inline bool operator!=(const Tile &a, const Tile &b) {
|
||||
return !(operator==(a, b));
|
||||
}
|
||||
|
||||
#endif // TILE_H
|
||||
|
||||
Reference in New Issue
Block a user