1
0

Fix XSCREEN for BIG

This commit is contained in:
otya128
2016-12-10 15:54:45 +09:00
parent a04536335b
commit 1a6332d830
2 changed files with 81 additions and 32 deletions

View File

@@ -340,16 +340,45 @@ class BuiltinFunction
tchx = pos.x;
tchy = pos.y;
}
static void XSCREEN(PetitComputer p, int mode, DefaultValue!(int, false) a, DefaultValue!(int, false) b)
static void XSCREEN(PetitComputer p, int mode, int tv, int gamepad, int sp, int bg)
{
if (p.x.mode != PetitComputer.XMode.WIIU || mode != 6)
{
throw new IllegalFunctionCall("XSCREEN");
}
p.xscreen(mode, tv, gamepad, sp, bg);
}
static void XSCREEN(PetitComputer p, int mode, int tv, int sp, int bg)
{
if (p.x.mode != PetitComputer.XMode.WIIU || mode != 5)
{
throw new IllegalFunctionCall("XSCREEN");
}
p.xscreen(mode, tv, sp, bg);
}
static void XSCREEN(PetitComputer p, int mode, int tv)
{
XSCREEN(p, mode, tv, 4096, 4);
}
static void XSCREEN(PetitComputer p, int mode)
{
a.setDefaultValue(512);
b.setDefaultValue(4);
if(mode == 2 || mode == 3)
{
a.setDefaultValue(256);
b.setDefaultValue(2);
p.xscreen(mode, 256, 2);
}
p.xscreen(mode, cast(int)a, cast(int)b);
else
{
p.xscreen(mode, 512, 4);
}
}
static void XSCREEN(PetitComputer p, int mode, int sp, int bg)
{
if (mode == 6)
{
XSCREEN(p, mode, sp, bg, 2048, 2);
return;
}
p.xscreen(mode, sp, bg);
}
static void DISPLAY(PetitComputer p, int display)
{