diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-12-29 18:24:16 +0100 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-12-29 18:24:16 +0100 |
commit | 224e805fe4e7a4d5366b228072834674f77fa0ba (patch) | |
tree | e28b27bea8a0b8c5d78b1a67231713c58f430e9f /src/render/Draw.cpp | |
parent | Merge branch 'master' of github.com:GTAmodding/re3 (diff) | |
download | re3-224e805fe4e7a4d5366b228072834674f77fa0ba.tar re3-224e805fe4e7a4d5366b228072834674f77fa0ba.tar.gz re3-224e805fe4e7a4d5366b228072834674f77fa0ba.tar.bz2 re3-224e805fe4e7a4d5366b228072834674f77fa0ba.tar.lz re3-224e805fe4e7a4d5366b228072834674f77fa0ba.tar.xz re3-224e805fe4e7a4d5366b228072834674f77fa0ba.tar.zst re3-224e805fe4e7a4d5366b228072834674f77fa0ba.zip |
Diffstat (limited to 'src/render/Draw.cpp')
-rw-r--r-- | src/render/Draw.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp index 4e323ec2..2a4739c9 100644 --- a/src/render/Draw.cpp +++ b/src/render/Draw.cpp @@ -35,8 +35,14 @@ CDraw::FindAspectRatio(void) default: case AR_4_3: return 4.0f / 3.0f; + case AR_5_4: + return 5.0f / 4.0f; + case AR_16_10: + return 16.0f / 10.0f; case AR_16_9: return 16.0f / 9.0f; + case AR_21_9: + return 21.0f / 9.0f; }; #endif } @@ -72,12 +78,13 @@ CDraw::SetFOV(float fov) } #ifdef ASPECT_RATIO_SCALE -float -ScaleAndCenterX(float x) +float CDraw::ScaleY(float y) { - if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH) - return x; - else - return (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X(x); + switch ( CMenuManager::m_PrefsSpriteScalingMode ) + { + case SCL_PC: return y * ((float)DEFAULT_SCREEN_HEIGHT/SCREEN_HEIGHT_NTSC); + default: + return y; + } } #endif
\ No newline at end of file |