author | Tero Marttila <terom@fixme.fi> |
Fri, 19 Dec 2008 02:25:44 +0200 | |
branch | terom-mini |
changeset 10442 | 7089fa402bfd |
parent 9111 | 48ce04029fe4 |
permissions | -rw-r--r-- |
6884
a931841e9df4
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff
changeset
|
1 |
/* $Id$ */ |
a931841e9df4
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff
changeset
|
2 |
|
9111
48ce04029fe4
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
7860
diff
changeset
|
3 |
/** @file newgrf_industrytiles.h NewGRF handling of industry tiles. */ |
6884
a931841e9df4
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff
changeset
|
4 |
|
a931841e9df4
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff
changeset
|
5 |
#ifndef NEWGRF_INDUSTRYTILES_H |
a931841e9df4
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff
changeset
|
6 |
#define NEWGRF_INDUSTRYTILES_H |
a931841e9df4
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff
changeset
|
7 |
|
7229
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
8 |
enum IndustryAnimationTrigger { |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
9 |
IAT_CONSTRUCTION_STATE_CHANGE, |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
10 |
IAT_TILELOOP, |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
11 |
IAT_INDUSTRY_TICK, |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
12 |
IAT_INDUSTRY_RECEIVED_CARGO, |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
13 |
IAT_INDUSTRY_DISTRIBUTES_CARGO, |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
14 |
}; |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
15 |
|
6970
b489d8ec5d4a
(svn r10226) -Codechange: Add support for newindustry tiles drawing.
belugas
parents:
6884
diff
changeset
|
16 |
bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds); |
7327
d810677fb909
(svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium
parents:
7229
diff
changeset
|
17 |
uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile); |
7662
b9da9d79a9a9
(svn r11193) -Fix: be more compliant with the specifications of callback #2F (and undocumented side effects in TTDP in corner cases).
rubidium
parents:
7327
diff
changeset
|
18 |
bool PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index); |
6884
a931841e9df4
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff
changeset
|
19 |
|
7229
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
20 |
void AnimateNewIndustryTile(TileIndex tile); |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
21 |
bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat, uint32 random = Random()); |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
22 |
bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat); |
a5f262f6df1b
(svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents:
7216
diff
changeset
|
23 |
|
7860
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
24 |
|
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
25 |
enum IndustryTileTrigger { |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
26 |
/* The tile of the industry has been triggered during the tileloop. */ |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
27 |
INDTILE_TRIGGER_TILE_LOOP = 0x01, |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
28 |
/* The industry has been triggered via it's tick. */ |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
29 |
INDUSTRY_TRIGGER_INDUSTRY_TICK = 0x02, |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
30 |
/* Cargo has been delivered. */ |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
31 |
INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04, |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
32 |
}; |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
33 |
void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger); |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
34 |
void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger); |
5cdd0d914013
(svn r11410) -Codechange: implement random triggers for industries.
rubidium
parents:
7662
diff
changeset
|
35 |
|
6884
a931841e9df4
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
diff
changeset
|
36 |
#endif /* NEWGRF_INDUSTRYTILES_H */ |