1
0
This commit is contained in:
otya128
2016-12-10 20:42:24 +09:00
parent 2f19e886be
commit bfdc8c17dd
2 changed files with 5 additions and 1 deletions

View File

@@ -398,7 +398,7 @@ class BuiltinFunction
static void GCLS(PetitComputer p, DefaultValue!(int, false) color)
{
color.setDefaultValue(0);
p.graphic.gfill(p.graphic.useGRP, 0, 0, 511, 511, cast(int)color);
p.graphic.gcls(p.graphic.useGRP, cast(int)color);
}
static void GPSET(PetitComputer p, int x, int y, DefaultValue!(int, false) color)
{

View File

@@ -646,6 +646,10 @@ class Graphic
{
sendDrawMessage(DrawType.FILL, cast(byte)page, cast(short)x, cast(short)y, cast(short)x2, cast(short)y2, color);
}
void gcls(int page, uint color)
{
sendDrawMessage(DrawType.FILL, cast(byte)page, 0, 0, cast(short)width, cast(short)height, color);
}
void gpaint(int page, int x, int y, uint color)
{
sendDrawMessage(DrawType.PAINT, cast(byte)page, cast(short)x, cast(short)y, color);