(svn r20187) -Codechange: move _tileh_to_sprite into a function in a more logical place and with a more descriptive name

This commit is contained in:
rubidium
2010-07-19 17:00:54 +00:00
parent 2ab8035604
commit 035d0ef16b
8 changed files with 25 additions and 16 deletions

View File

@@ -397,4 +397,16 @@ static inline Foundation SpecialRailFoundation(Corner corner)
return (Foundation)(FOUNDATION_RAIL_W + corner);
}
/**
* Returns the #Sprite offset for a given #Slope.
*
* @param s The #Slope to get the offset for.
* @return The sprite offset for this #Slope.
*/
static inline uint SlopeToSpriteOffset(Slope s)
{
extern const byte _slope_to_sprite_offset[32];
return _slope_to_sprite_offset[s];
}
#endif /* SLOPE_FUNC_H */