mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +00:00
Add gpu.clear
This commit is contained in:
parent
8b32d524de
commit
e662e77fa5
1 changed files with 17 additions and 0 deletions
|
@ -134,6 +134,11 @@ public class GPU : IComponent
|
||||||
name = "loadImage",
|
name = "loadImage",
|
||||||
function = L_LoadImage,
|
function = L_LoadImage,
|
||||||
},
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
name = "clear",
|
||||||
|
function = L_Clear,
|
||||||
|
},
|
||||||
new(), // NULL
|
new(), // NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -517,4 +522,16 @@ public class GPU : IComponent
|
||||||
|
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int L_Clear(IntPtr state)
|
||||||
|
{
|
||||||
|
var L = Lua.FromIntPtr(state);
|
||||||
|
|
||||||
|
var c = L.OptInteger(1, 0x000000);
|
||||||
|
|
||||||
|
Utils.UnpackRGB((uint)c, out var r, out var g, out var b);
|
||||||
|
_game.Drawing.Clear(new Color(r, g, b));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue