mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 15:50:00 +00:00
Fix sprite vertical scale
This commit is contained in:
parent
6473778c47
commit
6647312660
|
@ -107,10 +107,8 @@ extern void **rwengine;
|
||||||
|
|
||||||
#ifdef ASPECT_RATIO_SCALE
|
#ifdef ASPECT_RATIO_SCALE
|
||||||
#define SCREEN_SCALE_AR(a) ((a) * DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO)
|
#define SCREEN_SCALE_AR(a) ((a) * DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO)
|
||||||
#define SCREEN_SCALE_AR2(a) ((a) / (DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO))
|
|
||||||
#else
|
#else
|
||||||
#define SCREEN_SCALE_AR(a) (a)
|
#define SCREEN_SCALE_AR(a) (a)
|
||||||
#define SCREEN_SCALE_AR2(a) (a)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "maths.h"
|
#include "maths.h"
|
||||||
|
|
|
@ -320,7 +320,7 @@ CCoronas::Render(void)
|
||||||
|
|
||||||
CSprite::RenderOneXLUSprite(spriteCoors.x, spriteCoors.y, spriteCoors.z,
|
CSprite::RenderOneXLUSprite(spriteCoors.x, spriteCoors.y, spriteCoors.z,
|
||||||
spritew * aCoronas[i].size * wscale,
|
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].red / fogscale,
|
||||||
CCoronas::aCoronas[i].green / fogscale,
|
CCoronas::aCoronas[i].green / fogscale,
|
||||||
CCoronas::aCoronas[i].blue / fogscale,
|
CCoronas::aCoronas[i].blue / fogscale,
|
||||||
|
@ -331,7 +331,7 @@ CCoronas::Render(void)
|
||||||
CSprite::RenderOneXLUSprite_Rotate_Aspect(
|
CSprite::RenderOneXLUSprite_Rotate_Aspect(
|
||||||
spriteCoors.x, spriteCoors.y, spriteCoors.z,
|
spriteCoors.x, spriteCoors.y, spriteCoors.z,
|
||||||
spritew * aCoronas[i].size * fogscale,
|
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].red / fogscale,
|
||||||
CCoronas::aCoronas[i].green / fogscale,
|
CCoronas::aCoronas[i].green / fogscale,
|
||||||
CCoronas::aCoronas[i].blue / fogscale,
|
CCoronas::aCoronas[i].blue / fogscale,
|
||||||
|
|
|
@ -30,10 +30,12 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
|
||||||
out->x *= SCREEN_WIDTH * recip;
|
out->x *= SCREEN_WIDTH * recip;
|
||||||
out->y *= SCREEN_HEIGHT * recip;
|
out->y *= SCREEN_HEIGHT * recip;
|
||||||
// What is this? size?
|
// What is this? size?
|
||||||
*outw = 70.0f/CDraw::GetFOV();
|
*outw = 70.0f/CDraw::GetFOV() * SCREEN_WIDTH * recip;
|
||||||
*outh = 70.0f/CDraw::GetFOV();
|
#ifdef ASPECT_RATIO_SCALE
|
||||||
*outw *= SCREEN_WIDTH * recip;
|
*outh = 70.0f/CDraw::GetFOV() / (DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO) * SCREEN_HEIGHT * recip;
|
||||||
*outh *= SCREEN_HEIGHT * recip;
|
#else
|
||||||
|
*outh = 70.0f/CDraw::GetFOV() * SCREEN_HEIGHT * recip;
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ CWeaponEffects::Render(void)
|
||||||
{
|
{
|
||||||
float recipz = 1.0f / pos.z;
|
float recipz = 1.0f / pos.z;
|
||||||
CSprite::RenderOneXLUSprite(pos.x, pos.y, 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,
|
gCrossHair.m_nRed, gCrossHair.m_nGreen, gCrossHair.m_nBlue, 255,
|
||||||
recipz, 255);
|
recipz, 255);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue