44 return &_object_specs[index];
102 MemCpyT(_object_specs, _original_objects,
lengthof(_original_objects));
104 for (uint16 i = 0; i <
lengthof(_original_objects); i++) {
109 template <
typename Tspec,
typename T
id, T
id Tmax>
117 cls = ObjectClass::Allocate(
'TRNS');
123 template <
typename Tspec,
typename T
id, T
id Tmax>
126 return this->GetSpec(index)->IsEverAvailable();
203 uint32 best_dist = UINT32_MAX;
206 if (o->
type != type || o == current)
continue;
253 const Town *t = NULL;
255 if (this->
obj == NULL) {
273 case 0x42:
return _date;
279 case 0x48:
return this->
view;
302 uint offset_x =
TileX(offset);
303 uint offset_y =
TileY(offset);
304 return offset_y << 20 | offset_x << 16 | offset_y << 8 | offset_x;
329 case 0x48:
return this->
obj->
view;
354 DEBUG(grf, 1,
"Unhandled object variable 0x%X", variable);
370 CallbackID callback, uint32 param1, uint32 param2)
371 :
ResolverObject(spec->grf_prop.grffile, callback, param1, param2), object_scope(*this, obj, tile, view)
378 ObjectResolverObject::~ObjectResolverObject()
397 if (t == NULL)
return NULL;
417 return object.ResolveCallback();
438 DrawWaterClassGround(ti);
458 if (group == NULL || group->type != SGT_TILELAYOUT)
return;
474 if (group == NULL || group->type != SGT_TILELAYOUT)
return;