(svn r3014) -NewGRF, Codechange: Make all sprite group references be pointers instead of copying the data around.

This commit is contained in:
2005-10-04 19:52:26 +00:00
parent c3a73d4047
commit 9fabe008a0
6 changed files with 53 additions and 40 deletions

View File

@@ -31,7 +31,7 @@ SpriteGroup *EvalDeterministicSpriteGroup(const DeterministicSpriteGroup *dsg, i
DeterministicSpriteGroupRange *range = &dsg->ranges[i];
if (range->low <= value && value <= range->high)
return &range->group;
return range->group;
}
return dsg->default_group;
@@ -72,7 +72,7 @@ SpriteGroup *EvalRandomizedSpriteGroup(const RandomizedSpriteGroup *rsg, byte ra
mask = (rsg->num_groups - 1) << rsg->lowest_randbit;
index = (random_bits & mask) >> rsg->lowest_randbit;
assert(index < rsg->num_groups);
return &rsg->groups[index];
return rsg->groups[index];
}
byte RandomizedSpriteGroupTriggeredBits(const RandomizedSpriteGroup *rsg,