diff options
author | rubidium <rubidium@openttd.org> | 2010-08-26 15:31:40 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-26 15:31:40 +0000 |
commit | e2e26190d55fe5a7e053791ac9bce095b303be10 (patch) | |
tree | 94224f8433a94c28866b63347b64c3f7c8e4f201 /src/newgrf_airporttiles.cpp | |
parent | 4efa2efdbba6f08b2ee4ca3aacb2aeb792429af4 (diff) | |
download | openttd-e2e26190d55fe5a7e053791ac9bce095b303be10.tar.xz |
(svn r20623) -Codechange: unify the storing of animation related information
Diffstat (limited to 'src/newgrf_airporttiles.cpp')
-rw-r--r-- | src/newgrf_airporttiles.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/newgrf_airporttiles.cpp b/src/newgrf_airporttiles.cpp index c963c7da3..9de3f38fd 100644 --- a/src/newgrf_airporttiles.cpp +++ b/src/newgrf_airporttiles.cpp @@ -308,7 +308,7 @@ void AnimateAirportTile(TileIndex tile) Station *st = Station::GetByTile(tile); StationGfx gfx = GetAirportGfx(tile); const AirportTileSpec *ats = AirportTileSpec::Get(gfx); - uint8 animation_speed = ats->animation_speed; + uint8 animation_speed = ats->animation.speed; if (HasBit(ats->callback_mask, CBM_AIRT_ANIM_SPEED)) { uint16 callback_res = GetAirportTileCallback(CBID_AIRPTILE_ANIMATION_SPEED, 0, 0, gfx, st, tile); @@ -323,7 +323,7 @@ void AnimateAirportTile(TileIndex tile) bool frame_set_by_callback = false; uint8 frame = GetAnimationFrame(tile); - uint16 num_frames = GB(ats->animation_info, 0, 8); + uint16 num_frames = ats->animation.frames; if (HasBit(ats->callback_mask, CBM_AIRT_ANIM_NEXT_FRAME)) { uint16 callback_res = GetAirportTileCallback(CBID_AIRPTILE_ANIM_NEXT_FRAME, HasBit(ats->animation_special_flags, 0) ? Random() : 0, 0, gfx, st, tile); @@ -353,7 +353,7 @@ void AnimateAirportTile(TileIndex tile) if (!frame_set_by_callback) { if (frame < num_frames) { frame++; - } else if (frame == num_frames && GB(ats->animation_info, 8, 8) == 1) { + } else if (frame == num_frames && ats->animation.status == ANIM_STATUS_LOOPING) { /* This animation loops, so start again from the beginning */ frame = 0; } else { @@ -391,7 +391,7 @@ void AirportTileAnimationTrigger(Station *st, TileIndex tile, AirpAnimationTrigg StationGfx gfx = GetAirportGfx(tile); const AirportTileSpec *ats = AirportTileSpec::Get(gfx); - if (!HasBit(ats->animation_triggers, trigger)) return; + if (!HasBit(ats->animation.triggers, trigger)) return; ChangeAirportTileAnimationFrame(ats, tile, trigger, gfx, st); return; |