mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 04:27:42 +00:00
Fix ShotSmoke effect
This commit is contained in:
@@ -386,7 +386,7 @@ zeus::CVector2i CGraphics::ProjectPoint(const zeus::CVector3f& point)
|
||||
{
|
||||
zeus::CVector3f projPt = GetPerspectiveProjectionMatrix(false).multiplyOneOverW(point);
|
||||
return {int(projPt.x * g_Viewport.x10_halfWidth) + int(g_Viewport.x10_halfWidth),
|
||||
int(g_Viewport.x14_halfHeight) - (int(projPt.y * g_Viewport.x14_halfHeight) +
|
||||
int(g_Viewport.xc_height) - (int(projPt.y * g_Viewport.x14_halfHeight) +
|
||||
int(g_Viewport.x14_halfHeight))};
|
||||
}
|
||||
|
||||
@@ -406,9 +406,9 @@ SClipScreenRect CGraphics::ClipScreenRectFromVS(const zeus::CVector3f& p1,
|
||||
if (p2.x == 0.f && p2.y == 0.f && p2.z == 0.f)
|
||||
return {};
|
||||
|
||||
if (p1.y < GetProjectionState().x14_near || p2.y < GetProjectionState().x14_near)
|
||||
if (-p1.z < GetProjectionState().x14_near || -p2.z < GetProjectionState().x14_near)
|
||||
return {};
|
||||
if (p1.y > GetProjectionState().x18_far || p2.y > GetProjectionState().x18_far)
|
||||
if (-p1.z > GetProjectionState().x18_far || -p2.z > GetProjectionState().x18_far)
|
||||
return {};
|
||||
|
||||
zeus::CVector2i sp1 = ProjectPoint(p1);
|
||||
|
||||
Reference in New Issue
Block a user