| 1714 | |
| 1715 | |
| 1716 | static void ViewportDrawParentSprites(const ParentSpriteToSortVector *psd, const ChildScreenSpriteToDrawVector *csstdv) |
| 1717 | { |
| 1718 | for (const ParentSpriteToDraw *ps : *psd) { |
| 1719 | if (ps->image != SPR_EMPTY_BOUNDING_BOX) DrawSpriteViewport(ps->image, ps->pal, ps->x, ps->y, ps->sub); |
| 1720 | |
| 1721 | int child_idx = ps->first_child; |
| 1722 | while (child_idx >= 0) { |
| 1723 | const ChildScreenSpriteToDraw *cs = &(*csstdv)[child_idx]; |
| 1724 | child_idx = cs->next; |
| 1725 | if (cs->relative) { |
| 1726 | DrawSpriteViewport(cs->image, cs->pal, ps->left + cs->x, ps->top + cs->y, cs->sub); |
| 1727 | } else { |
| 1728 | DrawSpriteViewport(cs->image, cs->pal, ps->x + cs->x, ps->y + cs->y, cs->sub); |
| 1729 | } |
| 1730 | } |
| 1731 | } |
| 1732 | } |
| 1733 | |
| 1734 | /** |
| 1735 | * Draws the bounding boxes of all ParentSprites |
no test coverage detected