[iortcw] 460/497: MP: Fix cinematics and some scaling issues

2017-09-08 Thread Simon McVittie
This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 5206fd503207eb5160040e750cbb1502f486f0fc
Author: MAN-AT-ARMS 
Date:   Sun Dec 6 09:51:32 2015 -0500

MP: Fix cinematics and some scaling issues
---
 MP/code/cgame/cg_draw.c   | 21 +++-
 MP/code/cgame/cg_drawtools.c  | 47 +++
 MP/code/cgame/cg_scoreboard.c |  8 +-
 MP/code/cgame/cg_view.c   |  4 +++
 MP/code/ui/ui_main.c  | 57 ++-
 SP/code/cgame/cg_draw.c   |  8 +++---
 6 files changed, 106 insertions(+), 39 deletions(-)

diff --git a/MP/code/cgame/cg_draw.c b/MP/code/cgame/cg_draw.c
index 49023c4..6a856cc 100644
--- a/MP/code/cgame/cg_draw.c
+++ b/MP/code/cgame/cg_draw.c
@@ -3880,20 +3880,17 @@ void CG_DrawActive( stereoFrame_t stereoView ) {
w = LIMBO_3D_W;
h = LIMBO_3D_H;
 
+   if ( cg_fixedAspect.integer ) { //FIXME:MAN-AT-ARMS...Use 
correct view
+   CG_SetScreenPlacement(PLACE_CENTER, PLACE_CENTER);
+   }
+
cg.refdef.width = 0;
-   if ( cg_fixedAspect.integer == 2 ) { //FIXME:MAN-AT-ARMS...Use 
correct view
-   cg.refdef.x = LIMBO_3D_X * cgs.screenXScaleStretch;
-   cg.refdef.y = LIMBO_3D_Y * cgs.screenYScaleStretch;
-   cg.refdef.width = LIMBO_3D_W * cgs.screenXScaleStretch;
-   cg.refdef.height = LIMBO_3D_H * cgs.screenYScaleStretch;
-   } else {
-   CG_AdjustFrom640( &x, &y, &w, &h );
+   CG_AdjustFrom640( &x, &y, &w, &h );
 
-   cg.refdef.x = x;
-   cg.refdef.y = y;
-   cg.refdef.width = w;
-   cg.refdef.height = h;
-   }
+   cg.refdef.x = x;
+   cg.refdef.y = y;
+   cg.refdef.width = w;
+   cg.refdef.height = h;
}
// -NERVE - SMF
 
diff --git a/MP/code/cgame/cg_drawtools.c b/MP/code/cgame/cg_drawtools.c
index 21c9b79..0a6d230 100644
--- a/MP/code/cgame/cg_drawtools.c
+++ b/MP/code/cgame/cg_drawtools.c
@@ -96,21 +96,28 @@ void CG_AdjustFrom640( float *x, float *y, float *w, float 
*h ) {
 
if ( cg_fixedAspect.integer ) {
if (cg_horizontalPlacement == PLACE_STRETCH) {
+   // NERVE - SMF - hack to make images display properly 
in small view / limbo mode
+   if ( cg.limboMenu && cg.refdef.width ) {
+   float xscale = ( ( cg.refdef.width / 
cgs.screenXScaleStretch ) / 640.f );
+
+   ( *x ) = ( *x ) * xscale + ( cg.refdef.x / 
cgs.screenXScaleStretch );
+   ( *w ) *= xscale;
+   }
+   // -NERVE - SMF
+
// scale for screen sizes (not aspect correct in wide 
screen)
*w *= cgs.screenXScaleStretch;
*x *= cgs.screenXScaleStretch;
-   } else if ( cg.limboMenu && cg.refdef.width ) {
+   } else {
// NERVE - SMF - hack to make images display properly 
in small view / limbo mode
-   float xscale = ( ( cg.refdef.width / cgs.screenXScale ) 
/ 640.f );
+   if ( cg.limboMenu && cg.refdef.width ) {
+   float xscale = ( ( cg.refdef.width / 
cgs.screenXScaleStretch ) / 640.f );
 
-   ( *x ) = ( *x ) * xscale + ( cg.refdef.x / 
cgs.screenXScale );
-   ( *w ) *= xscale;
+   ( *x ) = ( *x ) * xscale + ( cg.refdef.x / 
cgs.screenXScaleStretch );
+   ( *w ) *= xscale;
+   }
// -NERVE - SMF
-   
-   // scale for screen sizes
-   *w *= cgs.screenXScale;
-   *x *= cgs.screenXScale;
-   } else {
+
// scale for screen sizes
*w *= cgs.screenXScale;
*x *= cgs.screenXScale;
@@ -123,21 +130,29 @@ void CG_AdjustFrom640( float *x, float *y, float *w, 
float *h ) {
}
 
if (cg_verticalPlacement == PLACE_STRETCH) {
+   // NERVE - SMF - hack to make images display properly 
in small view / limbo mode
+   if ( cg.limboMenu && cg.refdef.width ) {
+   float yscale = ( ( cg.refdef.height / 
cgs.screenYScaleStretch ) / 480.f );
+
+   ( *y ) = ( *y ) * yscale + ( cg.refdef.y / 
cgs.screenYScaleStretch );
+   ( *h ) *= yscale;
+   }
+   // -NERVE - SMF
+
  

[iortcw] 460/497: MP: Fix cinematics and some scaling issues

2016-09-21 Thread Simon McVittie
This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 5206fd503207eb5160040e750cbb1502f486f0fc
Author: MAN-AT-ARMS 
Date:   Sun Dec 6 09:51:32 2015 -0500

MP: Fix cinematics and some scaling issues
---
 MP/code/cgame/cg_draw.c   | 21 +++-
 MP/code/cgame/cg_drawtools.c  | 47 +++
 MP/code/cgame/cg_scoreboard.c |  8 +-
 MP/code/cgame/cg_view.c   |  4 +++
 MP/code/ui/ui_main.c  | 57 ++-
 SP/code/cgame/cg_draw.c   |  8 +++---
 6 files changed, 106 insertions(+), 39 deletions(-)

diff --git a/MP/code/cgame/cg_draw.c b/MP/code/cgame/cg_draw.c
index 49023c4..6a856cc 100644
--- a/MP/code/cgame/cg_draw.c
+++ b/MP/code/cgame/cg_draw.c
@@ -3880,20 +3880,17 @@ void CG_DrawActive( stereoFrame_t stereoView ) {
w = LIMBO_3D_W;
h = LIMBO_3D_H;
 
+   if ( cg_fixedAspect.integer ) { //FIXME:MAN-AT-ARMS...Use 
correct view
+   CG_SetScreenPlacement(PLACE_CENTER, PLACE_CENTER);
+   }
+
cg.refdef.width = 0;
-   if ( cg_fixedAspect.integer == 2 ) { //FIXME:MAN-AT-ARMS...Use 
correct view
-   cg.refdef.x = LIMBO_3D_X * cgs.screenXScaleStretch;
-   cg.refdef.y = LIMBO_3D_Y * cgs.screenYScaleStretch;
-   cg.refdef.width = LIMBO_3D_W * cgs.screenXScaleStretch;
-   cg.refdef.height = LIMBO_3D_H * cgs.screenYScaleStretch;
-   } else {
-   CG_AdjustFrom640( &x, &y, &w, &h );
+   CG_AdjustFrom640( &x, &y, &w, &h );
 
-   cg.refdef.x = x;
-   cg.refdef.y = y;
-   cg.refdef.width = w;
-   cg.refdef.height = h;
-   }
+   cg.refdef.x = x;
+   cg.refdef.y = y;
+   cg.refdef.width = w;
+   cg.refdef.height = h;
}
// -NERVE - SMF
 
diff --git a/MP/code/cgame/cg_drawtools.c b/MP/code/cgame/cg_drawtools.c
index 21c9b79..0a6d230 100644
--- a/MP/code/cgame/cg_drawtools.c
+++ b/MP/code/cgame/cg_drawtools.c
@@ -96,21 +96,28 @@ void CG_AdjustFrom640( float *x, float *y, float *w, float 
*h ) {
 
if ( cg_fixedAspect.integer ) {
if (cg_horizontalPlacement == PLACE_STRETCH) {
+   // NERVE - SMF - hack to make images display properly 
in small view / limbo mode
+   if ( cg.limboMenu && cg.refdef.width ) {
+   float xscale = ( ( cg.refdef.width / 
cgs.screenXScaleStretch ) / 640.f );
+
+   ( *x ) = ( *x ) * xscale + ( cg.refdef.x / 
cgs.screenXScaleStretch );
+   ( *w ) *= xscale;
+   }
+   // -NERVE - SMF
+
// scale for screen sizes (not aspect correct in wide 
screen)
*w *= cgs.screenXScaleStretch;
*x *= cgs.screenXScaleStretch;
-   } else if ( cg.limboMenu && cg.refdef.width ) {
+   } else {
// NERVE - SMF - hack to make images display properly 
in small view / limbo mode
-   float xscale = ( ( cg.refdef.width / cgs.screenXScale ) 
/ 640.f );
+   if ( cg.limboMenu && cg.refdef.width ) {
+   float xscale = ( ( cg.refdef.width / 
cgs.screenXScaleStretch ) / 640.f );
 
-   ( *x ) = ( *x ) * xscale + ( cg.refdef.x / 
cgs.screenXScale );
-   ( *w ) *= xscale;
+   ( *x ) = ( *x ) * xscale + ( cg.refdef.x / 
cgs.screenXScaleStretch );
+   ( *w ) *= xscale;
+   }
// -NERVE - SMF
-   
-   // scale for screen sizes
-   *w *= cgs.screenXScale;
-   *x *= cgs.screenXScale;
-   } else {
+
// scale for screen sizes
*w *= cgs.screenXScale;
*x *= cgs.screenXScale;
@@ -123,21 +130,29 @@ void CG_AdjustFrom640( float *x, float *y, float *w, 
float *h ) {
}
 
if (cg_verticalPlacement == PLACE_STRETCH) {
+   // NERVE - SMF - hack to make images display properly 
in small view / limbo mode
+   if ( cg.limboMenu && cg.refdef.width ) {
+   float yscale = ( ( cg.refdef.height / 
cgs.screenYScaleStretch ) / 480.f );
+
+   ( *y ) = ( *y ) * yscale + ( cg.refdef.y / 
cgs.screenYScaleStretch );
+   ( *h ) *= yscale;
+   }
+   // -NERVE - SMF
+