newgrf_industrytiles.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef NEWGRF_INDUSTRYTILES_H
00013 #define NEWGRF_INDUSTRYTILES_H
00014
00015 #include "tile_cmd.h"
00016 #include "industry_type.h"
00017 #include "newgrf_callbacks.h"
00018 #include "core/random_func.hpp"
00019
00020 enum IndustryAnimationTrigger {
00021 IAT_CONSTRUCTION_STATE_CHANGE,
00022 IAT_TILELOOP,
00023 IAT_INDUSTRY_TICK,
00024 IAT_INDUSTRY_RECEIVED_CARGO,
00025 IAT_INDUSTRY_DISTRIBUTES_CARGO,
00026 };
00027
00028 bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds);
00029 uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile);
00030 bool PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index);
00031
00032 void AnimateNewIndustryTile(TileIndex tile);
00033 bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat, uint32 random = Random());
00034 bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat);
00035
00036
00037 enum IndustryTileTrigger {
00038
00039 INDTILE_TRIGGER_TILE_LOOP = 0x01,
00040
00041 INDUSTRY_TRIGGER_INDUSTRY_TICK = 0x02,
00042
00043 INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04,
00044 };
00045 void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger);
00046 void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger);
00047
00048 #endif