diff --git a/SMILEBASIC/builtinfunctions.d b/SMILEBASIC/builtinfunctions.d index 26b989f..79133d6 100644 --- a/SMILEBASIC/builtinfunctions.d +++ b/SMILEBASIC/builtinfunctions.d @@ -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) { diff --git a/SMILEBASIC/graphic.d b/SMILEBASIC/graphic.d index 3be2ed9..2064415 100644 --- a/SMILEBASIC/graphic.d +++ b/SMILEBASIC/graphic.d @@ -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);