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_house.cpp | |
parent | 4efa2efdbba6f08b2ee4ca3aacb2aeb792429af4 (diff) | |
download | openttd-e2e26190d55fe5a7e053791ac9bce095b303be10.tar.xz |
(svn r20623) -Codechange: unify the storing of animation related information
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r-- | src/newgrf_house.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 402847f8b..94fc02d1e 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -474,7 +474,7 @@ void DrawNewHouseTile(TileInfo *ti, HouseID house_id) void AnimateNewHouseTile(TileIndex tile) { const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile)); - byte animation_speed = hs->animation_speed; + byte animation_speed = hs->animation.speed; bool frame_set_by_callback = false; if (HasBit(hs->callback_mask, CBM_HOUSE_ANIMATION_SPEED)) { @@ -489,7 +489,7 @@ void AnimateNewHouseTile(TileIndex tile) if (_tick_counter % (1 << animation_speed) != 0) return; byte frame = GetAnimationFrame(tile); - byte num_frames = GB(hs->animation_frames, 0, 7); + byte num_frames = hs->animation.frames; if (HasBit(hs->callback_mask, CBM_HOUSE_ANIMATION_NEXT_FRAME)) { uint32 param = (hs->extra_flags & CALLBACK_1A_RANDOM_BITS) ? Random() : 0; @@ -520,7 +520,7 @@ void AnimateNewHouseTile(TileIndex tile) if (!frame_set_by_callback) { if (frame < num_frames) { frame++; - } else if (frame == num_frames && HasBit(hs->animation_frames, 7)) { + } else if (frame == num_frames && hs->animation.status == ANIM_STATUS_LOOPING) { /* This animation loops, so start again from the beginning */ frame = 0; } else { |