Codefix: Pass cargo as CargoID. (#13311)

This commit is contained in:
Peter Nelson 2025-01-13 19:23:26 +00:00 committed by GitHub
parent 4670a62342
commit 41c9f2d82c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ const SpriteGroup *GetWagonOverrideSpriteSet(EngineID engine, CargoID cargo, Eng
return nullptr;
}
void SetCustomEngineSprites(EngineID engine, uint8_t cargo, const SpriteGroup *group)
void SetCustomEngineSprites(EngineID engine, CargoID cargo, const SpriteGroup *group)
{
Engine *e = Engine::Get(engine);
assert(cargo < std::size(e->grf_prop.spritegroup));

View File

@ -78,7 +78,7 @@ struct VehicleSpriteSeq;
void SetWagonOverrideSprites(EngineID engine, CargoID cargo, const struct SpriteGroup *group, std::span<EngineID> engine_ids);
const SpriteGroup *GetWagonOverrideSpriteSet(EngineID engine, CargoID cargo, EngineID overriding_engine);
void SetCustomEngineSprites(EngineID engine, uint8_t cargo, const struct SpriteGroup *group);
void SetCustomEngineSprites(EngineID engine, CargoID cargo, const struct SpriteGroup *group);
void GetCustomEngineSprite(EngineID engine, const Vehicle *v, Direction direction, EngineImageType image_type, VehicleSpriteSeq *result);
#define GetCustomVehicleSprite(v, direction, image_type, result) GetCustomEngineSprite(v->engine_type, v, direction, image_type, result)