From 84d48789c76900b1de432cad6ef11c3cf7f7d8d4 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 28 Apr 2022 08:24:13 +0200 Subject: [PATCH] apeirogonal color fixup --- config.cpp | 3 +++ pattern2.cpp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.cpp b/config.cpp index 130cdf84..fc06eca4 100644 --- a/config.cpp +++ b/config.cpp @@ -2985,6 +2985,9 @@ EX int read_color_args() { else if(argis("-fillmodel")) { PHASEFROM(2); shift(); modelcolor = argcolor(32); } + else if(argis("-apeirocolor")) { + PHASEFROM(2); shift(); patterns::apeirogonal_color = argcolor(32); + } else if(argis("-ring")) { PHASEFROM(2); shift(); ringcolor = argcolor(32); } diff --git a/pattern2.cpp b/pattern2.cpp index 39314fab..3a678fdb 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1752,7 +1752,9 @@ EX namespace patterns { } EX hookset hooks_generate_canvas; - + + EX color_t apeirogonal_color = 0xFFFFFFFF; + EX int jhole = 0; EX int jblock = 0; EX int rwalls = 50; @@ -1787,6 +1789,7 @@ EX namespace patterns { if(arb::in()) return colortables['A'][shvid(c) + c->master->emeraldval * isize(arb::current.shapes)]; return colortables['A'][shvid(c)]; case 'B': + if(arb::is_apeirogonal(c)) return apeirogonal_color; return colortables['B'][c->type & 15]; #if CAP_FIELD case 'C': {