VasiliyFamiliyaLe 21/04/2019 à 07:24
The bug is finally fixed (the archive file by the link is updated, but link by itself is stayed the same). Now the solid objects properties code looks that:
if(((x>(RoxyX-48))&&(x<(RoxyX-32))))
{
if(((y<(RoxyY+8))&&(y>(RoxyY-8))))
{
x--;
}
}
if(((x>(RoxyX+32))&&(x<(RoxyX+48))))
{
if(((y<(RoxyY+8))&&(y>(RoxyY-8))))
{
x++;
}
}
if(((y>(RoxyY+4))&&(y<(RoxyY+8))))
{
if(((x<(RoxyX+16))&&(x>(RoxyX-16))))
{
y++;
}
}
if(((y>(RoxyY-8))&&(y<(RoxyY-4))))
{
if(((x<(RoxyX+16))&&(x>(RoxyX-16))))
{
y--;
}
}
if(((x>(GyaruX-48))&&(x<(GyaruX-32))))
{
if(((y<(GyaruY+8))&&(y>(GyaruY-8))))
{
x--;
}
}
if(((x>(GyaruX+32))&&(x<(GyaruX+48))))
{
if(((y<(GyaruY+8))&&(y>(GyaruY-8))))
{
x++;
}
}
if(((y>(GyaruY+4))&&(y<(GyaruY+8))))
{
if(((x<(GyaruX+16))&&(x>(GyaruX-16))))
{
y++;
}
}
if(((y>(GyaruY-8))&&(y<(GyaruY-4))))
{
if(((x<(GyaruX+16))&&(x>(GyaruX-16))))
{
y--;
}
}
However, the pieces of code responsible for each NPC hitzones is still diplicates each other for now, so I'll need to make this code more common for all NPCs (this also applies to dialogues code in future).
I also had to "centerize" the every frame of player sprite animation horizonatally to solve the hitzones detection problem.
But it's a still unclear, what's happening with Gyaru sprite palettes, and what mistakes I made during the definition of FRONT_MAX_X.