changeset 1048:d36681a9e4f8

Слияние
author Ritor1
date Thu, 23 May 2013 11:17:01 +0600
parents 76ce871b0076 (diff) 0744f8665045 (current diff)
children efe228ab5003
files Player.cpp Vis.cpp mm7_1.cpp mm7_5.cpp
diffstat 4 files changed, 5 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/Player.cpp	Thu May 23 08:27:15 2013 +0400
+++ b/Player.cpp	Thu May 23 11:17:01 2013 +0600
@@ -7359,8 +7359,6 @@
 
     }
 
-
-
 //----- (00449BB4) --------------------------------------------------------
 bool Player::CompareVariable( enum VariableType VarNum, signed int pValue )
 {
--- a/Vis.h	Thu May 23 08:27:15 2013 +0400
+++ b/Vis.h	Thu May 23 11:17:01 2013 +0600
@@ -111,9 +111,9 @@
   int get_object_zbuf_val(Vis_ObjectInfo *info);
   int get_picked_object_zbuf_val();
   bool Intersect_Ray_Face(struct RenderVertexSoft *pRayStart, struct RenderVertexSoft *pRayEnd, float *pDepth, RenderVertexSoft *Intersection, BLVFace *pFace, unsigned int pBModelID);
-  bool _4C1D2B(BLVFace *pFace, Vec3_short_ a2, unsigned int uModelID);
+  bool IntersectBModel_sub(BLVFace *pFace, Vec3_short_ IntersectPoint, unsigned int uModelID);
   bool _4C1EE5_BLV_IntersectBModel_2(int *a1, int *a2, __int16 *a3, __int16 *a4, Vec3_short_ *a5, BLVFace *pFace);
-  bool _4C2186_BLV_IntersectBModel(BLVFace *pFace, unsigned int ModelID, __int16 *displaced_face_intersect_plane_coords_a, __int16 *displaced_face_intersect_plane_coords_b, Vec3_short_ *a5, BLVFace *face, unsigned int uModelID);
+  bool _4C2186_BLV_IntersectBModel(BLVFace *pFace, unsigned int ModelID, __int16 *displaced_face_intersect_plane_coords_a, __int16 *displaced_face_intersect_plane_coords_b, Vec3_short_ *IntersectPoint, BLVFace *face, unsigned int uModelID);
   void CastPickRay(RenderVertexSoft *pRay, float fMouseX, float fMouseY, float fPickDepth);
   void sort_object_pointers(Vis_ObjectInfo **pPointers, int left, int right);
   bool SortVerticesByX(struct RenderVertexD3D3 *a2, unsigned int uStart, unsigned int uEnd);
--- a/mm7_1.cpp	Thu May 23 08:27:15 2013 +0400
+++ b/mm7_1.cpp	Thu May 23 11:17:01 2013 +0600
@@ -895,9 +895,7 @@
   POINT a2; // [sp+84h] [bp-8h]@3
 
   if ( pRenderer->pRenderD3D )
-  {
     v0 = pGame->pVisInstance->get_picked_object_zbuf_val();
-  }
   else
   {
     v1 = pMouse->GetCursorPos(&a2);
@@ -908,9 +906,7 @@
   {
     a2.y = (signed int)(unsigned __int16)v0 >> 3;
     v21 = (signed int)(unsigned __int16)v0 >> 3;
-    if ( !(pObjectList->pObjects[pSpriteObjects[v21].uObjectDescID].uFlags & 0x10)
-      && a2.y < 1000
-      && pSpriteObjects[v21].uObjectDescID
+    if ( !(pObjectList->pObjects[pSpriteObjects[v21].uObjectDescID].uFlags & 0x10) && a2.y < 1000 && pSpriteObjects[v21].uObjectDescID
       && (unsigned int)v0 < 0x2000000 )
     {
       v22 = &pSpriteObjects[v21].stru_24;
@@ -994,9 +990,7 @@
 			v6 = 0;
 			a1.uType = v5;
 			if ( (signed int)pObjectList->uNumObjects <= 0 )
-			{
 				LOWORD(v6) = 0;
-			}
 			else
 			{
 				v7 = (char *)&pObjectList->pObjects->uObjectID;
@@ -1019,10 +1013,7 @@
 			a1.uSoundID = 0;
 			a1.uFacing = 0;
 			a1.uAttributes = 8;
-			a1.uSectorID = pIndoor->GetSector(
-								pParty->vPosition.x,
-								pParty->vPosition.y,
-								pParty->sEyelevel + pParty->vPosition.z);
+			a1.uSectorID = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->sEyelevel + pParty->vPosition.z);
 			a1.uSpriteFrameID = 0;
 			memcpy(&a1.stru_24, &pParty->pPickedItem, 0x24u);
 
--- a/mm7_5.cpp	Thu May 23 08:27:15 2013 +0400
+++ b/mm7_5.cpp	Thu May 23 11:17:01 2013 +0600
@@ -5342,28 +5342,14 @@
 //----- (0043AA99) --------------------------------------------------------
 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz)
 {
-/*  int v7; // ebx@1
-  int v8; // ST14_4@1
-  int v9; // edi@1
-  int anglea; // [sp+20h] [bp+8h]@1
-
-  v7 = sRotX;
-  v8 = sDepth;
-  v9 = sRotY;
-  anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16;
-  *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY) * (signed __int64)anglea) >> 16);
-  *outy = v.y + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY - stru_5C6E00->uIntegerHalfPi) * (signed __int64)anglea) >> 16);
-  *outz = v.z + ((unsigned __int64)(stru_5C6E00->SinCos(sRotX - stru_5C6E00->uIntegerHalfPi) * (signed __int64)sDepth) >> 16);*/
-
  float cosf_x = cosf(3.14159265f * sRotX / 1024.0f),
        sinf_x = sinf(3.14159265f * sRotX / 1024.0f),
        cosf_y = cosf(3.14159265f * sRotY / 1024.0f),
        sinf_y = sinf(3.14159265f * sRotY / 1024.0f);
- //sDepth = 14000000;
+
  *outx = v.x + ((unsigned __int64)(sinf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16)));
  *outy = v.y + ((unsigned __int64)(cosf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16)));
  *outz = v.z + ((unsigned __int64)(sinf_x * (signed __int64)sDepth) >> 16);
-
 }
 
 //----- (0043AB61) --------------------------------------------------------