diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2021-01-08 23:01:41 +0100 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2021-01-08 23:01:41 +0100 |
commit | 7a3ee349da51543f5e273df1a7d932a25602ea2a (patch) | |
tree | 89dfabef536de8e7163e4fe1b094957e6d3ac762 /src/render/Sprite.cpp | |
parent | Train anims in enum (diff) | |
download | re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.gz re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.bz2 re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.lz re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.xz re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.zst re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.zip |
Diffstat (limited to 'src/render/Sprite.cpp')
-rw-r--r-- | src/render/Sprite.cpp | 4 |
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; |