Sprite Scaling option

This commit is contained in:
Fire-Head
2020-12-29 20:24:16 +03:00
parent 40b90618ef
commit 224e805fe4
11 changed files with 106 additions and 17 deletions

View File

@@ -5,6 +5,10 @@
#include "Camera.h"
#include "Sprite.h"
#ifdef ASPECT_RATIO_SCALE
#include "Frontend.h"
#endif
float CSprite::m_f2DNearScreenZ;
float CSprite::m_f2DFarScreenZ;
float CSprite::m_fRecipNearClipPlane;
@@ -35,6 +39,11 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
*outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH;
*outh = fovScale * recip * SCREEN_HEIGHT;
#ifdef ASPECT_RATIO_SCALE
if ( CMenuManager::m_PrefsSpriteScalingMode==SCL_AUTO )
*outw = fovScale * recip * SCREEN_HEIGHT;
#endif
return true;
}