author | rubidium |
Thu, 18 Dec 2008 12:23:08 +0000 | |
changeset 10436 | 8d3a9fbe8f19 |
parent 9342 | 6daf441eee26 |
permissions | -rw-r--r-- |
8102
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
1 |
/* $Id$ */ |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
2 |
|
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
3 |
/** @file road_internal.h Functions used internally by the roads. */ |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
4 |
|
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
5 |
#ifndef ROAD_INTERNAL_H |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
6 |
#define ROAD_INTERNAL_H |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
7 |
|
8138
dbfdc08fa6b9
(svn r11700) -Codechange: reduce the amount of unnecessary includes.
rubidium
parents:
8102
diff
changeset
|
8 |
#include "tile_cmd.h" |
dbfdc08fa6b9
(svn r11700) -Codechange: reduce the amount of unnecessary includes.
rubidium
parents:
8102
diff
changeset
|
9 |
|
8102
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
10 |
/** |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
11 |
* Clean up unneccesary RoadBits of a planed tile. |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
12 |
* @param tile current tile |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
13 |
* @param org_rb planed RoadBits |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
14 |
* @return optimised RoadBits |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
15 |
*/ |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
16 |
RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb); |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
17 |
|
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
18 |
/** |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
19 |
* Is it allowed to remove the given road bits from the given tile? |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
20 |
* @param tile the tile to remove the road from |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
21 |
* @param remove the roadbits that are going to be removed |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
22 |
* @param owner the actual owner of the roadbits of the tile |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
23 |
* @param rt the road type to remove the bits from |
9342
6daf441eee26
(svn r13234) -Fix: Check/affect town rating when removing/bulldozing town-owned road under drivethrough stops.
frosch
parents:
8821
diff
changeset
|
24 |
* @param flags command flags |
6daf441eee26
(svn r13234) -Fix: Check/affect town rating when removing/bulldozing town-owned road under drivethrough stops.
frosch
parents:
8821
diff
changeset
|
25 |
* @param town_check Shall the town rating checked/affected |
8102
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
26 |
* @return true when it is allowed to remove the road bits |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
27 |
*/ |
9342
6daf441eee26
(svn r13234) -Fix: Check/affect town rating when removing/bulldozing town-owned road under drivethrough stops.
frosch
parents:
8821
diff
changeset
|
28 |
bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, RoadType rt, uint32 flags, bool town_check = true); |
8102
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
29 |
|
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
30 |
/** |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
31 |
* Draw the catenary for tram road bits |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
32 |
* @param ti information about the tile (position, slope) |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
33 |
* @param tram the roadbits to draw the catenary for |
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
34 |
*/ |
8821
1411d08e26b3
(svn r12569) -Cleanup: variable scope and coding style in road*.cpp
smatz
parents:
8138
diff
changeset
|
35 |
void DrawTramCatenary(const TileInfo *ti, RoadBits tram); |
8102
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
36 |
|
906a3d3b6df1
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff
changeset
|
37 |
#endif /* ROAD_INTERNAL_H */ |