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

Function StartSpriteCombine

src/viewport.cpp:764–768  ·  view source on GitHub ↗

* Starts a block of sprites, which are "combined" into a single bounding box. * * Subsequent calls to #AddSortableSpriteToDraw will be drawn into the same bounding box. * That is: The first sprite that is not clipped by the viewport defines the bounding box, and * the following sprites will be child sprites to that one. * * That implies: * - The drawing order is definite. No other sprites

Source from the content-addressed store, hash-verified

762 * You cannot nest "combined" blocks.
763 */
764void StartSpriteCombine()
765{
766 assert(_vd.combine_sprites == SPRITE_COMBINE_NONE);
767 _vd.combine_sprites = SPRITE_COMBINE_PENDING;
768}
769
770/**
771 * Terminates a block of sprites started by #StartSpriteCombine.

Callers 7

DrawBridgeRoadBitsFunction · 0.85
DrawTile_TunnelBridgeFunction · 0.85
DrawBridgeMiddleFunction · 0.85
DoDrawVehicleFunction · 0.85
DrawClearLandFenceFunction · 0.85
DrawTile_TreesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected