(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.

This commit is contained in:
rubidium
2007-01-10 18:56:51 +00:00
parent ce75f6549d
commit a7d0cdf95f
190 changed files with 2825 additions and 2208 deletions

View File

@@ -10,11 +10,13 @@
enum {
INVALID_VEH_ORDER_ID = 0xFF,
INVALID_ORDER = 0xFFFF,
};
static const OrderID INVALID_ORDER = 0xFFFF;
/* Order types */
enum OrderTypes {
enum OrderType {
OT_BEGIN = 0,
OT_NOTHING = 0,
OT_GOTO_STATION = 1,
OT_GOTO_DEPOT = 2,
@@ -22,9 +24,14 @@ enum OrderTypes {
OT_LEAVESTATION = 4,
OT_DUMMY = 5,
OT_GOTO_WAYPOINT = 6,
OT_END
};
/* It needs to be 8bits, because we save and load it as such */
typedef uint8 OrderType;
/** Define basic enum properties */
template <> struct EnumPropsT<OrderType> : MakeEnumPropsT<OrderType, byte, OT_BEGIN, OT_END, OT_END> {};
typedef TinyEnumT<OrderType> OrderTypeByte;
/* Order flags -- please use OFB instead OF and use HASBIT/SETBIT/CLEARBIT */
@@ -82,7 +89,7 @@ enum {
* - REF_SHEDULE (all REFs are currently limited to 16 bits!!)
*/
typedef struct Order {
OrderType type;
OrderTypeByte type;
uint8 flags;
DestinationID dest; ///< The destionation of the order.