# newgrf_industrytiles.h

Go to the documentation of this file.

    00001 /* $Id: newgrf_industrytiles.h 12971 2008-05-06 15:11:33Z rubidium $ */
    00002
    00005 #ifndef NEWGRF_INDUSTRYTILES_H
    00006 #define NEWGRF_INDUSTRYTILES_H
    00007
    00008 enum IndustryAnimationTrigger {
    00009   IAT_CONSTRUCTION_STATE_CHANGE,
    00010   IAT_TILELOOP,
    00011   IAT_INDUSTRY_TICK,
    00012   IAT_INDUSTRY_RECEIVED_CARGO,
    00013   IAT_INDUSTRY_DISTRIBUTES_CARGO,
    00014 };
    00015
    00016 bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds);
    00017 uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile);
    00018 bool PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index);
    00019
    00020 void AnimateNewIndustryTile(TileIndex tile);
    00021 bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat, uint32 random = Random());
    00022 bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat);
    00023
    00024
    00025 enum IndustryTileTrigger {
    00026   /* The tile of the industry has been triggered during the tileloop. */
    00027   INDTILE_TRIGGER_TILE_LOOP       = 0x01,
    00028   /* The industry has been triggered via it's tick. */
    00029   INDUSTRY_TRIGGER_INDUSTRY_TICK  = 0x02,
    00030   /* Cargo has been delivered. */
    00031   INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04,
    00032 };
    00033 void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger);
    00034 void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger);
    00035
    00036 #endif /* NEWGRF_INDUSTRYTILES_H */