* Wrapper around GFX_Screen_Copy. Protects against wrong input values. * @param xSrc The X-coordinate on the source divided by 8. * @param ySrc The Y-coordinate on the source. * @param xDst The X-coordinate on the destination divided by 8. * @param yDst The Y-coordinate on the destination. * @param width The width divided by 8. * @param height The height. * @param screenSrc The ID of the so
| 2612 | * @param screenDst The ID of the destination screen. |
| 2613 | */ |
| 2614 | void GUI_Screen_Copy(int16 xSrc, int16 ySrc, int16 xDst, int16 yDst, int16 width, int16 height, Screen screenSrc, Screen screenDst) |
| 2615 | { |
| 2616 | if (width > SCREEN_WIDTH / 8) width = SCREEN_WIDTH / 8; |
| 2617 | if (height > SCREEN_HEIGHT) height = SCREEN_HEIGHT; |
| 2618 | |
| 2619 | if (xSrc < 0) { |
| 2620 | xDst -= xSrc; |
| 2621 | width += xSrc; |
| 2622 | xSrc = 0; |
| 2623 | } |
| 2624 | |
| 2625 | if (xSrc >= SCREEN_WIDTH / 8 || xDst >= SCREEN_WIDTH / 8) return; |
| 2626 | |
| 2627 | if (xDst < 0) { |
| 2628 | xSrc -= xDst; |
| 2629 | width += xDst; |
| 2630 | xDst = 0; |
| 2631 | } |
| 2632 | |
| 2633 | if (ySrc < 0) { |
| 2634 | yDst -= ySrc; |
| 2635 | height += ySrc; |
| 2636 | ySrc = 0; |
| 2637 | } |
| 2638 | |
| 2639 | if (yDst < 0) { |
| 2640 | ySrc -= yDst; |
| 2641 | height += yDst; |
| 2642 | yDst = 0; |
| 2643 | } |
| 2644 | |
| 2645 | GFX_Screen_Copy(xSrc * 8, ySrc, xDst * 8, yDst, width * 8, height, screenSrc, screenDst); |
| 2646 | } |
| 2647 | |
| 2648 | static uint32 GUI_FactoryWindow_CreateWidgets(void) |
| 2649 | { |
no test coverage detected