diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-10 09:52:47 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-04-10 09:52:47 +0200 |
commit | 6647312660cb6c67d7ee3fec89897c930783a77f (patch) | |
tree | ee3411c32f192fd6c088a7cd5cfa655e82684167 /src/render/Sprite.cpp | |
parent | fix weather init (diff) | |
download | re3-6647312660cb6c67d7ee3fec89897c930783a77f.tar re3-6647312660cb6c67d7ee3fec89897c930783a77f.tar.gz re3-6647312660cb6c67d7ee3fec89897c930783a77f.tar.bz2 re3-6647312660cb6c67d7ee3fec89897c930783a77f.tar.lz re3-6647312660cb6c67d7ee3fec89897c930783a77f.tar.xz re3-6647312660cb6c67d7ee3fec89897c930783a77f.tar.zst re3-6647312660cb6c67d7ee3fec89897c930783a77f.zip |
Diffstat (limited to 'src/render/Sprite.cpp')
-rw-r--r-- | src/render/Sprite.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp index fec50c7e..8ac2315f 100644 --- a/src/render/Sprite.cpp +++ b/src/render/Sprite.cpp @@ -30,10 +30,12 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh, out->x *= SCREEN_WIDTH * recip; out->y *= SCREEN_HEIGHT * recip; // What is this? size? - *outw = 70.0f/CDraw::GetFOV(); - *outh = 70.0f/CDraw::GetFOV(); - *outw *= SCREEN_WIDTH * recip; - *outh *= SCREEN_HEIGHT * recip; + *outw = 70.0f/CDraw::GetFOV() * SCREEN_WIDTH * recip; +#ifdef ASPECT_RATIO_SCALE + *outh = 70.0f/CDraw::GetFOV() / (DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO) * SCREEN_HEIGHT * recip; +#else + *outh = 70.0f/CDraw::GetFOV() * SCREEN_HEIGHT * recip; +#endif return true; } |