diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2021-01-08 17:43:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 17:43:31 +0100 |
commit | 6e42c791cf3bbcb59363ab913a4d909b5345ab1b (patch) | |
tree | f39e4ab8a86ccfae72bf59b3ce984a02cc13b50a /src/render/Sprite.cpp | |
parent | Merge pull request #930 from Nick007J/master (diff) | |
parent | bb .ini hello defines (diff) | |
download | re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.gz re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.bz2 re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.lz re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.xz re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.tar.zst re3-6e42c791cf3bbcb59363ab913a4d909b5345ab1b.zip |
Diffstat (limited to 'src/render/Sprite.cpp')
-rw-r--r-- | src/render/Sprite.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp index 9ec7b002..c31c75d2 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; @@ -33,7 +37,11 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh, // this is used to scale correctly if you zoom in with sniper rifle float fovScale = fov / CDraw::GetFOV(); +#ifdef FIX_SPRITES + *outw = fovScale * recip * SCREEN_HEIGHT; +#else *outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH; +#endif *outh = fovScale * recip * SCREEN_HEIGHT; return true; |