src/road_internal.h
author rubidium
Sat, 22 Dec 2007 21:01:49 +0000
changeset 8120 7128bb2b57a3
parent 8102 906a3d3b6df1
child 8138 dbfdc08fa6b9
permissions -rw-r--r--
(svn r11681) -Fix (r11674): hopefully fix the compile error on big endian machines.
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
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
     8
/**
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
     9
 * Clean up unneccesary RoadBits of a planed tile.
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    10
 * @param tile current tile
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    11
 * @param org_rb planed RoadBits
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    12
 * @return optimised RoadBits
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    13
 */
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    14
RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb);
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
/**
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    17
 * 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
    18
 * @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
    19
 * @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
    20
 * @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
    21
 * @param edge_road are the removed bits from a town?
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    22
 * @param rt        the road type to remove the bits from
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    23
 * @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
    24
 */
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    25
bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, bool *edge_road, RoadType rt);
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    26
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    27
/**
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    28
 * Draw the catenary for tram road bits
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    29
 * @param ti   information about the tile (position, slope)
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    30
 * @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
    31
 */
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    32
void DrawTramCatenary(TileInfo *ti, RoadBits tram);
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    33
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    34
#endif /* ROAD_INTERNAL_H */