* Get the center of the given station as point on the screen in the smallmap window. * @param st Station to find in the smallmap. * @return Point with coordinates of the station. */
| 1494 | * @return Point with coordinates of the station. |
| 1495 | */ |
| 1496 | Point GetStationMiddle(const Station *st) const |
| 1497 | { |
| 1498 | int x = CentreBounds(st->rect.left, st->rect.right, 0); |
| 1499 | int y = CentreBounds(st->rect.top, st->rect.bottom, 0); |
| 1500 | Point ret = this->RemapTile(x, y); |
| 1501 | |
| 1502 | /* Same magic 3 as in DrawVehicles; that's where I got it from. |
| 1503 | * No idea what it is, but without it the result looks bad. |
| 1504 | */ |
| 1505 | ret.x -= 3 + this->subscroll; |
| 1506 | return ret; |
| 1507 | } |
| 1508 | |
| 1509 | void Close([[maybe_unused]] int data) override |
| 1510 | { |
no test coverage detected