Fix sprite visibility
This commit is contained in:
@@ -611,18 +611,18 @@ class PetitComputer
|
|||||||
bg[i].render(400f, 240f);
|
bg[i].render(400f, 240f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(xscreenmode == 1)
|
if(xscreenmode == 1 && BGvisibles[1])
|
||||||
{
|
|
||||||
if (BGvisibles[1])
|
|
||||||
{
|
{
|
||||||
chScreen(40, 0, 320, 240);
|
chScreen(40, 0, 320, 240);
|
||||||
for(int i = bgmax; i < bg.length; i++)
|
for(int i = bgmax; i < bg.length; i++)
|
||||||
{
|
{
|
||||||
bg[i].render(320f, 240f);
|
bg[i].render(320f, 240f);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
chScreen(0, 240, 400, 240);
|
chScreen(0, 240, 400, 240);
|
||||||
}
|
}
|
||||||
|
//glColor3f(1.0, 1.0, 1.0);
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
//glLoadIdentity();
|
||||||
}
|
}
|
||||||
version(test) glLoadIdentity();
|
version(test) glLoadIdentity();
|
||||||
version(test) glRotatef(rot_test_deg, rot_test_x, rot_test_y, rot_test_z);
|
version(test) glRotatef(rot_test_deg, rot_test_x, rot_test_y, rot_test_z);
|
||||||
|
|||||||
@@ -668,28 +668,30 @@ class Sprite
|
|||||||
{
|
{
|
||||||
if(!dis && sprite.id >= spmax)
|
if(!dis && sprite.id >= spmax)
|
||||||
{
|
{
|
||||||
|
dis = true;
|
||||||
if (!visibles[1])
|
if (!visibles[1])
|
||||||
continue;
|
continue;
|
||||||
disw = 160f;
|
disw = 160f;
|
||||||
disw2 = 320f;
|
disw2 = 320f;
|
||||||
petitcom.chScreen(40, 0, 320, 240);
|
petitcom.chScreen(40, 0, 320, 240);
|
||||||
aspect = disw2 / dish2;
|
aspect = disw2 / dish2;
|
||||||
dis = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(sprite.id < spmax && dis)
|
if(sprite.id < spmax && dis)
|
||||||
{
|
{
|
||||||
|
dis = false;
|
||||||
if (!visibles[0])
|
if (!visibles[0])
|
||||||
continue;
|
continue;
|
||||||
disw = 200f;
|
disw = 200f;
|
||||||
disw2 = 400f;
|
disw2 = 400f;
|
||||||
petitcom.chScreen(0, 240, 400, 240);
|
petitcom.chScreen(0, 240, 400, 240);
|
||||||
aspect = disw2 / dish2;
|
aspect = disw2 / dish2;
|
||||||
dis = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!visibles[dis])
|
||||||
|
continue;
|
||||||
int x, y;
|
int x, y;
|
||||||
if(sprite.parent)
|
if(sprite.parent)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user