newgrf_industrytiles.h

Go to the documentation of this file.
00001 /* $Id: newgrf_industrytiles.h 20942 2010-10-16 13:15:54Z rubidium $ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
00008  */
00009 
00012 #ifndef NEWGRF_INDUSTRYTILES_H
00013 #define NEWGRF_INDUSTRYTILES_H
00014 
00015 #include "tile_cmd.h"
00016 #include "industry_type.h"
00017 #include "newgrf_animation_type.h"
00018 #include "newgrf_callbacks.h"
00019 #include "core/random_func.hpp"
00020 
00021 bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds);
00022 uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile);
00023 CommandCost PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type);
00024 
00025 void AnimateNewIndustryTile(TileIndex tile);
00026 bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat, uint32 random = Random());
00027 bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat);
00028 
00029 
00031 enum IndustryTileTrigger {
00032   INDTILE_TRIGGER_TILE_LOOP       = 0x01, 
00033   INDUSTRY_TRIGGER_INDUSTRY_TICK  = 0x02, 
00034   INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04, 
00035 };
00036 void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger);
00037 void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger);
00038 
00039 #endif /* NEWGRF_INDUSTRYTILES_H */

Generated on Fri Dec 31 17:15:35 2010 for OpenTTD by  doxygen 1.6.1