57 if (group == NULL)
return 0;
59 return group->GetResult();
66 return object.ResolveCallback();
81 if (grffile->grf_version < 7 && !usebit)
return cargo;
const SpriteGroup * ResolveReal(const RealSpriteGroup *group) const
Get the real sprites of the grf.
SpriteID GetCustomCargoSprite(const CargoSpec *cs)
Get the custom sprite for the given cargo type.
CargoID GetCargoIDByLabel(CargoLabel cl)
Get the cargo ID by cargo label.
Functions related to debugging.
CargoID GetCargoTranslation(uint8 cargo, const GRFFile *grffile, bool usebit)
Translate a GRF-local cargo slot/bitnum into a CargoID.
Interface for SpriteGroup-s to access the gamestate.
Specification of a cargo type.
Set when using the callback resolve system, but not to resolve a callback.
byte num_loaded
Number of loaded groups.
uint32 callback_param1
First parameter (var 10) of the callback.
const SpriteGroup * root_spritegroup
Root SpriteGroup to use for resolving.
uint32 callback_param2
Second parameter (var 18) of the callback.
virtual const SpriteGroup * Resolve(ResolverObject &object) const
Base sprite group resolver.
const SpriteGroup ** loaded
List of loaded groups (can be SpriteIDs or Callback results)
uint Length() const
Get the number of items in the list.
Definition of base types and functions in a cross-platform compatible way.
A number of safeguards to prevent using unsafe methods.
const SpriteGroup ** loading
List of loading groups (can be SpriteIDs or Callback results)
byte num_loading
Number of loading groups.
const GRFFile * grffile
GRFFile the resolved SpriteGroup belongs to.
CargoID GetCargoIDByBitnum(uint8 bitnum)
Find the CargoID of a 'bitnum' value.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
SmallVector< CargoLabel, 4 > cargo_list
Cargo translation table (local ID -> label)
CallbackID callback
Callback being resolved.
CallbackID
List of implemented NewGRF callbacks.
byte CargoID
Cargo slots to indicate a cargo type within a game.
Dynamic data of a loaded NewGRF.
CargoResolverObject(const CargoSpec *cs, CallbackID callback=CBID_NO_CALLBACK, uint32 callback_param1=0, uint32 callback_param2=0)
Constructor of the cargo resolver.