diff --git a/geometry2.cpp b/geometry2.cpp index 88640846..b38baa89 100644 --- a/geometry2.cpp +++ b/geometry2.cpp @@ -61,7 +61,7 @@ transmatrix calc_relative_matrix(cell *c2, cell *c1, const hyperpoint& point_hin auto bak = gp::draw_li; swap(gmatrix, gmatrix0); just_gmatrix = true; - drawrec(viewctr, hsOrigin, Id); + drawStandard(); just_gmatrix = false; swap(gmatrix, gmatrix0); gp::draw_li = bak; diff --git a/hyper.h b/hyper.h index 340204ad..2b67bd45 100644 --- a/hyper.h +++ b/hyper.h @@ -3858,7 +3858,7 @@ void queuestr(const hyperpoint& h, int size, const string& chr, color_t col, int void queuechr(const transmatrix& V, double size, char chr, color_t col, int frame = 0); extern bool just_gmatrix; -void drawrec(const heptspin& hs, hstate s, const transmatrix& V, int reclev = 0); +void drawStandard(); bool haveLeaderboard(int id); int get_currentscore(int id); diff --git a/hypgraph.cpp b/hypgraph.cpp index dae6e216..d2b2bb7b 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -735,14 +735,14 @@ void drawrec(cell *c, const transmatrix& V) { bool drawrec(cell *c, const transmatrix& V, gp::loc at, int dir, int maindir) { bool res = false; - if(do_draw(c, V)) { + transmatrix V1 = V * Tf[draw_li.last_dir][at.first&31][at.second&31][fixg6(dir)]; + if(do_draw(c, V1)) { /* auto li = get_local_info(c); if(fix6(dir) != fix6(li.total_dir)) printf("totaldir %d/%d\n", dir, li.total_dir); if(at != li.relative) printf("at %s/%s\n", disp(at), disp(li.relative)); if(maindir != li.last_dir) printf("ld %d/%d\n", maindir, li.last_dir); */ draw_li.relative = at; draw_li.total_dir = fixg6(dir); - transmatrix V1 = V * Tf[draw_li.last_dir][at.first&31][at.second&31][fixg6(dir)]; drawcell(c, V1, 0, false); res = true; } @@ -775,61 +775,70 @@ void drawrec(cell *c, const transmatrix& V) { } } -void drawrec(const heptspin& hs, hstate s, const transmatrix& V, int reclev) { +vector > drawn_cells; - // calc_relative_matrix(cwt.c, hs.at); - cell *c = hs.at->c7; - - transmatrix V10; - const transmatrix& V1 = hs.mirrored ? (V10 = V * Mirror) : V; - - bool draw = false; - - if(GOLDBERG) { - draw = gp::drawrec(c, actualV(hs, V1)); - } - - else if(IRREGULAR) { - auto& hi = irr::periodmap[hs.at]; - transmatrix V0 = actualV(hs, V1); - auto& vc = irr::cells_of_heptagon[hi.base.at]; - for(int i=0; i(dc); + auto& s = get<1>(dc); + auto& V = get<2>(dc); + dynamicval bs(band_shift, get<3>(dc)); - if(BITRUNCATED) for(int d=0; dc.fix(hs.spin + d); - // createMov(c, ds); - if(c->move(ds) && c->c.spin(ds) == 0) { - transmatrix V2 = V1 * hexmove[d]; - if(do_draw(c->move(ds), V2)) + cell *c = hs.at->c7; + + transmatrix V10; + const transmatrix& V1 = hs.mirrored ? (V10 = V * Mirror) : V; + + bool draw = false; + + if(GOLDBERG) { + draw = gp::drawrec(c, actualV(hs, V1)); + } + + else if(IRREGULAR) { + auto& hi = irr::periodmap[hs.at]; + transmatrix V0 = actualV(hs, V1); + auto& vc = irr::cells_of_heptagon[hi.base.at]; + for(int i=0; imove(ds), V2, 0, hs.mirrored ^ c->c.mirror(ds)); + drawcell(hi.subcells[i], V0 * irr::cells[vc[i]].pusher, 0, false); } } - } - - if(draw) for(int d=0; dc.fix(hs.spin + d); + // createMov(c, ds); + if(c->move(ds) && c->c.spin(ds) == 0) { + transmatrix V2 = V1 * hexmove[d]; + if(do_draw(c->move(ds), V2)) + draw = true, + drawcell(c->move(ds), V2, 0, hs.mirrored ^ c->c.mirror(ds)); + } + } + } + + if(draw) for(int d=0; d