diff options
author | glx <glx@openttd.org> | 2008-05-11 19:47:10 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2008-05-11 19:47:10 +0000 |
commit | a1a04fcc61c0e030f75da3192ca3e3f114d699d5 (patch) | |
tree | e54ac59b985ad1b287ff9955feb5bd4776aabea5 /src/viewport.cpp | |
parent | d711d21199cbfc475745b46c01441e8d982c461e (diff) | |
download | openttd-a1a04fcc61c0e030f75da3192ca3e3f114d699d5.tar.xz |
(svn r13055) -Codechange: make a class of SmallMapWindow.
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r-- | src/viewport.cpp | 23 |
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); |