5 #ifndef NEWGRF_INDUSTRIES_H |
5 #ifndef NEWGRF_INDUSTRIES_H |
6 #define NEWGRF_INDUSTRIES_H |
6 #define NEWGRF_INDUSTRIES_H |
7 |
7 |
8 #include "industry.h" |
8 #include "industry.h" |
9 #include "newgrf_spritegroup.h" |
9 #include "newgrf_spritegroup.h" |
|
10 |
|
11 /** When should the industry(tile) be triggered for random bits? */ |
|
12 enum IndustryTrigger { |
|
13 /** Triggered each tile loop */ |
|
14 INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1, |
|
15 /** Triggered (whole industry) each 256 ticks */ |
|
16 INDUSTRY_TRIGGER_256_TICKS = 2, |
|
17 /** Triggered on cargo delivery */ |
|
18 INDUSTRY_TRIGGER_CARGO_DELIVERY = 4, |
|
19 }; |
10 |
20 |
11 /* in newgrf_industry.cpp */ |
21 /* in newgrf_industry.cpp */ |
12 uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available); |
22 uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available); |
13 uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile); |
23 uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile); |
14 uint32 GetIndustryIDAtOffset(TileIndex new_tile, TileIndex old_tile, const Industry *i); |
24 uint32 GetIndustryIDAtOffset(TileIndex new_tile, TileIndex old_tile, const Industry *i); |
17 bool CheckIfCallBackAllowsAvailability(IndustryType type, IndustryAvailabilityCallType creation_type); |
27 bool CheckIfCallBackAllowsAvailability(IndustryType type, IndustryAvailabilityCallType creation_type); |
18 |
28 |
19 IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id); |
29 IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id); |
20 |
30 |
21 /* in newgrf_industrytiles.cpp*/ |
31 /* in newgrf_industrytiles.cpp*/ |
22 uint32 IndustryTileGetRandomBits(const ResolverObject *object); |
|
23 uint32 IndustryTileGetTriggers(const ResolverObject *object); |
|
24 void IndustryTileSetTriggers(const ResolverObject *object, int triggers); |
|
25 |
|
26 uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index); |
32 uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index); |
27 |
33 |
28 #endif /* NEWGRF_INDUSTRIES_H */ |
34 #endif /* NEWGRF_INDUSTRIES_H */ |