diff options
Diffstat (limited to 'src/newgrf_spritegroup.h')
-rw-r--r-- | src/newgrf_spritegroup.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index c3753dcfd..0a7705d66 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -321,6 +321,26 @@ struct ResolverObject { uint32 reseed[VSG_END]; ///< Collects bits to rerandomise while triggering triggers. const GRFFile *grffile; ///< GRFFile the resolved SpriteGroup belongs to + const SpriteGroup *root_spritegroup; ///< Root SpriteGroup to use for resolving + + /** + * Resolve SpriteGroup. + * @return Result spritegroup. + */ + const SpriteGroup *Resolve() + { + return SpriteGroup::Resolve(this->root_spritegroup, *this); + } + + /** + * Resolve callback. + * @return Callback result. + */ + uint16 ResolveCallback() + { + const SpriteGroup *result = Resolve(); + return result != NULL ? result->GetCallbackResult() : CALLBACK_FAILED; + } virtual const SpriteGroup *ResolveReal(const RealSpriteGroup *group) const; |