summaryrefslogtreecommitdiff
path: root/src/slope_func.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/slope_func.h')
-rw-r--r--src/slope_func.h12
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 */