From e7eacdde9dc5a99636cda74c91384a4ec0752547 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 27 Oct 2023 18:42:56 -0400 Subject: Simpler default layout --- ext/wittle_generator/Generate.cpp | 4 ++++ ext/wittle_generator/Generate.h | 2 +- ext/wittle_generator/Test.cpp | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/wittle_generator/Generate.cpp b/ext/wittle_generator/Generate.cpp index 5776386..49ffe96 100644 --- a/ext/wittle_generator/Generate.cpp +++ b/ext/wittle_generator/Generate.cpp @@ -54,6 +54,10 @@ void Generate::initPanel() { if (hasFlag(Config::TreehouseLayout)) { init_treehouse_layout(); } + if (hasFlag(Config::RegularStartEnd)) { + setSymbol(Decoration::Start, 0, _panel->height() - 1); + setSymbol(Decoration::Exit, _panel->width() - 1, 0); + } if (_custom_grid.size() > 0) { // If we want to start with a certain default grid when generating diff --git a/ext/wittle_generator/Generate.h b/ext/wittle_generator/Generate.h index e37c2fd..0dc5fc3 100644 --- a/ext/wittle_generator/Generate.h +++ b/ext/wittle_generator/Generate.h @@ -48,7 +48,7 @@ class Generate { TreehouseColors = 0x4000, AlternateColors = 0x8000, WriteColors = 0x10000, - Write2Color = 0x20000, + RegularStartEnd = 0x20000, FixBackground = 0x40000, CombineErasers = 0x80000, LongPath = 0x100000, diff --git a/ext/wittle_generator/Test.cpp b/ext/wittle_generator/Test.cpp index 1a2597a..5eaef5a 100644 --- a/ext/wittle_generator/Test.cpp +++ b/ext/wittle_generator/Test.cpp @@ -2,8 +2,7 @@ int main(int, char**) { Generate generator; - generator.setSymbol(Decoration::Start, 0, 4 * 2); - generator.setSymbol(Decoration::Exit, 4 * 2, 0); + generator.setFlag(Generate::RegularStartEnd); /*generator.generate(4 * 2 + 1, 4 * 2 + 1, {{{Decoration::Triangle | Decoration::Orange, 6}}});*/ generator.generate( -- cgit 1.4.1