# HG changeset patch # User Ritor1 # Date 1369427006 -21600 # Node ID 6b34a45a39834c5deb7eb4b5d972ff5426369590 # Parent 22a42961d349a73120ae8e82300b077c85ef2445 m diff -r 22a42961d349 -r 6b34a45a3983 Arcomage.cpp --- a/Arcomage.cpp Fri May 24 23:34:00 2013 +0600 +++ b/Arcomage.cpp Sat May 25 02:23:26 2013 +0600 @@ -1602,7 +1602,7 @@ while ( v2 ); v0 += 47; } - while ( (signed int)v0 < (signed int)&pArcomageGame->msg.pt.y ); + while ( (signed int)v0 < 2 );//(signed int)&pArcomageGame->msg.pt.y ); v4 = 0; do { @@ -1616,7 +1616,7 @@ *v7 = 1; dword_505314[v4] = dword_505554[v6]; result = byte_5054E8[v6]; - array_4FAC10[9].field_4[v4++ + 4232] = result; + array_4FAC10[9].field_4[v4++ + 4232] = result;//затирает pArcomageGame } while ( v4 < 108 ); dword_4FABC8 = 0; @@ -5801,7 +5801,7 @@ v5->_40DFD1(); ++v5; } - while ( (signed int)v5 < (signed int)&unk_5052C8 ); + while ( (signed int)v5 < 10 );//(signed int)&unk_5052C8 ); dword_4FABBC = -1; amuint_4FAA4C = -1; byte_4FAA74 = 0; diff -r 22a42961d349 -r 6b34a45a3983 Player.cpp --- a/Player.cpp Fri May 24 23:34:00 2013 +0600 +++ b/Player.cpp Sat May 25 02:23:26 2013 +0600 @@ -5828,7 +5828,7 @@ v58 = v56 & 0x3F; for ( j = 0; j < (signed int)v57; ++j ) { - if ( lvl_avl[i] ) + if ( lvl_avl[j] ) v70 += v58; } } diff -r 22a42961d349 -r 6b34a45a3983 Vis.cpp --- a/Vis.cpp Fri May 24 23:34:00 2013 +0600 +++ b/Vis.cpp Sat May 25 02:23:26 2013 +0600 @@ -27,7 +27,7 @@ //----- (004C1026) -------------------------------------------------------- -Vis_ObjectInfo *Vis::DetermineFacetIntersection(BLVFace *face, unsigned int a3, float pick_depth) +Vis_ObjectInfo *Vis::DetermineFacetIntersection(BLVFace *face, unsigned int pid, float pick_depth) { char *v4; // eax@4 signed int v5; // ecx@4 @@ -60,7 +60,7 @@ } else if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) { - uint bmodel_id = a3 >> 9; + uint bmodel_id = pid >> 9; auto v = (Vec3_int_ *)pOutdoor->pBModels[bmodel_id].pVertices.pVertices; for (uint i = 0; i < face->uNumVertices; ++i) { @@ -98,7 +98,7 @@ if (!static_DetermineFacetIntersection_stru_F8FE00.uNumPointers) return nullptr; - if (!static_DetermineFacetIntersection_stru_F8FE00.sub_4C2551(2, a3)) + if (!static_DetermineFacetIntersection_stru_F8FE00.sub_4C2551(2, pid)) return nullptr; if (static_DetermineFacetIntersection_stru_F8FE00.uNumPointers) @@ -902,33 +902,29 @@ } //----- (004C2551) -------------------------------------------------------- -Vis_ObjectInfo *Vis_SelectionList::sub_4C2551(int a2, int a3) +Vis_ObjectInfo *Vis_SelectionList::sub_4C2551(int pVisObjectType, int pid) { - unsigned int v3; // esi@1 + //unsigned int v3; // esi@1 signed int v4; // edx@1 - char *v5; // eax@2 - Vis_ObjectInfo *result; // eax@6 + //char *v5; // eax@2 + //Vis_ObjectInfo *result; // eax@6 - v3 = this->uNumPointers; + //v3 = this->uNumPointers; v4 = 0; - if ( (signed int)v3 <= 0 ) - { -LABEL_6: - result = 0; - } + if ( this->uNumPointers <= 0 ) + return false; else { - v5 = (char *)&this->object_pool[0].sZValue; - while ( *((int *)v5 + 1) != a2 || (*(int *)v5 & 0xFFFF) != a3 ) + //v5 = (char *)&this->object_pool[0].sZValue; + while ( this->object_pool[v4].object_type != pVisObjectType || (this->object_pool[v4].sZValue & 0xFFFF) != pid ) { ++v4; - v5 += 12; - if ( v4 >= (signed int)v3 ) - goto LABEL_6; + //v5 += 12; + if ( v4 >= this->uNumPointers ) + return false; } - result = &this->object_pool[v4]; + return &this->object_pool[v4]; } - return result; } //----- (004C2591) -------------------------------------------------------- @@ -973,26 +969,26 @@ void Vis::sort_object_pointers(Vis_ObjectInfo **pPointers, int left, int right) { //int v4; // edx@1 - int v5; // ebx@1 + //int v5; // ebx@1 int v6; // esi@2 signed int i; // ecx@2 int v8; // eax@3 int v9; // ebx@4 int v10; // ebx@6 Vis_ObjectInfo *v11; // eax@7 - Vis *thisa; // [sp+4h] [bp-4h]@1 + //Vis *thisa; // [sp+4h] [bp-4h]@1 Vis_ObjectInfo *a3a; // [sp+14h] [bp+Ch]@2 //v4 = left; - v5 = right; - thisa = this; + //v5 = right; + //thisa = this; if ( right > left ) { do { v6 = left - 1; - a3a = pPointers[v5]; - for ( i = v5; ; pPointers[i] = v11 ) + a3a = pPointers[right]; + for ( i = right; ; pPointers[i] = v11 ) { v8 = a3a->sZValue; LOWORD(v8) = 0; @@ -1017,7 +1013,7 @@ break; pPointers[v6] = pPointers[i]; } - v5 = right; + //v5 = right; pPointers[v6] = pPointers[right]; pPointers[right] = v11; sort_object_pointers(pPointers, left, v6 - 1);