mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
updated rogueviz to changed functions
This commit is contained in:
parent
b80bd90174
commit
64f4f93966
@ -396,7 +396,7 @@ struct hrmap_grigorchuk : hrmap_standard {
|
||||
void draw_at(cell *at, const shiftmatrix& where) override {
|
||||
|
||||
dq::clear_all();
|
||||
dq::enqueue_by_matrix(at->master, where * master_relative(centerover, true));
|
||||
dq::enqueue_by_matrix(at->master, where * currentmap->master_relative(centerover, true));
|
||||
|
||||
while(!dq::drawqueue.empty()) {
|
||||
auto& p = dq::drawqueue.front();
|
||||
@ -414,7 +414,7 @@ struct hrmap_grigorchuk : hrmap_standard {
|
||||
if(patterns::whichCanvas == 'G' && c->landparam == 0)
|
||||
c->landparam = 0x102008 * (1 + ((hrmap_grigorchuk*)currentmap)->dec[c->master]->len);
|
||||
|
||||
drawcell(c, V * master_relative(c, false));
|
||||
drawcell(c, V * currentmap->master_relative(c, false));
|
||||
|
||||
for(int i=0; i<3; i++) if(c->move(i))
|
||||
dq::enqueue_by_matrix(h->cmove(i), optimized_shift(V * adj(h, i)));
|
||||
|
@ -1253,7 +1253,7 @@ void fillgroups() {
|
||||
do_classify();
|
||||
vector<int> samples_to_sort;
|
||||
for(int i=0; i<samples; i++) samples_to_sort.push_back(i);
|
||||
hrandom_shuffle(samples_to_sort);
|
||||
hrandom_shuffle(&samples_to_sort[0], samples);
|
||||
for(int i=0; i<samples; i++) if(net[bids[i]].drawn_samples < net[bids[i]].max_group_here)
|
||||
showsample(i);
|
||||
distribute_neurons();
|
||||
|
@ -463,8 +463,8 @@ struct hrmap_notknot : hrmap {
|
||||
}
|
||||
|
||||
bool adjacent_matrix(const transmatrix& Tk, const transmatrix& Tl) {
|
||||
for(auto vk: cgi.vertices_only)
|
||||
for(auto vl: cgi.vertices_only)
|
||||
for(auto vk: cgi.heptshape->vertices_only)
|
||||
for(auto vl: cgi.heptshape->vertices_only)
|
||||
if(hdist(Tk * vk, Tl * vl) < .01)
|
||||
return true;
|
||||
|
||||
@ -492,7 +492,7 @@ struct hrmap_notknot : hrmap {
|
||||
return;
|
||||
}
|
||||
|
||||
for(auto& v: cgi.vertices_only) {
|
||||
for(auto& v: cgi.heptshape->vertices_only) {
|
||||
map<heptagon*, ucover*> visited;
|
||||
vector<pair<ucover *, transmatrix>> q;
|
||||
|
||||
@ -515,7 +515,7 @@ struct hrmap_notknot : hrmap {
|
||||
if(u2->state != 0) continue;
|
||||
auto T1 = T0 * adj(u1, i);
|
||||
bool adjacent = false;
|
||||
for(auto& v2: cgi.vertices_only)
|
||||
for(auto& v2: cgi.heptshape->vertices_only)
|
||||
if(hdist(T1 * v2, h) < 1e-5)
|
||||
adjacent = true;
|
||||
if(adjacent)
|
||||
@ -584,7 +584,7 @@ struct hrmap_notknot : hrmap {
|
||||
if(u2->iswall()) continue;
|
||||
transmatrix Tj = Ti * adj(at, j);
|
||||
bool adj = false;
|
||||
for(auto v: cgi.vertices_only) for(auto v1: cgi.vertices_only)
|
||||
for(auto v: cgi.heptshape->vertices_only) for(auto v1: cgi.heptshape->vertices_only)
|
||||
if(hdist(M * v1, Tj * v) < 1e-3) adj = true;
|
||||
|
||||
if(adj) visit(at, u2, at->where->c.spin(j), Tj);
|
||||
|
@ -31,8 +31,8 @@ void create_pentaroll(bool animated) {
|
||||
/* the construction */
|
||||
for(cell *c: cl.lst) {
|
||||
int common = 0;
|
||||
for(auto& v: cgi.vertices_only)
|
||||
for(auto& w: cgi.vertices_only)
|
||||
for(auto& v: currentmap->get_cellshape(c).vertices_only_local)
|
||||
for(auto& w: currentmap->get_cellshape(c).vertices_only_local)
|
||||
if(hdist(v, rel[c] * w) < 1e-6)
|
||||
common++;
|
||||
|
||||
@ -49,7 +49,7 @@ void create_pentaroll(bool animated) {
|
||||
cellwalker cw(c0, i0);
|
||||
cw.peek()->wall = waPlatform;
|
||||
if(cgi.face == 5) {
|
||||
cellwalker cw1 = reg3::strafe(cw, (i==1?cgi.face:i-1));
|
||||
cellwalker cw1 = currentmap->strafe(cw, (i==1?cgi.face:i-1));
|
||||
cw1.peek()->wall = waWaxWall;
|
||||
cw1.peek()->landparam = hrand(0x1000000) | 0x808080;
|
||||
}
|
||||
@ -74,16 +74,16 @@ void animate() {
|
||||
int tb = int(t) % cgi.face;
|
||||
|
||||
hyperpoint m;
|
||||
for(int i=0; i<cgi.face; i++) m += cgi.vertices_only[i];
|
||||
for(int i=0; i<cgi.face; i++) m += cgi.heptshape->vertices_only[i];
|
||||
m /= cgi.face;
|
||||
|
||||
auto normm = [&] (hyperpoint h) {
|
||||
return normalize(lerp(m, h, how_far));
|
||||
};
|
||||
|
||||
hyperpoint h1 = normm(cgi.vertices_only[tb]);
|
||||
hyperpoint h2 = normm(cgi.vertices_only[(tb+1) % cgi.face]);
|
||||
hyperpoint h3 = normm(cgi.vertices_only[(tb+2) % cgi.face]);
|
||||
hyperpoint h1 = normm(cgi.heptshape->vertices_only[tb]);
|
||||
hyperpoint h2 = normm(cgi.heptshape->vertices_only[(tb+1) % cgi.face]);
|
||||
hyperpoint h3 = normm(cgi.heptshape->vertices_only[(tb+2) % cgi.face]);
|
||||
|
||||
hyperpoint a = gpushxto0(h2) * h1;
|
||||
hyperpoint b = gpushxto0(h2) * h3;
|
||||
|
Loading…
Reference in New Issue
Block a user