equal
deleted
inserted
replaced
231 |
231 |
232 /* Pointer to industry */ |
232 /* Pointer to industry */ |
233 ind = GetIndustryByTile(ti->tile); |
233 ind = GetIndustryByTile(ti->tile); |
234 |
234 |
235 /* Retrieve pointer to the draw industry tile struct */ |
235 /* Retrieve pointer to the draw industry tile struct */ |
236 dits = &_industry_draw_tile_data[gfx << 2 | (_industry_section_draw_animation_state[gfx] ? |
236 dits = &_industry_draw_tile_data[gfx << 2 | (GetIndustryTileSpec(gfx)->anim_state ? |
237 GetIndustryAnimationState(ti->tile) & 3 : |
237 GetIndustryAnimationState(ti->tile) & 3 : |
238 GetIndustryConstructionStage(ti->tile))]; |
238 GetIndustryConstructionStage(ti->tile))]; |
239 |
239 |
240 image = dits->ground.sprite; |
240 image = dits->ground.sprite; |
241 if (HASBIT(image, PALETTE_MODIFIER_COLOR) && dits->ground.pal == PAL_NONE) { |
241 if (HASBIT(image, PALETTE_MODIFIER_COLOR) && dits->ground.pal == PAL_NONE) { |
355 i->last_mo_production[0] += cw; |
355 i->last_mo_production[0] += cw; |
356 |
356 |
357 am = MoveGoodsToStation(i->xy, i->width, i->height, i->produced_cargo[0], cw); |
357 am = MoveGoodsToStation(i->xy, i->width, i->height, i->produced_cargo[0], cw); |
358 i->last_mo_transported[0] += am; |
358 i->last_mo_transported[0] += am; |
359 if (am != 0) { |
359 if (am != 0) { |
360 uint newgfx = _industry_produce_section[GetIndustryGfx(tile)]; |
360 uint newgfx = GetIndustryTileSpec(GetIndustryGfx(tile))->anim_production; |
361 |
361 |
362 if (newgfx != 0xFF) { |
362 if (newgfx != INDUTILE_NOAMIN) { |
363 ResetIndustryConstructionStage(tile); |
363 ResetIndustryConstructionStage(tile); |
364 SetIndustryCompleted(tile, true); |
364 SetIndustryCompleted(tile, true); |
365 SetIndustryGfx(tile, newgfx); |
365 SetIndustryGfx(tile, newgfx); |
366 MarkTileDirtyByTile(tile); |
366 MarkTileDirtyByTile(tile); |
367 } |
367 } |
643 |
643 |
644 if (_game_mode == GM_EDITOR) return; |
644 if (_game_mode == GM_EDITOR) return; |
645 |
645 |
646 TransportIndustryGoods(tile); |
646 TransportIndustryGoods(tile); |
647 |
647 |
648 newgfx = _industry_section_animation_next[GetIndustryGfx(tile)]; |
648 newgfx = GetIndustryTileSpec(GetIndustryGfx(tile))->anim_next; |
649 if (newgfx != 255) { |
649 if (newgfx != INDUTILE_NOAMIN) { |
650 ResetIndustryConstructionStage(tile); |
650 ResetIndustryConstructionStage(tile); |
651 SetIndustryGfx(tile, newgfx); |
651 SetIndustryGfx(tile, newgfx); |
652 MarkTileDirtyByTile(tile); |
652 MarkTileDirtyByTile(tile); |
653 return; |
653 return; |
654 } |
654 } |