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);
147 CallbackID callback, uint32 callback_param1, uint32 callback_param2)
149 indtile_scope(*this, indus, tile),
150 ind_scope(*this, tile, indus, indus->type)
181 DrawWaterClassGround(ti);
190 uint16 GetIndustryTileCallback(
CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id,
Industry *industry,
TileIndex tile)
196 return object.ResolveCallback();
202 bool draw_old_one =
true;
215 if (group == NULL || group->type != SGT_TILELAYOUT)
return false;
220 IndustryDrawTileLayout(ti, tlgroup, i->
random_colour, stage, gfx);
224 extern bool IsSlopeRefused(
Slope current,
Slope refused);
242 ind.
index = INVALID_INDUSTRY;
246 ind.
random = initial_random_bits;
249 uint16 callback_res = GetIndustryTileCallback(
CBID_INDTILE_SHAPE_CHECK, 0, creation_type << 8 | itspec_index, gfx, &ind, ind_tile);
265 return GetIndustryTileCallback(callback, param1, param2, spec -
GetIndustryTileSpec(0), ind, tile);
277 void AnimateNewIndustryTile(
TileIndex tile)
280 if (itspec == NULL)
return;
298 uint32 random = Random();
301 if (StartStopIndustryTileAnimation(tile, iat, random)) {
302 SB(random, 0, 16, Random());
329 object.trigger = trigger;
332 if (group == NULL)
return;
334 byte new_random_bits = Random();
351 if (reseed == 0 || ind == NULL)
return;
353 uint16 random_bits = Random();
355 ind->
random |= random_bits & reseed;
365 uint32 reseed_industry = 0;
378 uint32 reseed_industry = 0;