23 #include "table/strings.h"
38 if (parameter != 0) tile =
GetNearbyTile(parameter, tile, signed_offsets);
60 return ((y & 0xF) << 20) | ((x & 0xF) << 16) | (y << 8) | x;
83 this->
industry == NULL ? (IndustryID)INVALID_INDUSTRY : this->
industry->
index,
true, this->ro.grffile->grf_version >= 8);
98 DEBUG(grf, 1,
"Unhandled industry tile variable 0x%X", variable);
141 CallbackID callback, uint32 callback_param1, uint32 callback_param2)
143 indtile_scope(*this, indus, tile),
144 ind_scope(*this, tile, indus, indus->type)
175 DrawWaterClassGround(ti);
184 uint16 GetIndustryTileCallback(
CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id,
Industry *industry,
TileIndex tile)
190 return object.ResolveCallback();
196 bool draw_old_one =
true;
209 if (group == NULL || group->type != SGT_TILELAYOUT)
return false;
214 IndustryDrawTileLayout(ti, tlgroup, i->
random_colour, stage, gfx);
218 extern bool IsSlopeRefused(
Slope current,
Slope refused);
236 ind.
index = INVALID_INDUSTRY;
240 ind.
random = initial_random_bits;
243 uint16 callback_res = GetIndustryTileCallback(
CBID_INDTILE_SHAPE_CHECK, 0, creation_type << 8 | itspec_index, gfx, &ind, ind_tile);
259 return GetIndustryTileCallback(callback, param1, param2, spec -
GetIndustryTileSpec(0), ind, tile);
271 void AnimateNewIndustryTile(
TileIndex tile)
274 if (itspec == NULL)
return;
292 uint32 random = Random();
295 if (StartStopIndustryTileAnimation(tile, iat, random)) {
296 SB(random, 0, 16, Random());
327 if (group == NULL)
return;
333 byte new_random_bits = Random();
350 if (reseed == 0 || ind == NULL)
return;
352 uint16 random_bits = Random();
354 ind->
random |= random_bits & reseed;
364 uint32 reseed_industry = 0;
377 uint32 reseed_industry = 0;