belugas@7380: /* $Id$ */ belugas@7380: rubidium@10429: /** @file newgrf_industrytiles.h NewGRF handling of industry tiles. */ belugas@7380: belugas@7380: #ifndef NEWGRF_INDUSTRYTILES_H belugas@7380: #define NEWGRF_INDUSTRYTILES_H belugas@7380: rubidium@7725: enum IndustryAnimationTrigger { rubidium@7725: IAT_CONSTRUCTION_STATE_CHANGE, rubidium@7725: IAT_TILELOOP, rubidium@7725: IAT_INDUSTRY_TICK, rubidium@7725: IAT_INDUSTRY_RECEIVED_CARGO, rubidium@7725: IAT_INDUSTRY_DISTRIBUTES_CARGO, rubidium@7725: }; rubidium@7725: belugas@7466: bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds); rubidium@7823: uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile); rubidium@8158: bool PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index); belugas@7380: rubidium@7725: void AnimateNewIndustryTile(TileIndex tile); rubidium@7725: bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat, uint32 random = Random()); rubidium@7725: bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat); rubidium@7725: rubidium@8356: rubidium@8356: enum IndustryTileTrigger { rubidium@8356: /* The tile of the industry has been triggered during the tileloop. */ rubidium@8356: INDTILE_TRIGGER_TILE_LOOP = 0x01, rubidium@8356: /* The industry has been triggered via it's tick. */ rubidium@8356: INDUSTRY_TRIGGER_INDUSTRY_TICK = 0x02, rubidium@8356: /* Cargo has been delivered. */ rubidium@8356: INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04, rubidium@8356: }; rubidium@8356: void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger); rubidium@8356: void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger); rubidium@8356: belugas@7380: #endif /* NEWGRF_INDUSTRYTILES_H */