Implement BGSHOW/HIDE
This commit is contained in:
@@ -22,6 +22,7 @@ class BG
|
||||
int width, height;
|
||||
int rendermax = 899;
|
||||
PetitComputer petitcom;
|
||||
bool show;
|
||||
this(PetitComputer pc)
|
||||
{
|
||||
chip[] = BGChip(0);
|
||||
@@ -31,9 +32,12 @@ class BG
|
||||
scalex = 1;
|
||||
scaley = 1;
|
||||
r = 0;
|
||||
show = true;
|
||||
}
|
||||
void render(float disw, float dish)
|
||||
{
|
||||
if (!show)
|
||||
return;
|
||||
float aspect = disw / dish;
|
||||
disw /= 2;
|
||||
dish /= 2;
|
||||
|
||||
@@ -1607,6 +1607,14 @@ class BuiltinFunction
|
||||
{
|
||||
return p.bgpage;
|
||||
}
|
||||
static void BGSHOW(PetitComputer p, int layer)
|
||||
{
|
||||
p.getBG(layer).show = true;
|
||||
}
|
||||
static void BGHIDE(PetitComputer p, int layer)
|
||||
{
|
||||
p.getBG(layer).show = false;
|
||||
}
|
||||
static void EFCON()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user