Aspect ratio fix for player skin menu

This commit is contained in:
Sergeanur 2019-10-07 15:08:39 +03:00
parent 568bdcfd74
commit 1df8e7976f
2 changed files with 13 additions and 1 deletions

View File

@ -137,11 +137,15 @@ CPlayerSkin::RenderFrontendSkinEdit(void)
{ {
static float rotation = 0.0f; static float rotation = 0.0f;
RwRGBAReal AmbientColor = { 0.65f, 0.65f, 0.65f, 1.0f }; RwRGBAReal AmbientColor = { 0.65f, 0.65f, 0.65f, 1.0f };
const RwV3d pos = { 1.35f, 0.35f, 7.725f }; RwV3d pos = { 1.35f, 0.35f, 7.725f };
const RwV3d axis1 = { 1.0f, 0.0f, 0.0f }; const RwV3d axis1 = { 1.0f, 0.0f, 0.0f };
const RwV3d axis2 = { 0.0f, 0.0f, 1.0f }; const RwV3d axis2 = { 0.0f, 0.0f, 1.0f };
static uint32 LastFlash = 0; static uint32 LastFlash = 0;
#ifdef ASPECT_RATIO_SCALE
pos.x = 1.35f * (SCREEN_ASPECT_RATIO / DEFAULT_ASPECT_RATIO);
#endif
RwFrame *frame = RpClumpGetFrame(gpPlayerClump); RwFrame *frame = RpClumpGetFrame(gpPlayerClump);
if (CTimer::GetTimeInMillisecondsPauseMode() - LastFlash > 7) { if (CTimer::GetTimeInMillisecondsPauseMode() - LastFlash > 7) {

View File

@ -199,7 +199,11 @@ Idle(void *arg)
Render2dStuff(); Render2dStuff();
}else{ }else{
float viewWindow = DEFAULT_VIEWWINDOW; float viewWindow = DEFAULT_VIEWWINDOW;
#ifdef ASPECT_RATIO_SCALE
CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
#else
CameraSize(Scene.camera, nil, viewWindow, DEFAULT_ASPECT_RATIO); CameraSize(Scene.camera, nil, viewWindow, DEFAULT_ASPECT_RATIO);
#endif
CVisibilityPlugins::SetRenderWareCamera(Scene.camera); CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ); RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
if(!RsCameraBeginUpdate(Scene.camera)) if(!RsCameraBeginUpdate(Scene.camera))
@ -234,7 +238,11 @@ FrontendIdle(void)
return; return;
float viewWindow = DEFAULT_VIEWWINDOW; float viewWindow = DEFAULT_VIEWWINDOW;
#ifdef ASPECT_RATIO_SCALE
CameraSize(Scene.camera, nil, viewWindow, SCREEN_ASPECT_RATIO);
#else
CameraSize(Scene.camera, nil, viewWindow, DEFAULT_ASPECT_RATIO); CameraSize(Scene.camera, nil, viewWindow, DEFAULT_ASPECT_RATIO);
#endif
CVisibilityPlugins::SetRenderWareCamera(Scene.camera); CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ); RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
if(!RsCameraBeginUpdate(Scene.camera)) if(!RsCameraBeginUpdate(Scene.camera))