From 3670be57006baea0d0811c0959ea7f59d540ec01 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 14 Sep 2023 17:36:31 +0200 Subject: [PATCH] debug_voronoi option --- bigstuff.cpp | 1 + celldrawer.cpp | 5 +++++ config.cpp | 2 ++ 3 files changed, 8 insertions(+) diff --git a/bigstuff.cpp b/bigstuff.cpp index bb0e6c49..74696388 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -1815,6 +1815,7 @@ EX void start_camelot(cell *c) { } } +EX bool debug_voronoi; EX map horodisk_land; EX map horodisk_last_land; diff --git a/celldrawer.cpp b/celldrawer.cpp index 05a049a6..67ce8c28 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -2105,6 +2105,11 @@ void celldrawer::draw_cellstat() { queuestr(V * rgpushxto0(mid(currentmap->get_corner(c, i, 4), currentmap->get_corner(c, i+1, 5))), .2, its(i), 0xFFFFFFFF, 1); } } + + if(debug_voronoi && ls::voronoi_structure() && mod_allowed()) { + auto p = get_voronoi_winner(c); + queuestr(V, .2, its(p.second), index_pointer_int(p.first) * 0x7F3015, 1); + } if(cmode & sm::TORUSCONFIG) { auto p = euc::coord_display(V, c); diff --git a/config.cpp b/config.cpp index 5a1df369..9a657867 100644 --- a/config.cpp +++ b/config.cpp @@ -3223,6 +3223,8 @@ EX int config3 = addHook(hooks_configfile, 100, [] { "Setting 1 uses the internal shape IDs, while setting 2 in tes files uses " "the original IDs in case if extra tile types were added to " "separate mirror images or different football types.", 'd'); + param_b(debug_voronoi, "debug_voronoi")->editable( + "display Voronoi tie debug values", 'd'); param_f(global_boundary_ratio, "global_boundary_ratio") ->editable(0, 5, 0.1, "Width of cell boundaries", "How wide should the cell boundaries be.", '0');