| 988 | } |
| 989 | |
| 990 | static void drawAttachStruct(const Gfx::RenderTarget& rt, Gfx::DrawingContext& drawingCtx, const PaintStruct& ps, const AttachedPaintStruct& attachPs, const bool shouldCull) |
| 991 | { |
| 992 | auto imageId = attachPs.imageId; |
| 993 | |
| 994 | if (shouldCull) |
| 995 | { |
| 996 | imageId = ImageId(imageId.getIndex()).withTranslucency(ExtColour::unk30); |
| 997 | } |
| 998 | Ui::Point imagePos = ps.vpPos + attachPs.vpPos; |
| 999 | if (rt.zoomLevel != 0) |
| 1000 | { |
| 1001 | imagePos.x = Numerics::floor2(imagePos.x, 2); |
| 1002 | imagePos.y = Numerics::floor2(imagePos.y, 2); |
| 1003 | } |
| 1004 | |
| 1005 | if ((attachPs.flags & PaintStructFlags::hasMaskedImage) != PaintStructFlags::none) |
| 1006 | { |
| 1007 | drawingCtx.drawImageMasked(imagePos, imageId, attachPs.maskedImageId); |
| 1008 | } |
| 1009 | else |
| 1010 | { |
| 1011 | drawingCtx.drawImage(imagePos, imageId); |
| 1012 | } |
| 1013 | } |
| 1014 | |
| 1015 | static void drawAllAttachedStructs(const Gfx::RenderTarget& rt, Gfx::DrawingContext& drawingCtx, const PaintStruct& ps, const Ui::ViewportFlags viewFlags) |
| 1016 | { |
no test coverage detected