diff --git a/celldrawer.cpp b/celldrawer.cpp index 1612f20d..63c16cdc 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -1940,7 +1940,7 @@ void celldrawer::check_rotations() { } } -EX bool debug_tiles; +EX int debug_tiles; void celldrawer::bookkeeping() { bool orig = false; @@ -2034,8 +2034,27 @@ void celldrawer::draw_cellstat() { queuestr(V, 1 * .2, label, 0xFFFFFFFF, 1); } - if(debug_tiles) { - string label = its(shvid(c)); + if(debug_tiles && mod_allowed()) { + string label; + if(arb::in() && debug_tiles == 2) { + int id = shvid(c); + auto& sh = arb::current.shapes[id]; + int oid = sh.orig_id; + label = its(oid); + if(c->master->emeraldval || sh.is_mirrored) label += 'M'; + if(arb::current.was_split_for_football) label += "F" + its(sh.football_type); + } + else if(arcm::in() && debug_tiles == 2) { + int id = arcm::id_of(c->master); + int tid = arcm::current.tilegroup[id]; + int tid2 = arcm::current.tilegroup[id^1]; + bool mirrored = (id&1) && (tid != tid2); + if(tid2 >= 0) tid = min(tid, tid2); + label = its(tid); + if(mirrored) label += "M"; + } + else + label = its(shvid(c)); queuestr(V, .5, label, 0xFFFFFFFF, 1); for(int i=0; itype; i++) { queuestr(V * rgpushxto0(currentmap->get_corner(c, i, 4)), .2, its(i), 0xFFFFFFFF, 1); diff --git a/config.cpp b/config.cpp index b6822d6c..5f4f2663 100644 --- a/config.cpp +++ b/config.cpp @@ -2498,7 +2498,12 @@ EX int config3 = addHook(hooks_configfile, 100, [] { ->set_reaction([] { if(vid.highdetail > vid.middetail) vid.highdetail = vid.middetail; }); - param_b(debug_tiles, "debug_tiles"); + param_i(debug_tiles, "debug_tiles")->editable(0, 2, 1, + "display tile debug values", + "Display cell type IDs, as well as vertex and edge identifiers.\n\n" + "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'); addsaver(vid.gp_autoscale_heights, "3D Goldberg autoscaling", true); addsaver(scorefile, "savefile"); param_b(savefile_selection, "savefile_selection") diff --git a/expansion.cpp b/expansion.cpp index 3c0fd5e9..b398f176 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -436,7 +436,7 @@ EX string ncnames[5] = { "NO", "distance", "type", "debug", "error" }; EX eNumberCoding number_coding = ncDistance; EX bool mod_allowed() { - return cheater || autocheat || arcm::in() || tour::on; + return cheater || autocheat || arcm::in() || arb::in() || tour::on; } EX int curr_dist(cell *c) {