1
0

Implement SPUSED

This commit is contained in:
otya128
2016-12-30 20:51:05 +09:00
parent 2b0385676d
commit 5279e5c62e
2 changed files with 13 additions and 0 deletions

View File

@@ -1800,6 +1800,14 @@ class BuiltinFunction
{ {
p.sprite.spclip(x1, y1, x2, y2); p.sprite.spclip(x1, y1, x2, y2);
} }
static int SPUSED(PetitComputer p, int id)
{
if (!p.sprite.isValidSpriteId(id))
{
throw new OutOfRange("SPUSED", 1);
}
return p.sprite.spused(id);
}
static void BGMSTOP(PetitComputer p) static void BGMSTOP(PetitComputer p)
{ {
writeln("NOTIMPL:BGMSTOP"); writeln("NOTIMPL:BGMSTOP");

View File

@@ -1171,4 +1171,9 @@ class Sprite
return sprites.length > id + spmax; return sprites.length > id + spmax;
} }
} }
bool spused(int id)
{
id = spid(id);
return sprites[id].define;
}
} }