summaryrefslogtreecommitdiff
path: root/src/newgrf_industries.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-23 19:27:35 +0000
committerrubidium <rubidium@openttd.org>2007-09-23 19:27:35 +0000
commit2b89ecca47e654578481ea64743d2d703bb049ed (patch)
tree8d414b503256ed5d9878145e189d1eecce904f00 /src/newgrf_industries.h
parent893842a8a39d1e0b0606598738ec564d65a033b5 (diff)
downloadopenttd-2b89ecca47e654578481ea64743d2d703bb049ed.tar.xz
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
Diffstat (limited to 'src/newgrf_industries.h')
-rw-r--r--src/newgrf_industries.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/newgrf_industries.h b/src/newgrf_industries.h
index 779050b33..3fda464dd 100644
--- a/src/newgrf_industries.h
+++ b/src/newgrf_industries.h
@@ -8,6 +8,16 @@
#include "industry.h"
#include "newgrf_spritegroup.h"
+/** When should the industry(tile) be triggered for random bits? */
+enum IndustryTrigger {
+ /** Triggered each tile loop */
+ INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1,
+ /** Triggered (whole industry) each 256 ticks */
+ INDUSTRY_TRIGGER_256_TICKS = 2,
+ /** Triggered on cargo delivery */
+ INDUSTRY_TRIGGER_CARGO_DELIVERY = 4,
+};
+
/* in newgrf_industry.cpp */
uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available);
uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile);
@@ -19,10 +29,6 @@ bool CheckIfCallBackAllowsAvailability(IndustryType type, IndustryAvailabilityCa
IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id);
/* in newgrf_industrytiles.cpp*/
-uint32 IndustryTileGetRandomBits(const ResolverObject *object);
-uint32 IndustryTileGetTriggers(const ResolverObject *object);
-void IndustryTileSetTriggers(const ResolverObject *object, int triggers);
-
uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index);
#endif /* NEWGRF_INDUSTRIES_H */