Zoom: Fix scrolling into negative coordinates
* If you open a wide unbounded level like Castle.level and zoom out and scroll left (into negative world coordinates), the level chunks display correctly now.
This commit is contained in:
parent
fd730483b0
commit
21520e71e9
|
@ -44,9 +44,7 @@ func (w *Canvas) Present(e render.Engine, p render.Point) {
|
||||||
// TODO: seems unstable as shit on Zoom In??
|
// TODO: seems unstable as shit on Zoom In??
|
||||||
Viewport.W = w.ZoomDivide(Viewport.W)
|
Viewport.W = w.ZoomDivide(Viewport.W)
|
||||||
Viewport.H = w.ZoomDivide(Viewport.H)
|
Viewport.H = w.ZoomDivide(Viewport.H)
|
||||||
if w.Zoom > 0 {
|
if w.Zoom != 0 {
|
||||||
// Viewport.X = w.ZoomDivide(w.chunks.Size)
|
|
||||||
// Viewport.Y = w.ZoomDivide(w.chunks.Size)
|
|
||||||
Viewport.X = w.ZoomDivide(Viewport.X)
|
Viewport.X = w.ZoomDivide(Viewport.X)
|
||||||
Viewport.Y = w.ZoomDivide(Viewport.Y)
|
Viewport.Y = w.ZoomDivide(Viewport.Y)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user