diff options
author | belugas <belugas@openttd.org> | 2007-07-20 17:14:03 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-07-20 17:14:03 +0000 |
commit | f9d3463af1e85126ff0d4681a9ccb63e75d6680a (patch) | |
tree | c13433758c295ec4b58abdecc31d0a96a0118cb1 /src/industry_cmd.cpp | |
parent | d847b30c98e003e78a76a1208674fc8b855274d7 (diff) | |
download | openttd-f9d3463af1e85126ff0d4681a9ccb63e75d6680a.tar.xz |
(svn r10639) -Codechange: Give meaninfull name to a magic number
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 75afe3f90..80d5b472b 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -276,7 +276,7 @@ static void DrawTile_Industry(TileInfo *ti) } dits = &_industry_draw_tile_data[gfx << 2 | (indts->anim_state ? - GetIndustryAnimationState(ti->tile) & 3 : + GetIndustryAnimationState(ti->tile) & INDUSTRY_COMPLETED : GetIndustryConstructionStage(ti->tile))]; image = dits->ground.sprite; @@ -642,9 +642,7 @@ static void MakeIndustryTileBigger(TileIndex tile) SetIndustryConstructionCounter(tile, 0); SetIndustryConstructionStage(tile, stage); StartStopIndustryTileAnimation(tile, IAT_CONSTRUCTION_STATE_CHANGE); - if (stage == 3) { - SetIndustryCompleted(tile, true); - } + if (stage == INDUSTRY_COMPLETED) SetIndustryCompleted(tile, true); MarkTileDirtyByTile(tile); |