mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-08 23:20:12 +00:00
fixed a crash problem with tes files in 2.5D
This commit is contained in:
parent
dbf9b2b325
commit
f29f908e05
@ -1277,7 +1277,7 @@ EX transmatrix get_adj(arbi_tiling& c, int t, int dl, int t1, int xdl) {
|
|||||||
println(hlog, "s1 = ", kz(spintox(rm*vr)), " s2 = ", kz(rspintox(xrm*xvr)));
|
println(hlog, "s1 = ", kz(spintox(rm*vr)), " s2 = ", kz(rspintox(xrm*xvr)));
|
||||||
println(hlog, tie(t, dl), " = ", kz(Res));
|
println(hlog, tie(t, dl), " = ", kz(Res));
|
||||||
println(hlog, hdist(vl, Res * xvr), " # ", hdist(vr, Res * xvl));
|
println(hlog, hdist(vl, Res * xvr), " # ", hdist(vr, Res * xvl));
|
||||||
exit(3);
|
throw hr_exception("error in arb::get_adj");
|
||||||
}
|
}
|
||||||
|
|
||||||
return Res;
|
return Res;
|
||||||
@ -1952,12 +1952,17 @@ EX pair<ld, ld> rep_ideal(ld e, ld u IS(1)) {
|
|||||||
return {len, 90 * degree - (gamma - beta)};
|
return {len, 90 * degree - (gamma - beta)};
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MAXMDIM >= 4
|
EX void swap_vertices() {
|
||||||
auto hooksw = addHook(hooks_swapdim, 100, [] {
|
|
||||||
for(auto& p: {¤t, &slided})
|
for(auto& p: {¤t, &slided})
|
||||||
for(auto& s: p->shapes)
|
for(auto& s: p->shapes)
|
||||||
for(auto& v: s.vertices)
|
for(auto& v: s.vertices)
|
||||||
swapmatrix(v);
|
swapmatrix(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if MAXMDIM >= 4
|
||||||
|
auto hooksw = addHook(hooks_swapdim, 100, [] {
|
||||||
|
println(hlog, "swapmatrix called for vertices");
|
||||||
|
swap_vertices();
|
||||||
for(auto& p: altmap) for(auto& pp: p.second) swapmatrix(pp.second);
|
for(auto& p: altmap) for(auto& pp: p.second) swapmatrix(pp.second);
|
||||||
for(auto& p: arbi_matrix) swapmatrix(p.second.second);
|
for(auto& p: arbi_matrix) swapmatrix(p.second.second);
|
||||||
});
|
});
|
||||||
|
7
sky.cpp
7
sky.cpp
@ -518,6 +518,8 @@ EX void make_air() {
|
|||||||
dynamicval<int> i(vrhr::state, 0);
|
dynamicval<int> i(vrhr::state, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool missing = false;
|
||||||
|
|
||||||
if(1) {
|
if(1) {
|
||||||
//shot::take("airtest.png", drawqueue);
|
//shot::take("airtest.png", drawqueue);
|
||||||
dynamicval<videopar> v(vid, vid);
|
dynamicval<videopar> v(vid, vid);
|
||||||
@ -545,8 +547,10 @@ EX void make_air() {
|
|||||||
pmodel = mdDisk;
|
pmodel = mdDisk;
|
||||||
|
|
||||||
vid.always3 = false;
|
vid.always3 = false;
|
||||||
geom3::apply_always3();
|
geom3::apply_always3();
|
||||||
check_cgi();
|
check_cgi();
|
||||||
|
missing = !(cgi.state & 2);
|
||||||
|
if(missing) arb::swap_vertices();
|
||||||
cgi.require_shapes();
|
cgi.require_shapes();
|
||||||
|
|
||||||
eGeometry orig = geometry;
|
eGeometry orig = geometry;
|
||||||
@ -595,6 +599,7 @@ EX void make_air() {
|
|||||||
|
|
||||||
GLERR("after draw");
|
GLERR("after draw");
|
||||||
geom3::apply_always3();
|
geom3::apply_always3();
|
||||||
|
if(missing) arb::swap_vertices();
|
||||||
check_cgi();
|
check_cgi();
|
||||||
calcparam();
|
calcparam();
|
||||||
GLERR("after make_air");
|
GLERR("after make_air");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user