mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-27 03:47:40 +00:00
removed calc_relative_matrix with direction hint; used adj in more places
This commit is contained in:
@@ -147,7 +147,6 @@ EX void calcMousedest() {
|
|||||||
transmatrix T = currentmap->adj(cwt.at, (cwt+i).spin);
|
transmatrix T = currentmap->adj(cwt.at, (cwt+i).spin);
|
||||||
dists[i] = intval(mouseh, U * T * C0);
|
dists[i] = intval(mouseh, U * T * C0);
|
||||||
}
|
}
|
||||||
// confusingGeometry() ? ggmatrix(cwt.at) * calc_relative_matrix(cwt.at->move(i), cwt.at, i) : shmup::ggmatrix(cwt.at->move(i))));
|
|
||||||
|
|
||||||
for(int i=0; i<cwt.at->type; i++) if(dists[i] < mousedist) {
|
for(int i=0; i<cwt.at->type; i++) if(dists[i] < mousedist) {
|
||||||
mousedist = dists[i];
|
mousedist = dists[i];
|
||||||
|
|||||||
@@ -55,10 +55,6 @@ EX transmatrix master_relative(cell *c, bool get_inverse IS(false)) {
|
|||||||
return pispin * Id;
|
return pispin * Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
EX transmatrix calc_relative_matrix(cell *c2, cell *c1, int direction_hint) {
|
|
||||||
return calc_relative_matrix(c2, c1, ddspin(c1, direction_hint) * xpush0(1e-2));
|
|
||||||
}
|
|
||||||
|
|
||||||
EX transmatrix calc_relative_matrix(cell *c2, cell *c1, const hyperpoint& point_hint) {
|
EX transmatrix calc_relative_matrix(cell *c2, cell *c1, const hyperpoint& point_hint) {
|
||||||
return currentmap->relative_matrix(c2, c1, point_hint);
|
return currentmap->relative_matrix(c2, c1, point_hint);
|
||||||
}
|
}
|
||||||
@@ -340,7 +336,7 @@ double hrmap_standard::spacedist(cell *c, int i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
transmatrix hrmap_standard::adj(cell *c, int i) {
|
transmatrix hrmap_standard::adj(cell *c, int i) {
|
||||||
if(NONSTDVAR) return calc_relative_matrix(c->cmove(i), c, i);
|
if(NONSTDVAR) return calc_relative_matrix(c->cmove(i), c, C0);
|
||||||
double d = cellgfxdist(c, i);
|
double d = cellgfxdist(c, i);
|
||||||
transmatrix T = ddspin(c, i) * xpush(d);
|
transmatrix T = ddspin(c, i) * xpush(d);
|
||||||
if(c->c.mirror(i)) T = T * Mirror;
|
if(c->c.mirror(i)) T = T * Mirror;
|
||||||
@@ -425,7 +421,7 @@ EX hyperpoint nearcorner(cell *c, int i) {
|
|||||||
if(GOLDBERG) {
|
if(GOLDBERG) {
|
||||||
cellwalker cw(c, i);
|
cellwalker cw(c, i);
|
||||||
cw += wstep;
|
cw += wstep;
|
||||||
transmatrix cwm = calc_relative_matrix(cw.at, c, i);
|
transmatrix cwm = currentmap->adj(c, i);
|
||||||
if(elliptic && cwm[2][2] < 0) cwm = centralsym * cwm;
|
if(elliptic && cwm[2][2] < 0) cwm = centralsym * cwm;
|
||||||
return cwm * C0;
|
return cwm * C0;
|
||||||
}
|
}
|
||||||
@@ -517,11 +513,8 @@ EX hyperpoint farcorner(cell *c, int i, int which) {
|
|||||||
#if CAP_GP
|
#if CAP_GP
|
||||||
if(GOLDBERG) {
|
if(GOLDBERG) {
|
||||||
cellwalker cw(c, i);
|
cellwalker cw(c, i);
|
||||||
int hint = cw.spin;
|
|
||||||
cw += wstep;
|
cw += wstep;
|
||||||
transmatrix cwm = calc_relative_matrix(cw.at, c, hint);
|
transmatrix cwm = currentmap->adj(c, i);
|
||||||
if(elliptic && cwm[2][2] < 0) cwm = centralsym * cwm;
|
|
||||||
// hyperpoint nfar = cwm*C0;
|
|
||||||
auto li1 = gp::get_local_info(cw.at);
|
auto li1 = gp::get_local_info(cw.at);
|
||||||
if(which == 0)
|
if(which == 0)
|
||||||
return cwm * get_corner_position(li1, (cw+2).spin);
|
return cwm * get_corner_position(li1, (cw+2).spin);
|
||||||
|
|||||||
@@ -2650,7 +2650,7 @@ EX bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, boo
|
|||||||
Vb = Vb * xpush(cgi.tentacle_length - cellgfxdist(c, c->mondir));
|
Vb = Vb * xpush(cgi.tentacle_length - cellgfxdist(c, c->mondir));
|
||||||
}
|
}
|
||||||
else if(NONSTDVAR) {
|
else if(NONSTDVAR) {
|
||||||
transmatrix T = calc_relative_matrix(c->move(c->mondir), c, c->mondir);
|
transmatrix T = currentmap->adj(c, c->mondir);
|
||||||
Vb = Vb * T * rspintox(tC0(inverse(T))) * xpush(cgi.tentacle_length);
|
Vb = Vb * T * rspintox(tC0(inverse(T))) * xpush(cgi.tentacle_length);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user