|
|
|
@ -1477,17 +1477,19 @@ void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom
|
|
|
|
|
dp.height = UnScaleByZoom(dp.height, zoom);
|
|
|
|
|
_cur_dpi = &dp;
|
|
|
|
|
|
|
|
|
|
/* translate to window coordinates */
|
|
|
|
|
dp.left = x;
|
|
|
|
|
dp.top = y;
|
|
|
|
|
|
|
|
|
|
if (vp->overlay != NULL) vp->overlay->Draw(&dp);
|
|
|
|
|
|
|
|
|
|
/* translate back to world coordinates */
|
|
|
|
|
dp.left = UnScaleByZoom(_vd.dpi.left, zoom);
|
|
|
|
|
dp.top = UnScaleByZoom(_vd.dpi.top, zoom);
|
|
|
|
|
if (vp->overlay != NULL && vp->overlay->GetCargoMask() != 0 && vp->overlay->GetCompanyMask() != 0) {
|
|
|
|
|
/* translate to window coordinates */
|
|
|
|
|
dp.left = x;
|
|
|
|
|
dp.top = y;
|
|
|
|
|
vp->overlay->Draw(&dp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_vd.string_sprites_to_draw.Length() != 0) ViewportDrawStrings(zoom, &_vd.string_sprites_to_draw);
|
|
|
|
|
if (_vd.string_sprites_to_draw.Length() != 0) {
|
|
|
|
|
/* translate to world coordinates */
|
|
|
|
|
dp.left = UnScaleByZoom(_vd.dpi.left, zoom);
|
|
|
|
|
dp.top = UnScaleByZoom(_vd.dpi.top, zoom);
|
|
|
|
|
ViewportDrawStrings(zoom, &_vd.string_sprites_to_draw);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_cur_dpi = old_dpi;
|
|
|
|
|
|
|
|
|
|