mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
improved rogueviz image scaling
This commit is contained in:
parent
a6870750dc
commit
b49266cbce
@ -119,13 +119,8 @@ colorpair parse(string s) {
|
||||
y -= 8;
|
||||
x /= 16.;
|
||||
y /= 16.;
|
||||
ld r = max(abs(x), abs(y)) / hypot(x, y);
|
||||
if(x || y) {
|
||||
x *= r;
|
||||
y *= r;
|
||||
}
|
||||
i.tinf.tvertices.push_back(glhr::makevertex(x + .5, y + .5, 0));
|
||||
i.vertices.push_back(hpxy(x * .4, y * .4));
|
||||
i.vertices.push_back(hpxy(x * .5 * cgi.scalefactor, y * .5 * cgi.scalefactor));
|
||||
};
|
||||
addv(x, y);
|
||||
addv(x, y+1);
|
||||
|
Loading…
Reference in New Issue
Block a user