newgrf_industries.h

Go to the documentation of this file.
00001 /* $Id: newgrf_industries.h 12971 2008-05-06 15:11:33Z rubidium $ */
00002 
00005 #ifndef NEWGRF_INDUSTRIES_H
00006 #define NEWGRF_INDUSTRIES_H
00007 
00008 #include "industry_type.h"
00009 #include "newgrf_spritegroup.h"
00010 
00012 enum IndustryTrigger {
00014   INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1,
00016   INDUSTRY_TRIGGER_256_TICKS        = 2,
00018   INDUSTRY_TRIGGER_CARGO_DELIVERY   = 4,
00019 };
00020 
00022 enum IndustryAvailabilityCallType {
00023   IACT_MAPGENERATION,   
00024   IACT_RANDOMCREATION,  
00025   IACT_USERCREATION,    
00026 };
00027 
00028 /* in newgrf_industry.cpp */
00029 uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available);
00030 uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile);
00031 uint32 GetIndustryIDAtOffset(TileIndex new_tile, const Industry *i);
00032 void IndustryProductionCallback(Industry *ind, int reason);
00033 bool CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint itspec_index, uint32 seed);
00034 bool CheckIfCallBackAllowsAvailability(IndustryType type, IndustryAvailabilityCallType creation_type);
00035 
00036 IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id);
00037 
00038 /* in newgrf_industrytiles.cpp*/
00039 uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index);
00040 
00041 #endif /* NEWGRF_INDUSTRIES_H */

Generated on Thu Sep 24 19:35:03 2009 for OpenTTD by  doxygen 1.5.6