Implement BGSHOW/HIDE

This commit is contained in:
otya128 committed 2016-12-08 22:38:02 +09:00
1 parent 609bc0bcd5
commit b64120b480
2 files changed
+12

No files matched your search

+4
View File
@@ -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;
+8
View File
@@ -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()
{ {
} }