Return old code for grid drawing on the renderer side

This commit is contained in:
ZZYZX 2019-12-16 08:32:01 +02:00
parent 4cb6d68c45
commit bd967138f2
3 changed files with 4 additions and 6 deletions

Binary file not shown.

View file

@ -968,8 +968,7 @@ namespace CodeImp.DoomBuilder.Rendering
pos.y = y;
pos = pos.GetTransformed(translatex, translatey, scale, -scale);
// Note: I'm not using Math.Ceiling in this case, because that doesn't work right.
gridplotter.DrawGridLineH((int)pos.y, (int)from, (int)to, ref c);
gridplotter.DrawGridLineH((int)pos.y, (int)Math.Round(from + 0.49999f), (int)Math.Round(to + 0.49999f), ref c);
}
// Draw all vertical grid lines
@ -987,8 +986,7 @@ namespace CodeImp.DoomBuilder.Rendering
pos.x = x;
pos = pos.GetTransformed(translatex, translatey, scale, -scale);
// Note: I'm not using Math.Ceiling in this case, because that doesn't work right.
gridplotter.DrawGridLineV((int)pos.x, (int)from, (int)to, ref c);
gridplotter.DrawGridLineV((int)pos.x, (int)Math.Round(from + 0.49999f), (int)Math.Round(to + 0.49999f), ref c);
}
}