summaryrefslogtreecommitdiffstats
path: root/src/render/Sprite.cpp
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-12-29 18:24:16 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2020-12-29 18:24:16 +0100
commit224e805fe4e7a4d5366b228072834674f77fa0ba (patch)
treee28b27bea8a0b8c5d78b1a67231713c58f430e9f /src/render/Sprite.cpp
parentMerge branch 'master' of github.com:GTAmodding/re3 (diff)
downloadre3-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 '')
-rw-r--r--src/render/Sprite.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp
index 9ec7b002..4be64ef2 100644
--- a/src/render/Sprite.cpp
+++ b/src/render/Sprite.cpp
@@ -5,6 +5,10 @@
#include "Camera.h"
#include "Sprite.h"
+#ifdef ASPECT_RATIO_SCALE
+#include "Frontend.h"
+#endif
+
float CSprite::m_f2DNearScreenZ;
float CSprite::m_f2DFarScreenZ;
float CSprite::m_fRecipNearClipPlane;
@@ -35,6 +39,11 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
*outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH;
*outh = fovScale * recip * SCREEN_HEIGHT;
+
+#ifdef ASPECT_RATIO_SCALE
+ if ( CMenuManager::m_PrefsSpriteScalingMode==SCL_AUTO )
+ *outw = fovScale * recip * SCREEN_HEIGHT;
+#endif
return true;
}