diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -56,13 +56,14 @@ extern SpriteGroupPool _spritegroup_pool /* Common wrapper for all the different sprite group types */ struct SpriteGroup : SpriteGroupPool::PoolItem<&_spritegroup_pool> { protected: - SpriteGroup(SpriteGroupType type) : type(type) {} + SpriteGroup(SpriteGroupType type) : nfo_line(0), type(type) {} /** Base sprite group resolver */ virtual const SpriteGroup *Resolve(ResolverObject &object) const { return this; }; public: virtual ~SpriteGroup() {} + uint32 nfo_line; SpriteGroupType type; virtual SpriteID GetResult() const { return 0; } @@ -398,6 +399,18 @@ struct ResolverObject { this->used_triggers = 0; memset(this->reseed, 0, sizeof(this->reseed)); } + + /** + * Get the feature number being resolved for. + * This function is mainly intended for the callback profiling feature. + */ + virtual GrfSpecFeature GetFeature() const { return GSF_INVALID; } + /** + * Get an identifier for the item being resolved. + * This function is mainly intended for the callback profiling feature, + * and should return an identifier recognisable by the NewGRF developer. + */ + virtual uint32 GetDebugID() const { return 0; } }; #endif /* NEWGRF_SPRITEGROUP_H */