Fix crash when setting separation mode for vehicles with no orders list.
[openttd-joker.git] / src / tilehighlight_func.h
blob837928d95f9bc424bcde99b0258ff43a74dec589
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 tilehighlight_func.h Functions related to tile highlights. */
12 #ifndef TILEHIGHLIGHT_FUNC_H
13 #define TILEHIGHLIGHT_FUNC_H
15 #include "gfx_type.h"
16 #include "tilehighlight_type.h"
17 #include "track_type.h"
19 void PlaceProc_DemolishArea(TileIndex tile);
20 bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_tile, TileIndex end_tile);
22 bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyle mode);
23 void SetObjectToPlaceWnd(CursorID icon, PaletteID pal, HighLightStyle mode, Window *w);
24 void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowClass window_class, WindowNumber window_num);
25 void ResetObjectToPlace();
27 void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method);
28 void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, ViewportDragDropSelectionProcess process);
29 void VpSetPresizeRange(TileIndex from, TileIndex to);
30 void VpSetPlaceSizingLimit(int limit);
32 void UpdateTileSelection();
34 void StoreRailPlacementEndpoints(TileIndex start_tile, TileIndex end_tile, Track start_track, bool bidirectional = true);
35 void ResetRailPlacementSnapping();
36 bool CurrentlySnappingRailPlacement();
38 extern TileHighlightData _thd;
40 #endif /* TILEHIGHLIGHT_FUNC_H */