equal
deleted
inserted
replaced
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. |