1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

fake:: fixed some bugs with patterns working incorrectly

This commit is contained in:
Zeno Rogue 2020-06-03 11:46:50 +02:00
parent bc63ca3f81
commit ffa4589705
3 changed files with 8 additions and 0 deletions

View File

@ -989,6 +989,7 @@ EX namespace patterns {
}
EX patterninfo getpatterninfo(cell *c, ePattern pat, int sub) {
if(fake::in()) return FPIU(getpatterninfo(c, pat, sub));
if(!(sub & SPF_NO_SUBCODES)) {
auto si = getpatterninfo(c, pat, sub | SPF_NO_SUBCODES);
if(1) ;
@ -2440,6 +2441,7 @@ EX namespace patterns {
}
EX void computeCgroup() {
if(fake::in()) { FPIU(computeCgroup()); return; }
cgroup = cpUnknown;
if(whichPattern == PAT_SINGLETYPE) {
cgroup = cpSingle;

View File

@ -188,6 +188,7 @@ struct hrmap_spherical : hrmap_standard {
};
EX heptagon *getDodecahedron(int i) {
if(fake::in()) return FPIU(getDodecahedron(i));
hrmap_spherical *s = dynamic_cast<hrmap_spherical*> (currentmap);
if(!s) return NULL;
return s->dodecahedron[i];

View File

@ -1642,6 +1642,11 @@ void texture_config::true_remap() {
void texture_config::remap() {
if(tstate == tsActive) {
if(geometry == gFake) {
/* always correct */
true_remap();
return;
}
patterns::computeCgroup();
correctly_mapped = patterns::compatible(texture::cgroup, patterns::cgroup);
if(!correctly_mapped)