From f1ac62c0f17f7f5179cd39743a51d6e67b4eec3b Mon Sep 17 00:00:00 2001 From: otya128 Date: Wed, 7 Dec 2016 23:07:09 +0900 Subject: [PATCH] Fix BGCLIP --- SMILEBASIC/builtinfunctions.d | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/SMILEBASIC/builtinfunctions.d b/SMILEBASIC/builtinfunctions.d index 1c710cf..267cb7b 100644 --- a/SMILEBASIC/builtinfunctions.d +++ b/SMILEBASIC/builtinfunctions.d @@ -1465,18 +1465,13 @@ class BuiltinFunction z.setDefaultValue(p.getBG(layer).offsetz); p.getBG(layer).ofs(x, y, cast(int)z); } - static void BGCLIP(PetitComputer p, int layer, DefaultValue!(int, false) x, DefaultValue!(int, false) y, - DefaultValue!(int, false) x2, DefaultValue!(int, false) y2) + static void BGCLIP(PetitComputer p, int layer) { - if(x.isDefault && y.isDefault && x2.isDefault && y2.isDefault) - { - p.getBG(layer).clip(); - } - if(x.isDefault || y.isDefault || x2.isDefault || y2.isDefault) - { - throw new IllegalFunctionCall("BGCLIP"); - } - p.getBG(layer).clip(cast(int)x, cast(int)y, cast(int)x2, cast(int)y2); + p.getBG(layer).clip(); + } + static void BGCLIP(PetitComputer p, int layer, int x, int y, int x2, int y2) + { + p.getBG(layer).clip(x, y, x2, y2); } static void BGPUT(PetitComputer p, int layer, int x, int y, int screendata) {