(svn r4714) - NewGRF: simplify evaluation of 'real' sprite groups.

This commit is contained in:
peter1138
2006-05-03 15:46:21 +00:00
parent 9cd88e7153
commit 4ef1033287
3 changed files with 9 additions and 24 deletions

View File

@@ -71,19 +71,6 @@ void InitializeSpriteGroupPool(void)
}
static inline const SpriteGroup *ResolveReal(const SpriteGroup *group, ResolverObject *object)
{
bool in_motion;
uint set;
set = object->ResolveReal(object, group->g.real.num_loaded, group->g.real.num_loading, &in_motion);
assert((in_motion && set < group->g.real.num_loaded) || (!in_motion && set < group->g.real.num_loading));
return in_motion ? group->g.real.loaded[set] : group->g.real.loading[set];
}
static inline uint32 GetVariable(const ResolverObject *object, byte variable, byte parameter)
{
/* Return common variables */
@@ -240,7 +227,7 @@ const SpriteGroup *Resolve(const SpriteGroup *group, ResolverObject *object)
if (group == NULL) return NULL;
switch (group->type) {
case SGT_REAL: return ResolveReal(group, object);
case SGT_REAL: return object->ResolveReal(object, group);
case SGT_DETERMINISTIC: return ResolveVariable(group, object);
case SGT_RANDOMIZED: return ResolveRandom(group, object);
default: return group;