1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-04-21 18:23:15 +00:00

kite:: sidewalls were not arranged correctly

This commit is contained in:
Zeno Rogue 2020-03-21 09:28:16 +01:00
parent 4e52804d45
commit 5bd291784b
3 changed files with 24 additions and 4 deletions

@ -448,8 +448,8 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i
for(int cid=0; cid<cor; cid++) {
sizeto(fsh.gpside[k][cid], id);
bshape(fsh.gpside[k][cid][id], fsh.prio);
hpcpush(iddspin(c, cid) * cornerlist[cid]);
hpcpush(iddspin(c, cid) * cornerlist[(cid+1)%cor]);
hpcpush(iddspin_side(c, cid) * cornerlist[cid]);
hpcpush(iddspin_side(c, cid) * cornerlist[(cid+1)%cor]);
chasmifyPoly(dlow_table[k], dhi_table[k], k);
}
}

@ -378,6 +378,26 @@ ld hrmap_standard::spin_angle(cell *c, int d) {
EX transmatrix ddspin(cell *c, int d, ld bonus IS(0)) { return currentmap->spin_to(c, d, bonus); }
EX transmatrix iddspin(cell *c, int d, ld bonus IS(0)) { return currentmap->spin_from(c, d, bonus); }
EX ld cellgfxdist(cell *c, int d) { return currentmap->spacedist(c, d); }
EX transmatrix ddspin_side(cell *c, int d, ld bonus IS(0)) {
if(kite::in()) {
hyperpoint h1 = get_corner_position(c, gmod(d, c->type), 3);
hyperpoint h2 = get_corner_position(c, gmod(d+1, c->type) , 3);
hyperpoint hm = mid(h1, h2);
return rspintox(hm) * spin(bonus);
}
return currentmap->spin_to(c, d, bonus);
}
EX transmatrix iddspin_side(cell *c, int d, ld bonus IS(0)) {
if(kite::in()) {
hyperpoint h1 = get_corner_position(c, gmod(d, c->type), 3);
hyperpoint h2 = get_corner_position(c, gmod(d+1, c->type) , 3);
hyperpoint hm = mid(h1, h2);
return spintox(hm) * spin(bonus);
}
return currentmap->spin_from(c, d, bonus);
}
double hrmap_standard::spacedist(cell *c, int i) {
if(NONSTDVAR || WDIM == 3) return hrmap::spacedist(c, i);

@ -3337,8 +3337,8 @@ EX bool placeSidewall(cell *c, int i, int sidepar, const transmatrix& V, color_t
else prio = PPR::REDWALL-2+4*(sidepar-SIDE_SLEV);
dynamicval<bool> ncor(approx_nearcorner, true);
transmatrix V2 = V * ddspin(c, i);
transmatrix V2 = V * ddspin_side(c, i);
if(NONSTDVAR || !standard_tiling()) {
#if CAP_ARCM
if(arcm::in() && !PURE)