* Draws the bounding boxes of all ParentSprites * @param psd Array of ParentSprites */
| 1736 | * @param psd Array of ParentSprites |
| 1737 | */ |
| 1738 | static void ViewportDrawBoundingBoxes(const ParentSpriteToSortVector *psd) |
| 1739 | { |
| 1740 | for (const ParentSpriteToDraw *ps : *psd) { |
| 1741 | Point pt1 = RemapCoords(ps->xmax + 1, ps->ymax + 1, ps->zmax + 1); // top front corner |
| 1742 | Point pt2 = RemapCoords(ps->xmin , ps->ymax + 1, ps->zmax + 1); // top left corner |
| 1743 | Point pt3 = RemapCoords(ps->xmax + 1, ps->ymin , ps->zmax + 1); // top right corner |
| 1744 | Point pt4 = RemapCoords(ps->xmax + 1, ps->ymax + 1, ps->zmin ); // bottom front corner |
| 1745 | |
| 1746 | DrawBox( pt1.x, pt1.y, |
| 1747 | pt2.x - pt1.x, pt2.y - pt1.y, |
| 1748 | pt3.x - pt1.x, pt3.y - pt1.y, |
| 1749 | pt4.x - pt1.x, pt4.y - pt1.y); |
| 1750 | } |
| 1751 | } |
| 1752 | |
| 1753 | /** |
| 1754 | * Draw/colour the blocks that have been redrawn. |
no test coverage detected