comparison mm7_2.cpp @ 458:c0ab5f64b37b

Слияние
author Ritor1
date Sun, 24 Feb 2013 20:42:44 +0600
parents e5cf03a3d98e a812665688e4
children a7869569e912
comparison
equal deleted inserted replaced
457:e5cf03a3d98e 458:c0ab5f64b37b
959 goto LABEL_13; 959 goto LABEL_13;
960 } 960 }
961 if ( v2 <= 41 ) 961 if ( v2 <= 41 )
962 { 962 {
963 v4 = word_4F0576[v2]; 963 v4 = word_4F0576[v2];
964 v9 = 22; 964 v9 = 22; //misc
965 goto LABEL_12; 965 goto LABEL_12;
966 } 966 }
967 if ( v2 <= 53 ) 967 if ( v2 <= 53 )
968 { 968 {
969 if ( v1 >= 6 ) 969 if ( v1 >= 6 )
970 { 970 {
971 v4 = word_4F0578[v2]; 971 v4 = word_4F0578[v2];
972 v9 = 45; 972 v9 = 45; //reagent
973 LABEL_12: 973 LABEL_12:
974 v5 = v9; 974 v5 = v9;
975 LABEL_13: 975 LABEL_13:
976 pItemsTable->GenerateItem(v4, v5, (ItemGen *)&pParty->field_777C[9 * (v1 + 12 * v2)]); 976 pItemsTable->GenerateItem(v4, v5, (ItemGen *)&pParty->field_777C[v2][v1]);//9 * (v1 + 12 * v2)]);
977 v0 = window_SpeakInHouse; 977 v0 = window_SpeakInHouse;
978 pParty->field_777C[9 * (v1 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 5] = 1; 978 pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v1].uAttributes = 1; //identified
979 goto LABEL_14; 979 goto LABEL_14;
980 } 980 }
981 auto _t = (ItemGen *)&pParty->field_777C[9 * (v1 + 12 * v2)]; 981 auto _t = (ItemGen *)&pParty->field_777C[v2][v1];
982 _t->Reset(); 982 _t->Reset();
983 v0 = window_SpeakInHouse; 983 v0 = window_SpeakInHouse;
984 pParty->field_777C[9 * (v1 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] = 220; 984 pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v1].uItemID = 220; //potion bottle
985 } 985 }
986 LABEL_14: 986 LABEL_14:
987 v2 = (signed int)v0->ptr_1C; 987 v2 = (signed int)v0->ptr_1C;
988 ++v1; 988 ++v1;
989 //if ( v1 >= (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v0->ptr_1C]] ) 989 //if ( v1 >= (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v0->ptr_1C]] )
1489 v48 = 0; 1489 v48 = 0;
1490 v108 = 0; 1490 v108 = 0;
1491 v109 = 0; 1491 v109 = 0;
1492 do 1492 do
1493 { 1493 {
1494 if ( pParty->field_777C[9 * (int)&v48[3 * (unsigned int)window_SpeakInHouse->ptr_1C]] ) 1494 // if ( pParty->field_777C[9 * (int)&v48[3 * (unsigned int)window_SpeakInHouse->ptr_1C]] )
1495 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][(int)v48].uItemID);
1495 { 1496 {
1496 v49 = word_F8B158[(signed int)v48]; 1497 v49 = word_F8B158[(signed int)v48];
1497 v50 = dword_F8B168[(signed int)v48]; 1498 v50 = dword_F8B168[(signed int)v48];
1498 v49 += 30; 1499 v49 += 30;
1499 v51 = 60 - ((signed int)v50->uTextureWidth >> 1); 1500 v51 = 60 - ((signed int)v50->uTextureWidth >> 1);
1514 { 1515 {
1515 v109 = 0; 1516 v109 = 0;
1516 v108 = 0; 1517 v108 = 0;
1517 do 1518 do
1518 { 1519 {
1519 if ( pParty->field_C59C[9 * (int)&v109[3 * (unsigned int)window_SpeakInHouse->ptr_1C] + 724] ) 1520 // if ( pParty->field_C59C[9 * (int)&v109[3 * (unsigned int)window_SpeakInHouse->ptr_1C] + 724] )
1521 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v109].uItemID)
1520 { 1522 {
1521 v52 = word_F8B158[(signed int)v109] + 30; 1523 v52 = word_F8B158[(signed int)v109] + 30;
1522 v53 = dword_F8B168[(signed int)v109]; 1524 v53 = dword_F8B168[(signed int)v109];
1523 v54 = 60 - ((signed int)v53->uTextureWidth >> 1); 1525 v54 = 60 - ((signed int)v53->uTextureWidth >> 1);
1524 pRenderer->DrawTextureTransparent(v54 + v108, word_F8B158[(signed int)v109] + 30, v53); 1526 pRenderer->DrawTextureTransparent(v54 + v108, word_F8B158[(signed int)v109] + 30, v53);
1540 if ( dword_F8B19C == 2 ) 1542 if ( dword_F8B19C == 2 )
1541 { 1543 {
1542 v106.x = 0; 1544 v106.x = 0;
1543 do 1545 do
1544 { 1546 {
1545 if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) 1547 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID);//9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] )
1546 ++v106.x; 1548 ++v106.x;
1547 ++v55; 1549 ++v55;
1548 } 1550 }
1549 while ( v55 < 6 ); 1551 while ( v55 < 6 );
1550 } 1552 }
1551 else 1553 else
1552 { 1554 {
1553 do 1555 do
1554 { 1556 {
1555 if ( pParty->field_C59C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) 1557 // if ( pParty->field_C59C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] )
1558 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID)
1556 ++v106.x; 1559 ++v106.x;
1557 ++v55; 1560 ++v55;
1558 } 1561 }
1559 while ( v55 < 6 ); 1562 while ( v55 < 6 );
1560 } 1563 }
1579 if ( pRenderer->pActiveZBuffer[(int)result] & 0xFFFF ) 1582 if ( pRenderer->pActiveZBuffer[(int)result] & 0xFFFF )
1580 { 1583 {
1581 v60 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1; 1584 v60 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1;
1582 v106.x = v60; 1585 v106.x = v60;
1583 v61 = (int)window_SpeakInHouse->ptr_1C; 1586 v61 = (int)window_SpeakInHouse->ptr_1C;
1584 v62 = 9 * (v60 + 12 * v61); 1587 // v62 = 9 * (v60 + 12 * v61);
1585 v63 = (ItemGen *)&pParty->field_777C[v62]; 1588 v63 = (ItemGen *)&pParty->field_777C[(int)v61][v60];
1586 if ( dword_F8B19C != 2 ) 1589 if ( dword_F8B19C != 2 )
1587 v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; 1590 v63 = &pParty->Recipes_Item[(int)v61][v60];//v63 = (ItemGen *)&pParty->field_C59C[v62 + 724];
1588 if ( !v56 || !Str ) 1591 if ( !v56 || !Str )
1589 { 1592 {
1590 v85 = 0; 1593 v85 = 0;
1591 v83 = 2; 1594 v83 = 2;
1592 v81 = window_SpeakInHouse->ptr_1C; 1595 v81 = window_SpeakInHouse->ptr_1C;
2027 v114 = 0; 2030 v114 = 0;
2028 if ( dword_F8B19C == 2 ) 2031 if ( dword_F8B19C == 2 )
2029 { 2032 {
2030 do 2033 do
2031 { 2034 {
2032 if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) 2035 // if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] )
2036 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID);
2033 { 2037 {
2034 v46 = dword_F8B168[v114]; 2038 v46 = dword_F8B168[v114];
2035 v47 = 152 - v46->uTextureHeight; 2039 v47 = 152 - v46->uTextureHeight;
2036 if ( (signed int)v47 < 1 ) 2040 if ( (signed int)v47 < 1 )
2037 v47 = 0; 2041 v47 = 0;
2057 } 2061 }
2058 while ( v114 < 6 ); 2062 while ( v114 < 6 );
2059 v114 = 0; 2063 v114 = 0;
2060 do 2064 do
2061 { 2065 {
2062 if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] ) 2066 // if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] )
2067 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v114+1].uItemID);
2063 { 2068 {
2064 v50 = dword_F8B168[v114 + 6]; 2069 v50 = dword_F8B168[v114 + 6];
2065 v51 = 308 - v50->uTextureHeight; 2070 v51 = 308 - v50->uTextureHeight;
2066 if ( (signed int)v51 < 1 ) 2071 if ( (signed int)v51 < 1 )
2067 v51 = 0; 2072 v51 = 0;
2089 } 2094 }
2090 else 2095 else
2091 { 2096 {
2092 do 2097 do
2093 { 2098 {
2094 if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) 2099 //if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] )
2100 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID)
2095 { 2101 {
2096 v54 = dword_F8B168[v114]; 2102 v54 = dword_F8B168[v114];
2097 v55 = 152 - v54->uTextureHeight; 2103 v55 = 152 - v54->uTextureHeight;
2098 if ( (signed int)v55 < 1 ) 2104 if ( (signed int)v55 < 1 )
2099 v55 = 0; 2105 v55 = 0;
2119 } 2125 }
2120 while ( v114 < 6 ); 2126 while ( v114 < 6 );
2121 v114 = 0; 2127 v114 = 0;
2122 do 2128 do
2123 { 2129 {
2124 if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 778] ) 2130 // if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 778] ) //weak
2131 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v114].uItemID) //not itemid
2125 { 2132 {
2126 v58 = dword_F8B168[v114 + 6]; 2133 v58 = dword_F8B168[v114 + 6];
2127 v59 = 308 - v58->uTextureHeight; 2134 v59 = 308 - v58->uTextureHeight;
2128 if ( (signed int)v59 < 1 ) 2135 if ( (signed int)v59 < 1 )
2129 v59 = 0; 2136 v59 = 0;
2156 v109 = 0; 2163 v109 = 0;
2157 if ( dword_F8B19C == 2 ) 2164 if ( dword_F8B19C == 2 )
2158 { 2165 {
2159 do 2166 do
2160 { 2167 {
2161 if ( pParty->field_777C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) 2168 // if ( pParty->field_777C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] )
2169 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID);
2162 ++v109; 2170 ++v109;
2163 ++v62; 2171 ++v62;
2164 } 2172 }
2165 while ( v62 < 12 ); 2173 while ( v62 < 12 );
2166 } 2174 }
2167 else 2175 else
2168 { 2176 {
2169 do 2177 do
2170 { 2178 {
2171 if ( pParty->field_C59C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) 2179 //if ( pParty->field_C59C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] )
2180 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID)
2172 ++v109; 2181 ++v109;
2173 ++v62; 2182 ++v62;
2174 } 2183 }
2175 while ( v62 < 12 ); 2184 while ( v62 < 12 );
2176 } 2185 }
2199 if ( pRenderer->pActiveZBuffer[(int)result] & 0xFFFF ) 2208 if ( pRenderer->pActiveZBuffer[(int)result] & 0xFFFF )
2200 { 2209 {
2201 v67 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1; 2210 v67 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1;
2202 v109 = v67; 2211 v109 = v67;
2203 v68 = (int)window_SpeakInHouse->ptr_1C; 2212 v68 = (int)window_SpeakInHouse->ptr_1C;
2204 v69 = 9 * (v67 + 12 * v68); 2213 // v69 = 9 * (v67 + 12 * v68);
2205 v70 = (ItemGen *)&pParty->field_777C[v69]; 2214 v70 = (ItemGen *)&pParty->field_777C[v68][v67];
2206 if ( dword_F8B19C != 2 ) 2215 if ( dword_F8B19C != 2 )
2207 v70 = (ItemGen *)&pParty->field_C59C[v69 + 724]; 2216 v70 = &pParty->Recipes_Item[(int)v68][v67];//v70 = (ItemGen *)&pParty->field_C59C[v69 + 724];
2208 if ( !v63 || !Str ) 2217 if ( !v63 || !Str )
2209 { 2218 {
2210 v93 = 0; 2219 v93 = 0;
2211 v91 = 2; 2220 v91 = 2;
2212 v89 = window_SpeakInHouse->ptr_1C; 2221 v89 = window_SpeakInHouse->ptr_1C;
2406 return; 2415 return;
2407 v149 = 0; 2416 v149 = 0;
2408 v93 = 0; 2417 v93 = 0;
2409 do 2418 do
2410 { 2419 {
2411 if ( pParty->field_C59C[9 * (v93 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) 2420 // if ( pParty->field_C59C[9 * (v93 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] )
2421 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v93].uItemID)
2412 ++v149; 2422 ++v149;
2413 ++v93; 2423 ++v93;
2414 } 2424 }
2415 while ( v93 < 8 ); 2425 while ( v93 < 8 );
2416 if ( v149 ) 2426 if ( v149 )
2421 if ( v149 && v149 != -65536 ) 2431 if ( v149 && v149 != -65536 )
2422 { 2432 {
2423 --v149; 2433 --v149;
2424 v96 = window_SpeakInHouse->ptr_1C; 2434 v96 = window_SpeakInHouse->ptr_1C;
2425 v97 = uActiveCharacter - 1; 2435 v97 = uActiveCharacter - 1;
2426 v98 = (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724]; 2436 // v98 = (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724];
2427 v99 = _this->_490EEE( 2437 v99 = _this->_490EEE(
2428 (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724], 2438 &pParty->Recipes_Item[(int)v96][v95-1],// (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724],
2429 2, 2439 2,
2430 (int)window_SpeakInHouse->ptr_1C, 2440 (int)window_SpeakInHouse->ptr_1C,
2431 2); 2441 2);
2432 v100 = BuilDialogueString((char *)pMerchantsBuyPhrases[v99], v97, v98, (char *)v96, 2, 0); 2442 v100 = BuilDialogueString((char *)pMerchantsBuyPhrases[v99], v97, v98, (char *)v96, 2, 0);
2433 v101 = v100; 2443 v101 = v100;
2437 } 2447 }
2438 v104 = 0; 2448 v104 = 0;
2439 v153 = 0; 2449 v153 = 0;
2440 do 2450 do
2441 { 2451 {
2442 if ( pParty->field_C59C[9 * (v104 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) 2452 //if ( pParty->field_C59C[9 * (v104 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] )
2453 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v104].uItemID)
2443 { 2454 {
2444 v105 = dword_F8B168[v104]; 2455 v105 = dword_F8B168[v104];
2445 if ( v104 >= 4 ) 2456 if ( v104 >= 4 )
2446 { 2457 {
2447 v110 = 90 - ((signed int)v105->uTextureWidth >> 1); 2458 v110 = 90 - ((signed int)v105->uTextureWidth >> 1);
2624 { 2635 {
2625 v55 = 0; 2636 v55 = 0;
2626 v153 = 0; 2637 v153 = 0;
2627 do 2638 do
2628 { 2639 {
2629 if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) 2640 // if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] )
2641 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID);
2630 { 2642 {
2631 v56 = dword_F8B168[v55]; 2643 v56 = dword_F8B168[v55];
2632 if ( v55 >= 4 ) 2644 if ( v55 >= 4 )
2633 { 2645 {
2634 v60 = 90 - ((signed int)v56->uTextureWidth >> 1); 2646 v60 = 90 - ((signed int)v56->uTextureWidth >> 1);
2658 v11 = 0; 2670 v11 = 0;
2659 v61 = 0; 2671 v61 = 0;
2660 v153 = 0; 2672 v153 = 0;
2661 do 2673 do
2662 { 2674 {
2663 if ( (char *)pParty->field_C59C[9 * (v61 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) 2675 // if ( (char *)pParty->field_C59C[9 * (v61 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 )
2676 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v61].uItemID)
2664 { 2677 {
2665 v62 = dword_F8B168[v61]; 2678 v62 = dword_F8B168[v61];
2666 if ( v61 >= 4 ) 2679 if ( v61 >= 4 )
2667 { 2680 {
2668 v67 = 90 - ((signed int)v62->uTextureWidth >> 1); 2681 v67 = 90 - ((signed int)v62->uTextureWidth >> 1);
2694 v149 = (__int32)v11; 2707 v149 = (__int32)v11;
2695 if ( dword_F8B19C == 2 ) 2708 if ( dword_F8B19C == 2 )
2696 { 2709 {
2697 do 2710 do
2698 { 2711 {
2699 if ( (char *)pParty->field_777C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] != v11 ) 2712 // if ( (char *)pParty->field_777C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] != v11 )
2713 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v68].uItemID);
2700 ++v149; 2714 ++v149;
2701 ++v68; 2715 ++v68;
2702 } 2716 }
2703 while ( v68 < 6 ); 2717 while ( v68 < 6 );
2704 } 2718 }
2705 else 2719 else
2706 { 2720 {
2707 do 2721 do
2708 { 2722 {
2709 if ( (char *)pParty->field_C59C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) 2723 // if ( (char *)pParty->field_C59C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 )
2724 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v68].uItemID)
2710 ++v149; 2725 ++v149;
2711 ++v68; 2726 ++v68;
2712 } 2727 }
2713 while ( v68 < 6 ); 2728 while ( v68 < 6 );
2714 } 2729 }
2736 v75 = (int)window_SpeakInHouse->ptr_1C; 2751 v75 = (int)window_SpeakInHouse->ptr_1C;
2737 v76 = 9 * (v74 - 1 + 12 * v75); 2752 v76 = 9 * (v74 - 1 + 12 * v75);
2738 if ( dword_F8B19C == 2 ) 2753 if ( dword_F8B19C == 2 )
2739 v77 = (ItemGen *)&pParty->field_777C[v76]; 2754 v77 = (ItemGen *)&pParty->field_777C[v76];
2740 else 2755 else
2741 v77 = (ItemGen *)&pParty->field_C59C[v76 + 724]; 2756 v77 = &pParty->Recipes_Item[(int)75][v74-1];//(ItemGen *)&pParty->field_C59C[v76 + 724];
2742 if ( v69 == (short)v11 || Str == v11 ) 2757 if ( v69 == (short)v11 || Str == v11 )
2743 { 2758 {
2744 v124 = (__int64 *)v11; 2759 v124 = (__int64 *)v11;
2745 v122 = 2; 2760 v122 = 2;
2746 v120 = window_SpeakInHouse->ptr_1C; 2761 v120 = window_SpeakInHouse->ptr_1C;
4213 { 4228 {
4214 if ( _4F063C_smthn_by_2da_uType[v44] ) 4229 if ( _4F063C_smthn_by_2da_uType[v44] )
4215 { 4230 {
4216 do 4231 do
4217 { 4232 {
4218 v45 = pParty->field_777C[9 * (v43 + 12 * (int)v42)]; 4233 v45 = pParty->field_777C[(int)v42][v43].uItemID;
4219 if ( v45 ) 4234 if ( v45 )
4220 { 4235 {
4221 v46 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v45].pIconName, TEXTURE_16BIT_PALETTE); 4236 v46 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v45].pIconName, TEXTURE_16BIT_PALETTE);
4222 //v3 = dword_F8B198; 4237 //v3 = dword_F8B198;
4223 v8 = window_SpeakInHouse; 4238 v8 = window_SpeakInHouse;
4236 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) 4251 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] )
4237 if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) 4252 if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] )
4238 { 4253 {
4239 do 4254 do
4240 { 4255 {
4241 if ( pParty->field_777C[9 * (v48 + 12 * (int)v47)] ) 4256 // if ( pParty->field_777C[9 * (v48 + 12 * (int)v47)] )
4257 if ( pParty->field_777C[(int)v47][v48].uItemID);
4242 { 4258 {
4243 v49 = rand(); 4259 v49 = rand();
4244 v8 = window_SpeakInHouse; 4260 v8 = window_SpeakInHouse;
4245 word_F8B158[v48] = v49 % (300 - dword_F8B168[v48]->uTextureHeight); 4261 word_F8B158[v48] = v49 % (300 - dword_F8B168[v48]->uTextureHeight);
4246 } 4262 }
4256 { 4272 {
4257 if ( _4F063C_smthn_by_2da_uType[v44] ) 4273 if ( _4F063C_smthn_by_2da_uType[v44] )
4258 { 4274 {
4259 do 4275 do
4260 { 4276 {
4261 v50 = pParty->field_C59C[9 * (v43 + 12 * (int)v42) + 724]; 4277 //v50 = pParty->field_C59C[9 * (v43 + 12 * (int)v42) + 724];
4278 v50=pParty->Recipes_Item[(unsigned int)v42][(signed int)v43].uItemID;
4262 if ( v50 ) 4279 if ( v50 )
4263 { 4280 {
4264 v51 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v50].pIconName, TEXTURE_16BIT_PALETTE); 4281 v51 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v50].pIconName, TEXTURE_16BIT_PALETTE);
4265 //v3 = dword_F8B198; 4282 //v3 = dword_F8B198;
4266 v8 = window_SpeakInHouse; 4283 v8 = window_SpeakInHouse;
4279 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) 4296 //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] ) 4297 if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] )
4281 { 4298 {
4282 do 4299 do
4283 { 4300 {
4284 if ( pParty->field_C59C[9 * (v53 + 12 * (int)v52) + 724] ) 4301 // if ( pParty->field_C59C[9 * (v53 + 12 * (int)v52) + 724] )
4302 if (pParty->Recipes_Item[(unsigned int)v52][v53].uItemID)
4285 { 4303 {
4286 v54 = rand(); 4304 v54 = rand();
4287 v8 = window_SpeakInHouse; 4305 v8 = window_SpeakInHouse;
4288 word_F8B158[v53] = v54 % (300 - dword_F8B168[v53]->uTextureHeight); 4306 word_F8B158[v53] = v54 % (300 - dword_F8B168[v53]->uTextureHeight);
4289 } 4307 }
4309 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 4327 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
4310 pKeyActionMap->_459ED1(3); 4328 pKeyActionMap->_459ED1(3);
4311 pKeyActionMap->ResetKeys(); 4329 pKeyActionMap->ResetKeys();
4312 _5C3420_pDecoration = 0; 4330 _5C3420_pDecoration = 0;
4313 ptr_F8B1E8 = 0; 4331 ptr_F8B1E8 = 0;
4314 if ( pDialogueNPCCount ) 4332 if ( array_5913D8[6] )
4315 { 4333 {
4316 v0 = dword_F8B19C; 4334 v0 = dword_F8B19C;
4317 if ( dword_F8B19C != 2 4335 if ( dword_F8B19C != 2
4318 && dword_F8B19C != 3 4336 && dword_F8B19C != 3
4319 && dword_F8B19C != 97 4337 && dword_F8B19C != 97
4327 } 4345 }
4328 if ( v0 && v0 != 1 ) 4346 if ( v0 && v0 != 1 )
4329 { 4347 {
4330 if ( v0 == -1 ) 4348 if ( v0 == -1 )
4331 { 4349 {
4332 _4B4224_UpdateNPCTopics((int)((char *)pDialogueNPCCount - 1)); 4350 _4B4224_UpdateNPCTopics((int)((char *)array_5913D8[6] - 1));
4333 LABEL_33: 4351 LABEL_33:
4334 pVideoPlayer->_4BF5B2(); 4352 pVideoPlayer->_4BF5B2();
4335 return 1; 4353 return 1;
4336 } 4354 }
4337 if ( v0 != 94 && v0 != 96 && v0 != 101 ) 4355 if ( v0 != 94 && v0 != 96 && v0 != 101 )
4361 } 4379 }
4362 pVideoPlayer->_4BF5B2(); 4380 pVideoPlayer->_4BF5B2();
4363 UI_CreateEndConversationButton(); 4381 UI_CreateEndConversationButton();
4364 goto LABEL_28; 4382 goto LABEL_28;
4365 } 4383 }
4366 pDialogueNPCCount = 0; 4384 array_5913D8[6] = 0;
4367 pDialogueWindow->Release(); 4385 pDialogueWindow->Release();
4368 dword_F8B19C = 0; 4386 dword_F8B19C = 0;
4369 pDialogueWindow = 0; 4387 pDialogueWindow = 0;
4370 pIcons_LOD->_40F9C5(); 4388 pIcons_LOD->_40F9C5();
4371 v1 = uNumDialogueNPCPortraits; 4389 v1 = uNumDialogueNPCPortraits;
4376 if ( uNumDialogueNPCPortraits > 0 ) 4394 if ( uNumDialogueNPCPortraits > 0 )
4377 { 4395 {
4378 v3 = byte_591180; 4396 v3 = byte_591180;
4379 do 4397 do
4380 { 4398 {
4381 HouseNPCData[v2 + 7] = (NPCData *)window_SpeakInHouse->CreateButton(pNPCPortraits_x[v1 - 1][v2], pNPCPortraits_y[v1 - 1][v2], 4399 array_5913D8[v2 + 7] = (NPCData *)window_SpeakInHouse->CreateButton(pNPCPortraits_x[v1 - 1][v2], pNPCPortraits_y[v1 - 1][v2],
4382 0x3Fu, 0x49u, 1, 0, 0x19Au, v2, 0, v3, 0, 0, 0); 4400 0x3Fu, 0x49u, 1, 0, 0x19Au, v2, 0, v3, 0, 0, 0);
4383 v1 = uNumDialogueNPCPortraits; 4401 v1 = uNumDialogueNPCPortraits;
4384 ++v2; 4402 ++v2;
4385 v3 += 100; 4403 v3 += 100;
4386 } 4404 }
4589 v28 = pMouse->GetCursorPos(&v59); 4607 v28 = pMouse->GetCursorPos(&v59);
4590 v29 = pRenderer->pActiveZBuffer[v28->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v57)->y]] & 0xFFFF; 4608 v29 = pRenderer->pActiveZBuffer[v28->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v57)->y]] & 0xFFFF;
4591 if ( !v29 ) 4609 if ( !v29 )
4592 return; 4610 return;
4593 v30 = window_SpeakInHouse->ptr_1C; 4611 v30 = window_SpeakInHouse->ptr_1C;
4594 v31 = 9 * (v29 - 1 + 12 * (int)v30); 4612 // v31 = 9 * (v29 - 1 + 12 * (int)v30);
4595 if ( dword_F8B19C == 2 ) 4613 if ( dword_F8B19C == 2 )
4596 { 4614 {
4597 v32 = (ItemGen *)&pParty->field_777C[v31]; 4615 v32 = (ItemGen *)&pParty->field_777C[(int)v30][v29];
4598 _this = (ItemGen *)&pParty->field_777C[v31]; 4616 _this = (ItemGen *)&pParty->field_777C[(int)v30][v29];
4599 } 4617 }
4600 else 4618 else
4601 { 4619 {
4602 _this = (ItemGen *)&pParty->field_C59C[v31 + 724]; 4620 _this =&pParty->Recipes_Item[(int)v30][v29-1]; //(ItemGen *)&pParty->field_C59C[v31 + 724];
4603 v32 = (ItemGen *)&pParty->field_C59C[v31 + 724]; 4621 v32 = &pParty->Recipes_Item[(int)v30][v29-1];//(ItemGen *)&pParty->field_C59C[v31 + 724];
4604 } 4622 }
4605 //v33 = p2DEvents_minus1__20[13 * (signed int)v30]; 4623 //v33 = p2DEvents_minus1__20[13 * (signed int)v30];
4606 v33 = p2DEvents[(signed int)v30 - 1].fPriceMultiplier; 4624 v33 = p2DEvents[(signed int)v30 - 1].fPriceMultiplier;
4607 v34 = v32->GetValue(); 4625 v34 = v32->GetValue();
4608 v80 = v0->_4B8142(v34, v33); 4626 v80 = v0->_4B8142(v34, v33);
11667 HANDLE v6; // eax@32 11685 HANDLE v6; // eax@32
11668 Keyboard *v7; // eax@33 11686 Keyboard *v7; // eax@33
11669 //HDC v9; // edi@41 11687 //HDC v9; // edi@41
11670 HDC v10; // edi@50 11688 HDC v10; // edi@50
11671 int v11; // esi@50 11689 int v11; // esi@50
11672 char v12; // zf@132 11690 //char v12; // zf@132
11673 signed int v13; // eax@135 11691 signed int v13; // eax@135
11674 int v14; // eax@139 11692 int v14; // eax@139
11675 int v15; // eax@140 11693 int v15; // eax@140
11676 int v16; // eax@141 11694 int v16; // eax@141
11677 int v17; // eax@142 11695 int v17; // eax@142
11933 } 11951 }
11934 v38 = 0; 11952 v38 = 0;
11935 v37 = 0; 11953 v37 = 0;
11936 v36 = 2; 11954 v36 = 2;
11937 v35 = ::hWnd; 11955 v35 = ::hWnd;
11938 LABEL_104: 11956 //LABEL_104:
11939 SendMessageA(v35, v36, v37, v38); 11957 SendMessageA(::hWnd, WM_DESTROY, v37, v38);
11940 return 0; 11958 return 0;
11941 } 11959 }
11942 if ( dword_506E68 != -1 ) 11960 if ( dword_506E68 != -1 )
11943 { 11961 {
11944 pKeyActionMap->_459F10(wParam); 11962 pKeyActionMap->_459F10(wParam);
11946 } 11964 }
11947 if ( !pArcomageGame->bGameInProgress ) 11965 if ( !pArcomageGame->bGameInProgress )
11948 { 11966 {
11949 if ( pVideoPlayer->pVideoFrame.pPixels ) 11967 if ( pVideoPlayer->pVideoFrame.pPixels )
11950 pVideoPlayer->bStopBeforeSchedule = 1; 11968 pVideoPlayer->bStopBeforeSchedule = 1;
11951 if ( wParam != 13 ) 11969 if ( wParam != VK_RETURN )
11952 { 11970 {
11953 if ( wParam == 17 ) 11971 if ( wParam == VK_CONTROL )
11954 { 11972 {
11955 dword_507B98_ctrl_pressed = 1; 11973 dword_507B98_ctrl_pressed = 1;
11956 return 0; 11974 return 0;
11957 } 11975 }
11958 if ( wParam == 27 ) 11976 if ( wParam == VK_ESCAPE )
11959 { 11977 {
11960 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 11978 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, window_SpeakInHouse != 0, 0);
11961 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 11979 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
11962 { 11980 {
11963 v12 = window_SpeakInHouse == 0; 11981 v12 = window_SpeakInHouse == 0;
11964 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; 11982 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
11965 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = !v12; 11983 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = !v12;
11966 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 11984 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
11967 ++pMessageQueue_50CBD0->uNumMessages; 11985 ++pMessageQueue_50CBD0->uNumMessages;
11968 }*/ 11986 }*/
11969 return 0; 11987 return 0;
11970 } 11988 }
11971 if ( wParam <= 0x24 ) 11989 if ( wParam <= VK_HOME )
11972 return 0; 11990 return 0;
11973 if ( wParam > 0x28 ) 11991 if ( wParam > VK_DOWN )
11974 { 11992 {
11975 if ( wParam != 115 || pVideoPlayer->AnyMovieLoaded() ) 11993 if ( wParam != VK_F4 || pVideoPlayer->AnyMovieLoaded() )
11976 return 0; 11994 return 0;
11977 v38 = 0; 11995 v38 = 0;
11978 v37 = 104; 11996 v37 = 104;
11979 LABEL_126: 11997 LABEL_126:
11980 v36 = 273; 11998 v36 = 273;
11981 v35 = hWnd; 11999 v35 = hWnd;
11982 goto LABEL_104; 12000 SendMessageA(hWnd, WM_COMMAND, v37, v38);
12001 return 0;
11983 } 12002 }
11984 if ( pCurrentScreen 12003 if ( pCurrentScreen
11985 && pCurrentScreen != SCREEN_PRESS_ESCAPE_MESSAGE ) 12004 && pCurrentScreen != SCREEN_PRESS_ESCAPE_MESSAGE )
11986 return 0; 12005 return 0;
11987 } 12006 }