| 29 | } |
| 30 | |
| 31 | void IGraphics::MapScreenToWorld(float CenterX, float CenterY, float ParallaxX, float ParallaxY, |
| 32 | float ParallaxZoom, float OffsetX, float OffsetY, float Aspect, float Zoom, float *pPoints) const |
| 33 | { |
| 34 | float Width, Height; |
| 35 | CalcScreenParams(Aspect, Zoom, &Width, &Height); |
| 36 | |
| 37 | float Scale = (ParallaxZoom * (Zoom - 1.0f) + 100.0f) / 100.0f / Zoom; |
| 38 | Width *= Scale; |
| 39 | Height *= Scale; |
| 40 | |
| 41 | CenterX *= ParallaxX / 100.0f; |
| 42 | CenterY *= ParallaxY / 100.0f; |
| 43 | pPoints[0] = OffsetX + CenterX - Width / 2; |
| 44 | pPoints[1] = OffsetY + CenterY - Height / 2; |
| 45 | pPoints[2] = pPoints[0] + Width; |
| 46 | pPoints[3] = pPoints[1] + Height; |
| 47 | } |
| 48 | |
| 49 | void IGraphics::MapScreenToInterface(float CenterX, float CenterY, float Zoom) |
| 50 | { |
no outgoing calls
no test coverage detected