1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-25 22:53:19 +00:00

svg:: works nicely with smart_range

This commit is contained in:
Zeno Rogue 2018-11-09 15:46:34 +01:00
parent 549d86b15d
commit c8e0371a4c
2 changed files with 2 additions and 1 deletions

View File

@ -706,6 +706,7 @@ bool in_smart_range(const transmatrix& T) {
ld x2 = vid.radius * abs(h3[0] - h1[0]) / epsilon;
ld y2 = vid.radius * abs(h3[1] - h1[1]) * vid.stretch / epsilon;
ld scale = sqrt(hypot(x1, y1) * hypot(x2, y2)) * scalefactor * hcrossf7;
if(svg::in) scale /= svg::divby;
return
scale > vid.smart_range_detail &&
x - 2 * max(x1, x2) < vid.xres &&

View File

@ -161,7 +161,7 @@ namespace svg {
// dynamicval<int> v5(ringcolor, 0x808080FF);
vid.usingGL = false;
vid.xres = vid.yres = svgsize ? svgsize : min(1 << (get_sightrange()+7), 16384);
vid.xres = vid.yres = svgsize ? svgsize : vid.use_smart_range ? pngres*divby : min(1 << (get_sightrange()+7), 16384);
calcparam();
dynamicval<bool> v6(inHighQual, true);
darken = 0;