0x0045F997
| 297 | |
| 298 | // 0x0045F997 |
| 299 | Pos2 Viewport::getCentreMapPosition() const |
| 300 | { |
| 301 | const viewport_pos initialVPPos = getCentre(); |
| 302 | |
| 303 | const auto rotation = getRotation(); |
| 304 | // Vanilla unrolled on rotation at this point |
| 305 | |
| 306 | auto result = viewportCoordToMapCoord(initialVPPos.x, initialVPPos.y, 0, rotation); |
| 307 | for (auto i = 0; i < 6; i++) |
| 308 | { |
| 309 | const auto z = World::TileManager::getHeight(result); |
| 310 | result = viewportCoordToMapCoord(initialVPPos.x, initialVPPos.y, z.landHeight, rotation); |
| 311 | } |
| 312 | |
| 313 | return result; |
| 314 | } |
| 315 | |
| 316 | std::optional<Pos2> Viewport::getCentreScreenMapPosition() const |
| 317 | { |
no test coverage detected