MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetObjectCallback

Function GetObjectCallback

src/newgrf_object.cpp:435–439  ·  view source on GitHub ↗

* Perform a callback for an object. * @param callback The callback to perform. * @param param1 The first parameter to pass to the NewGRF. * @param param2 The second parameter to pass to the NewGRF. * @param spec The specification of the object / the entry point. * @param o The object to call the callback for. * @param tile The tile the callback is called for. * @param vie

Source from the content-addressed store, hash-verified

433 * @return The result of the callback.
434 */
435uint16_t GetObjectCallback(CallbackID callback, uint32_t param1, uint32_t param2, const ObjectSpec *spec, Object *o, TileIndex tile, std::span<int32_t> regs100, uint8_t view)
436{
437 ObjectResolverObject object(spec, o, tile, view, callback, param1, param2);
438 return object.ResolveCallback(regs100);
439}
440
441/**
442 * Draw an group of sprites on the map.

Callers 5

BuildObjectFunction · 0.85
CmdBuildObjectFunction · 0.85
TerraformTile_ObjectFunction · 0.85
DrawWidgetMethod · 0.85
StubGetObjectCallbackFunction · 0.85

Calls 1

ResolveCallbackMethod · 0.80

Tested by

no test coverage detected