summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-10 09:52:47 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-10 09:52:47 +0200
commit6647312660cb6c67d7ee3fec89897c930783a77f (patch)
treeee3411c32f192fd6c088a7cd5cfa655e82684167 /src/render
parentfix weather init (diff)
downloadre3-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')
-rw-r--r--src/render/Coronas.cpp4
-rw-r--r--src/render/Sprite.cpp10
-rw-r--r--src/render/WeaponEffects.cpp2
3 files changed, 9 insertions, 7 deletions
diff --git a/src/render/Coronas.cpp b/src/render/Coronas.cpp
index c934540b..68994b0b 100644
--- a/src/render/Coronas.cpp
+++ b/src/render/Coronas.cpp
@@ -320,7 +320,7 @@ CCoronas::Render(void)
CSprite::RenderOneXLUSprite(spriteCoors.x, spriteCoors.y, spriteCoors.z,
spritew * aCoronas[i].size * wscale,
- spriteh * SCREEN_SCALE_AR2(aCoronas[i].size * fogscale * hscale),
+ spriteh * aCoronas[i].size * fogscale * hscale,
CCoronas::aCoronas[i].red / fogscale,
CCoronas::aCoronas[i].green / fogscale,
CCoronas::aCoronas[i].blue / fogscale,
@@ -331,7 +331,7 @@ CCoronas::Render(void)
CSprite::RenderOneXLUSprite_Rotate_Aspect(
spriteCoors.x, spriteCoors.y, spriteCoors.z,
spritew * aCoronas[i].size * fogscale,
- spriteh * SCREEN_SCALE_AR2(aCoronas[i].size * fogscale),
+ spriteh * aCoronas[i].size * fogscale,
CCoronas::aCoronas[i].red / fogscale,
CCoronas::aCoronas[i].green / fogscale,
CCoronas::aCoronas[i].blue / fogscale,
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;
}
diff --git a/src/render/WeaponEffects.cpp b/src/render/WeaponEffects.cpp
index 3101def9..2ed9e662 100644
--- a/src/render/WeaponEffects.cpp
+++ b/src/render/WeaponEffects.cpp
@@ -83,7 +83,7 @@ CWeaponEffects::Render(void)
{
float recipz = 1.0f / pos.z;
CSprite::RenderOneXLUSprite(pos.x, pos.y, pos.z,
- gCrossHair.m_fSize * w, gCrossHair.m_fSize * SCREEN_SCALE_AR2(h),
+ gCrossHair.m_fSize * w, gCrossHair.m_fSize * h,
gCrossHair.m_nRed, gCrossHair.m_nGreen, gCrossHair.m_nBlue, 255,
recipz, 255);
}