1
0

Implement BG/SPPAGE

This commit is contained in:
otya128
2016-12-07 23:04:20 +09:00
parent 02fad28c82
commit d9161a07e0
3 changed files with 33 additions and 5 deletions

View File

@@ -1339,6 +1339,18 @@ class BuiltinFunction
{
return p.sprite.spchk(id);
}
static void SPPAGE(PetitComputer p, int page)
{
if (!p.isValidGraphicPage(page))
{
throw new OutOfRange("SPPAGE", 1);
}
p.sprite.sppage = page;
}
static int SPPAGE(PetitComputer p)
{
return p.sprite.sppage;
}
static void BGMSTOP(PetitComputer p)
{
writeln("NOTIMPL:BGMSTOP");
@@ -1486,6 +1498,18 @@ class BuiltinFunction
{
p.getBG(layer).fill(x, y, x2, y2, screendata);
}
static void BGPAGE(PetitComputer p, int page)
{
if (!p.isValidGraphicPage(page))
{
throw new OutOfRange("BGPAGE", 1);
}
p.bgpage = page;
}
static int BGPAGE(PetitComputer p)
{
return p.bgpage;
}
static void EFCON()
{
}