Codechange: Sprite mapping for objects doesn't involve cargo types. (#10905)

Objects have a default sprite group and an optional purchase list sprite
group. There is no need to pretend that these are cargo IDs.
This commit is contained in:
2023-06-02 09:25:13 +01:00
committed by GitHub
parent cdb3a6288b
commit 0b663f709d
3 changed files with 13 additions and 19 deletions

View File

@@ -166,8 +166,8 @@ private:
/** Struct containing information relating to object classes. */
typedef NewGRFClass<ObjectSpec, ObjectClassID, OBJECT_CLASS_MAX> ObjectClass;
/** Mapping of purchase for objects. */
static const CargoID CT_PURCHASE_OBJECT = 1;
static const size_t OBJECT_SPRITE_GROUP_DEFAULT = 0;
static const size_t OBJECT_SPRITE_GROUP_PURCHASE = 1;
uint16 GetObjectCallback(CallbackID callback, uint32 param1, uint32 param2, const ObjectSpec *spec, Object *o, TileIndex tile, uint8 view = 0);