Files
@ r12698:23a20e8bb850
Branch filter:
Location: cpp/openttd-patchpack/source/src/road_type.h - annotation
r12698:23a20e8bb850
2.3 KiB
text/x-c
(svn r17171) -Doc: Additions and corrections of various doxygen strings.
r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8348:e6507808d2e7 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r10011:61b953b16f93 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r11247:c15ef8b37f5e r11247:c15ef8b37f5e r11247:c15ef8b37f5e r11247:c15ef8b37f5e r11247:c15ef8b37f5e r11247:c15ef8b37f5e r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r12016:12cc374b77e8 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r12470:62669b41f044 r12470:62669b41f044 r12470:62669b41f044 r12470:62669b41f044 r12470:62669b41f044 r12470:62669b41f044 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 | /* $Id$ */
/** @file road_type.h Enums and other types related to roads. */
#ifndef ROAD_TYPE_H
#define ROAD_TYPE_H
#include "core/enum_type.hpp"
/**
* The different roadtypes we support
*
* @note currently only ROADTYPE_ROAD and ROADTYPE_TRAM are supported.
*/
enum RoadType {
ROADTYPE_BEGIN = 0, ///< Used for iterations
ROADTYPE_ROAD = 0, ///< Basic road type
ROADTYPE_TRAM = 1, ///< Trams
ROADTYPE_END, ///< Used for iterations
INVALID_ROADTYPE = 0xFF ///< flag for invalid roadtype
};
DECLARE_POSTFIX_INCREMENT(RoadType);
/**
* The different roadtypes we support, but then a bitmask of them
* @note currently only roadtypes with ROADTYPE_ROAD and ROADTYPE_TRAM are supported.
*/
enum RoadTypes {
ROADTYPES_NONE = 0, ///< No roadtypes
ROADTYPES_ROAD = 1 << ROADTYPE_ROAD, ///< Road
ROADTYPES_TRAM = 1 << ROADTYPE_TRAM, ///< Trams
ROADTYPES_ALL = ROADTYPES_ROAD | ROADTYPES_TRAM, ///< Road + trams
ROADTYPES_END, ///< Used for iterations?
INVALID_ROADTYPES = 0xFF ///< Invalid roadtypes
};
DECLARE_ENUM_AS_BIT_SET(RoadTypes);
typedef SimpleTinyEnumT<RoadTypes, byte> RoadTypesByte;
/**
* Enumeration for the road parts on a tile.
*
* This enumeration defines the possible road parts which
* can be build on a tile.
*/
enum RoadBits {
ROAD_NONE = 0U, ///< No road-part is build
ROAD_NW = 1U, ///< North-west part
ROAD_SW = 2U, ///< South-west part
ROAD_SE = 4U, ///< South-east part
ROAD_NE = 8U, ///< North-east part
ROAD_X = ROAD_SW | ROAD_NE, ///< Full road along the x-axis (south-west + north-east)
ROAD_Y = ROAD_NW | ROAD_SE, ///< Full road along the y-axis (north-west + south-east)
ROAD_N = ROAD_NE | ROAD_NW, ///< Road at the two northern edges
ROAD_E = ROAD_NE | ROAD_SE, ///< Road at the two eastern edges
ROAD_S = ROAD_SE | ROAD_SW, ///< Road at the two southern edges
ROAD_W = ROAD_NW | ROAD_SW, ///< Road at the two western edges
ROAD_ALL = ROAD_X | ROAD_Y ///< Full 4-way crossing
};
DECLARE_ENUM_AS_BIT_SET(RoadBits);
#endif /* ROAD_TYPE_H */
|