diff options
author | alberth <alberth@openttd.org> | 2010-05-14 17:49:55 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-05-14 17:49:55 +0000 |
commit | 270b5fdaafa8d16c72497cdcf6822a26582912cc (patch) | |
tree | ae7279b73be919c66807dfec641a1987800c4ad7 /src | |
parent | e4e8ac471a8d4ed1a760b7199baefa41ab2ceb16 (diff) | |
download | openttd-270b5fdaafa8d16c72497cdcf6822a26582912cc.tar.xz |
(svn r19821) -Fix (r19816): Minimap displayed a black screen instead of the upper edge of the map (reported by IPG).
Diffstat (limited to 'src')
-rw-r--r-- | src/smallmap_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 16ce51369..30ccc9cb5 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -555,8 +555,8 @@ class SmallMapWindow : public Window { */ FORCEINLINE Point RemapTile(int tile_x, int tile_y) const { - int x_offset = tile_x - this->scroll_x / TILE_SIZE; - int y_offset = tile_y - this->scroll_y / TILE_SIZE; + int x_offset = tile_x - this->scroll_x / (int)TILE_SIZE; + int y_offset = tile_y - this->scroll_y / (int)TILE_SIZE; if (this->zoom == 1) return RemapCoords(x_offset, y_offset, 0); @@ -922,8 +922,8 @@ class SmallMapWindow : public Window { /* Which tile is displayed at (dpi->left, dpi->top)? */ int dx; Point tile = this->PixelToTile(dpi->left, dpi->top, &dx); - int tile_x = this->scroll_x / TILE_SIZE + tile.x; - int tile_y = this->scroll_y / TILE_SIZE + tile.y; + int tile_x = this->scroll_x / (int)TILE_SIZE + tile.x; + int tile_y = this->scroll_y / (int)TILE_SIZE + tile.y; void *ptr = blitter->MoveTo(dpi->dst_ptr, -dx - 4, 0); int x = - dx - 4; |