1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

fixed more warnings

This commit is contained in:
Zeno Rogue 2019-09-13 19:36:16 +02:00
parent e1d6f547a4
commit a47be2f89f
2 changed files with 8 additions and 8 deletions

View File

@ -751,10 +751,10 @@ EX void showEuclideanMenu() {
}
else if(geometry == gRotSpace) {
auto& r = rots::underlying_scale;
auto r = rots::underlying_scale;
dialog::addSelItem(XLAT("view the underlying geometry"), r > 0 ? fts(r)+"x" : ONOFF(false), '4');
dialog::add_action([&r] {
dialog::editNumber(r, 0, 1, 0.05, 0.25, XLAT("view the underlying geometry"),
dialog::add_action([] {
dialog::editNumber(rots::underlying_scale, 0, 1, 0.05, 0.25, XLAT("view the underlying geometry"),
XLAT(
"The space you are currently in the space of rotations of the underlying hyperbolic or spherical geometry. "
"This option lets you see the underlying space. Lands and some walls (e.g. in the Graveyard) are based on "

View File

@ -652,7 +652,7 @@ EX namespace hybrid {
}
~hrmap_hybrid() {
in_underlying([this] { delete currentmap; });
in_underlying([] { delete currentmap; });
for(auto& p: at) tailored_delete(p.second);
}
@ -788,7 +788,7 @@ EX namespace product {
void draw() override {
actual_view_level = hybrid::current_view_level - floor(zlevel(tC0(cview())) / cgi.plevel + .5);
in_underlying([this] { currentmap->draw(); });
in_underlying([] { currentmap->draw(); });
}
};
@ -1159,7 +1159,7 @@ EX namespace rots {
std::unordered_map<int, transmatrix> saved_matrices;
transmatrix relative_matrix(cell *c1, int i) {
transmatrix get_relative_matrix(cell *c1, int i) {
if(i == c1->type-2) return uzpush(-cgi.plevel) * spin(-2*cgi.plevel);
if(i == c1->type-1) return uzpush(+cgi.plevel) * spin(+2*cgi.plevel);
cell *c2 = c1->cmove(i);
@ -1196,7 +1196,7 @@ EX namespace rots {
if(c1 == c2) return Id;
if(gmatrix0.count(c2) && gmatrix0.count(c1))
return inverse(gmatrix0[c1]) * gmatrix0[c2];
for(int i=0; i<c1->type; i++) if(c1->move(i) == c2) return relative_matrix(c1, i);
for(int i=0; i<c1->type; i++) if(c1->move(i) == c2) return get_relative_matrix(c1, i);
return Id; // not implemented yet
}
@ -1226,7 +1226,7 @@ EX namespace rots {
cell *c1 = c->cmove(i);
if(visited.count(c1)) continue;
visited.insert(c1);
dq.emplace_back(c1, V * relative_matrix(c, i));
dq.emplace_back(c1, V * get_relative_matrix(c, i));
}
}
}