Implement BACKCOLOR
This commit is contained in:
@@ -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/*!?!???!?*/)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user