Mercurial > mm7
comparison mm7_2.cpp @ 439:6b8118542175
recipie item
author | Gloval |
---|---|
date | Sun, 24 Feb 2013 14:51:43 +0400 |
parents | 17c90e543e28 |
children | 4946b3ed74be |
comparison
equal
deleted
inserted
replaced
438:17c90e543e28 | 439:6b8118542175 |
---|---|
1514 { | 1514 { |
1515 v109 = 0; | 1515 v109 = 0; |
1516 v108 = 0; | 1516 v108 = 0; |
1517 do | 1517 do |
1518 { | 1518 { |
1519 if ( pParty->field_C59C[9 * (int)&v109[3 * (unsigned int)window_SpeakInHouse->ptr_1C] + 724] ) | 1519 // if ( pParty->field_C59C[9 * (int)&v109[3 * (unsigned int)window_SpeakInHouse->ptr_1C] + 724] ) |
1520 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v109].uItemID) | |
1520 { | 1521 { |
1521 v52 = word_F8B158[(signed int)v109] + 30; | 1522 v52 = word_F8B158[(signed int)v109] + 30; |
1522 v53 = dword_F8B168[(signed int)v109]; | 1523 v53 = dword_F8B168[(signed int)v109]; |
1523 v54 = 60 - ((signed int)v53->uTextureWidth >> 1); | 1524 v54 = 60 - ((signed int)v53->uTextureWidth >> 1); |
1524 pRenderer->DrawTextureTransparent(v54 + v108, word_F8B158[(signed int)v109] + 30, v53); | 1525 pRenderer->DrawTextureTransparent(v54 + v108, word_F8B158[(signed int)v109] + 30, v53); |
1550 } | 1551 } |
1551 else | 1552 else |
1552 { | 1553 { |
1553 do | 1554 do |
1554 { | 1555 { |
1555 if ( pParty->field_C59C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 1556 // if ( pParty->field_C59C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
1557 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID) | |
1556 ++v106.x; | 1558 ++v106.x; |
1557 ++v55; | 1559 ++v55; |
1558 } | 1560 } |
1559 while ( v55 < 6 ); | 1561 while ( v55 < 6 ); |
1560 } | 1562 } |
1582 v106.x = v60; | 1584 v106.x = v60; |
1583 v61 = (int)window_SpeakInHouse->ptr_1C; | 1585 v61 = (int)window_SpeakInHouse->ptr_1C; |
1584 v62 = 9 * (v60 + 12 * v61); | 1586 v62 = 9 * (v60 + 12 * v61); |
1585 v63 = (ItemGen *)&pParty->field_777C[v62]; | 1587 v63 = (ItemGen *)&pParty->field_777C[v62]; |
1586 if ( dword_F8B19C != 2 ) | 1588 if ( dword_F8B19C != 2 ) |
1587 v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; | 1589 v63 = &pParty->Recipes_Item[(int)v61][v60];//v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; |
1588 if ( !v56 || !Str ) | 1590 if ( !v56 || !Str ) |
1589 { | 1591 { |
1590 v85 = 0; | 1592 v85 = 0; |
1591 v83 = 2; | 1593 v83 = 2; |
1592 v81 = window_SpeakInHouse->ptr_1C; | 1594 v81 = window_SpeakInHouse->ptr_1C; |
2089 } | 2091 } |
2090 else | 2092 else |
2091 { | 2093 { |
2092 do | 2094 do |
2093 { | 2095 { |
2094 if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 2096 //if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
2097 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID) | |
2095 { | 2098 { |
2096 v54 = dword_F8B168[v114]; | 2099 v54 = dword_F8B168[v114]; |
2097 v55 = 152 - v54->uTextureHeight; | 2100 v55 = 152 - v54->uTextureHeight; |
2098 if ( (signed int)v55 < 1 ) | 2101 if ( (signed int)v55 < 1 ) |
2099 v55 = 0; | 2102 v55 = 0; |
2119 } | 2122 } |
2120 while ( v114 < 6 ); | 2123 while ( v114 < 6 ); |
2121 v114 = 0; | 2124 v114 = 0; |
2122 do | 2125 do |
2123 { | 2126 { |
2124 if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 778] ) | 2127 // if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 778] ) //weak |
2128 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v114].uItemID) //not itemid | |
2125 { | 2129 { |
2126 v58 = dword_F8B168[v114 + 6]; | 2130 v58 = dword_F8B168[v114 + 6]; |
2127 v59 = 308 - v58->uTextureHeight; | 2131 v59 = 308 - v58->uTextureHeight; |
2128 if ( (signed int)v59 < 1 ) | 2132 if ( (signed int)v59 < 1 ) |
2129 v59 = 0; | 2133 v59 = 0; |
2166 } | 2170 } |
2167 else | 2171 else |
2168 { | 2172 { |
2169 do | 2173 do |
2170 { | 2174 { |
2171 if ( pParty->field_C59C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 2175 //if ( pParty->field_C59C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
2176 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID) | |
2172 ++v109; | 2177 ++v109; |
2173 ++v62; | 2178 ++v62; |
2174 } | 2179 } |
2175 while ( v62 < 12 ); | 2180 while ( v62 < 12 ); |
2176 } | 2181 } |
2202 v109 = v67; | 2207 v109 = v67; |
2203 v68 = (int)window_SpeakInHouse->ptr_1C; | 2208 v68 = (int)window_SpeakInHouse->ptr_1C; |
2204 v69 = 9 * (v67 + 12 * v68); | 2209 v69 = 9 * (v67 + 12 * v68); |
2205 v70 = (ItemGen *)&pParty->field_777C[v69]; | 2210 v70 = (ItemGen *)&pParty->field_777C[v69]; |
2206 if ( dword_F8B19C != 2 ) | 2211 if ( dword_F8B19C != 2 ) |
2207 v70 = (ItemGen *)&pParty->field_C59C[v69 + 724]; | 2212 v70 = &pParty->Recipes_Item[(int)v68][v67];//v70 = (ItemGen *)&pParty->field_C59C[v69 + 724]; |
2208 if ( !v63 || !Str ) | 2213 if ( !v63 || !Str ) |
2209 { | 2214 { |
2210 v93 = 0; | 2215 v93 = 0; |
2211 v91 = 2; | 2216 v91 = 2; |
2212 v89 = window_SpeakInHouse->ptr_1C; | 2217 v89 = window_SpeakInHouse->ptr_1C; |
2406 return; | 2411 return; |
2407 v149 = 0; | 2412 v149 = 0; |
2408 v93 = 0; | 2413 v93 = 0; |
2409 do | 2414 do |
2410 { | 2415 { |
2411 if ( pParty->field_C59C[9 * (v93 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 2416 // if ( pParty->field_C59C[9 * (v93 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
2417 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v93].uItemID) | |
2412 ++v149; | 2418 ++v149; |
2413 ++v93; | 2419 ++v93; |
2414 } | 2420 } |
2415 while ( v93 < 8 ); | 2421 while ( v93 < 8 ); |
2416 if ( v149 ) | 2422 if ( v149 ) |
2421 if ( v149 && v149 != -65536 ) | 2427 if ( v149 && v149 != -65536 ) |
2422 { | 2428 { |
2423 --v149; | 2429 --v149; |
2424 v96 = window_SpeakInHouse->ptr_1C; | 2430 v96 = window_SpeakInHouse->ptr_1C; |
2425 v97 = uActiveCharacter - 1; | 2431 v97 = uActiveCharacter - 1; |
2426 v98 = (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724]; | 2432 // v98 = (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724]; |
2427 v99 = _this->_490EEE( | 2433 v99 = _this->_490EEE( |
2428 (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724], | 2434 &pParty->Recipes_Item[(int)v96][v95-1],// (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724], |
2429 2, | 2435 2, |
2430 (int)window_SpeakInHouse->ptr_1C, | 2436 (int)window_SpeakInHouse->ptr_1C, |
2431 2); | 2437 2); |
2432 v100 = BuilDialogueString((char *)pMerchantsBuyPhrases[v99], v97, v98, (char *)v96, 2, 0); | 2438 v100 = BuilDialogueString((char *)pMerchantsBuyPhrases[v99], v97, v98, (char *)v96, 2, 0); |
2433 v101 = v100; | 2439 v101 = v100; |
2437 } | 2443 } |
2438 v104 = 0; | 2444 v104 = 0; |
2439 v153 = 0; | 2445 v153 = 0; |
2440 do | 2446 do |
2441 { | 2447 { |
2442 if ( pParty->field_C59C[9 * (v104 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 2448 //if ( pParty->field_C59C[9 * (v104 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
2449 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v104].uItemID) | |
2443 { | 2450 { |
2444 v105 = dword_F8B168[v104]; | 2451 v105 = dword_F8B168[v104]; |
2445 if ( v104 >= 4 ) | 2452 if ( v104 >= 4 ) |
2446 { | 2453 { |
2447 v110 = 90 - ((signed int)v105->uTextureWidth >> 1); | 2454 v110 = 90 - ((signed int)v105->uTextureWidth >> 1); |
2658 v11 = 0; | 2665 v11 = 0; |
2659 v61 = 0; | 2666 v61 = 0; |
2660 v153 = 0; | 2667 v153 = 0; |
2661 do | 2668 do |
2662 { | 2669 { |
2663 if ( (char *)pParty->field_C59C[9 * (v61 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) | 2670 // if ( (char *)pParty->field_C59C[9 * (v61 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) |
2671 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v61].uItemID) | |
2664 { | 2672 { |
2665 v62 = dword_F8B168[v61]; | 2673 v62 = dword_F8B168[v61]; |
2666 if ( v61 >= 4 ) | 2674 if ( v61 >= 4 ) |
2667 { | 2675 { |
2668 v67 = 90 - ((signed int)v62->uTextureWidth >> 1); | 2676 v67 = 90 - ((signed int)v62->uTextureWidth >> 1); |
2704 } | 2712 } |
2705 else | 2713 else |
2706 { | 2714 { |
2707 do | 2715 do |
2708 { | 2716 { |
2709 if ( (char *)pParty->field_C59C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) | 2717 // if ( (char *)pParty->field_C59C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) |
2718 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v68].uItemID) | |
2710 ++v149; | 2719 ++v149; |
2711 ++v68; | 2720 ++v68; |
2712 } | 2721 } |
2713 while ( v68 < 6 ); | 2722 while ( v68 < 6 ); |
2714 } | 2723 } |
2736 v75 = (int)window_SpeakInHouse->ptr_1C; | 2745 v75 = (int)window_SpeakInHouse->ptr_1C; |
2737 v76 = 9 * (v74 - 1 + 12 * v75); | 2746 v76 = 9 * (v74 - 1 + 12 * v75); |
2738 if ( dword_F8B19C == 2 ) | 2747 if ( dword_F8B19C == 2 ) |
2739 v77 = (ItemGen *)&pParty->field_777C[v76]; | 2748 v77 = (ItemGen *)&pParty->field_777C[v76]; |
2740 else | 2749 else |
2741 v77 = (ItemGen *)&pParty->field_C59C[v76 + 724]; | 2750 v77 = &pParty->Recipes_Item[(int)75][v74-1];//(ItemGen *)&pParty->field_C59C[v76 + 724]; |
2742 if ( v69 == (short)v11 || Str == v11 ) | 2751 if ( v69 == (short)v11 || Str == v11 ) |
2743 { | 2752 { |
2744 v124 = (__int64 *)v11; | 2753 v124 = (__int64 *)v11; |
2745 v122 = 2; | 2754 v122 = 2; |
2746 v120 = window_SpeakInHouse->ptr_1C; | 2755 v120 = window_SpeakInHouse->ptr_1C; |
4256 { | 4265 { |
4257 if ( _4F063C_smthn_by_2da_uType[v44] ) | 4266 if ( _4F063C_smthn_by_2da_uType[v44] ) |
4258 { | 4267 { |
4259 do | 4268 do |
4260 { | 4269 { |
4261 v50 = pParty->field_C59C[9 * (v43 + 12 * (int)v42) + 724]; | 4270 //v50 = pParty->field_C59C[9 * (v43 + 12 * (int)v42) + 724]; |
4271 v50=pParty->Recipes_Item[(unsigned int)v42][(signed int)v43].uItemID; | |
4262 if ( v50 ) | 4272 if ( v50 ) |
4263 { | 4273 { |
4264 v51 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v50].pIconName, TEXTURE_16BIT_PALETTE); | 4274 v51 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v50].pIconName, TEXTURE_16BIT_PALETTE); |
4265 //v3 = dword_F8B198; | 4275 //v3 = dword_F8B198; |
4266 v8 = window_SpeakInHouse; | 4276 v8 = window_SpeakInHouse; |
4279 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) | 4289 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) |
4280 if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) | 4290 if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) |
4281 { | 4291 { |
4282 do | 4292 do |
4283 { | 4293 { |
4284 if ( pParty->field_C59C[9 * (v53 + 12 * (int)v52) + 724] ) | 4294 // if ( pParty->field_C59C[9 * (v53 + 12 * (int)v52) + 724] ) |
4295 if (pParty->Recipes_Item[(unsigned int)v52][v53].uItemID) | |
4285 { | 4296 { |
4286 v54 = rand(); | 4297 v54 = rand(); |
4287 v8 = window_SpeakInHouse; | 4298 v8 = window_SpeakInHouse; |
4288 word_F8B158[v53] = v54 % (300 - dword_F8B168[v53]->uTextureHeight); | 4299 word_F8B158[v53] = v54 % (300 - dword_F8B168[v53]->uTextureHeight); |
4289 } | 4300 } |
4597 v32 = (ItemGen *)&pParty->field_777C[v31]; | 4608 v32 = (ItemGen *)&pParty->field_777C[v31]; |
4598 _this = (ItemGen *)&pParty->field_777C[v31]; | 4609 _this = (ItemGen *)&pParty->field_777C[v31]; |
4599 } | 4610 } |
4600 else | 4611 else |
4601 { | 4612 { |
4602 _this = (ItemGen *)&pParty->field_C59C[v31 + 724]; | 4613 _this =&pParty->Recipes_Item[(int)v30][v29-1]; //(ItemGen *)&pParty->field_C59C[v31 + 724]; |
4603 v32 = (ItemGen *)&pParty->field_C59C[v31 + 724]; | 4614 v32 = &pParty->Recipes_Item[(int)v30][v29-1];//(ItemGen *)&pParty->field_C59C[v31 + 724]; |
4604 } | 4615 } |
4605 //v33 = p2DEvents_minus1__20[13 * (signed int)v30]; | 4616 //v33 = p2DEvents_minus1__20[13 * (signed int)v30]; |
4606 v33 = p2DEvents[(signed int)v30 - 1].fPriceMultiplier; | 4617 v33 = p2DEvents[(signed int)v30 - 1].fPriceMultiplier; |
4607 v34 = v32->GetValue(); | 4618 v34 = v32->GetValue(); |
4608 v80 = v0->_4B8142(v34, v33); | 4619 v80 = v0->_4B8142(v34, v33); |