1
0

Implement BACKCOLOR

This commit is contained in:
otya128
2016-12-07 22:31:51 +09:00
parent 1c5c0935de
commit 02fad28c82
2 changed files with 22 additions and 0 deletions

View File

@@ -315,6 +315,14 @@ class BuiltinFunction
p.BGvisible = cast(bool)BG;
p.sprite.visible = cast(bool)sprite;
}
static void BACKCOLOR(PetitComputer p, int color)
{
p.backcolor = color;
}
static int BACKCOLOR(PetitComputer p)
{
return p.backcolor;
}
static void XON(PetitComputer p, Value mode/*!?!???!?*/)
{
}

View File

@@ -487,6 +487,15 @@ class PetitComputer
m_touch = to;
}
}
int petitcomBackcolor;
void backcolor(int color)
{
petitcomBackcolor = color;
}
int backcolor()
{
return petitcomBackcolor;
}
void render()
{
try
@@ -621,6 +630,11 @@ class PetitComputer
{
chScreen(0, 0, 320, 480);
}
{
ubyte r, g, b, a;
RGBRead(petitcomBackcolor, r, g, b, a);
glClearColor(r / 255f, g / 255f, b / 255f, 1);
}
//描画の順位
//sprite>GRP>console>BG
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);