OpenTTD Source: src/bridge_type.h File Reference

OpenTTD Source 15.3

Data Structures | Typedefs | Enumerations | Variables
bridge_type.h File Reference

Header file for bridge types. More...

`#include "core/enum_type.hpp"`

Go to the source code of this file.

## Data Structures
struct | BridgeableTileInfo
| Information about a tile structure that may have a bridge above. More...

## Typedefs
using | BridgeType = uint
| Bridge spec number.
using | BridgePillarFlags = EnumBitSet< BridgePillarFlag, uint8_t >

## Enumerations
enum | BridgePieces : uint8_t { BRIDGE_PIECE_NORTH = 0 , BRIDGE_PIECE_SOUTH , BRIDGE_PIECE_INNER_NORTH , BRIDGE_PIECE_INNER_SOUTH , BRIDGE_PIECE_MIDDLE_ODD , BRIDGE_PIECE_MIDDLE_EVEN , BRIDGE_PIECE_HEAD , NUM_BRIDGE_PIECES }
| This enum is related to the definition of bridge pieces, which is used to determine the proper sprite table to use while drawing a given bridge part. More...
enum class | BridgePillarFlag : uint8_t { CornerW = 0 , CornerS = 1 , CornerE = 2 , CornerN = 3 , EdgeNE = 4 , EdgeSE = 5 , EdgeSW = 6 , EdgeNW = 7 }
| Obstructed bridge pillars information. More...

## Variables
static constexpr uint | NUM_BRIDGE_MIDDLE_PIECES = NUM_BRIDGE_PIECES - 1
| Number of bridge middles pieces.
static constexpr BridgePillarFlags | BRIDGEPILLARFLAGS_ALL

## Detailed Description

Header file for bridge types.

Definition in file bridge_type.h.

## Typedef Documentation

## ◆ BridgePillarFlags

using BridgePillarFlags = EnumBitSet<BridgePillarFlag, uint8_t>

Definition at line 51 of file bridge_type.h.

## ◆ BridgeType

using BridgeType = uint

Bridge spec number.

Definition at line 15 of file bridge_type.h.

## Enumeration Type Documentation

## ◆ BridgePieces

enum BridgePieces : uint8_t

This enum is related to the definition of bridge pieces, which is used to determine the proper sprite table to use while drawing a given bridge part.

Definition at line 22 of file bridge_type.h.

## ◆ BridgePillarFlag

enum class BridgePillarFlag : uint8_t
| strong

Obstructed bridge pillars information.

Enumerator
CornerW | West corner is obstructed.
CornerS | South corner is obstructed.
CornerE | East corner is obstructed.
CornerN | North corner is obstructed.

Definition at line 39 of file bridge_type.h.

## Variable Documentation

## ◆ BRIDGEPILLARFLAGS_ALL

constexpr BridgePillarFlags BRIDGEPILLARFLAGS_ALL
| staticconstexpr

Initial value:
{
BridgePillarFlag::CornerW, BridgePillarFlag::CornerS, BridgePillarFlag::CornerE, BridgePillarFlag::CornerN,
BridgePillarFlag::EdgeNE, BridgePillarFlag::EdgeSE, BridgePillarFlag::EdgeSW, BridgePillarFlag::EdgeNW,
}
BridgePillarFlag::CornerN
@ CornerN
North corner is obstructed.
BridgePillarFlag::CornerS
@ CornerS
South corner is obstructed.
BridgePillarFlag::CornerE
@ CornerE
East corner is obstructed.
BridgePillarFlag::CornerW
@ CornerW
West corner is obstructed.

Definition at line 53 of file bridge_type.h.

## ◆ NUM_BRIDGE_MIDDLE_PIECES

constexpr uint NUM_BRIDGE_MIDDLE_PIECES = NUM_BRIDGE_PIECES - 1
| staticconstexpr

Number of bridge middles pieces.

This is all bridge pieces except BRIDGE_PIECE_HEAD.

Definition at line 36 of file bridge_type.h.