diff mm7_3.cpp @ 774:c319601893af

Слияние
author Ritor1
date Sun, 24 Mar 2013 00:32:13 +0600
parents fbae3100f991 67b77b052ef3
children d170f23f70d1 b27dd658ea77
line wrap: on
line diff
--- a/mm7_3.cpp	Sun Mar 24 00:31:56 2013 +0600
+++ b/mm7_3.cpp	Sun Mar 24 00:32:13 2013 +0600
@@ -3046,20 +3046,14 @@
       if ( !v107
         && !(BYTE1(pOutdoor->pBModels[pParty->field_6F4_packedid >> 9].pFaces[(pParty->field_6F4_packedid >> 3) & 0x3F].uAttributes) & 0x20) )
       {
-        v96 = 0;
-        v94 = 0;
-        v92 = 0;
-        v91 = 0;
+        
         v90 = -1;
         v89 = 1;
         v88 = 804;
         v87 = 64;
         goto LABEL_257;
       }
-      v96 = 0;
-      v94 = 0;
-      v92 = 0;
-      v91 = 0;
+     
       v90 = -1;
       v89 = 1;
       v88 = 804;
@@ -3067,7 +3061,7 @@
 LABEL_255:
       v63 = WorldPosToGridCellZ(pParty->vPosition.y) - 1;
       v64 = WorldPosToGridCellX(pParty->vPosition.x);
-      v87 = pOutdoor->_47EE49(v64, v63, v86);
+      v87 = pOutdoor->GetSoundIdByPosition(v64, v63, v86);
       goto LABEL_257;
     }
     if ( v124 && (!bJumping || v101) )
@@ -3075,26 +3069,19 @@
       if ( v107
         || BYTE1(pOutdoor->pBModels[pParty->field_6F4_packedid >> 9].pFaces[(pParty->field_6F4_packedid >> 3) & 0x3F].uAttributes) & 0x20 )
       {
-        v96 = 0;
-        v94 = 0;
-        v92 = 0;
-        v91 = 0;
+        
         v90 = -1;
         v89 = 1;
         v88 = 804;
         v86 = 0;
         goto LABEL_255;
       }
-      v96 = 0;
-      v94 = 0;
-      v92 = 0;
-      v91 = 0;
       v90 = -1;
       v89 = 1;
       v88 = 804;
       v87 = 103;
 LABEL_257:
-      pAudioPlayer->PlaySound((SoundID)v87, v88, v89, v90, v91, v92, v94, v96);
+      pAudioPlayer->PlaySound((SoundID)v87, v88, v89, v90, 0, 0, 0, 0);
     }
     else
     {
@@ -6686,7 +6673,7 @@
   {
     v4 = (MapInfo *)thisa;
   }
-  day_attrib &= 0xFFFFFFFEu;
+  day_attrib &= ~DAY_ATTRIB_FOG;
   dword_6BE13C_uCurrentlyLoadedLocationID = v2;
   pOutdoor->Initialize(
     pFilename,
@@ -6825,7 +6812,7 @@
     return PaletteManager::Get(a2);
   if ( !pWeather->bNight )
   {
-    if ( day_attrib & 1 )
+    if (day_attrib & DAY_ATTRIB_FOG)
     {
       v14 = day_fogrange_1 << 16;
       if ( a3 >= day_fogrange_1 << 16 )
@@ -6958,7 +6945,7 @@
     v10 = 0;
   if ( !v10 )
   {
-    if ( !(day_attrib & 1) && !bUnderwater )
+    if ( !(day_attrib & DAY_ATTRIB_FOG) && !bUnderwater )
     {
       v14 = a5;
       v15 = a6;
@@ -7233,13 +7220,13 @@
 
   if ( bUnderwater )
   {
-    result = 0xFF258F5Cu;
-  }
-  else
-  {
-    if ( day_attrib & 1 )
-    {
-      if ( pWeather->bNight )
+    result = 0xFF258F5C;
+  }
+  else
+  {
+    if (day_attrib & DAY_ATTRIB_FOG)
+    {
+      if ( pWeather->bNight ) // night-time fog
       {
         __debugbreak(); // decompilation can be inaccurate, please  send savegame to Nomad
         v2 = -(pWeather->bNight != 1);
@@ -7252,9 +7239,7 @@
       }
     }
     else
-    {
-      result = 0;
-    }
+      return 0;
   }
   return result;
 }
@@ -7277,7 +7262,7 @@
   v3 = pWeather->bNight;
   if ( bUnderwater == 1 )
     v3 = 0;
-  if ( pParty->armageddon_timer || !(day_attrib & 1) && !bUnderwater )
+  if ( pParty->armageddon_timer || !(day_attrib & DAY_ATTRIB_FOG) && !bUnderwater )
     return 0xFF000000;
   if ( v3 )
   {