shithub: rott

Download patch

ref: dc50fad6647c96c7b21810a037e67ed69ade258e
parent: 6504274b40c5543755558a9013cdf4dc4815d579
author: LTCHIPS <ltchips994@gmail.com>
date: Thu May 10 13:35:42 EDT 2018

made w and h calculations in rotate scale be absolute value

--- a/rott/modexlib.c
+++ b/rott/modexlib.c
@@ -1046,9 +1046,9 @@
         
     SDL_Rect output;
     
-    output.w = (int)((float)w * scale);
+    output.w = abs((int)((float)w * scale));
     
-    output.h = (int)((float)h * scale);
+    output.h = abs((int)((float)h * scale));
                
     output.x = (iGLOBAL_SCREENWIDTH - output.w)>>1;
         
--- a/rott/rt_draw.c
+++ b/rott/rt_draw.c
@@ -3424,11 +3424,7 @@
         
         //printf("factor: %f \n", factor);
         
-        x = abs((int)((float) iGLOBAL_SCREENWIDTH * factor));
-        
-        y = abs((int)((float) (iGLOBAL_SCREENHEIGHT * factor)));
-        
-        DoScreenRotateScale(x, y, newTex, angle, factor);
+        DoScreenRotateScale(iGLOBAL_SCREENWIDTH, iGLOBAL_SCREENHEIGHT, newTex, angle, factor);
         
         scale+=(scalestep);
         if (angle < endAngle)