src/road_internal.h
author rubidium
Fri, 25 Apr 2008 15:22:32 +0000
changeset 9055 4dc6a0c0ef47
parent 8821 1411d08e26b3
child 9342 6daf441eee26
permissions -rw-r--r--
(svn r12897) -Codechange: some coding style in station_cmd.cpp.
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 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
    24
 * @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
    25
 * @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
    26
 */
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    27
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
    28
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
 * Draw the catenary for tram road bits
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    31
 * @param ti   information about the tile (position, slope)
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    32
 * @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
    33
 */
8821
1411d08e26b3 (svn r12569) -Cleanup: variable scope and coding style in road*.cpp
smatz
parents: 8138
diff changeset
    34
void DrawTramCatenary(const TileInfo *ti, RoadBits tram);
8102
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    35
906a3d3b6df1 (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
diff changeset
    36
#endif /* ROAD_INTERNAL_H */