MCPcopy Create free account
hub / github.com/TASEmulators/fceux / gui_fillbox_internal

Function gui_fillbox_internal

src/lua-engine.cpp:3669–3693  ·  view source on GitHub ↗

draw fill rect on gui_data

Source from the content-addressed store, hash-verified

3667
3668// draw fill rect on gui_data
3669static 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
3695enum
3696{

Callers 1

gui_boxFunction · 0.85

Calls 2

swapFunction · 0.85
gui_drawpixel_fastFunction · 0.85

Tested by

no test coverage detected