[rott-commits] r281 - trunk/rott
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Feb 11 04:18:02 EST 2015
Author: fabian
Date: 2015-02-11 04:18:02 -0500 (Wed, 11 Feb 2015)
New Revision: 281
Modified:
trunk/rott/rt_scale.c
trunk/rott/rt_view.c
Log:
Fix scaling of the weapon sprite
Modified: trunk/rott/rt_scale.c
===================================================================
--- trunk/rott/rt_scale.c 2015-02-11 09:17:36 UTC (rev 280)
+++ trunk/rott/rt_scale.c 2015-02-11 09:18:02 UTC (rev 281)
@@ -861,7 +861,7 @@
return; // off the left side
dc_iscale=0xffffffffu/(unsigned)dc_invscale;
- dc_texturemid=(((p->origsize>>1)+p->topoffset)<<SFRACBITS)+(SFRACUNIT>>1);
+ dc_texturemid=(((p->origsize>>1)+p->topoffset)<<SFRACBITS)+(SFRACUNIT>>2);
sprtopoffset=(centeryclipped<<16) - FixedMul(dc_texturemid,dc_invscale);
//
Modified: trunk/rott/rt_view.c
===================================================================
--- trunk/rott/rt_view.c 2015-02-11 09:17:36 UTC (rev 280)
+++ trunk/rott/rt_view.c 2015-02-11 09:18:02 UTC (rev 281)
@@ -386,19 +386,12 @@
// SetTextMode ( );
// viewheight=viewheight;
height = viewheight;
- if ( height > 168 )
+ if ( height > 168*iGLOBAL_SCREENHEIGHT/200 )
{
// Prevent weapon from being scaled too big
- height = 168;
- if ( iGLOBAL_SCREENWIDTH == 640) {
- height = 260;
- }else if ( iGLOBAL_SCREENWIDTH == 800) {
- height = 360;
- }
+ height = 168*iGLOBAL_SCREENHEIGHT/200;
}
- if ((G_weaponscale > 150)&&(G_weaponscale <600)){height = G_weaponscale;}
- if ( iGLOBAL_SCREENWIDTH == 320) {G_weaponscale=G_weaponscale/2;}
weaponscale = ( height << 16 ) / 168;//( height << 16 ) = 170 * 65536
More information about the rott-commits
mailing list