mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 21:33:51 +00:00
(svn r18681) -Codechange: Use existing TILE_LOOP method for iterating trigger area.
This commit is contained in:
parent
f77d88c0aa
commit
81dc77ee23
@ -1062,10 +1062,9 @@ void StationAnimationTrigger(const BaseStation *st, TileIndex tile, StatAnimTrig
|
||||
ETileArea area = ETileArea(st, tile, tas[trigger]);
|
||||
|
||||
/* Check all tiles over the station to check if the specindex is still in use */
|
||||
for (uint y = 0; y < area.h; y++) {
|
||||
for (uint x = 0; x < area.w; x++) {
|
||||
if (st->TileBelongsToRailStation(area.tile)) {
|
||||
const StationSpec *ss = GetStationSpec(area.tile);
|
||||
TILE_LOOP(tile, area.w, area.h, area.tile) {
|
||||
if (st->TileBelongsToRailStation(tile)) {
|
||||
const StationSpec *ss = GetStationSpec(tile);
|
||||
if (ss != NULL && HasBit(ss->anim_triggers, trigger)) {
|
||||
CargoID cargo;
|
||||
if (cargo_type == CT_INVALID) {
|
||||
@ -1073,12 +1072,9 @@ void StationAnimationTrigger(const BaseStation *st, TileIndex tile, StatAnimTrig
|
||||
} else {
|
||||
cargo = GetReverseCargoTranslation(cargo_type, ss->grffile);
|
||||
}
|
||||
ChangeStationAnimationFrame(ss, st, area.tile, random_bits, trigger, cargo);
|
||||
ChangeStationAnimationFrame(ss, st, tile, random_bits, trigger, cargo);
|
||||
}
|
||||
}
|
||||
area.tile += TileDiffXY(1, 0);
|
||||
}
|
||||
area.tile += TileDiffXY(-area.w, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user