1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

in_wallopt(): auto in racing

This commit is contained in:
Zeno Rogue 2019-12-06 11:45:19 +01:00
parent 4d5928fcc0
commit 99ab57086b
6 changed files with 9 additions and 7 deletions

View File

@ -191,7 +191,7 @@ struct hrmap_asonov : hrmap {
cell *c = h->c7; cell *c = h->c7;
if(!do_draw(c, V)) continue; if(!do_draw(c, V)) continue;
drawcell(c, V); drawcell(c, V);
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue; if(in_wallopt() && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
for(int i=0; i<S7; i++) for(int i=0; i<S7; i++)
dq::enqueue_by_matrix(h->cmove(i), V * adjmatrix(i)); dq::enqueue_by_matrix(h->cmove(i), V * adjmatrix(i));

View File

@ -581,7 +581,7 @@ struct hrmap_crystal : hrmap_standard {
if(!do_draw(c, V)) continue; if(!do_draw(c, V)) continue;
drawcell(c, V); drawcell(c, V);
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue; if(in_wallopt() && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
for(int d=0; d<S7; d++) { for(int d=0; d<S7; d++) {
dq::enqueue_by_matrix(h->move(d), V * adj(h, d)); dq::enqueue_by_matrix(h->move(d), V * adj(h, d));

View File

@ -179,7 +179,7 @@ EX namespace euclid3 {
cell *c = h->c7; cell *c = h->c7;
bool draw = drawcell_subs(c, V * spin(master_to_c7_angle())); bool draw = drawcell_subs(c, V * spin(master_to_c7_angle()));
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue; if(in_wallopt() && isWall3(c) && isize(dq::drawqueue) > 1000 && !hybrid::pmap) continue;
if(draw) for(int i=0; i<S7; i++) if(draw) for(int i=0; i<S7; i++)
dq::enqueue_by_matrix(h->move(i), V * adj(h, i)); dq::enqueue_by_matrix(h->move(i), V * adj(h, i));

View File

@ -16,6 +16,8 @@ EX int inmirrorcount = 0;
/** wall optimization: do not draw things beyond walls */ /** wall optimization: do not draw things beyond walls */
EX bool wallopt; EX bool wallopt;
EX bool in_wallopt() { return wallopt || racing::on; }
EX bool spatial_graphics; EX bool spatial_graphics;
EX bool wmspatial, wmescher, wmplain, wmblack, wmascii; EX bool wmspatial, wmescher, wmplain, wmblack, wmascii;
EX bool mmspatial, mmhigh, mmmon, mmitem; EX bool mmspatial, mmhigh, mmmon, mmitem;

View File

@ -413,7 +413,7 @@ EX namespace solnihv {
cell *c = h->c7; cell *c = h->c7;
if(!do_draw(c, V)) continue; if(!do_draw(c, V)) continue;
drawcell(c, V); drawcell(c, V);
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue; if(in_wallopt() && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
for(int i=0; i<S7; i++) { for(int i=0; i<S7; i++) {
// note: need do cmove before c.spin // note: need do cmove before c.spin
@ -873,7 +873,7 @@ EX namespace nilv {
cell *c = h->c7; cell *c = h->c7;
if(!do_draw(c, V)) continue; if(!do_draw(c, V)) continue;
drawcell(c, V); drawcell(c, V);
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue; if(in_wallopt() && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
if(0) for(int t=0; t<c->type; t++) { if(0) for(int t=0; t<c->type; t++) {
if(!c->move(t)) continue; if(!c->move(t)) continue;

View File

@ -567,7 +567,7 @@ EX namespace reg3 {
cell *c = h->c7; cell *c = h->c7;
if(!do_draw(c, V)) continue; if(!do_draw(c, V)) continue;
drawcell(c, V); drawcell(c, V);
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue; if(in_wallopt() && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
for(int d=0; d<S7; d++) for(int d=0; d<S7; d++)
dq::enqueue_by_matrix(h->move(d), V * tmatrices[h->fieldval][d]); dq::enqueue_by_matrix(h->move(d), V * tmatrices[h->fieldval][d]);
@ -861,7 +861,7 @@ EX namespace reg3 {
cell *c = h->c7; cell *c = h->c7;
if(!do_draw(c, V)) continue; if(!do_draw(c, V)) continue;
drawcell(c, V); drawcell(c, V);
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue; if(in_wallopt() && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
for(int i=0; i<S7; i++) if(h->move(i)) { for(int i=0; i<S7; i++) if(h->move(i)) {
dq::enqueue(h->move(i), V * adj(h, i)); dq::enqueue(h->move(i), V * adj(h, i));