summaryrefslogtreecommitdiffstats
path: root/src/render/Sprite.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-12 11:45:56 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-12 11:55:07 +0100
commitcb4b4d584c4d08791207ff92870b400a84faa742 (patch)
treefc740c000f1283fb695de5556cdd59efcf71e65b /src/render/Sprite.cpp
parentMerge branch 'lcs-dev' into lcs (diff)
parentpremake: add startrpoject; add lto option; fix copying of binary to gamedir; update premake5.exe (diff)
downloadre3-cb4b4d584c4d08791207ff92870b400a84faa742.tar
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.gz
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.bz2
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.lz
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.xz
re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.zst
re3-cb4b4d584c4d08791207ff92870b400a84faa742.zip
Diffstat (limited to 'src/render/Sprite.cpp')
-rw-r--r--src/render/Sprite.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp
index 401eebd0..ba6ab291 100644
--- a/src/render/Sprite.cpp
+++ b/src/render/Sprite.cpp
@@ -33,7 +33,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 = CDraw::ms_bFixSprites ? (fovScale * recip * SCREEN_HEIGHT) : (fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH);
+#else
*outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH;
+#endif
*outh = fovScale * recip * SCREEN_HEIGHT;
return true;