# HG changeset patch # User Ritor1 # Date 1369286221 -21600 # Node ID d36681a9e4f8273f1519737c15a64e4a86323f86 # Parent 76ce871b0076c0ec66715b778b6f7ec3fb8673ff# Parent 0744f86650459f6d2bc8cc185a4d5a3a5b395a56 Слияние diff -r 0744f8665045 -r d36681a9e4f8 Player.cpp --- 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 ) { diff -r 0744f8665045 -r d36681a9e4f8 Vis.cpp diff -r 0744f8665045 -r d36681a9e4f8 Vis.h --- 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); diff -r 0744f8665045 -r d36681a9e4f8 mm7_1.cpp --- 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); diff -r 0744f8665045 -r d36681a9e4f8 mm7_5.cpp --- 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) --------------------------------------------------------