src/newgrf_industrytiles.h
author translators
Thu, 18 Dec 2008 18:47:39 +0000
changeset 10437 6d64230b9fb9
parent 9111 48ce04029fe4
permissions -rw-r--r--
(svn r14691) -Update: WebTranslator2 update to 2008-12-18 18:47:25
arabic_egypt - 132 fixed, 1 changed by khaloofah (133)
czech - 10 fixed, 25 changed by Hadez (35)
esperanto - 15 fixed by Athaba (15)
greek - 7 fixed by ouranogrammi (7)
indonesian - 88 changed by fanioz (88)
latvian - 117 fixed, 16 changed by peerer (83), marismols (50)
lithuanian - 15 fixed by Zogg (15)
malay - 38 fixed by tombakemas (5), Syed (33)
serbian - 39 fixed, 1 changed by Jenraux (40)
thai - 105 fixed by vetbook (105)
/* $Id$ */

/** @file newgrf_industrytiles.h NewGRF handling of industry tiles. */

#ifndef NEWGRF_INDUSTRYTILES_H
#define NEWGRF_INDUSTRYTILES_H

enum IndustryAnimationTrigger {
	IAT_CONSTRUCTION_STATE_CHANGE,
	IAT_TILELOOP,
	IAT_INDUSTRY_TICK,
	IAT_INDUSTRY_RECEIVED_CARGO,
	IAT_INDUSTRY_DISTRIBUTES_CARGO,
};

bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds);
uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile);
bool PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index);

void AnimateNewIndustryTile(TileIndex tile);
bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat, uint32 random = Random());
bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat);


enum IndustryTileTrigger {
	/* The tile of the industry has been triggered during the tileloop. */
	INDTILE_TRIGGER_TILE_LOOP       = 0x01,
	/* The industry has been triggered via it's tick. */
	INDUSTRY_TRIGGER_INDUSTRY_TICK  = 0x02,
	/* Cargo has been delivered. */
	INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04,
};
void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger);
void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger);

#endif /* NEWGRF_INDUSTRYTILES_H */