From 0cda0ee0957cb7947df170f4c6d637148ed55099 Mon Sep 17 00:00:00 2001 From: otya128 Date: Fri, 23 Dec 2016 21:12:05 +0900 Subject: [PATCH] Fix BGMPLAY --- SMILEBASIC/builtinfunctions.d | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/SMILEBASIC/builtinfunctions.d b/SMILEBASIC/builtinfunctions.d index 1197fdf..a1870f5 100644 --- a/SMILEBASIC/builtinfunctions.d +++ b/SMILEBASIC/builtinfunctions.d @@ -678,7 +678,25 @@ class BuiltinFunction { GCOPY(p, p.graphic.useGRP, x, y, x2, y2, x3, y3, cpmode); } - static void BGMPLAY(PetitComputer p, int music) + static void BGMPLAY(PetitComputer p, Value numberOrMML) + { + if (numberOrMML.isNumber) + { + int number = numberOrMML.castInteger; + } + else if (numberOrMML.isString) + { + wstring mml = numberOrMML.castDString; + } + else + { + throw new TypeMismatch("BGMPLAY", 1); + } + } + static void BGMPLAY(PetitComputer p, int track, int number) + { + } + static void BGMPLAY(PetitComputer p, int track, int number, int volume) { } static void BEEP(PetitComputer p, DefaultValue!(int, false) beep, DefaultValue!(int, false) pitch, DefaultValue!(int, false) volume, DefaultValue!(int, false) pan)