src/slope_func.h
branchNewGRF_ports
changeset 10994 cd9968b6f96b
parent 10184 fcf5fb2548eb
equal deleted inserted replaced
10991:d8811e327d12 10994:cd9968b6f96b
   345 
   345 
   346 /**
   346 /**
   347  * Returns the foundation needed to flatten a slope.
   347  * Returns the foundation needed to flatten a slope.
   348  * The returned foundation is either FOUNDATION_NONE if the tile was already flat, or FOUNDATION_LEVELED.
   348  * The returned foundation is either FOUNDATION_NONE if the tile was already flat, or FOUNDATION_LEVELED.
   349  *
   349  *
   350  * @pre      The slope must not be steep.
       
   351  * @param s  The current #Slope.
   350  * @param s  The current #Slope.
   352  * @return   The needed #Foundation.
   351  * @return   The needed #Foundation.
   353  */
   352  */
   354 static inline Foundation FlatteningFoundation(Slope s)
   353 static inline Foundation FlatteningFoundation(Slope s)
   355 {
   354 {
   356 	assert(!IsSteepSlope(s));
       
   357 	return (s == SLOPE_FLAT ? FOUNDATION_NONE : FOUNDATION_LEVELED);
   355 	return (s == SLOPE_FLAT ? FOUNDATION_NONE : FOUNDATION_LEVELED);
   358 }
   356 }
   359 
   357 
   360 /**
   358 /**
   361  * Returns the along a specific axis inclined foundation.
   359  * Returns the along a specific axis inclined foundation.