summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-05-11 19:47:10 +0000
committerglx <glx@openttd.org>2008-05-11 19:47:10 +0000
commitad19bf105af41a89b1b331d56eb75f9ae4d8b79a (patch)
treee54ac59b985ad1b287ff9955feb5bd4776aabea5 /src/viewport.cpp
parent526d5de867dc5cf17c09e4bb9358ee23c01ed667 (diff)
downloadopenttd-ad19bf105af41a89b1b331d56eb75f9ae4d8b79a.tar.xz
(svn r13055) -Codechange: make a class of SmallMapWindow.
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 7b3d3bfdb..1eb5ec63d 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -144,8 +144,6 @@ TileHighlightData _thd;
static TileInfo *_cur_ti;
bool _draw_bounding_boxes = false;
-extern void SmallMapCenterOnCurrentPos(Window *w);
-
static Point MapXYZToViewport(const ViewPort *vp, uint x, uint y, uint z)
{
Point p = RemapCoords(x, y, z);
@@ -2079,27 +2077,6 @@ bool ScrollWindowTo(int x , int y, Window *w, bool instant)
return true;
}
-
-bool ScrollMainWindowTo(int x, int y, bool instant)
-{
- Window *w;
- bool res = ScrollWindowTo(x, y, FindWindowById(WC_MAIN_WINDOW, 0), instant);
-
- /* If a user scrolls to a tile (via what way what so ever) and already is on
- * that tile (e.g.: pressed twice), move the smallmap to that location,
- * so you directly see where you are on the smallmap. */
-
- if (res) return res;
-
- w = FindWindowById(WC_SMALLMAP, 0);
- if (w == NULL) return res;
-
- SmallMapCenterOnCurrentPos(w);
-
- return res;
-}
-
-
bool ScrollMainWindowToTile(TileIndex tile, bool instant)
{
return ScrollMainWindowTo(TileX(tile) * TILE_SIZE + TILE_SIZE / 2, TileY(tile) * TILE_SIZE + TILE_SIZE / 2, instant);