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