diff --git a/graph.cpp b/graph.cpp index 6359f290..46509ba4 100644 --- a/graph.cpp +++ b/graph.cpp @@ -314,8 +314,6 @@ double hexshiftat(cell *c) { return 0; } -#define FACE3 (DIM == 3 ? M_PI/2 : 0) - transmatrix ddspin(cell *c, int d, ld bonus) { if(DIM == 3 && d < c->type) return rspintox(tC0(calc_relative_matrix(c->move(d), c, C0))) * cspin(2, 0, bonus); return spin(displayspin(c, d) + bonus - hexshiftat(c)); @@ -1129,15 +1127,20 @@ void drawMimic(eMonster m, cell *where, const transmatrix& V, color_t col, doubl } } -bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, color_t col, double footphase) { +bool drawMonsterType(eMonster m, cell *where, const transmatrix& V1, color_t col, double footphase) { #if MAXMDIM >= 4 if(DIM == 3 && m != moPlayer) - radarpoints.emplace_back(radarpoint{makeradar(V), minf[m].glyph, col, isFriendly(m) ? 0x00FF00FF : 0xFF0000FF }); + radarpoints.emplace_back(radarpoint{makeradar(V1), minf[m].glyph, col, isFriendly(m) ? 0x00FF00FF : 0xFF0000FF }); #endif #if CAP_SHAPES char xch = minf[m].glyph; + + transmatrix V = V1; + if(DIM == 3 && (classflag(m) & CF_FACE_UP)) V = V1 * cspin(0, 2, M_PI/2); + + // if(DIM == 3) V = V * cspin(0, 2, M_PI/2); if(m == moTortoise && where && where->stuntime >= 3) drawStunStars(V, where->stuntime-2); @@ -2042,7 +2045,7 @@ bool applyAnimation(cell *c, transmatrix& V, double& footphase, int layer) { footphase = a.footphase; V = V * a.wherenow; if(a.attacking == 2) V = V * pispin; - if(DIM == 3) V = V * cspin(0, 2, M_PI/2); + // if(DIM == 3) V = V * cspin(0, 2, M_PI/2); a.ltick = ticks; return true; } @@ -2409,7 +2412,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col) { bheat = HEAT(c->move(i)); d = i; } - Vs = Vs * ddspin(c, d, FACE3); + Vs = Vs * ddspin(c, d, 0); } return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase); } @@ -2459,7 +2462,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col) { } else { hyperpoint V0 = inverse(cwtV) * tC0(Vs); - Vs = cwtV * rspintox(V0) * xpush(hdist0(V0)) * cspin(0, 2, -M_PI/2); + Vs = cwtV * rspintox(V0) * xpush(hdist0(V0)) * cspin(0, 2, -M_PI); // cwtV * rgpushxto0(inverse(cwtV) * tC0(Vs)); } if(c->monst == moHunterChanging) @@ -4174,14 +4177,14 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { if(multi::players > 1) { for(int i=0; i d(cpid, m->pid); if(!hide_player() || !subscreens::is_current_player(m->pid)) { drawPlayerEffects(view, c, true); - if(DIM == 3) view = view * spin(-M_PI/2); + if(DIM == 3) view = view * spin(-M_PI/2) * cspin(0, 2, -M_PI/2); if(m->inBoat) m->footphase = 0; if(mapeditor::drawplayer) drawMonsterType(moPlayer, c, view, 0xFFFFFFC0, m->footphase); } @@ -3686,11 +3686,11 @@ bool drawMonster(const transmatrix& V, cell *c, const transmatrix*& Vboat, trans if(hasHitpoints(m->type)) c->hitpoints = m->hitpoints; if(m->type == moTortoise) tortoise::emap[c] = getBits(m->torigin); - if(m->type == moMimic && DIM == 3) - drawMonsterType(m->type, c, view * spin(-M_PI/2), col, m->footphase); - else if(DIM == 3) - drawMonsterType(m->type, c, view * cspin(0, 2, M_PI/2), col, m->footphase); - else + /* if(m->type == moMimic && DIM == 3) + drawMonsterType(m->type, c, view * spin(-M_PI/2), col, m->footphase); */ + /* else if(DIM == 3) + drawMonsterType(m->type, c, view * cspin(0, 2, M_PI/2), col, m->footphase); */ + /* else */ drawMonsterType(m->type, c, view, col, m->footphase); if(m->type == moTortoise) tortoise::emap.erase(c); break;