diff --git a/SMILEBASIC/bg.d b/SMILEBASIC/bg.d index eac0bcd..a277041 100644 --- a/SMILEBASIC/bg.d +++ b/SMILEBASIC/bg.d @@ -22,6 +22,7 @@ class BG int width, height; int rendermax = 899; PetitComputer petitcom; + bool show; this(PetitComputer pc) { chip[] = BGChip(0); @@ -31,9 +32,12 @@ class BG scalex = 1; scaley = 1; r = 0; + show = true; } void render(float disw, float dish) { + if (!show) + return; float aspect = disw / dish; disw /= 2; dish /= 2; diff --git a/SMILEBASIC/builtinfunctions.d b/SMILEBASIC/builtinfunctions.d index 49b76dd..9a63c6b 100644 --- a/SMILEBASIC/builtinfunctions.d +++ b/SMILEBASIC/builtinfunctions.d @@ -1607,6 +1607,14 @@ class BuiltinFunction { return p.bgpage; } + static void BGSHOW(PetitComputer p, int layer) + { + p.getBG(layer).show = true; + } + static void BGHIDE(PetitComputer p, int layer) + { + p.getBG(layer).show = false; + } static void EFCON() { }