diff Vis.cpp @ 834:95d9727412c9

Слияние
author Ritor1
date Wed, 27 Mar 2013 21:24:24 +0600
parents 0f56abdcce94
children ceef50611567 06fc66ceecd6
line wrap: on
line diff
--- a/Vis.cpp	Wed Mar 27 21:24:13 2013 +0600
+++ b/Vis.cpp	Wed Mar 27 21:24:24 2013 +0600
@@ -9,7 +9,7 @@
 #include "Log.h"
 
 #include "mm7_data.h"
-//#include "MM7.h"
+#include "MM7.h"
 
 
 static Vis_SelectionList Vis_static_sub_4C1944_stru_F8BDE8;
@@ -377,7 +377,7 @@
         {
           pGame->pIndoorCameraD3D->ViewTransform(&intersection, 1u);
           int v13 = _48B561_mess_with_scaling_along_z(/*v12, */intersection.vWorldViewPosition.x);
-          v13 += (8 * (j | (i << 6)) | OBJECT_BModel);
+          v13 += PID(OBJECT_BModel, j | (i << 6));
 
           list->AddObject(face, VisObjectType_Face, v13);
         }
@@ -1802,7 +1802,7 @@
   int result; // eax@1
   signed int pFaceID; // esi@2
   BLVFace *pFace; // edi@4
-  unsigned int v7; // eax@6
+  //unsigned int v7; // eax@6
   Vis_ObjectInfo *v8; // eax@6
   signed int i; // [sp+18h] [bp-8h]@1
 
@@ -1819,9 +1819,7 @@
         {
           if ( is_part_of_selection(pFace, filter) )
           {
-            v7 = 8 * pFaceID;
-            LOBYTE(v7) = 8 * pFaceID | OBJECT_BModel;
-            v8 = _4C1026(pFace, v7, pick_depth);
+            v8 = _4C1026(pFace, PID(OBJECT_BModel, pFaceID), pick_depth);
             if ( v8 )
               list->AddObject(v8->object, v8->object_type, v8->sZValue);
           }
@@ -1853,7 +1851,7 @@
         BLVFace blv_face;
         blv_face.FromODM(face);
 
-        int pid = 8 * (j | (i << 6)) | OBJECT_BModel;
+        int pid = PID(OBJECT_BModel, j | (i << 6));
         if (auto object_info = _4C1026(&blv_face, pid, pick_depth))
           list->AddObject(object_info->object, object_info->object_type, object_info->sZValue);
       }