diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-06-07 20:44:43 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-06-07 20:44:54 +0200 |
commit | e07b6fdce73884de93dbefd7056b3a04d2f4898c (patch) | |
tree | 203809f8025866131892e0c17b05fd0c9ec05623 /src/core/Camera.cpp | |
parent | fix (diff) | |
download | re3-e07b6fdce73884de93dbefd7056b3a04d2f4898c.tar re3-e07b6fdce73884de93dbefd7056b3a04d2f4898c.tar.gz re3-e07b6fdce73884de93dbefd7056b3a04d2f4898c.tar.bz2 re3-e07b6fdce73884de93dbefd7056b3a04d2f4898c.tar.lz re3-e07b6fdce73884de93dbefd7056b3a04d2f4898c.tar.xz re3-e07b6fdce73884de93dbefd7056b3a04d2f4898c.tar.zst re3-e07b6fdce73884de93dbefd7056b3a04d2f4898c.zip |
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r-- | src/core/Camera.cpp | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index d9cc5c32..9ebec1a6 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -2198,26 +2198,24 @@ CCamera::ProcessWideScreenOn(void) void CCamera::DrawBordersForWideScreen(void) { + float bottomBorderTopY, topBorderBottomY; + if (m_WideScreenOn) { + float centerY = (SCREEN_HEIGHT / 2) * (m_ScreenReductionPercentage / 100.f); + topBorderBottomY = centerY - SCREEN_SCALE_Y(22.f); + bottomBorderTopY = SCREEN_HEIGHT - centerY - SCREEN_SCALE_Y(14.f); + } else { + topBorderBottomY = 0.f; + bottomBorderTopY = SCREEN_HEIGHT; + } + if(m_BlurType == MBLUR_NONE || m_BlurType == MBLUR_NORMAL) SetMotionBlurAlpha(80); - CSprite2d::DrawRect( -#ifdef FIX_BUGS - CRect(0.0f, (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - SCREEN_SCALE_Y(8.0f), -#else - CRect(0.0f, (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - 8.0f, -#endif - SCREEN_WIDTH, 0.0f), - CRGBA(0, 0, 0, 255)); + // top border + CSprite2d::DrawRect(CRect(0.0f, 0.0f, SCREEN_WIDTH, topBorderBottomY), CRGBA(0, 0, 0, 255)); - CSprite2d::DrawRect( - CRect(0.0f, SCREEN_HEIGHT, -#ifdef FIX_BUGS - SCREEN_WIDTH, SCREEN_HEIGHT - (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - SCREEN_SCALE_Y(8.0f)), -#else - SCREEN_WIDTH, SCREEN_HEIGHT - (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - 8.0f), -#endif - CRGBA(0, 0, 0, 255)); + // bottom border + CSprite2d::DrawRect(CRect(0.0f, bottomBorderTopY, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(0, 0, 0, 255)); } |