mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-09 12:16:45 +00:00
removed assignment of gp::loc to tie as Clang does not like it
This commit is contained in:
parent
56e575369b
commit
f46967efb9
37
bigstuff.cpp
37
bigstuff.cpp
@ -1089,18 +1089,18 @@ EX void setLandEuclid(cell *c) {
|
||||
#endif
|
||||
setland(c, specialland);
|
||||
if(specialland == laCrossroads4 || chaosmode) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
c->land = getEuclidLand(y);
|
||||
}
|
||||
if(specialland == laCrossroads) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
setland(c, getEuclidLand(y+2*x));
|
||||
}
|
||||
if(specialland == laTerracotta) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
if(((y+2*x) & 15) == 1) {
|
||||
setland(c, laMercuryRiver);
|
||||
c->wall = waMercury;
|
||||
@ -1112,8 +1112,8 @@ EX void setLandEuclid(cell *c) {
|
||||
}
|
||||
if(specialland == laPrincessQuest) setland(c, laPalace);
|
||||
if(specialland == laOcean) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
y += 10;
|
||||
if(euclid && quotient) y = -celldistAlt(c);
|
||||
if(y == 0)
|
||||
@ -1122,8 +1122,8 @@ EX void setLandEuclid(cell *c) {
|
||||
else c->landparam = y;
|
||||
}
|
||||
if(specialland == laWestWall) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first;
|
||||
x = -5 - x;
|
||||
if(x == 0)
|
||||
{setland(c, laBarrier); if(ishept(c)) setland(c, laMotion); }
|
||||
@ -1131,8 +1131,9 @@ EX void setLandEuclid(cell *c) {
|
||||
else c->landparam = x;
|
||||
}
|
||||
if(specialland == laIvoryTower || specialland == laDungeon) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c); y = -5 - y;
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
y = -5 - y;
|
||||
if(specialland == laDungeon) y = -10 - y;
|
||||
if(euclid && quotient) y = -celldistAlt(c);
|
||||
if(y == 0)
|
||||
@ -1143,8 +1144,8 @@ EX void setLandEuclid(cell *c) {
|
||||
}
|
||||
}
|
||||
if(specialland == laElementalWall) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
int x0 = euclid4 ? x : x + (y>>1);
|
||||
int y0 = y;
|
||||
|
||||
@ -1172,8 +1173,8 @@ EX void setLandEuclid(cell *c) {
|
||||
}
|
||||
}
|
||||
if(specialland == laCrossroads3) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
int y0 = euclid4 ? 2 * y - x : y;
|
||||
int x0 = euclid4 ? 2 * x + y : x + y/2;
|
||||
|
||||
@ -1191,8 +1192,8 @@ EX void setLandEuclid(cell *c) {
|
||||
}
|
||||
}
|
||||
if(specialland == laWarpCoast) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
|
||||
int zz = a4 ? x : 2*x+y + 10;
|
||||
zz = gmod(zz, 30);
|
||||
|
3
cell.cpp
3
cell.cpp
@ -795,8 +795,7 @@ cdata *getHeptagonCdata(heptagon *h) {
|
||||
|
||||
cdata *getEuclidCdata(gp::loc h) {
|
||||
|
||||
int x, y;
|
||||
tie(x,y) = h;
|
||||
int x = h.first, y = h.second;
|
||||
auto& data = archimedean ? arcm::get_cdata() : get_cdata();
|
||||
|
||||
// hrmap_euclidean* euc = dynamic_cast<hrmap_euclidean*> (currentmap);
|
||||
|
16
complex.cpp
16
complex.cpp
@ -16,8 +16,8 @@ EX namespace whirlwind {
|
||||
if(archimedean) return 0;
|
||||
if(euclid) {
|
||||
if(bounded) return 0;
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
return 1+((((signed short)(y)+int(50000))/3)%3);
|
||||
}
|
||||
if(S7 == 5) return getHemisphere(c, 0) > 0 ? 1 : 2;
|
||||
@ -870,8 +870,8 @@ EX namespace clearing {
|
||||
if(pseudohept(c)) return;
|
||||
c->monst = moMutant;
|
||||
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
|
||||
int xco = x * 2 + y + 1;
|
||||
c->stuntime = (8-xco/2) & 15;
|
||||
@ -2982,8 +2982,8 @@ EX namespace prairie {
|
||||
c->LHU.fi.rval = 0;
|
||||
}
|
||||
else if(euclid) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
c->LHU.fi.rval = (y&15);
|
||||
}
|
||||
else if(sphere) {
|
||||
@ -3760,8 +3760,8 @@ EX namespace dungeon {
|
||||
|
||||
if(euclid) {
|
||||
if(quotient) return;
|
||||
int x, y;
|
||||
tie(x, y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
string tab6[] = {
|
||||
".####...",
|
||||
"L...L...",
|
||||
|
23
landgen.cpp
23
landgen.cpp
@ -508,8 +508,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->wall = euclid3::get_emerald(c) ? waCavewall : waCavefloor;
|
||||
#endif
|
||||
else if(euclid) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
if(((y-2)&7) < 4) c->wall = waCavewall;
|
||||
else c->wall = waCavefloor;
|
||||
}
|
||||
@ -599,8 +599,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
v = hrand(100) < 25 ? 24 : 16;
|
||||
}
|
||||
else if(euclid) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
int y0 = gmod(y, 6);
|
||||
if(y0 == 3 || y0 == 4) v=24; else v=0;
|
||||
}
|
||||
@ -662,8 +662,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->wall = arcm::linespattern(c) ? waTrapdoor : waNone;
|
||||
#endif
|
||||
else if(euclid && !archimedean) {
|
||||
int x,y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
if(y&1) c->wall = waTrapdoor;
|
||||
else c->wall = waNone;
|
||||
}
|
||||
@ -698,8 +698,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->wall = waVinePlant;
|
||||
}
|
||||
else if(euclid && !archimedean) {
|
||||
int x,y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
int dy = gmod(y, 3);
|
||||
if(dy == 1) c->wall = waVinePlant;
|
||||
}
|
||||
@ -1292,8 +1292,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(c == at_euc2_coordinates(s-st)) c->wall = waGrounded;
|
||||
}
|
||||
else if(euclid && WDIM == 2) {
|
||||
int x,y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
if((x+1)%3 == 0 && y%3 == 0) {
|
||||
if(hrand(100) < 50)
|
||||
c->wall = hrand(2) ? waCharged : waGrounded;
|
||||
@ -1302,7 +1302,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
bool sand = false;
|
||||
for(int i=0; i<c->type; i++) {
|
||||
createMov(c, i);
|
||||
tie(x,y) = euc2_coordinates(c->move(i));
|
||||
auto co = euc2_coordinates(c->move(i));
|
||||
int x = co.first, y = co.second;
|
||||
if((x+1)%3 == 0 && (y)%3 == 0) sand = true;
|
||||
}
|
||||
if(sand && hrand(100) < 20)
|
||||
|
@ -281,7 +281,9 @@ EX namespace models {
|
||||
if(spiral_id > isize(torus_zeros)) spiral_id = 0;
|
||||
dialog::editNumber(spiral_id, 0, isize(torus_zeros)-1, 1, 10, XLAT("match the period of the torus"), "");
|
||||
dialog::reaction = [] () {
|
||||
tie(spiral_x, spiral_y) = torus_zeros[spiral_id];
|
||||
auto& co = torus_zeros[spiral_id];
|
||||
spiral_x = co.first;
|
||||
spiral_y = co.second;
|
||||
};
|
||||
dialog::bound_low(0);
|
||||
dialog::bound_up(isize(torus_zeros)-1);
|
||||
|
16
pattern2.cpp
16
pattern2.cpp
@ -36,8 +36,8 @@ int gp_threecolor() {
|
||||
}
|
||||
|
||||
int eupattern(cell *c) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
if(a4)
|
||||
return ((x&1) + 2*(y&1)) % 3;
|
||||
else
|
||||
@ -45,8 +45,8 @@ int eupattern(cell *c) {
|
||||
}
|
||||
|
||||
int eupattern4(cell *c) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
return (x&1) + ((y&1)) * 2;
|
||||
}
|
||||
|
||||
@ -108,8 +108,8 @@ unsigned bitmajority(unsigned a, unsigned b, unsigned c) {
|
||||
}
|
||||
|
||||
int eufifty(cell *c) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
int ix = x + 99999 + y;
|
||||
int iy = y + 99999;
|
||||
if(c->land == laWildWest)
|
||||
@ -1542,8 +1542,8 @@ EX namespace patterns {
|
||||
ep.extra_params["h2"] = getHemisphere(c, 2);
|
||||
}
|
||||
if(euclid) {
|
||||
int x, y;
|
||||
tie(x,y) = euc2_coordinates(c);
|
||||
auto co = euc2_coordinates(c);
|
||||
int x = co.first, y = co.second;
|
||||
ep.extra_params["ex"] = x;
|
||||
ep.extra_params["ey"] = y;
|
||||
if(S7 == 6) ep.extra_params["ez"] = -x-y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user