Merge branch 'tracerestrict-sx' into jgrpp
# Conflicts: # src/saveload/extended_ver_sl.cpp # src/tracerestrict.h
This commit is contained in:
@@ -47,7 +47,7 @@ std::vector<uint32> _sl_xv_discardable_chunk_ids; ///< list of chunks
|
||||
static const uint32 _sl_xv_slxi_chunk_version = 0; ///< current version os SLXI chunk
|
||||
|
||||
const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||
{ XSLFI_TRACE_RESTRICT, XSCF_NULL, 9, 9, "tracerestrict", NULL, NULL, "TRRM,TRRP,TRRS" },
|
||||
{ XSLFI_TRACE_RESTRICT, XSCF_NULL, 10, 10, "tracerestrict", NULL, NULL, "TRRM,TRRP,TRRS" },
|
||||
{ XSLFI_TRACE_RESTRICT_OWNER, XSCF_NULL, 1, 1, "tracerestrict_owner", NULL, NULL, NULL },
|
||||
{ XSLFI_TRACE_RESTRICT_ORDRCND, XSCF_NULL, 2, 2, "tracerestrict_order_cond", NULL, NULL, NULL },
|
||||
{ XSLFI_TRACE_RESTRICT_STATUSCND,XSCF_NULL, 1, 1, "tracerestrict_status_cond", NULL, NULL, NULL },
|
||||
|
@@ -87,10 +87,10 @@ typedef uint32 TraceRestrictItem;
|
||||
* OFFSET values describe the field bit offset
|
||||
*/
|
||||
enum TraceRestrictItemFlagAllocation {
|
||||
TRIFA_TYPE_COUNT = 5,
|
||||
TRIFA_TYPE_COUNT = 6,
|
||||
TRIFA_TYPE_OFFSET = 0,
|
||||
|
||||
/* 3 bits reserved for future use */
|
||||
/* 2 bits reserved for future use */
|
||||
|
||||
TRIFA_COND_FLAGS_COUNT = 3,
|
||||
TRIFA_COND_FLAGS_OFFSET = 8,
|
||||
@@ -138,7 +138,11 @@ enum TraceRestrictItemType {
|
||||
TRIT_COND_SLOT_OCCUPANCY = 22, ///< Test train slot occupancy state
|
||||
TRIT_COND_TRAIN_OWNER = 24, ///< Test train owner
|
||||
TRIT_COND_TRAIN_STATUS = 25, ///< Test train status
|
||||
/* space up to 31 */
|
||||
|
||||
TRIT_COND_END = 48, ///< End (exclusive) of conditional item types, note that this has the same value as TRIT_REVERSE
|
||||
//TRIT_REVERSE = 48, ///< Reverse: reserved for future use
|
||||
|
||||
/* space up to 63 */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -216,7 +220,7 @@ enum TraceRestrictPhysPropRatioCondAuxField {
|
||||
};
|
||||
|
||||
/**
|
||||
* TraceRestrictItem auxiliary type field, for order type conditionals
|
||||
* TraceRestrictItem auxiliary type field, for TRIT_PF_PENALTY
|
||||
*/
|
||||
enum TraceRestrictPathfinderPenaltyAuxField {
|
||||
TRPPAF_VALUE = 0, ///< value field is a the pathfinder penalty to use
|
||||
@@ -487,7 +491,7 @@ static inline void SetTraceRestrictValue(TraceRestrictItem &item, uint16 value)
|
||||
/** Is TraceRestrictItemType a conditional type? */
|
||||
static inline bool IsTraceRestrictTypeConditional(TraceRestrictItemType type)
|
||||
{
|
||||
return type >= TRIT_COND_BEGIN;
|
||||
return type >= TRIT_COND_BEGIN && type < TRIT_COND_END;
|
||||
}
|
||||
|
||||
/** Is TraceRestrictItem type field a conditional type? */
|
||||
|
Reference in New Issue
Block a user