MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / attachToPrevious

Method attachToPrevious

src/OpenLoco/src/Paint/Paint.cpp:387–403  ·  view source on GitHub ↗

0x0045E779

Source from the content-addressed store, hash-verified

385
386 // 0x0045E779
387 AttachedPaintStruct* PaintSession::attachToPrevious(ImageId imageId, const Ui::Point& offset)
388 {
389 if (_lastPS == nullptr)
390 {
391 return nullptr;
392 }
393 auto* attached = allocatePaintStruct<AttachedPaintStruct>();
394 if (attached == nullptr)
395 {
396 return nullptr;
397 }
398 attached->imageId = imageId;
399 attached->vpPos = offset;
400 attached->next = _lastPS->attachedPS;
401 _lastPS->attachedPS = attached;
402 return attached;
403 }
404
405 void PaintSession::setSegmentsSupportHeight(const SegmentFlags segments, const uint16_t height, const uint8_t slope)
406 {

Calls

no outgoing calls

Tested by

no test coverage detected