mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-01 00:07:02 +00:00
wall optimization option (-wallopt): do not draw things behind walls
This commit is contained in:
parent
e80869e14e
commit
adee8aa699
@ -694,6 +694,7 @@ EX namespace euclid3 {
|
||||
cell *c = h->c7;
|
||||
if(!do_draw(c, V)) continue;
|
||||
drawcell(c, V, 0, false);
|
||||
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
|
||||
|
||||
for(int i=0; i<S7; i++)
|
||||
dq::enqueue_by_matrix(h->move(i), V * get_move(h->c7, i));
|
||||
|
@ -12,6 +12,9 @@ int last_firelimit, firelimit;
|
||||
|
||||
EX int inmirrorcount = 0;
|
||||
|
||||
/** wall optimization: do not draw things beyond walls */
|
||||
EX bool wallopt;
|
||||
|
||||
EX bool spatial_graphics;
|
||||
EX bool wmspatial, wmescher, wmplain, wmblack, wmascii;
|
||||
EX bool mmspatial, mmhigh, mmmon, mmitem;
|
||||
@ -4429,6 +4432,8 @@ EX bool isWall3(cell *c, color_t& wcol) {
|
||||
return false;
|
||||
}
|
||||
|
||||
EX bool isWall3(cell *c) { color_t dummy; return isWall3(c, dummy); }
|
||||
|
||||
bool isSulphuric(eWall w) { return among(w, waSulphur, waSulphurC); }
|
||||
|
||||
// 'land color', but a bit twisted for Alchemist Lab
|
||||
|
@ -387,6 +387,7 @@ EX namespace solnihv {
|
||||
cell *c = h->c7;
|
||||
if(!do_draw(c, V)) continue;
|
||||
drawcell(c, V, 0, false);
|
||||
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
|
||||
|
||||
for(int i=0; i<S7; i++) {
|
||||
// note: need do cmove before c.spin
|
||||
@ -829,6 +830,7 @@ EX namespace nilv {
|
||||
cell *c = h->c7;
|
||||
if(!do_draw(c, V)) continue;
|
||||
drawcell(c, V, 0, false);
|
||||
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
|
||||
|
||||
if(0) for(int t=0; t<c->type; t++) {
|
||||
if(!c->move(t)) continue;
|
||||
@ -1507,6 +1509,7 @@ EX namespace rots {
|
||||
else {
|
||||
drawcell(c, V, 0, false);
|
||||
}
|
||||
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
|
||||
|
||||
for(int i=0; i<c->type; i++) {
|
||||
cell *c1 = c->cmove(i);
|
||||
|
2
reg3.cpp
2
reg3.cpp
@ -523,6 +523,7 @@ EX namespace reg3 {
|
||||
cell *c = h->c7;
|
||||
if(!do_draw(c, V)) continue;
|
||||
drawcell(c, V, 0, false);
|
||||
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
|
||||
|
||||
for(int d=0; d<S7; d++)
|
||||
dq::enqueue_by_matrix(h->move(d), V * tmatrices[h->fieldval][d]);
|
||||
@ -812,6 +813,7 @@ EX namespace reg3 {
|
||||
cell *c = h->c7;
|
||||
if(!do_draw(c, V)) continue;
|
||||
drawcell(c, V, 0, false);
|
||||
if(wallopt && isWall3(c) && isize(dq::drawqueue) > 1000) continue;
|
||||
|
||||
for(int i=0; i<S7; i++) if(h->move(i)) {
|
||||
#if CAP_FIELD
|
||||
|
@ -1064,6 +1064,9 @@ int readArgs() {
|
||||
shift_arg_formula(shift_angle);
|
||||
shift_arg_formula(movement_angle);
|
||||
}
|
||||
else if(argis("-wallopt")) {
|
||||
wallopt = true;
|
||||
}
|
||||
else if(argis("-animpar")) {
|
||||
ma = maParabolic;
|
||||
shift_arg_formula(parabolic_length);
|
||||
|
Loading…
x
Reference in New Issue
Block a user