1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-20 11:54:48 +00:00

fixed Zebra-patterned lands in Zebra quotient space

This commit is contained in:
Zeno Rogue 2022-04-26 13:20:00 +02:00
parent 4707347f3b
commit 64ece33a97

View File

@ -160,8 +160,12 @@ EX int default_levs() {
#if HDR
namespace altmap {
/* in quotient space we cannot use alt for quotient */
extern map<heptagon*, short> quotient_relspins;
/** h->move(relspin(h->alt)) corresponds to h->alt->move(0) */
inline short& relspin(heptagon *alt) { return alt->zebraval; }
inline short& relspin(heptagon *alt) { return quotient ? quotient_relspins[alt] : alt->zebraval; }
/** for Camelot, the radius */
inline short& radius(heptagon *alt) { return alt->emeraldval; }
@ -176,6 +180,9 @@ namespace altmap {
}
#endif
map<heptagon*, short> altmap::quotient_relspins;
auto qclear = addHook(hooks_clearmemory, 200, [] { altmap::quotient_relspins.clear(); });
void hrmap::extend_altmap(heptagon *h, int levs, bool link_cdata) {
if(hybri) { PIU ( extend_altmap(h, levs, link_cdata) ); }
if(!h->alt) return;