diff options
author | belugas <belugas@openttd.org> | 2007-03-14 02:52:50 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-03-14 02:52:50 +0000 |
commit | 65ce0e36dbada71cb8526eed7377d57eaf8086b6 (patch) | |
tree | e076782524d7c0d3f0802c5e32f57a2dd288a8bc /src/industry_cmd.cpp | |
parent | 4177215b4111dedba3f4c7ce354a0b19d7edbf28 (diff) | |
download | openttd-65ce0e36dbada71cb8526eed7377d57eaf8086b6.tar.xz |
(svn r9162) -Codechange: Cleanup of industry_cmd (Step-8). Gather tile animation data into IndustryTileSpec array
Added a few documentation on remaining animation arrays (mostly ToyLand ones)
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index b7fb11d1d..967f78456 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -233,7 +233,7 @@ static void DrawTile_Industry(TileInfo *ti) ind = GetIndustryByTile(ti->tile); /* Retrieve pointer to the draw industry tile struct */ - dits = &_industry_draw_tile_data[gfx << 2 | (_industry_section_draw_animation_state[gfx] ? + dits = &_industry_draw_tile_data[gfx << 2 | (GetIndustryTileSpec(gfx)->anim_state ? GetIndustryAnimationState(ti->tile) & 3 : GetIndustryConstructionStage(ti->tile))]; @@ -357,9 +357,9 @@ static void TransportIndustryGoods(TileIndex tile) am = MoveGoodsToStation(i->xy, i->width, i->height, i->produced_cargo[0], cw); i->last_mo_transported[0] += am; if (am != 0) { - uint newgfx = _industry_produce_section[GetIndustryGfx(tile)]; + uint newgfx = GetIndustryTileSpec(GetIndustryGfx(tile))->anim_production; - if (newgfx != 0xFF) { + if (newgfx != INDUTILE_NOAMIN) { ResetIndustryConstructionStage(tile); SetIndustryCompleted(tile, true); SetIndustryGfx(tile, newgfx); @@ -645,8 +645,8 @@ static void TileLoop_Industry(TileIndex tile) TransportIndustryGoods(tile); - newgfx = _industry_section_animation_next[GetIndustryGfx(tile)]; - if (newgfx != 255) { + newgfx = GetIndustryTileSpec(GetIndustryGfx(tile))->anim_next; + if (newgfx != INDUTILE_NOAMIN) { ResetIndustryConstructionStage(tile); SetIndustryGfx(tile, newgfx); MarkTileDirtyByTile(tile); |