irr:: Orb of the Sword and Kraken.

This commit is contained in:
Zeno Rogue 2018-07-16 21:41:59 +02:00
parent 58d8742cf9
commit 4d61f2169e
7 changed files with 24 additions and 17 deletions

View File

@ -2481,7 +2481,8 @@ namespace sword {
s += S42/t;
s %= S84;
if(s<0) s += S84;
s /= (S84/t);
s *= t;
s /= S84;
return c->mov[s];
}

View File

@ -293,13 +293,13 @@ void drawPlayerEffects(const transmatrix& V, cell *c, bool onplayer) {
int& ang = angle[multi::cpid];
ang %= S42;
transmatrix Vnow = gmatrix[c] * rgpushxto0(inverse(gmatrix[c]) * tC0(V)) * spin(-hexshiftat(c));
transmatrix Vnow = gmatrix[c] * rgpushxto0(inverse(gmatrix[c]) * tC0(V)) * (irr::on ? ddspin(c,0,S42) : spin(-hexshiftat(c)));
#if CAP_QUEUE
if(!euclid) for(int a=0; a<S42; a++) {
int dda = S42 + (-1-2*a);
if(a == ang && items[itOrbSword]) continue;
if(nonbitrunc && !gp::on && a%3 != ang%3) continue;
if(nonbitrunc && !gp::on && !irr::on && a%3 != ang%3) continue;
if((a+S21)%S42 == ang && items[itOrbSword2]) continue;
bool longer = sword::pos(cwt.c, a-1) != sword::pos(cwt.c, a+1);
int col = darkena(0xC0C0C0, 0, 0xFF);

View File

@ -2551,6 +2551,7 @@ struct hrmap_hyperbolic : hrmap {
namespace irr {
extern bool on;
extern ld scale;
void link_to_base(heptagon *h, heptspin base);
void link_start(heptagon *h);
void link_next(heptagon *h, int d);

View File

@ -326,13 +326,16 @@ bool step(int delta) {
return false;
}
ld scale;
void compute_geometry() {
if(irr::on) {
ld scal = sqrt(isize(cells_of_heptagon) * 1. / sc);
crossf *= scal;
hepvdist *= scal;
rhexf *= scal;
scale = sqrt(isize(cells_of_heptagon) * 1. / sc);
crossf *= scale;
hepvdist *= scale;
rhexf *= scale;
}
else scale = 1;
}
bool draw_cell_schematics(cell *c, transmatrix V) {

View File

@ -1165,7 +1165,7 @@ land_validity_t& land_validity(eLand l) {
if(irr::on && among(l, laStorms, laPrairie, laBlizzard, laVolcano))
return dont_work;
if(irr::on && among(l, laWhirlpool, laCamelot, laCaribbean, laClearing, laTemple, laHive, laMirror, laMirrorOld, laReptile, laKraken, laBurial))
if(irr::on && among(l, laWhirlpool, laCamelot, laCaribbean, laClearing, laTemple, laHive, laMirror, laMirrorOld, laReptile))
return dont_work;
// equidistant-based lands

View File

@ -1151,6 +1151,8 @@ bool pseudohept(cell *c) {
bool kraken_pseudohept(cell *c) {
if(!euclid && S3 == 4 && gp::on && (gp::param.first % 2 || gp::param.second % 2 || S7 % 2))
return ishept(c);
else if(irr::on)
return c->type != 6;
else if(!euclid && S3 == 3 && !(S7&1) && gp_threecolor() == 1)
return ishept(c);
else

View File

@ -1956,19 +1956,19 @@ void buildpolys() {
if(sphere) krsc *= 1.4;
if(S7 ==8) krsc *= 1.3;
if(nonbitrunc && !gp::on && !euclid4) {
if(nonbitrunc && !gp::on && !irr::on && !euclid4) {
tentacle_length = 1.52;
bshape(shSeaTentacle, PPR_TENTACLE1, 1, 245);
}
else if(gp::on) {
tentacle_length = 0.566256 * 1.6 * gp::scale * krsc;
bshape(shSeaTentacle, PPR_TENTACLE1, 1.6 * gp::scale * krsc, 246);
else if(gp::on || irr::on) {
tentacle_length = 0.566256 * 1.6 * gp::scale * irr::scale * krsc;
bshape(shSeaTentacle, PPR_TENTACLE1, 1.6 * gp::scale * irr::scale * krsc, 246);
}
else {
tentacle_length = 0.566256 * gp::scale;
bshape(shSeaTentacle, PPR_TENTACLE1, gp::scale, 246);
tentacle_length = 0.566256 * gp::scale * irr::scale;
bshape(shSeaTentacle, PPR_TENTACLE1, gp::scale * irr::scale, 246);
}
ld ksc = (nonbitrunc ? 1.8 : 1.5) * gp::scale * krsc;
ld ksc = (nonbitrunc ? 1.8 : 1.5) * gp::scale * irr::scale * krsc;
if(euclid4 && nonbitrunc) ksc *= .5;
bshape(shKrakenHead, PPR_ONTENTACLE, ksc, 247);
bshape(shKrakenEye, PPR_ONTENTACLE_EYES, ksc, 248);
@ -2200,10 +2200,10 @@ void buildpolys() {
for(int v=0; v<13; v++) for(int z=0; z<2; z++)
copyshape(shTortoise[v][4+z], shTortoise[v][2+z], shTortoise[v][2+z].prio + (PPR_CARRIED-PPR_ITEM));
if(nonbitrunc) bshape(shMagicSword, PPR_MAGICSWORD, euclid4 ? gp::scale / 2 : gp::scale, 243);
if(nonbitrunc) bshape(shMagicSword, PPR_MAGICSWORD, euclid4 ? gp::scale * irr::scale / 2 : gp::scale * irr::scale, 243);
else bshape(shMagicSword, PPR_MAGICSWORD, 1, 244);
if(nonbitrunc) bshape(shMagicShovel, PPR_MAGICSWORD, euclid4 ? gp::scale / 2 : gp::scale, 333);
if(nonbitrunc) bshape(shMagicShovel, PPR_MAGICSWORD, euclid4 ? gp::scale * irr::scale / 2 : gp::scale * irr::scale, 333);
else bshape(shMagicShovel, PPR_MAGICSWORD, 1, 333);
bshape(shBead0, 20, 1, 250);