MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IncrementSprite

Function IncrementSprite

src/effectvehicle.cpp:29–37  ·  view source on GitHub ↗

* Increment the sprite unless it has reached the end of the animation. * @param v Vehicle to increment sprite of. * @param last Last sprite of animation. * @return true if the sprite was incremented, false if the end was reached. */

Source from the content-addressed store, hash-verified

27 * @return true if the sprite was incremented, false if the end was reached.
28 */
29static bool IncrementSprite(EffectVehicle *v, SpriteID last)
30{
31 if (v->sprite_cache.sprite_seq.seq[0].sprite != last) {
32 v->sprite_cache.sprite_seq.seq[0].sprite++;
33 return true;
34 } else {
35 return false;
36 }
37}
38
39static void ChimneySmokeInit(EffectVehicle *v)
40{

Callers 8

ChimneySmokeTickFunction · 0.85
SteamSmokeTickFunction · 0.85
DieselSmokeTickFunction · 0.85
ElectricSparkTickFunction · 0.85
SmokeTickFunction · 0.85
ExplosionLargeTickFunction · 0.85
BreakdownSmokeTickFunction · 0.85
ExplosionSmallTickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected