mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-05 02:07:03 +00:00
qHUGE_BOUNDED to detect bounded geometries not to be computed fully
This commit is contained in:
parent
577ab0e1d4
commit
6655a73e5e
@ -212,6 +212,7 @@ EX void set_flags() {
|
||||
set_flag(flag, qANYQ, period_xy || period_z);
|
||||
set_flag(flag, qBOUNDED, period_xy && period_z);
|
||||
set_flag(flag, qSMALL, period_xy && period_z && (period_xy * period_xy * period_z <= 4096));
|
||||
set_flag(flag, qHUGE_BOUNDED, period_xy * period_xy * period_z > 16384);
|
||||
}
|
||||
|
||||
EX void prepare_config() {
|
||||
|
2
cell.cpp
2
cell.cpp
@ -102,7 +102,7 @@ transmatrix hrmap::adj(cell *c, int i) { return calc_relative_matrix(c->cmove(i)
|
||||
|
||||
vector<cell*>& hrmap::allcells() {
|
||||
static vector<cell*> default_allcells;
|
||||
if(bounded) {
|
||||
if(bounded && !(cgflags & qHUGE_BOUNDED)) {
|
||||
celllister cl(gamestart(), 1000000, 1000000, NULL);
|
||||
default_allcells = cl.lst;
|
||||
return default_allcells;
|
||||
|
@ -276,6 +276,7 @@ static const flagtype qEXPERIMENTAL = 32768;
|
||||
static const flagtype qNIH = 65536;
|
||||
|
||||
static const flagtype qIDEAL = 131072;
|
||||
static const flagtype qHUGE_BOUNDED = 262144;
|
||||
|
||||
// note: dnext assumes that x&7 equals 7
|
||||
static const int SEE_ALL = 50;
|
||||
|
10
racing.cpp
10
racing.cpp
@ -463,7 +463,11 @@ EX void generate_track() {
|
||||
if(WDIM == 3 || weirdhyperbolic) length = max(length - 10 * race_try, 10);
|
||||
|
||||
try {
|
||||
if(asonov::in()) {
|
||||
if(bounded && !prod && !(cgflags & qHUGE_BOUNDED)) {
|
||||
bounded_track = true;
|
||||
make_bounded_track(s);
|
||||
}
|
||||
else if(asonov::in()) {
|
||||
find_track(s, 0, length);
|
||||
}
|
||||
else if(sol && !asonov::in()) {
|
||||
@ -484,10 +488,6 @@ EX void generate_track() {
|
||||
find_track(track.back(), 3, length/4);
|
||||
find_track(track.back(), 4, length/4);
|
||||
}
|
||||
else if(bounded && !prod) {
|
||||
bounded_track = true;
|
||||
make_bounded_track(s);
|
||||
}
|
||||
else find_track(s, 0, length);
|
||||
}
|
||||
catch(hr_track_failure&) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user