(svn r28004) -Update from Eints:
[openttd.git] / src / script / api / script_viewport.cpp
blob737e7e68da7e74831dbf0ef3dfb50215a723918c
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
10 /** @file script_viewport.cpp Implementation of ScriptViewport. */
12 #include "../../stdafx.h"
13 #include "script_viewport.hpp"
14 #include "script_game.hpp"
15 #include "script_map.hpp"
16 #include "../../viewport_func.h"
18 #include "../../safeguards.h"
20 /* static */ void ScriptViewport::ScrollTo(TileIndex tile)
22 if (ScriptGame::IsMultiplayer()) return;
23 if (!ScriptMap::IsValidTile(tile)) return;
25 ScrollMainWindowToTile(tile);