mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-27 21:23:19 +00:00
removed static initialization order fiasco from fieldpattern
This commit is contained in:
parent
b872926cac
commit
3b0c760289
@ -1148,7 +1148,7 @@ void fpattern::findsubpath() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fpattern fp43(43);
|
fpattern *fp43;
|
||||||
|
|
||||||
EX void info() {
|
EX void info() {
|
||||||
fpattern fp(0);
|
fpattern fp(0);
|
||||||
@ -1303,16 +1303,18 @@ EX struct fpattern& getcurrfp() {
|
|||||||
return fp;
|
return fp;
|
||||||
}
|
}
|
||||||
if(sphere || euclid) return fp_invalid;
|
if(sphere || euclid) return fp_invalid;
|
||||||
if(S7 == 7 && S3 == 3 && !bt::in())
|
if(S7 == 7 && S3 == 3 && !bt::in()) {
|
||||||
return fp43;
|
if(!fp43) fp43 = new fpattern(43);
|
||||||
|
return *fp43;
|
||||||
|
}
|
||||||
return fp_invalid;
|
return fp_invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef STR
|
#undef STR
|
||||||
|
|
||||||
// todo undefined behavior
|
// todo undefined behavior
|
||||||
EX int subpathid = currfp.matcode[currfp.strtomatrix("RRRPRRRRRPRRRP")];
|
EX int subpathid = -1;
|
||||||
EX int subpathorder = currfp.order(currfp.matrices[subpathid]);
|
EX int subpathorder = -1;
|
||||||
|
|
||||||
// extra information for field quotient extra configuration
|
// extra information for field quotient extra configuration
|
||||||
|
|
||||||
|
@ -467,6 +467,12 @@ EX int fieldval_uniq_rand(cell *c, int randval) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pair<int, int> subval(cell *c, int _subpathid = subpathid, int _subpathorder = subpathorder) {
|
pair<int, int> subval(cell *c, int _subpathid = subpathid, int _subpathorder = subpathorder) {
|
||||||
|
|
||||||
|
if(_subpathid == -1)
|
||||||
|
_subpathid = currfp.matcode[currfp.strtomatrix("RRRPRRRRRPRRRP")];
|
||||||
|
if(_subpathorder == -1)
|
||||||
|
_subpathorder = currfp.order(currfp.matrices[subpathid]);
|
||||||
|
|
||||||
if(!ctof(c)) {
|
if(!ctof(c)) {
|
||||||
auto m = subval(createMov(c, 0));
|
auto m = subval(createMov(c, 0));
|
||||||
for(int u=2; u<S6; u+=2)
|
for(int u=2; u<S6; u+=2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user