diff options
author | smatz <smatz@openttd.org> | 2009-04-26 10:21:50 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-04-26 10:21:50 +0000 |
commit | fc63e376168adb7b12d9eca43c3bac3751297c3a (patch) | |
tree | e1031591a7f404b76891961f74d11edf4ce824f4 | |
parent | cd9f239f0f18080841cb4d069ee45f4e08bc6f41 (diff) | |
download | openttd-fc63e376168adb7b12d9eca43c3bac3751297c3a.tar.xz |
(svn r16155) -Codechange: remove MarkTileDirty, use MarkTileDirtyByTile instead
-rw-r--r-- | src/functions.h | 7 | ||||
-rw-r--r-- | src/rail_gui.cpp | 2 | ||||
-rw-r--r-- | src/road_gui.cpp | 2 | ||||
-rw-r--r-- | src/viewport.cpp | 12 |
4 files changed, 2 insertions, 21 deletions
diff --git a/src/functions.h b/src/functions.h index 1d33d70cb..d92ea85ab 100644 --- a/src/functions.h +++ b/src/functions.h @@ -26,13 +26,6 @@ void InitializeLandscapeVariables(bool only_constants); /* misc functions */ /** - * Mark a tile given by its coordinate dirty for repaint. - * - * @ingroup dirty - */ -void MarkTileDirty(int x, int y); - -/** * Mark a tile given by its index dirty for repaint. * * @ingroup dirty diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 678d0fc93..bb26cb00c 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -675,7 +675,7 @@ struct BuildRailToolbarWindow : Window { break; } } - MarkTileDirty(_thd.pos.x, _thd.pos.y); // redraw tile selection + MarkTileDirtyByTile(TileVirtXY(_thd.pos.x, _thd.pos.y)); // redraw tile selection return state; } diff --git a/src/road_gui.cpp b/src/road_gui.cpp index e041a08f4..d2241180c 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -507,7 +507,7 @@ struct BuildRoadToolbarWindow : Window { break; } } - MarkTileDirty(_thd.pos.x, _thd.pos.y); // redraw tile selection + MarkTileDirtyByTile(TileVirtXY(_thd.pos.x, _thd.pos.y)); // redraw tile selection return state; } diff --git a/src/viewport.cpp b/src/viewport.cpp index aa32bc96d..32bea397e 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1709,18 +1709,6 @@ void MarkTileDirtyByTile(TileIndex tile) ); } -void MarkTileDirty(int x, int y) -{ - Point pt = RemapCoords(x, y, GetTileZ(TileVirtXY(x, y))); - - MarkAllViewportsDirty( - pt.x - 31, - pt.y - 122, - pt.x - 31 + 67, - pt.y - 122 + 154 - ); -} - /** * Marks the selected tiles as dirty. * |