diff --git a/src/functions.h b/src/functions.h index 1d33d70cb7..d92ea85ab2 100644 --- a/src/functions.h +++ b/src/functions.h @@ -25,13 +25,6 @@ bool CheckTileOwnership(TileIndex tile); 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. * diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 678d0fc93e..bb26cb00c0 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 e041a08f4b..d2241180c5 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 aa32bc96d6..32bea397e5 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. *