Allow scaling of entire window

This commit is contained in:
stevenhowes
2022-06-12 20:28:38 +01:00
parent d7d1fabb0a
commit 8d93d84456
4 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -36,9 +36,9 @@ func drawTexture(
return renderer.CopyEx(
tex,
&sdl.Rect{X: sheetposition.X, Y: sheetposition.Y, W: size.X, H: size.Y},
&sdl.Rect{X: int32(position.X), Y: int32(position.Y), W: size.X, H: size.Y},
&sdl.Rect{X: int32(position.X) * Config.Scale, Y: int32(position.Y) * Config.Scale, W: size.X * Config.Scale, H: size.Y * Config.Scale},
rotation,
&sdl.Point{X: size.X / 2, Y: size.Y / 2},
&sdl.Point{X: (size.X * Config.Scale) / 2, Y: (size.Y * Config.Scale) / 2},
sdl.FLIP_NONE)
}