From 18b9e5fbeefe6d038ef93169c9cecfa8e0aee98e Mon Sep 17 00:00:00 2001 From: SBird Date: Tue, 30 Jun 2020 16:05:56 +0200 Subject: [PATCH] triple-layer: fix creating tilesets --- src/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 22a2b3bd..98b2be70 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1070,8 +1070,9 @@ void MainWindow::on_actionNew_Tileset_triggered() { editor->project->loadTilesetTiles(newSet, *tilesImage); newSet->metatiles = new QList(); for(int i = 0; i < numMetaTiles; ++i) { + int tilesPerMetatile = projectConfig.getTripleLayerMetatilesEnabled() ? 12 : 8; Metatile *mt = new Metatile(); - for(int j = 0; j < 8; ++j){ + for(int j = 0; j < tilesPerMetatile; ++j){ Tile *tile = new Tile(); //Create a checkerboard-style dummy tileset if(((i / 8) % 2) == 0)