From 3ad40c3ec240303885219fecf789c649d66de502 Mon Sep 17 00:00:00 2001 From: Primekick Date: Wed, 27 Nov 2024 14:51:57 +0100 Subject: [PATCH] Add partial AB autotile rewriting --- src/tilemap_layer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tilemap_layer.cpp b/src/tilemap_layer.cpp index f4e1dff8c3..e2ea3e560b 100644 --- a/src/tilemap_layer.cpp +++ b/src/tilemap_layer.cpp @@ -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;