src/newgrf_industrytiles.h
author convert-repo
Mon, 07 Apr 2008 16:21:55 +0000
changeset 10076 dfd70e42c4ae
parent 8356 4d72bac74977
child 10429 1b99254f9607
permissions -rw-r--r--
update tags
7380
a9d0047b015c (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff changeset
     1
/* $Id$ */
a9d0047b015c (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff changeset
     2
a9d0047b015c (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff changeset
     3
/** @file newgrf_industrytiles.h */
a9d0047b015c (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff changeset
     4
a9d0047b015c (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff changeset
     5
#ifndef NEWGRF_INDUSTRYTILES_H
a9d0047b015c (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff changeset
     6
#define NEWGRF_INDUSTRYTILES_H
a9d0047b015c (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff changeset
     7
7725
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
     8
enum IndustryAnimationTrigger {
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
     9
	IAT_CONSTRUCTION_STATE_CHANGE,
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    10
	IAT_TILELOOP,
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    11
	IAT_INDUSTRY_TICK,
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    12
	IAT_INDUSTRY_RECEIVED_CARGO,
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    13
	IAT_INDUSTRY_DISTRIBUTES_CARGO,
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    14
};
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    15
7466
01be88d1c0a6 (svn r10226) -Codechange: Add support for newindustry tiles drawing.
belugas
parents: 7380
diff changeset
    16
bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds);
7823
cad4dec2b899 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium
parents: 7725
diff changeset
    17
uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile);
8158
84c773075796 (svn r11193) -Fix: be more compliant with the specifications of callback #2F (and undocumented side effects in TTDP in corner cases).
rubidium
parents: 7823
diff changeset
    18
bool PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index);
7380
a9d0047b015c (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff changeset
    19
7725
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    20
void AnimateNewIndustryTile(TileIndex tile);
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    21
bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat, uint32 random = Random());
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    22
bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat);
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7712
diff changeset
    23
8356
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    24
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    25
enum IndustryTileTrigger {
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    26
	/* The tile of the industry has been triggered during the tileloop. */
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    27
	INDTILE_TRIGGER_TILE_LOOP       = 0x01,
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    28
	/* The industry has been triggered via it's tick. */
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    29
	INDUSTRY_TRIGGER_INDUSTRY_TICK  = 0x02,
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    30
	/* Cargo has been delivered. */
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    31
	INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04,
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    32
};
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    33
void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger);
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    34
void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger);
4d72bac74977 (svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents: 8158
diff changeset
    35
7380
a9d0047b015c (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff changeset
    36
#endif /* NEWGRF_INDUSTRYTILES_H */