changeset 1901:781522bf1a07

m
author Ritor1
date Mon, 21 Oct 2013 10:07:23 +0600
parents eb580660bbbb
children 39b6d789cbfc
files mm7_2.cpp mm7_3.cpp
diffstat 2 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_2.cpp	Wed Oct 16 13:34:49 2013 +0200
+++ b/mm7_2.cpp	Mon Oct 21 10:07:23 2013 +0600
@@ -939,18 +939,18 @@
             v21 = _450FB1(((int*)v175)[i]);
           else if(field0value == 16)
             v21 = _450FB1(((_WORD*)v175)[i]);
-          else
+          else if (field0value == 8)
             v21 = _450FB1(((unsigned __int8*)v175)[i]);
           v240 += ((unsigned int)v21 >> 24);
           a6b += BYTE2(v21);
           v252 += BYTE1(v21);
           v251 += (unsigned __int8)v21;
         }
-        if(field0value == 32)
+        if (field0value == 32)
           v175 += 2 * srcPitch;
-        else if(field0value == 16)
+        else if (field0value == 16)
           v175 += srcPitch;   
-        else
+        else if (field0value == 8)
           v175 = (unsigned short*)((char *)v175 + 2 * srcPitch);
       }
       v22 = (unsigned int)v240 / ((heightRatioPlusOne - heightRatio) * (widthRatioPlusOne - widthRatio));
--- a/mm7_3.cpp	Wed Oct 16 13:34:49 2013 +0200
+++ b/mm7_3.cpp	Mon Oct 21 10:07:23 2013 +0600
@@ -5314,7 +5314,10 @@
       v20 = pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uPower;
     v9 = (double)v20 * 1024.0;
     if ( a4 )
-      goto LABEL_19;
+    {
+      v6 = 216;
+      goto LABEL_20;
+    }
     if ( distance <= v9 )
     {
       if ( distance > 0.0 )
@@ -5324,7 +5327,10 @@
         //v6 = LODWORD(v10);
         v6 = floorf(0.5f + distance * 216.0 / v9);
         if (v6 > 216 )
-          goto LABEL_19;
+        {
+          v6 = 216;
+          goto LABEL_20;
+        }
       }
     }
     else
@@ -5340,7 +5346,7 @@
         v6 = 216;
       return (255 - v6) | ((255 - v6) << 16) | ((255 - v6) << 8);
     }
-LABEL_19:
+//LABEL_19:
     v6 = 216;
     goto LABEL_20;
   }