diff options
author | rubidium <rubidium@openttd.org> | 2010-07-19 17:00:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-07-19 17:00:54 +0000 |
commit | 5a836cdec79cea79ff3ef69c08f13a0546c6dacd (patch) | |
tree | b99ecea2bc6ed091855a354725adcf308c7c5ada /src/slope_func.h | |
parent | 34764feac226f4a962cfa7957db79feb617c900c (diff) | |
download | openttd-5a836cdec79cea79ff3ef69c08f13a0546c6dacd.tar.xz |
(svn r20187) -Codechange: move _tileh_to_sprite into a function in a more logical place and with a more descriptive name
Diffstat (limited to 'src/slope_func.h')
-rw-r--r-- | src/slope_func.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/slope_func.h b/src/slope_func.h index b6a0a6e9d..c05df5656 100644 --- a/src/slope_func.h +++ b/src/slope_func.h @@ -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 */ |