Skip to content

Commit

Permalink
Add partial AB autotile rewriting
Browse files Browse the repository at this point in the history
  • Loading branch information
Primekick committed Nov 27, 2024
1 parent 9b1f154 commit 3ad40c3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/tilemap_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,14 @@ void TilemapLayer::SetMapTileDataAt(int x, int y, int tile_id, bool disable_auto
{-1, 1}, { 0, 1}, { 1, 1}
};

RecalculateAutotile(x, y, tile_id);
// TODO: make it work for AB autotiles
if (IsAutotileAB(tile_id)) {
RecreateTileDataAt(x, y, tile_id);
Output::Warning("Maniac Patch: Command RewriteMap is only partially supported.");
} else {
RecalculateAutotile(x, y, tile_id);
}

for (const auto& adj : adjacent) {
auto nx = x + adj.dx;
auto ny = y + adj.dy;
Expand Down

0 comments on commit 3ad40c3

Please sign in to comment.