()
| 80 | } |
| 81 | |
| 82 | func (camera *Camera) Offset() Vector { |
| 83 | |
| 84 | width := globals.ScreenSize.X / 2 / camera.Zoom |
| 85 | height := globals.ScreenSize.Y / 2 / camera.Zoom |
| 86 | |
| 87 | // Rounded makes movement more stuttery, but also removes subpixel wobbling a bit, sigh, can't have everything |
| 88 | point := Vector{(camera.Position.X - width), (camera.Position.Y - height)}.Rounded() |
| 89 | return point |
| 90 | |
| 91 | } |
| 92 | |
| 93 | func (camera *Camera) TranslateRect(rect *sdl.FRect) *sdl.FRect { |
| 94 |
no test coverage detected