* Get the custom sprite for the given cargo type. * @param cs Cargo being queried. * @return Custom sprite to draw, or \c 0 if not available. */
| 53 | * @return Custom sprite to draw, or \c 0 if not available. |
| 54 | */ |
| 55 | SpriteID GetCustomCargoSprite(const CargoSpec *cs) |
| 56 | { |
| 57 | CargoResolverObject object(cs); |
| 58 | const auto *group = object.Resolve<ResultSpriteGroup>(); |
| 59 | if (group == nullptr || group->num_sprites == 0) return 0; |
| 60 | |
| 61 | return group->sprite; |
| 62 | } |
| 63 | |
| 64 | |
| 65 | uint16_t GetCargoCallback(CallbackID callback, uint32_t param1, uint32_t param2, const CargoSpec *cs, std::span<int32_t> regs100) |