From 41c9f2d82c82c968dfe909f5e6326ae07902f250 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 13 Jan 2025 19:23:26 +0000 Subject: [PATCH] Codefix: Pass cargo as CargoID. (#13311) --- src/newgrf_engine.cpp | 2 +- src/newgrf_engine.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index bbad159637..82ab0b70fb 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -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)); diff --git a/src/newgrf_engine.h b/src/newgrf_engine.h index bc396e7620..339be33d8a 100644 --- a/src/newgrf_engine.h +++ b/src/newgrf_engine.h @@ -78,7 +78,7 @@ struct VehicleSpriteSeq; void SetWagonOverrideSprites(EngineID engine, CargoID cargo, const struct SpriteGroup *group, std::span 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)