MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / PaintAddImageAsParent

Function PaintAddImageAsParent

src/openrct2/paint/Paint.cpp:877–892  ·  view source on GitHub ↗

* rct2: 0x00686806, 0x006869B2, 0x00686B6F, 0x00686D31, 0x0098197C * * @param image_id (ebx) * @param x_offset (al) * @param y_offset (cl) * @param bound_box_length_x (di) * @param bound_box_length_y (si) * @param bound_box_length_z (ah) * @param z_offset (dx) * @param bound_box_offset_x (0x009DEA52) * @param bound_box_offset_y (0x009DEA54) * @param bound_box_offset_z (0x009DEA56) * @

Source from the content-addressed store, hash-verified

875 */
876// Track Pieces, Shops.
877PaintStruct* PaintAddImageAsParent(
878 PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const BoundBoxXYZ& boundBox)
879{
880 session.LastPS = nullptr;
881 session.LastAttachedPS = nullptr;
882
883 auto* ps = CreateNormalPaintStruct(session, image_id, offset, boundBox);
884 if (ps == nullptr)
885 {
886 return nullptr;
887 }
888
889 PaintSessionAddPSToQuadrant(session, ps);
890
891 return ps;
892}
893
894/**
895 *

Callers 1

PaintAddImageAsChildFunction · 0.70

Calls 2

CreateNormalPaintStructFunction · 0.85

Tested by

no test coverage detected