draw fill rect on gui_data
| 3667 | |
| 3668 | // draw fill rect on gui_data |
| 3669 | static void gui_fillbox_internal(int x1, int y1, int x2, int y2, uint32 colour) |
| 3670 | { |
| 3671 | if (x1 > x2) |
| 3672 | std::swap(x1, x2); |
| 3673 | if (y1 > y2) |
| 3674 | std::swap(y1, y2); |
| 3675 | if (x1 < 0) |
| 3676 | x1 = 0; |
| 3677 | if (y1 < 0) |
| 3678 | y1 = 0; |
| 3679 | if (x2 >= LUA_SCREEN_WIDTH) |
| 3680 | x2 = LUA_SCREEN_WIDTH - 1; |
| 3681 | if (y2 >= LUA_SCREEN_HEIGHT) |
| 3682 | y2 = LUA_SCREEN_HEIGHT - 1; |
| 3683 | |
| 3684 | //gui_prepare(); |
| 3685 | int ix, iy; |
| 3686 | for (iy = y1; iy <= y2; iy++) |
| 3687 | { |
| 3688 | for (ix = x1; ix <= x2; ix++) |
| 3689 | { |
| 3690 | gui_drawpixel_fast(ix, iy, colour); |
| 3691 | } |
| 3692 | } |
| 3693 | } |
| 3694 | |
| 3695 | enum |
| 3696 | { |
no test coverage detected