Files
@ r15769:4a935f419828
Branch filter:
Location: cpp/openttd-patchpack/source/src/newgrf_industrytiles.h - annotation
r15769:4a935f419828
2.2 KiB
text/x-c
(svn r20453) -Codechange: Remove direct accesses to Window::hscroll, vscroll and vscroll2.
Note: All windows get individual members with the same names, which are initialised via Window::GetScrollbar(). This caching is not required at all, but simplifies conversion.
Note: All windows get individual members with the same names, which are initialised via Window::GetScrollbar(). This caching is not required at all, but simplifies conversion.
r6884:06c993c360e4 r6884:06c993c360e4 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r9111:983de9c5a848 r6884:06c993c360e4 r6884:06c993c360e4 r6884:06c993c360e4 r6884:06c993c360e4 r14248:a9050881acd7 r14248:a9050881acd7 r14248:a9050881acd7 r14248:a9050881acd7 r14248:a9050881acd7 r15606:aa81fc543ca1 r7229:58b7db9e5145 r7229:58b7db9e5145 r7229:58b7db9e5145 r7229:58b7db9e5145 r7229:58b7db9e5145 r7229:58b7db9e5145 r7229:58b7db9e5145 r7229:58b7db9e5145 r6970:377763da9c24 r7327:28855024ff6c r15256:e22f3389fd3a r6884:06c993c360e4 r7229:58b7db9e5145 r7229:58b7db9e5145 r7229:58b7db9e5145 r7229:58b7db9e5145 r7860:c73688ce46ca r15606:aa81fc543ca1 r7860:c73688ce46ca r15606:aa81fc543ca1 r15606:aa81fc543ca1 r15606:aa81fc543ca1 r7860:c73688ce46ca r7860:c73688ce46ca r7860:c73688ce46ca r7860:c73688ce46ca r6884:06c993c360e4 | /* $Id$ */
/*
* This file is part of OpenTTD.
* 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.
* 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.
* 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/>.
*/
/** @file newgrf_industrytiles.h NewGRF handling of industry tiles. */
#ifndef NEWGRF_INDUSTRYTILES_H
#define NEWGRF_INDUSTRYTILES_H
#include "tile_cmd.h"
#include "industry_type.h"
#include "newgrf_callbacks.h"
#include "core/random_func.hpp"
/** Animation triggers of the industries. */
enum IndustryAnimationTrigger {
IAT_CONSTRUCTION_STATE_CHANGE,
IAT_TILELOOP,
IAT_INDUSTRY_TICK,
IAT_INDUSTRY_RECEIVED_CARGO,
IAT_INDUSTRY_DISTRIBUTES_CARGO,
};
bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds);
uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile);
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);
void AnimateNewIndustryTile(TileIndex tile);
bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat, uint32 random = Random());
bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat);
/** Available industry tile triggers. */
enum IndustryTileTrigger {
INDTILE_TRIGGER_TILE_LOOP = 0x01, ///< The tile of the industry has been triggered during the tileloop.
INDUSTRY_TRIGGER_INDUSTRY_TICK = 0x02, ///< The industry has been triggered via its tick.
INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04, ///< Cargo has been delivered.
};
void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger);
void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger);
#endif /* NEWGRF_INDUSTRYTILES_H */
|