Mercurial > mm7
diff mm7_2.cpp @ 442:a812665688e4
Merge
author | Nomad |
---|---|
date | Sun, 24 Feb 2013 15:22:03 +0200 |
parents | acd8fa960c32 4946b3ed74be |
children | c0ab5f64b37b 197461e5acec |
line wrap: on
line diff
--- a/mm7_2.cpp Sun Feb 24 15:21:24 2013 +0200 +++ b/mm7_2.cpp Sun Feb 24 15:22:03 2013 +0200 @@ -961,7 +961,7 @@ if ( v2 <= 41 ) { v4 = word_4F0576[v2]; - v9 = 22; + v9 = 22; //misc goto LABEL_12; } if ( v2 <= 53 ) @@ -969,19 +969,19 @@ if ( v1 >= 6 ) { v4 = word_4F0578[v2]; - v9 = 45; + v9 = 45; //reagent LABEL_12: v5 = v9; LABEL_13: - pItemsTable->GenerateItem(v4, v5, (ItemGen *)&pParty->field_777C[9 * (v1 + 12 * v2)]); + pItemsTable->GenerateItem(v4, v5, (ItemGen *)&pParty->field_777C[v2][v1]);//9 * (v1 + 12 * v2)]); v0 = window_SpeakInHouse; - pParty->field_777C[9 * (v1 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 5] = 1; + pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v1].uAttributes = 1; //identified goto LABEL_14; } - auto _t = (ItemGen *)&pParty->field_777C[9 * (v1 + 12 * v2)]; + auto _t = (ItemGen *)&pParty->field_777C[v2][v1]; _t->Reset(); v0 = window_SpeakInHouse; - pParty->field_777C[9 * (v1 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] = 220; + pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v1].uItemID = 220; //potion bottle } LABEL_14: v2 = (signed int)v0->ptr_1C; @@ -1491,7 +1491,8 @@ v109 = 0; do { - if ( pParty->field_777C[9 * (int)&v48[3 * (unsigned int)window_SpeakInHouse->ptr_1C]] ) + // if ( pParty->field_777C[9 * (int)&v48[3 * (unsigned int)window_SpeakInHouse->ptr_1C]] ) + if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][(int)v48].uItemID); { v49 = word_F8B158[(signed int)v48]; v50 = dword_F8B168[(signed int)v48]; @@ -1516,7 +1517,8 @@ v108 = 0; do { - if ( pParty->field_C59C[9 * (int)&v109[3 * (unsigned int)window_SpeakInHouse->ptr_1C] + 724] ) + // if ( pParty->field_C59C[9 * (int)&v109[3 * (unsigned int)window_SpeakInHouse->ptr_1C] + 724] ) + if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v109].uItemID) { v52 = word_F8B158[(signed int)v109] + 30; v53 = dword_F8B168[(signed int)v109]; @@ -1542,7 +1544,7 @@ v106.x = 0; do { - if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) + if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID);//9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) ++v106.x; ++v55; } @@ -1552,7 +1554,8 @@ { do { - if ( pParty->field_C59C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + // if ( pParty->field_C59C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID) ++v106.x; ++v55; } @@ -1581,10 +1584,10 @@ v60 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1; v106.x = v60; v61 = (int)window_SpeakInHouse->ptr_1C; - v62 = 9 * (v60 + 12 * v61); - v63 = (ItemGen *)&pParty->field_777C[v62]; + // v62 = 9 * (v60 + 12 * v61); + v63 = (ItemGen *)&pParty->field_777C[(int)v61][v60]; if ( dword_F8B19C != 2 ) - v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; + v63 = &pParty->Recipes_Item[(int)v61][v60];//v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; if ( !v56 || !Str ) { v85 = 0; @@ -2029,7 +2032,8 @@ { do { - if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) + // if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) + if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID); { v46 = dword_F8B168[v114]; v47 = 152 - v46->uTextureHeight; @@ -2059,7 +2063,8 @@ v114 = 0; do { - if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] ) + // if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] ) + if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v114+1].uItemID); { v50 = dword_F8B168[v114 + 6]; v51 = 308 - v50->uTextureHeight; @@ -2091,7 +2096,8 @@ { do { - if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + //if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID) { v54 = dword_F8B168[v114]; v55 = 152 - v54->uTextureHeight; @@ -2121,7 +2127,8 @@ v114 = 0; do { - if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 778] ) + // if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 778] ) //weak + if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v114].uItemID) //not itemid { v58 = dword_F8B168[v114 + 6]; v59 = 308 - v58->uTextureHeight; @@ -2158,7 +2165,8 @@ { do { - if ( pParty->field_777C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) + // if ( pParty->field_777C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) + if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID); ++v109; ++v62; } @@ -2168,7 +2176,8 @@ { do { - if ( pParty->field_C59C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + //if ( pParty->field_C59C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID) ++v109; ++v62; } @@ -2201,10 +2210,10 @@ v67 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1; v109 = v67; v68 = (int)window_SpeakInHouse->ptr_1C; - v69 = 9 * (v67 + 12 * v68); - v70 = (ItemGen *)&pParty->field_777C[v69]; + // v69 = 9 * (v67 + 12 * v68); + v70 = (ItemGen *)&pParty->field_777C[v68][v67]; if ( dword_F8B19C != 2 ) - v70 = (ItemGen *)&pParty->field_C59C[v69 + 724]; + v70 = &pParty->Recipes_Item[(int)v68][v67];//v70 = (ItemGen *)&pParty->field_C59C[v69 + 724]; if ( !v63 || !Str ) { v93 = 0; @@ -2408,7 +2417,8 @@ v93 = 0; do { - if ( pParty->field_C59C[9 * (v93 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + // if ( pParty->field_C59C[9 * (v93 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v93].uItemID) ++v149; ++v93; } @@ -2423,9 +2433,9 @@ --v149; v96 = window_SpeakInHouse->ptr_1C; v97 = uActiveCharacter - 1; - v98 = (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724]; + // v98 = (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724]; v99 = _this->_490EEE( - (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724], + &pParty->Recipes_Item[(int)v96][v95-1],// (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724], 2, (int)window_SpeakInHouse->ptr_1C, 2); @@ -2439,7 +2449,8 @@ v153 = 0; do { - if ( pParty->field_C59C[9 * (v104 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + //if ( pParty->field_C59C[9 * (v104 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) + if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v104].uItemID) { v105 = dword_F8B168[v104]; if ( v104 >= 4 ) @@ -2626,7 +2637,8 @@ v153 = 0; do { - if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) + // if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) + if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID); { v56 = dword_F8B168[v55]; if ( v55 >= 4 ) @@ -2660,7 +2672,8 @@ v153 = 0; do { - if ( (char *)pParty->field_C59C[9 * (v61 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) + // if ( (char *)pParty->field_C59C[9 * (v61 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) + if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v61].uItemID) { v62 = dword_F8B168[v61]; if ( v61 >= 4 ) @@ -2696,7 +2709,8 @@ { do { - if ( (char *)pParty->field_777C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] != v11 ) + // if ( (char *)pParty->field_777C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] != v11 ) + if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v68].uItemID); ++v149; ++v68; } @@ -2706,7 +2720,8 @@ { do { - if ( (char *)pParty->field_C59C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) + // if ( (char *)pParty->field_C59C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) + if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v68].uItemID) ++v149; ++v68; } @@ -2738,7 +2753,7 @@ if ( dword_F8B19C == 2 ) v77 = (ItemGen *)&pParty->field_777C[v76]; else - v77 = (ItemGen *)&pParty->field_C59C[v76 + 724]; + v77 = &pParty->Recipes_Item[(int)75][v74-1];//(ItemGen *)&pParty->field_C59C[v76 + 724]; if ( v69 == (short)v11 || Str == v11 ) { v124 = (__int64 *)v11; @@ -4215,7 +4230,7 @@ { do { - v45 = pParty->field_777C[9 * (v43 + 12 * (int)v42)]; + v45 = pParty->field_777C[(int)v42][v43].uItemID; if ( v45 ) { v46 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v45].pIconName, TEXTURE_16BIT_PALETTE); @@ -4238,7 +4253,8 @@ { do { - if ( pParty->field_777C[9 * (v48 + 12 * (int)v47)] ) + // if ( pParty->field_777C[9 * (v48 + 12 * (int)v47)] ) + if ( pParty->field_777C[(int)v47][v48].uItemID); { v49 = rand(); v8 = window_SpeakInHouse; @@ -4258,7 +4274,8 @@ { do { - v50 = pParty->field_C59C[9 * (v43 + 12 * (int)v42) + 724]; + //v50 = pParty->field_C59C[9 * (v43 + 12 * (int)v42) + 724]; + v50=pParty->Recipes_Item[(unsigned int)v42][(signed int)v43].uItemID; if ( v50 ) { v51 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v50].pIconName, TEXTURE_16BIT_PALETTE); @@ -4281,7 +4298,8 @@ { do { - if ( pParty->field_C59C[9 * (v53 + 12 * (int)v52) + 724] ) + // if ( pParty->field_C59C[9 * (v53 + 12 * (int)v52) + 724] ) + if (pParty->Recipes_Item[(unsigned int)v52][v53].uItemID) { v54 = rand(); v8 = window_SpeakInHouse; @@ -4591,16 +4609,16 @@ if ( !v29 ) return; v30 = window_SpeakInHouse->ptr_1C; - v31 = 9 * (v29 - 1 + 12 * (int)v30); + // v31 = 9 * (v29 - 1 + 12 * (int)v30); if ( dword_F8B19C == 2 ) { - v32 = (ItemGen *)&pParty->field_777C[v31]; - _this = (ItemGen *)&pParty->field_777C[v31]; + v32 = (ItemGen *)&pParty->field_777C[(int)v30][v29]; + _this = (ItemGen *)&pParty->field_777C[(int)v30][v29]; } else { - _this = (ItemGen *)&pParty->field_C59C[v31 + 724]; - v32 = (ItemGen *)&pParty->field_C59C[v31 + 724]; + _this =&pParty->Recipes_Item[(int)v30][v29-1]; //(ItemGen *)&pParty->field_C59C[v31 + 724]; + v32 = &pParty->Recipes_Item[(int)v30][v29-1];//(ItemGen *)&pParty->field_C59C[v31 + 724]; } //v33 = p2DEvents_minus1__20[13 * (signed int)v30]; v33 = p2DEvents[(signed int)v30 - 1].fPriceMultiplier;