mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-05 23:04:09 +00:00
Fix corona scaling
This commit is contained in:
parent
e0b3418e65
commit
e917cd1f46
3 changed files with 10 additions and 6 deletions
|
@ -29,13 +29,17 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
|
|||
float recip = 1.0f/out->z;
|
||||
out->x *= SCREEN_WIDTH * recip;
|
||||
out->y *= SCREEN_HEIGHT * recip;
|
||||
// What is this? size?
|
||||
*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;
|
||||
float fov = CDraw::ConvertFOV(DefaultFOV);
|
||||
#else
|
||||
*outh = 70.0f/CDraw::GetFOV() * SCREEN_HEIGHT * recip;
|
||||
const float fov = DefaultFOV;
|
||||
#endif
|
||||
// this is used to scale correctly if you zoom in with sniper rifle
|
||||
float fovScale = fov / CDraw::GetFOV();
|
||||
|
||||
*outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH;
|
||||
*outh = fovScale * recip * SCREEN_HEIGHT;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue