diff mm7_5.cpp @ 1545:c4ab816fcc5e

assert, Abortf, AbortWithError -> Assert, Error refactors here and there
author Nomad
date Sat, 07 Sep 2013 20:05:20 +0200
parents d023247ae118
children 9a6567c6c76c
line wrap: on
line diff
--- a/mm7_5.cpp	Sat Sep 07 15:20:57 2013 +0200
+++ b/mm7_5.cpp	Sat Sep 07 20:05:20 2013 +0200
@@ -2,8 +2,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #endif
 
-#include <assert.h>
-
 #include "Texture.h"
 #include "mm7_data.h"
 #include "VideoPlayer.h"
@@ -4674,8 +4672,8 @@
   int v21; // edi@20
   signed int v22; // eax@22
   signed __int64 v23; // qtt@22
-  bool result; // eax@25
-  int v25; // [sp+14h] [bp-8h]@14
+  //bool result; // eax@25
+  //int v25; // [sp+14h] [bp-8h]@14
   int a4a; // [sp+28h] [bp+Ch]@2
   signed int a5a; // [sp+2Ch] [bp+10h]@14
 
@@ -4725,23 +4723,24 @@
     {
 	  if( dword_4F5BF4_xs[i + 2] >= a4a || dword_4F5BF4_xs[i] >= a4a)
       {
-		  if ( (dword_4F5BF4_xs[i + 2] >= a4a && dword_4F5BF4_xs[i + 1] >= a4a)
-          || (v25 = dword_4F5BF4_xs[i + 2] - dword_4F5BF4_xs[i + 1],
-              LODWORD(v23) = v25 << 16,
-              HIDWORD(v23) = v25 >> 16,
-              dword_4F5BF4_xs[i + 1]
-            + ((signed int)(((unsigned __int64)(v23
-                                              / (dword_4F5B24_ys[i + 2] - dword_4F5B24_ys[i + 1])
-                                              * ((a3 - dword_4F5B24_ys[i + 1]) << 16)) >> 16)
-                          + 32768) >> 16) >= a4a) )
-          ++a5a;
+		  if (dword_4F5BF4_xs[i + 2] >= a4a && dword_4F5BF4_xs[i + 1] >= a4a)
+            ++a5a;
+          else
+          {
+              v23 = (__int64)(dword_4F5BF4_xs[i + 2] - dword_4F5BF4_xs[i + 1]) << 16;
+              __int64 _a = dword_4F5B24_ys[i + 2] - dword_4F5B24_ys[i + 1];
+              __int64 _b = (__int64)(a3 - dword_4F5B24_ys[i + 1]) << 16;
+
+              if (dword_4F5BF4_xs[i + 1] + ((((v23 / _a * _b) >> 16) + 32768) >> 16) >= a4a)
+                ++a5a;
+          }
 	  }
     }
   }
-  result = 1;
+
   if ( a5a != 1 )
-    result = 0;
-  return result;
+    return false;
+  return true;
 
 }