bridge.h File Reference

Header file for bridges. More...

#include "gfx_type.h"
#include "direction_type.h"
#include "tile_cmd.h"

Go to the source code of this file.

Data Structures

struct  BridgeSpec
 Struct containing information about a single bridge type. More...

Typedefs

typedef uint BridgeType

Enumerations

enum  { MAX_BRIDGES = 13 }

Functions

Foundation GetBridgeFoundation (Slope tileh, Axis axis)
bool HasBridgeFlatRamp (Slope tileh, Axis axis)
 Determines if the track on a bridge ramp is flat or goes up/down.
static const BridgeSpecGetBridgeSpec (BridgeType i)
void DrawBridgeMiddle (const TileInfo *ti)
bool CheckBridge_Stuff (BridgeType bridge_type, uint bridge_len, uint32 flags=0)
int CalcBridgeLenCostFactor (int x)
 calculate the price factor for building a long bridge.
void ResetBridges ()
 Reset the data been eventually changed by the grf loaded.

Variables

BridgeSpec _bridge [MAX_BRIDGES]


Detailed Description

Header file for bridges.

Definition in file bridge.h.


Function Documentation

int CalcBridgeLenCostFactor ( int  x  ) 

calculate the price factor for building a long bridge.

basically the cost delta is 1,1, 1, 2,2, 3,3,3, 4,4,4,4, 5,5,5,5,5, 6,6,6,6,6,6, 7,7,7,7,7,7,7, 8,8,8,8,8,8,8,8,

Definition at line 64 of file tunnelbridge_cmd.cpp.

Referenced by CmdBuildBridge().

bool HasBridgeFlatRamp ( Slope  tileh,
Axis  axis 
)

Determines if the track on a bridge ramp is flat or goes up/down.

Parameters:
tileh Slope of the tile under the bridge head
axis Orientation of bridge
Returns:
true iff the track is flat.

Definition at line 94 of file tunnelbridge_cmd.cpp.

References SLOPE_FLAT.

void ResetBridges (  ) 

Reset the data been eventually changed by the grf loaded.

Definition at line 45 of file tunnelbridge_cmd.cpp.

Referenced by ResetNewGRFData().


Generated on Mon Sep 22 20:34:21 2008 for openttd by  doxygen 1.5.6