mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:07:42 +00:00
Water rendering order fix, morphball visor fixes
This commit is contained in:
@@ -613,11 +613,11 @@ zeus::CFrustum CStateManager::SetupDrawFrustum(const SViewport& vp) const
|
||||
zeus::CFrustum ret;
|
||||
const CGameCamera* cam = x870_cameraManager->GetCurrentCamera(*this);
|
||||
zeus::CTransform camXf = x870_cameraManager->GetCurrentCameraTransform(*this);
|
||||
//int vpWidth = xf2c_viewportScale.x * vp.x8_width;
|
||||
//int vpHeight = xf2c_viewportScale.y * vp.xc_height;
|
||||
//int vpLeft = (vp.x8_width - vpWidth) / 2 + vp.x0_left;
|
||||
//int vpTop = (vp.xc_height - vpHeight) / 2 + vp.x4_top;
|
||||
//g_Renderer->SetViewport(vpLeft, vpTop, vpWidth, vpHeight);
|
||||
int vpWidth = xf2c_viewportScale.x * vp.x8_width;
|
||||
int vpHeight = xf2c_viewportScale.y * vp.xc_height;
|
||||
int vpLeft = (vp.x8_width - vpWidth) / 2 + vp.x0_left;
|
||||
int vpTop = (vp.xc_height - vpHeight) / 2 + vp.x4_top;
|
||||
g_Renderer->SetViewport(vpLeft, vpTop, vpWidth, vpHeight);
|
||||
float fov = std::atan(std::tan(zeus::degToRad(cam->GetFov()) * 0.5f) * xf2c_viewportScale.y) * 2.f;
|
||||
float width = xf2c_viewportScale.x * vp.x8_width;
|
||||
float height = xf2c_viewportScale.y * vp.xc_height;
|
||||
@@ -633,11 +633,11 @@ zeus::CFrustum CStateManager::SetupViewForDraw(const SViewport& vp) const
|
||||
zeus::CTransform camXf = x870_cameraManager->GetCurrentCameraTransform(*this);
|
||||
g_Renderer->SetWorldViewpoint(camXf);
|
||||
CBooModel::SetNewPlayerPositionAndTime(x84c_player->GetTranslation());
|
||||
//int vpWidth = xf2c_viewportScale.x * vp.x8_width;
|
||||
//int vpHeight = xf2c_viewportScale.y * vp.xc_height;
|
||||
//int vpLeft = (vp.x8_width - vpWidth) / 2 + vp.x0_left;
|
||||
//int vpTop = (vp.xc_height - vpHeight) / 2 + vp.x4_top;
|
||||
//g_Renderer->SetViewport(vpLeft, vpTop, vpWidth, vpHeight);
|
||||
int vpWidth = xf2c_viewportScale.x * vp.x8_width;
|
||||
int vpHeight = xf2c_viewportScale.y * vp.xc_height;
|
||||
int vpLeft = (vp.x8_width - vpWidth) / 2 + vp.x0_left;
|
||||
int vpTop = (vp.xc_height - vpHeight) / 2 + vp.x4_top;
|
||||
g_Renderer->SetViewport(vpLeft, vpTop, vpWidth, vpHeight);
|
||||
CGraphics::SetDepthRange(DEPTH_WORLD, DEPTH_FAR);
|
||||
float fov = std::atan(std::tan(zeus::degToRad(cam->GetFov()) * 0.5f) * xf2c_viewportScale.y) * 2.f;
|
||||
float width = xf2c_viewportScale.x * vp.x8_width;
|
||||
|
||||
Reference in New Issue
Block a user