1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-29 19:40:35 +00:00

arcm:: correct cgip is used for the altmap

This commit is contained in:
Zeno Rogue 2021-08-05 12:48:14 +02:00
parent fcf55f1852
commit f21a36a7aa
2 changed files with 21 additions and 7 deletions

View File

@ -524,6 +524,8 @@ EX bool use_gmatrix = true;
* not used by arcm itself, but used in fake arcm * not used by arcm itself, but used in fake arcm
*/ */
EX geometry_information *alt_cgip;
struct hrmap_archimedean : hrmap { struct hrmap_archimedean : hrmap {
map<gp::loc, struct cdata> eucdata; map<gp::loc, struct cdata> eucdata;
heptagon *origin; heptagon *origin;
@ -544,10 +546,17 @@ struct hrmap_archimedean : hrmap {
if(hyperbolic) { if(hyperbolic) {
dynamicval<eGeometry> g(geometry, gNormal); dynamicval<eGeometry> g(geometry, gNormal);
alt = init_heptagon(S7); dynamicval<eVariation> gv(variation, eVariation::pure);
alt->s = hsOrigin; if(1) {
alt->alt = alt; dynamicval<geometry_information*> gi(cgip, cgip);
current_altmap = newAltMap(alt); check_cgi();
cgi.require_basics();
alt_cgip = cgip;
alt = init_heptagon(S7);
alt->s = hsOrigin;
alt->alt = alt;
current_altmap = newAltMap(alt);
}
} }
transmatrix T = xpush(.01241) * spin(1.4117) * xpush(0.1241) * Id; transmatrix T = xpush(.01241) * spin(1.4117) * xpush(0.1241) * Id;
@ -591,6 +600,8 @@ struct hrmap_archimedean : hrmap {
archimedean_gmatrix.clear(); archimedean_gmatrix.clear();
if(current_altmap) { if(current_altmap) {
dynamicval<eGeometry> g(geometry, gNormal); dynamicval<eGeometry> g(geometry, gNormal);
dynamicval<eVariation> gv(variation, eVariation::pure);
dynamicval<geometry_information*> gi(cgip, alt_cgip);
delete current_altmap; delete current_altmap;
current_altmap = NULL; current_altmap = NULL;
} }
@ -620,6 +631,8 @@ struct hrmap_archimedean : hrmap {
if(hyperbolic) { if(hyperbolic) {
dynamicval<eGeometry> g(geometry, gNormal); dynamicval<eGeometry> g(geometry, gNormal);
dynamicval<eVariation> gv(variation, eVariation::pure);
dynamicval<geometry_information*> gi(cgip, alt_cgip);
dynamicval<hrmap*> cm(currentmap, current_altmap); dynamicval<hrmap*> cm(currentmap, current_altmap);
U = T; U = T;
current_altmap->virtualRebase(alt, T); current_altmap->virtualRebase(alt, T);

View File

@ -1194,6 +1194,7 @@ EX void check_cgi() {
cgi.timestamp = ++ntimestamp; cgi.timestamp = ++ntimestamp;
if(hybri) hybrid::underlying_cgip->timestamp = ntimestamp; if(hybri) hybrid::underlying_cgip->timestamp = ntimestamp;
if(fake::in()) fake::underlying_cgip->timestamp = ntimestamp; if(fake::in()) fake::underlying_cgip->timestamp = ntimestamp;
if(arcm::alt_cgip) arcm::alt_cgip->timestamp = ntimestamp;
if(isize(cgis) > 4) { if(isize(cgis) > 4) {
vector<pair<int, string>> timestamps; vector<pair<int, string>> timestamps;