OpenTTD

road_internal.h
Go to the documentation of this file.
1 /* $Id: road_internal.h 27676 2016-11-05 11:53:03Z frosch $ */
2
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 */
9
12 #ifndef ROAD_INTERNAL_H
13 #define ROAD_INTERNAL_H
14
15 #include "tile_cmd.h"
16 #include "road_type.h"
17
18 RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb);
19
20 CommandCost CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, RoadType rt, DoCommandFlag flags, bool town_check = true);
21
22 void DrawRoadCatenary(const TileInfo *ti, RoadBits tram);
23
24 #endif /* ROAD_INTERNAL_H */
road_type.h
Enums and other types related to roads.
TileInfo
Tile information, used while rendering the tile.
Definition: tile_cmd.h:44
Window::flags
WindowFlags flags
Window flags.
Definition: window_gui.h:305
DrawRoadCatenary
void DrawRoadCatenary(const TileInfo *ti, RoadBits tram)
Draws the catenary for the given tile.
Definition: road_cmd.cpp:1194
CommandCost
Common return value for all commands.
Definition: command_type.h:25
RoadType
RoadType
The different roadtypes we support.
Definition: road_type.h:22
DoCommandFlag
DoCommandFlag
List of flags for a command.
Definition: command_type.h:340
RoadBits
RoadBits
Enumeration for the road parts on a tile.
Definition: road_type.h:55
CleanUpRoadBits
RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb)
Clean up unnecessary RoadBits of a planed tile.
Definition: road.cpp:46
TileIndex
uint32 TileIndex
The index/ID of a Tile.
Definition: tile_type.h:80
Window::owner
Owner owner
The owner of the content shown in this window. Company colour is acquired from this variable...
Definition: window_gui.h:319
Owner
Owner
Enum for all companies/owners.
Definition: company_type.h:20
CheckAllowRemoveRoad
CommandCost CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, RoadType rt, DoCommandFlag flags, bool town_check=true)
Is it allowed to remove the given road bits from the given tile?
Definition: road_cmd.cpp:116
tile_cmd.h
Generic &#39;commands&#39; that can be performed on all tiles.