(svn r17506) -Fix [FS#3191]: signs partly drawn out of the rectangle in 4/8x zoom out.

This commit is contained in:
rubidium
2009-09-11 22:21:54 +00:00
parent 2895bb0e36
commit da2008ae23
2 changed files with 34 additions and 47 deletions

View File

@@ -798,13 +798,13 @@ public:
this->RemapX(TileX(t->xy)),
this->RemapY(TileY(t->xy)),
0);
x = pt.x - this->subscroll + 3 - (t->sign.width_small >> 1);
x = pt.x - this->subscroll - (t->sign.width_small >> 1);
y = pt.y;
/* Check if the town sign is within bounds */
if (x + t->sign.width_small > dpi->left &&
x < dpi->left + dpi->width &&
y + 6 > dpi->top &&
y + FONT_HEIGHT_SMALL > dpi->top &&
y < dpi->top + dpi->height) {
/* And draw it. */
SetDParam(0, t->index);