(svn r22634) -Codechange: Deduplicate some code. Note that zeroing 'count' is intentionally removed, it is only used together with 'scope'.

This commit is contained in:
frosch
2011-07-04 20:31:57 +00:00
parent 74fbbc2f38
commit e2a5d69cb7
13 changed files with 27 additions and 48 deletions

View File

@@ -381,6 +381,17 @@ struct ResolverObject {
uint32 (*GetVariable)(const struct ResolverObject*, byte, byte, bool*);
const SpriteGroup *(*ResolveReal)(const struct ResolverObject*, const RealSpriteGroup*);
void (*StorePSA)(struct ResolverObject*, uint, int32);
/**
* Resets the dynamic state of the resolver object.
* To be called before resolving an Action-1-2-3 chain.
*/
void ResetState()
{
this->last_value = 0;
this->trigger = 0;
this->reseed = 0;
}
};
#endif /* NEWGRF_SPRITEGROUP_H */