diff options
author | alberth <alberth@openttd.org> | 2012-11-10 20:46:39 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2012-11-10 20:46:39 +0000 |
commit | 33ff55a8f1287643986621e7130e8acddf42b221 (patch) | |
tree | 04af02a5ad82e979ec200570b38628dccc860cdf /src/newgrf_spritegroup.h | |
parent | 4c9bea2a714da675217522c39113ba2c2c5bbee4 (diff) | |
download | openttd-33ff55a8f1287643986621e7130e8acddf42b221.tar.xz |
(svn r24693) -Doc: Add some doxymentation into the newgrf code.
Diffstat (limited to 'src/newgrf_spritegroup.h')
-rw-r--r-- | src/newgrf_spritegroup.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index ac2f939b2..9b6d1fc0e 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -303,8 +303,14 @@ struct IndustryProductionSpriteGroup : SpriteGroup { struct ResolverObject; +/** + * Interface to query and set values specific to a single #VarSpriteGroupScope (action 2 scope). + * + * Multiple of these interfaces are combined into a #ResolverObject to allow access + * to different game entities from a #SpriteGroup-chain (action 1-2-3 chain). + */ struct ScopeResolver { - ResolverObject *ro; + ResolverObject *ro; ///< Surrounding resolver object. ScopeResolver(ResolverObject *ro); virtual ~ScopeResolver(); @@ -317,15 +323,21 @@ struct ScopeResolver { virtual void StorePSA(uint reg, int32 value); }; +/** + * Interface for #SpriteGroup-s to access the gamestate. + * + * Using this interface #SpriteGroup-chains (action 1-2-3 chains) can be resolved, + * to get the results of callbacks, rerandomisations or normal sprite lookups. + */ struct ResolverObject { ResolverObject(const GRFFile *grffile, CallbackID callback = CBID_NO_CALLBACK, uint32 callback_param1 = 0, uint32 callback_param2 = 0); virtual ~ResolverObject(); ScopeResolver default_scope; ///< Default implementation of the grf scope. - CallbackID callback; - uint32 callback_param1; - uint32 callback_param2; + CallbackID callback; ///< Callback being resolved. + uint32 callback_param1; ///< First parameter (var 10) of the callback. + uint32 callback_param2; ///< Second parameter (var 18) of the callback. byte trigger; |