From b8f8024af957d2af63d209747a3818045ebad321 Mon Sep 17 00:00:00 2001 From: otya128 Date: Sun, 9 Jul 2017 21:40:27 +0900 Subject: [PATCH] Implement SPCOL(4,5,6,7)/Add BGMSTOP stub --- SMILEBASIC/builtinfunctions.d | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/SMILEBASIC/builtinfunctions.d b/SMILEBASIC/builtinfunctions.d index 2df4631..5684254 100644 --- a/SMILEBASIC/builtinfunctions.d +++ b/SMILEBASIC/builtinfunctions.d @@ -2122,6 +2122,20 @@ class BuiltinFunction } p.sprite.spcol(id, cast(short)x, cast(short)y, cast(ushort)w, cast(ushort)h, false, -1); } + + @StartOptional("mask") + static void SPCOL(PetitComputer p, int id, out int scalable, out int mask) + { + int dummy; + SPCOL(p, id, dummy, dummy, dummy, dummy, scalable, mask); + } + @StartOptional("scalable") + static void SPCOL(PetitComputer p, int id, out int x, out int y, out int w, out int h, out int scalable, out int mask) + { + bool s; + p.sprite.getspcol(id, x, y, w, h, s, mask); + scalable = cast(int)(s); + } static int SPHITSP(PetitComputer p, int id) { if (!p.sprite.isValidSpriteId(id)) @@ -2220,6 +2234,14 @@ class BuiltinFunction { writeln("NOTIMPL:BGMSTOP"); } + static void BGMSTOP(PetitComputer p, int track) + { + writeln("NOTIMPL:BGMSTOP %d", track); + } + static void BGMSTOP(PetitComputer p, int track, int fade) + { + writeln("NOTIMPL:BGMSTOP %d,%d", track, fade); + } static int BGMCHK(PetitComputer p) { writeln("NOTIMPL:BGMCHK");