mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 13:27:41 -07:00
implement approximation of z0 > z1 case
This commit is contained in:
parent
672e6d03fa
commit
b6fa43b0cf
@ -183,7 +183,7 @@ private:
|
|||||||
|
|
||||||
if (dir)
|
if (dir)
|
||||||
{
|
{
|
||||||
// seems like y dir does different interpolation?
|
// seems like y dir does different interpolation than x?
|
||||||
// this probably isn't right...
|
// this probably isn't right...
|
||||||
if (z0 < z1)
|
if (z0 < z1)
|
||||||
return z0 + (z1-z0) * x / xdiff;
|
return z0 + (z1-z0) * x / xdiff;
|
||||||
@ -195,7 +195,7 @@ private:
|
|||||||
if (z0 < z1)
|
if (z0 < z1)
|
||||||
return z0 + (((z1-z0) / xdiff & ~0x1) * x);
|
return z0 + (((z1-z0) / xdiff & ~0x1) * x);
|
||||||
else
|
else
|
||||||
return z1 + (((z0-z1) / xdiff & ~0x1) * (xdiff-x) + ((z0-z1) & 0xFF));
|
return z1 + (((z0-z1) / xdiff & ~0x1) * (xdiff-x)) + ((z0-z1) % (xdiff << 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user