(svn r22436) -Fix (r18969): Apply railtype property 12 (station graphics) also to station groundsprites from action 1.

This commit is contained in:
frosch
2011-05-08 15:58:59 +00:00
parent 29357ef65c
commit fb72295945
6 changed files with 29 additions and 39 deletions

View File

@@ -162,25 +162,15 @@ struct RailtypeInfo {
/** bitmask to the OTHER railtypes on which an engine of THIS railtype can physically travel */
RailTypes compatible_railtypes;
/**
* Offset between the current railtype and normal rail. This means that:<p>
* 1) All the sprites in a railset MUST be in the same order. This order
* is determined by normal rail. Check sprites 1005 and following for this order<p>
* 2) The position where the railtype is loaded must always be the same, otherwise
* the offset will fail.
* @note: Something more flexible might be desirable in the future.
*/
SpriteID total_offset;
/**
* Bridge offset
*/
SpriteID bridge_offset;
/**
* Offset to add to ground sprite when drawing custom waypoints / stations
* Original railtype number to use when drawing non-newgrf railtypes, or when drawing stations.
*/
byte custom_ground_offset;
byte fallback_railtype;
/**
* Multiplier for curve maximum speed advantage
@@ -251,6 +241,18 @@ struct RailtypeInfo {
{
return this->group[RTSG_GROUND] != NULL;
}
/**
* Offset between the current railtype and normal rail. This means that:<p>
* 1) All the sprites in a railset MUST be in the same order. This order
* is determined by normal rail. Check sprites 1005 and following for this order<p>
* 2) The position where the railtype is loaded must always be the same, otherwise
* the offset will fail.
*/
inline uint GetRailtypeSpriteOffset() const
{
return 82 * this->fallback_railtype;
}
};