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

fixed texts disappearing when scale is set to less than 0

This commit is contained in:
Zeno Rogue 2018-09-10 17:24:58 +02:00
parent de82b54163
commit 8999ceb59b
2 changed files with 5 additions and 0 deletions

View File

@ -5419,6 +5419,8 @@ void calcparam() {
DEBB(DF_GRAPH, (debugfile,"calc param\n"));
vid.xcenter = vid.xres / 2;
vid.ycenter = vid.yres / 2;
if(vid.scale > -1e-2 && vid.scale < 1e-2) vid.scale = 1;
int realradius = min(vid.xcenter, vid.ycenter);

View File

@ -407,6 +407,9 @@ void glflush() {
glhr::color2(text_color);
glhr::set_depthtest(false);
for(int ed = (stereo::active() && text_shift)?-1:0; ed<2; ed+=2) {
if(vid.scale < 0)
glhr::set_modelview(glhr::translate(-ed*text_shift-vid.xcenter,-vid.ycenter, stereo::scrdist_text) * glhr::scale(-1,-1,-1));
else
glhr::set_modelview(glhr::translate(-ed*text_shift-vid.xcenter,-vid.ycenter, stereo::scrdist_text));
stereo::set_mask(ed);