|
|
|
@ -100,9 +100,10 @@ RailTypeResolverObject::RailTypeResolverObject(const RailtypeInfo *rti, TileInde
|
|
|
|
|
* @param tile The tile to get the sprite for.
|
|
|
|
|
* @param rtsg The type of sprite to draw.
|
|
|
|
|
* @param content Where are we drawing the tile?
|
|
|
|
|
* @param [out] num_results If not NULL, return the number of sprites in the spriteset.
|
|
|
|
|
* @return The sprite to draw.
|
|
|
|
|
*/
|
|
|
|
|
SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context)
|
|
|
|
|
SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context, uint *num_results)
|
|
|
|
|
{
|
|
|
|
|
assert(rtsg < RTSG_END);
|
|
|
|
|
|
|
|
|
@ -112,6 +113,8 @@ SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSp
|
|
|
|
|
const SpriteGroup *group = object.Resolve();
|
|
|
|
|
if (group == NULL || group->GetNumResults() == 0) return 0;
|
|
|
|
|
|
|
|
|
|
if (num_results) *num_results = group->GetNumResults();
|
|
|
|
|
|
|
|
|
|
return group->GetResult();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|