()
| 113 | } |
| 114 | |
| 115 | func (camera *Camera) ViewArea() *sdl.Rect { |
| 116 | |
| 117 | width := int32(globals.ScreenSize.X / camera.Zoom) |
| 118 | height := int32(globals.ScreenSize.Y / camera.Zoom) |
| 119 | |
| 120 | rect := &sdl.Rect{ |
| 121 | X: int32(camera.Position.X - float32(width/2)), |
| 122 | Y: int32(camera.Position.Y - float32(height/2)), |
| 123 | W: width, |
| 124 | H: height, |
| 125 | } |
| 126 | |
| 127 | return rect |
| 128 | |
| 129 | } |
| 130 | |
| 131 | func (camera *Camera) FocusOn(zoom bool, cards ...*Card) { |
| 132 |
no outgoing calls
no test coverage detected