1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 00:42:45 +01:00

Codechange: Turn AnimationTrigger enums into enum classes. (#14067)

This commit is contained in:
frosch
2025-04-21 20:53:31 +02:00
committed by GitHub
parent 61a0a520f6
commit d7ddea4032
34 changed files with 124 additions and 112 deletions

View File

@@ -130,7 +130,7 @@ void BuildObject(ObjectType type, TileIndex tile, CompanyID owner, Town *town, u
}
Object::IncTypeCount(type);
if (spec->flags.Test(ObjectFlag::Animation)) TriggerObjectAnimation(o, OAT_BUILT, spec);
if (spec->flags.Test(ObjectFlag::Animation)) TriggerObjectAnimation(o, ObjectAnimationTrigger::Built, spec);
}
/**
@@ -676,8 +676,8 @@ static void TileLoop_Object(TileIndex tile)
const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
if (spec->flags.Test(ObjectFlag::Animation)) {
Object *o = Object::GetByTile(tile);
TriggerObjectTileAnimation(o, tile, OAT_TILELOOP, spec);
if (o->location.tile == tile) TriggerObjectAnimation(o, OAT_256_TICKS, spec);
TriggerObjectTileAnimation(o, tile, ObjectAnimationTrigger::TileLoop, spec);
if (o->location.tile == tile) TriggerObjectAnimation(o, ObjectAnimationTrigger::TileLoopNorth, spec);
}
if (IsTileOnWater(tile)) TileLoop_Water(tile);