src/slope_func.h
changeset 9509 f6d513c5c7e4
parent 8801 8c4b104b39ac
equal deleted inserted replaced
9508:e5ab9738298a 9509:f6d513c5c7e4
   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.