diff --git a/src/newgrf_cargo.h b/src/newgrf_cargo.h --- a/src/newgrf_cargo.h +++ b/src/newgrf_cargo.h @@ -14,9 +14,16 @@ #include "cargo_type.h" #include "gfx_type.h" -static const CargoID CT_DEFAULT = NUM_CARGO + 0; -static const CargoID CT_PURCHASE = NUM_CARGO + 1; -static const CargoID CT_DEFAULT_NA = NUM_CARGO + 2; +/** + * Sprite Group Cargo types. + * These special cargo types are used when resolving sprite groups when non-cargo-specific sprites or callbacks are needed, + * e.g. in purchase lists, or if no specific cargo type sprite group is supplied. + */ +namespace SpriteGroupCargo { + static constexpr CargoID SG_DEFAULT = NUM_CARGO; ///< Default type used when no more-specific cargo matches. + static constexpr CargoID SG_PURCHASE = NUM_CARGO + 1; ///< Used in purchase lists before an item exists. + static constexpr CargoID SG_DEFAULT_NA = NUM_CARGO + 2; ///< Used only by stations and roads when no more-specific cargo matches. +}; /* Forward declarations of structs used */ struct CargoSpec;