src/train.h
changeset 7931 b0a46cd92225
parent 7929 6c9b25842b0f
child 8144 65cec0877b78
equal deleted inserted replaced
7930:f12c2437a050 7931:b0a46cd92225
    39  * @param v vehicle to change
    39  * @param v vehicle to change
    40  */
    40  */
    41 static inline void SetFrontEngine(Vehicle *v)
    41 static inline void SetFrontEngine(Vehicle *v)
    42 {
    42 {
    43 	assert(v->type == VEH_TRAIN);
    43 	assert(v->type == VEH_TRAIN);
    44 	SETBIT(v->subtype, Train_Front);
    44 	SetBit(v->subtype, Train_Front);
    45 }
    45 }
    46 
    46 
    47 /** Remove the front engine state
    47 /** Remove the front engine state
    48  * @param v vehicle to change
    48  * @param v vehicle to change
    49  */
    49  */
    67  * @param v vehicle to change
    67  * @param v vehicle to change
    68  */
    68  */
    69 static inline void SetArticulatedPart(Vehicle *v)
    69 static inline void SetArticulatedPart(Vehicle *v)
    70 {
    70 {
    71 	assert(v->type == VEH_TRAIN);
    71 	assert(v->type == VEH_TRAIN);
    72 	SETBIT(v->subtype, Train_Articulated_Part);
    72 	SetBit(v->subtype, Train_Articulated_Part);
    73 }
    73 }
    74 
    74 
    75 /** Clear a vehicle from being an articulated part
    75 /** Clear a vehicle from being an articulated part
    76  * @param v vehicle to change
    76  * @param v vehicle to change
    77  */
    77  */
    95  * @param v vehicle to change
    95  * @param v vehicle to change
    96  */
    96  */
    97 static inline void SetTrainWagon(Vehicle *v)
    97 static inline void SetTrainWagon(Vehicle *v)
    98 {
    98 {
    99 	assert(v->type == VEH_TRAIN);
    99 	assert(v->type == VEH_TRAIN);
   100 	SETBIT(v->subtype, Train_Wagon);
   100 	SetBit(v->subtype, Train_Wagon);
   101 }
   101 }
   102 
   102 
   103 /** Clear wagon property
   103 /** Clear wagon property
   104  * @param v vehicle to change
   104  * @param v vehicle to change
   105  */
   105  */
   123  * @param v vehicle to change
   123  * @param v vehicle to change
   124  */
   124  */
   125 static inline void SetTrainEngine(Vehicle *v)
   125 static inline void SetTrainEngine(Vehicle *v)
   126 {
   126 {
   127 	assert(v->type == VEH_TRAIN);
   127 	assert(v->type == VEH_TRAIN);
   128 	SETBIT(v->subtype, Train_Engine);
   128 	SetBit(v->subtype, Train_Engine);
   129 }
   129 }
   130 
   130 
   131 /** Clear engine status
   131 /** Clear engine status
   132  * @param v vehicle to change
   132  * @param v vehicle to change
   133  */
   133  */
   151  * @param v vehicle to change
   151  * @param v vehicle to change
   152  */
   152  */
   153 static inline void SetFreeWagon(Vehicle *v)
   153 static inline void SetFreeWagon(Vehicle *v)
   154 {
   154 {
   155 	assert(v->type == VEH_TRAIN);
   155 	assert(v->type == VEH_TRAIN);
   156 	SETBIT(v->subtype, Train_Free_Wagon);
   156 	SetBit(v->subtype, Train_Free_Wagon);
   157 }
   157 }
   158 
   158 
   159 /** Clear a vehicle from being a free wagon
   159 /** Clear a vehicle from being a free wagon
   160  * @param v vehicle to change
   160  * @param v vehicle to change
   161  */
   161  */
   179  * @param v vehicle to change
   179  * @param v vehicle to change
   180  */
   180  */
   181 static inline void SetMultiheaded(Vehicle *v)
   181 static inline void SetMultiheaded(Vehicle *v)
   182 {
   182 {
   183 	assert(v->type == VEH_TRAIN);
   183 	assert(v->type == VEH_TRAIN);
   184 	SETBIT(v->subtype, Train_Multiheaded);
   184 	SetBit(v->subtype, Train_Multiheaded);
   185 }
   185 }
   186 
   186 
   187 /** Clear multiheaded engine property
   187 /** Clear multiheaded engine property
   188  * @param v vehicle to change
   188  * @param v vehicle to change
   189  */
   189  */