Mercurial > mm7
comparison mm7_2.cpp @ 463:f7b91ef98ab2
shopgenerators done, except config tables
author | Gloval |
---|---|
date | Mon, 25 Feb 2013 08:30:49 +0400 |
parents | 37090bd974f9 |
children | 8822405efad2 |
comparison
equal
deleted
inserted
replaced
462:37090bd974f9 | 463:f7b91ef98ab2 |
---|---|
1412 v108 = 0; | 1412 v108 = 0; |
1413 v109 = 0; | 1413 v109 = 0; |
1414 do | 1414 do |
1415 { | 1415 { |
1416 // if ( pParty->field_777C[9 * (int)&v48[3 * (unsigned int)window_SpeakInHouse->ptr_1C]] ) | 1416 // if ( pParty->field_777C[9 * (int)&v48[3 * (unsigned int)window_SpeakInHouse->ptr_1C]] ) |
1417 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][(int)v48].uItemID); | 1417 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][(int)v48].uItemID); |
1418 { | 1418 { |
1419 v49 = word_F8B158[(signed int)v48]; | 1419 v49 = word_F8B158[(signed int)v48]; |
1420 v50 = dword_F8B168[(signed int)v48]; | 1420 v50 = dword_F8B168[(signed int)v48]; |
1421 v49 += 30; | 1421 v49 += 30; |
1422 v51 = 60 - ((signed int)v50->uTextureWidth >> 1); | 1422 v51 = 60 - ((signed int)v50->uTextureWidth >> 1); |
1438 v109 = 0; | 1438 v109 = 0; |
1439 v108 = 0; | 1439 v108 = 0; |
1440 do | 1440 do |
1441 { | 1441 { |
1442 // if ( pParty->field_C59C[9 * (int)&v109[3 * (unsigned int)window_SpeakInHouse->ptr_1C] + 724] ) | 1442 // if ( pParty->field_C59C[9 * (int)&v109[3 * (unsigned int)window_SpeakInHouse->ptr_1C] + 724] ) |
1443 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v109].uItemID) | 1443 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v109].uItemID) |
1444 { | 1444 { |
1445 v52 = word_F8B158[(signed int)v109] + 30; | 1445 v52 = word_F8B158[(signed int)v109] + 30; |
1446 v53 = dword_F8B168[(signed int)v109]; | 1446 v53 = dword_F8B168[(signed int)v109]; |
1447 v54 = 60 - ((signed int)v53->uTextureWidth >> 1); | 1447 v54 = 60 - ((signed int)v53->uTextureWidth >> 1); |
1448 pRenderer->DrawTextureTransparent(v54 + v108, word_F8B158[(signed int)v109] + 30, v53); | 1448 pRenderer->DrawTextureTransparent(v54 + v108, word_F8B158[(signed int)v109] + 30, v53); |
1464 if ( dword_F8B19C == 2 ) | 1464 if ( dword_F8B19C == 2 ) |
1465 { | 1465 { |
1466 v106.x = 0; | 1466 v106.x = 0; |
1467 do | 1467 do |
1468 { | 1468 { |
1469 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID);//9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) | 1469 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID);//9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) |
1470 ++v106.x; | 1470 ++v106.x; |
1471 ++v55; | 1471 ++v55; |
1472 } | 1472 } |
1473 while ( v55 < 6 ); | 1473 while ( v55 < 6 ); |
1474 } | 1474 } |
1475 else | 1475 else |
1476 { | 1476 { |
1477 do | 1477 do |
1478 { | 1478 { |
1479 // if ( pParty->field_C59C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 1479 // if ( pParty->field_C59C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
1480 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID) | 1480 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID) |
1481 ++v106.x; | 1481 ++v106.x; |
1482 ++v55; | 1482 ++v55; |
1483 } | 1483 } |
1484 while ( v55 < 6 ); | 1484 while ( v55 < 6 ); |
1485 } | 1485 } |
1505 { | 1505 { |
1506 v60 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1; | 1506 v60 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1; |
1507 v106.x = v60; | 1507 v106.x = v60; |
1508 v61 = (int)window_SpeakInHouse->ptr_1C; | 1508 v61 = (int)window_SpeakInHouse->ptr_1C; |
1509 // v62 = 9 * (v60 + 12 * v61); | 1509 // v62 = 9 * (v60 + 12 * v61); |
1510 v63 = (ItemGen *)&pParty->field_777C[(int)v61][v60]; | 1510 v63 = (ItemGen *)&pParty->StandartItemsInShops[(int)v61][v60]; |
1511 if ( dword_F8B19C != 2 ) | 1511 if ( dword_F8B19C != 2 ) |
1512 v63 = &pParty->Recipes_Item[(int)v61][v60];//v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; | 1512 v63 = &pParty->SpecialItemsInShop[(int)v61][v60];//v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; |
1513 if ( !v56 || !Str ) | 1513 if ( !v56 || !Str ) |
1514 { | 1514 { |
1515 v85 = 0; | 1515 v85 = 0; |
1516 v83 = 2; | 1516 v83 = 2; |
1517 v81 = window_SpeakInHouse->ptr_1C; | 1517 v81 = window_SpeakInHouse->ptr_1C; |
1953 if ( dword_F8B19C == 2 ) | 1953 if ( dword_F8B19C == 2 ) |
1954 { | 1954 { |
1955 do | 1955 do |
1956 { | 1956 { |
1957 // if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) | 1957 // if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) |
1958 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID); | 1958 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID); |
1959 { | 1959 { |
1960 v46 = dword_F8B168[v114]; | 1960 v46 = dword_F8B168[v114]; |
1961 v47 = 152 - v46->uTextureHeight; | 1961 v47 = 152 - v46->uTextureHeight; |
1962 if ( (signed int)v47 < 1 ) | 1962 if ( (signed int)v47 < 1 ) |
1963 v47 = 0; | 1963 v47 = 0; |
1984 while ( v114 < 6 ); | 1984 while ( v114 < 6 ); |
1985 v114 = 0; | 1985 v114 = 0; |
1986 do | 1986 do |
1987 { | 1987 { |
1988 // if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] ) | 1988 // if ( pParty->field_777C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] ) |
1989 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v114+1].uItemID); | 1989 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v114+1].uItemID); |
1990 { | 1990 { |
1991 v50 = dword_F8B168[v114 + 6]; | 1991 v50 = dword_F8B168[v114 + 6]; |
1992 v51 = 308 - v50->uTextureHeight; | 1992 v51 = 308 - v50->uTextureHeight; |
1993 if ( (signed int)v51 < 1 ) | 1993 if ( (signed int)v51 < 1 ) |
1994 v51 = 0; | 1994 v51 = 0; |
2017 else | 2017 else |
2018 { | 2018 { |
2019 do | 2019 do |
2020 { | 2020 { |
2021 //if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 2021 //if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
2022 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID) | 2022 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID) |
2023 { | 2023 { |
2024 v54 = dword_F8B168[v114]; | 2024 v54 = dword_F8B168[v114]; |
2025 v55 = 152 - v54->uTextureHeight; | 2025 v55 = 152 - v54->uTextureHeight; |
2026 if ( (signed int)v55 < 1 ) | 2026 if ( (signed int)v55 < 1 ) |
2027 v55 = 0; | 2027 v55 = 0; |
2048 while ( v114 < 6 ); | 2048 while ( v114 < 6 ); |
2049 v114 = 0; | 2049 v114 = 0; |
2050 do | 2050 do |
2051 { | 2051 { |
2052 // if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 778] ) //weak | 2052 // if ( pParty->field_C59C[9 * (v114 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 778] ) //weak |
2053 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v114].uItemID) //not itemid | 2053 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v114].uItemID) //not itemid |
2054 { | 2054 { |
2055 v58 = dword_F8B168[v114 + 6]; | 2055 v58 = dword_F8B168[v114 + 6]; |
2056 v59 = 308 - v58->uTextureHeight; | 2056 v59 = 308 - v58->uTextureHeight; |
2057 if ( (signed int)v59 < 1 ) | 2057 if ( (signed int)v59 < 1 ) |
2058 v59 = 0; | 2058 v59 = 0; |
2086 if ( dword_F8B19C == 2 ) | 2086 if ( dword_F8B19C == 2 ) |
2087 { | 2087 { |
2088 do | 2088 do |
2089 { | 2089 { |
2090 // if ( pParty->field_777C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) | 2090 // if ( pParty->field_777C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) |
2091 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID); | 2091 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID); |
2092 ++v109; | 2092 ++v109; |
2093 ++v62; | 2093 ++v62; |
2094 } | 2094 } |
2095 while ( v62 < 12 ); | 2095 while ( v62 < 12 ); |
2096 } | 2096 } |
2097 else | 2097 else |
2098 { | 2098 { |
2099 do | 2099 do |
2100 { | 2100 { |
2101 //if ( pParty->field_C59C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 2101 //if ( pParty->field_C59C[9 * (v62 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
2102 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID) | 2102 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID) |
2103 ++v109; | 2103 ++v109; |
2104 ++v62; | 2104 ++v62; |
2105 } | 2105 } |
2106 while ( v62 < 12 ); | 2106 while ( v62 < 12 ); |
2107 } | 2107 } |
2131 { | 2131 { |
2132 v67 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1; | 2132 v67 = (pRenderer->pActiveZBuffer[(int)result] & 0xFFFF) - 1; |
2133 v109 = v67; | 2133 v109 = v67; |
2134 v68 = (int)window_SpeakInHouse->ptr_1C; | 2134 v68 = (int)window_SpeakInHouse->ptr_1C; |
2135 // v69 = 9 * (v67 + 12 * v68); | 2135 // v69 = 9 * (v67 + 12 * v68); |
2136 v70 = (ItemGen *)&pParty->field_777C[v68][v67]; | 2136 v70 = (ItemGen *)&pParty->StandartItemsInShops[v68][v67]; |
2137 if ( dword_F8B19C != 2 ) | 2137 if ( dword_F8B19C != 2 ) |
2138 v70 = &pParty->Recipes_Item[(int)v68][v67];//v70 = (ItemGen *)&pParty->field_C59C[v69 + 724]; | 2138 v70 = &pParty->SpecialItemsInShop[(int)v68][v67];//v70 = (ItemGen *)&pParty->field_C59C[v69 + 724]; |
2139 if ( !v63 || !Str ) | 2139 if ( !v63 || !Str ) |
2140 { | 2140 { |
2141 v93 = 0; | 2141 v93 = 0; |
2142 v91 = 2; | 2142 v91 = 2; |
2143 v89 = window_SpeakInHouse->ptr_1C; | 2143 v89 = window_SpeakInHouse->ptr_1C; |
2338 v149 = 0; | 2338 v149 = 0; |
2339 v93 = 0; | 2339 v93 = 0; |
2340 do | 2340 do |
2341 { | 2341 { |
2342 // if ( pParty->field_C59C[9 * (v93 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 2342 // if ( pParty->field_C59C[9 * (v93 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
2343 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v93].uItemID) | 2343 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v93].uItemID) |
2344 ++v149; | 2344 ++v149; |
2345 ++v93; | 2345 ++v93; |
2346 } | 2346 } |
2347 while ( v93 < 8 ); | 2347 while ( v93 < 8 ); |
2348 if ( v149 ) | 2348 if ( v149 ) |
2355 --v149; | 2355 --v149; |
2356 v96 = window_SpeakInHouse->ptr_1C; | 2356 v96 = window_SpeakInHouse->ptr_1C; |
2357 v97 = uActiveCharacter - 1; | 2357 v97 = uActiveCharacter - 1; |
2358 // v98 = (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724]; | 2358 // v98 = (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724]; |
2359 v99 = _this->_490EEE( | 2359 v99 = _this->_490EEE( |
2360 &pParty->Recipes_Item[(int)v96][v95-1],// (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724], | 2360 &pParty->SpecialItemsInShop[(int)v96][v95-1],// (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724], |
2361 2, | 2361 2, |
2362 (int)window_SpeakInHouse->ptr_1C, | 2362 (int)window_SpeakInHouse->ptr_1C, |
2363 2); | 2363 2); |
2364 v100 = BuilDialogueString((char *)pMerchantsBuyPhrases[v99], v97, v98, (char *)v96, 2, 0); | 2364 v100 = BuilDialogueString((char *)pMerchantsBuyPhrases[v99], v97, v98, (char *)v96, 2, 0); |
2365 v101 = v100; | 2365 v101 = v100; |
2370 v104 = 0; | 2370 v104 = 0; |
2371 v153 = 0; | 2371 v153 = 0; |
2372 do | 2372 do |
2373 { | 2373 { |
2374 //if ( pParty->field_C59C[9 * (v104 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 2374 //if ( pParty->field_C59C[9 * (v104 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
2375 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v104].uItemID) | 2375 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v104].uItemID) |
2376 { | 2376 { |
2377 v105 = dword_F8B168[v104]; | 2377 v105 = dword_F8B168[v104]; |
2378 if ( v104 >= 4 ) | 2378 if ( v104 >= 4 ) |
2379 { | 2379 { |
2380 v110 = 90 - ((signed int)v105->uTextureWidth >> 1); | 2380 v110 = 90 - ((signed int)v105->uTextureWidth >> 1); |
2558 v55 = 0; | 2558 v55 = 0; |
2559 v153 = 0; | 2559 v153 = 0; |
2560 do | 2560 do |
2561 { | 2561 { |
2562 // if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) | 2562 // if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) |
2563 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID); | 2563 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID); |
2564 { | 2564 { |
2565 v56 = dword_F8B168[v55]; | 2565 v56 = dword_F8B168[v55]; |
2566 if ( v55 >= 4 ) | 2566 if ( v55 >= 4 ) |
2567 { | 2567 { |
2568 v60 = 90 - ((signed int)v56->uTextureWidth >> 1); | 2568 v60 = 90 - ((signed int)v56->uTextureWidth >> 1); |
2593 v61 = 0; | 2593 v61 = 0; |
2594 v153 = 0; | 2594 v153 = 0; |
2595 do | 2595 do |
2596 { | 2596 { |
2597 // if ( (char *)pParty->field_C59C[9 * (v61 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) | 2597 // if ( (char *)pParty->field_C59C[9 * (v61 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) |
2598 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v61].uItemID) | 2598 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v61].uItemID) |
2599 { | 2599 { |
2600 v62 = dword_F8B168[v61]; | 2600 v62 = dword_F8B168[v61]; |
2601 if ( v61 >= 4 ) | 2601 if ( v61 >= 4 ) |
2602 { | 2602 { |
2603 v67 = 90 - ((signed int)v62->uTextureWidth >> 1); | 2603 v67 = 90 - ((signed int)v62->uTextureWidth >> 1); |
2630 if ( dword_F8B19C == 2 ) | 2630 if ( dword_F8B19C == 2 ) |
2631 { | 2631 { |
2632 do | 2632 do |
2633 { | 2633 { |
2634 // if ( (char *)pParty->field_777C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] != v11 ) | 2634 // if ( (char *)pParty->field_777C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] != v11 ) |
2635 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v68].uItemID); | 2635 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v68].uItemID); |
2636 ++v149; | 2636 ++v149; |
2637 ++v68; | 2637 ++v68; |
2638 } | 2638 } |
2639 while ( v68 < 6 ); | 2639 while ( v68 < 6 ); |
2640 } | 2640 } |
2641 else | 2641 else |
2642 { | 2642 { |
2643 do | 2643 do |
2644 { | 2644 { |
2645 // if ( (char *)pParty->field_C59C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) | 2645 // if ( (char *)pParty->field_C59C[9 * (v68 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] != v11 ) |
2646 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v68].uItemID) | 2646 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v68].uItemID) |
2647 ++v149; | 2647 ++v149; |
2648 ++v68; | 2648 ++v68; |
2649 } | 2649 } |
2650 while ( v68 < 6 ); | 2650 while ( v68 < 6 ); |
2651 } | 2651 } |
2671 return; | 2671 return; |
2672 v149 = v74 - 1; | 2672 v149 = v74 - 1; |
2673 v75 = (int)window_SpeakInHouse->ptr_1C; | 2673 v75 = (int)window_SpeakInHouse->ptr_1C; |
2674 v76 = 9 * (v74 - 1 + 12 * v75); | 2674 v76 = 9 * (v74 - 1 + 12 * v75); |
2675 if ( dword_F8B19C == 2 ) | 2675 if ( dword_F8B19C == 2 ) |
2676 v77 = (ItemGen *)&pParty->field_777C[v76]; | 2676 v77 = (ItemGen *)&pParty->StandartItemsInShops[v76]; |
2677 else | 2677 else |
2678 v77 = &pParty->Recipes_Item[(int)75][v74-1];//(ItemGen *)&pParty->field_C59C[v76 + 724]; | 2678 v77 = &pParty->SpecialItemsInShop[(int)75][v74-1];//(ItemGen *)&pParty->field_C59C[v76 + 724]; |
2679 if ( v69 == (short)v11 || Str == v11 ) | 2679 if ( v69 == (short)v11 || Str == v11 ) |
2680 { | 2680 { |
2681 v124 = (__int64 *)v11; | 2681 v124 = (__int64 *)v11; |
2682 v122 = 2; | 2682 v122 = 2; |
2683 v120 = window_SpeakInHouse->ptr_1C; | 2683 v120 = window_SpeakInHouse->ptr_1C; |
4020 switch ( a1 ) | 4020 switch ( a1 ) |
4021 { | 4021 { |
4022 case 96: | 4022 case 96: |
4023 pDialogueWindow->eWindowType = WINDOW_MainMenu; | 4023 pDialogueWindow->eWindowType = WINDOW_MainMenu; |
4024 UI_CreateEndConversationButton(); | 4024 UI_CreateEndConversationButton(); |
4025 sub_4B3703((void *)dword_F8B198); | 4025 sub_4B3703(dword_F8B198); |
4026 break; | 4026 break; |
4027 case 101: | 4027 case 101: |
4028 pDialogueWindow->eWindowType = WINDOW_MainMenu; | 4028 pDialogueWindow->eWindowType = WINDOW_MainMenu; |
4029 UI_CreateEndConversationButton(); | 4029 UI_CreateEndConversationButton(); |
4030 sub_4B3A72(dword_F8B198); | 4030 sub_4B3A72(dword_F8B198); |
4128 } | 4128 } |
4129 if ( (signed __int64)__PAIR__( | 4129 if ( (signed __int64)__PAIR__( |
4130 pParty->field_3C.field_50[2 * (unsigned int)v8->ptr_1C + 1], | 4130 pParty->field_3C.field_50[2 * (unsigned int)v8->ptr_1C + 1], |
4131 pParty->field_3C.field_50[2 * (unsigned int)v8->ptr_1C]) < (signed __int64)pParty->uTimePlayed ) | 4131 pParty->field_3C.field_50[2 * (unsigned int)v8->ptr_1C]) < (signed __int64)pParty->uTimePlayed ) |
4132 { | 4132 { |
4133 GenerateShopItems(); | 4133 GenerateStandartShopItems(); |
4134 sub_4B8F94(); | 4134 GenerateSpecialShopItems(); |
4135 v8 = window_SpeakInHouse; | 4135 v8 = window_SpeakInHouse; |
4136 v40 = window_SpeakInHouse->ptr_1C; | 4136 v40 = window_SpeakInHouse->ptr_1C; |
4137 //v3 = dword_F8B198; | 4137 //v3 = dword_F8B198; |
4138 v41 = pParty->uTimePlayed | 4138 v41 = pParty->uTimePlayed |
4139 //+ (signed __int64)((double)(11059200 * (signed int)p2DEvents_minus1[26 * (unsigned int)ptr_507BC0->ptr_1C]) | 4139 //+ (signed __int64)((double)(11059200 * (signed int)p2DEvents_minus1[26 * (unsigned int)ptr_507BC0->ptr_1C]) |
4146 v43 = 0; | 4146 v43 = 0; |
4147 //v44 = p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]; | 4147 //v44 = p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]; |
4148 v44 = p2DEvents[(unsigned int)v8->ptr_1C - 1].uType; | 4148 v44 = p2DEvents[(unsigned int)v8->ptr_1C - 1].uType; |
4149 if ( a1 == 2 ) | 4149 if ( a1 == 2 ) |
4150 { | 4150 { |
4151 if ( _4F063C_smthn_by_2da_uType[v44] ) | 4151 if ( uItemsAmountPerShopType[v44] ) |
4152 { | 4152 { |
4153 do | 4153 do |
4154 { | 4154 { |
4155 v45 = pParty->field_777C[(int)v42][v43].uItemID; | 4155 v45 = pParty->StandartItemsInShops[(int)v42][v43].uItemID; |
4156 if ( v45 ) | 4156 if ( v45 ) |
4157 { | 4157 { |
4158 v46 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v45].pIconName, TEXTURE_16BIT_PALETTE); | 4158 v46 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v45].pIconName, TEXTURE_16BIT_PALETTE); |
4159 //v3 = dword_F8B198; | 4159 //v3 = dword_F8B198; |
4160 v8 = window_SpeakInHouse; | 4160 v8 = window_SpeakInHouse; |
4162 } | 4162 } |
4163 v42 = v8->ptr_1C; | 4163 v42 = v8->ptr_1C; |
4164 ++v43; | 4164 ++v43; |
4165 } | 4165 } |
4166 //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); | 4166 //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); |
4167 while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); | 4167 while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); |
4168 } | 4168 } |
4169 if ( dword_F8B198 == 1 ) | 4169 if ( dword_F8B198 == 1 ) |
4170 { | 4170 { |
4171 v47 = v8->ptr_1C; | 4171 v47 = v8->ptr_1C; |
4172 v48 = 0; | 4172 v48 = 0; |
4173 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) | 4173 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) |
4174 if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) | 4174 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) |
4175 { | 4175 { |
4176 do | 4176 do |
4177 { | 4177 { |
4178 // if ( pParty->field_777C[9 * (v48 + 12 * (int)v47)] ) | 4178 // if ( pParty->field_777C[9 * (v48 + 12 * (int)v47)] ) |
4179 if ( pParty->field_777C[(int)v47][v48].uItemID); | 4179 if ( pParty->StandartItemsInShops[(int)v47][v48].uItemID); |
4180 { | 4180 { |
4181 v49 = rand(); | 4181 v49 = rand(); |
4182 v8 = window_SpeakInHouse; | 4182 v8 = window_SpeakInHouse; |
4183 word_F8B158[v48] = v49 % (300 - dword_F8B168[v48]->uTextureHeight); | 4183 word_F8B158[v48] = v49 % (300 - dword_F8B168[v48]->uTextureHeight); |
4184 } | 4184 } |
4185 v47 = v8->ptr_1C; | 4185 v47 = v8->ptr_1C; |
4186 ++v48; | 4186 ++v48; |
4187 } | 4187 } |
4188 //while ( v48 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); | 4188 //while ( v48 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); |
4189 while ( v48 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); | 4189 while ( v48 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); |
4190 } | 4190 } |
4191 } | 4191 } |
4192 } | 4192 } |
4193 else | 4193 else |
4194 { | 4194 { |
4195 if ( _4F063C_smthn_by_2da_uType[v44] ) | 4195 if ( uItemsAmountPerShopType[v44] ) |
4196 { | 4196 { |
4197 do | 4197 do |
4198 { | 4198 { |
4199 //v50 = pParty->field_C59C[9 * (v43 + 12 * (int)v42) + 724]; | 4199 //v50 = pParty->field_C59C[9 * (v43 + 12 * (int)v42) + 724]; |
4200 v50=pParty->Recipes_Item[(unsigned int)v42][(signed int)v43].uItemID; | 4200 v50=pParty->SpecialItemsInShop[(unsigned int)v42][(signed int)v43].uItemID; |
4201 if ( v50 ) | 4201 if ( v50 ) |
4202 { | 4202 { |
4203 v51 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v50].pIconName, TEXTURE_16BIT_PALETTE); | 4203 v51 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v50].pIconName, TEXTURE_16BIT_PALETTE); |
4204 //v3 = dword_F8B198; | 4204 //v3 = dword_F8B198; |
4205 v8 = window_SpeakInHouse; | 4205 v8 = window_SpeakInHouse; |
4207 } | 4207 } |
4208 v42 = v8->ptr_1C; | 4208 v42 = v8->ptr_1C; |
4209 ++v43; | 4209 ++v43; |
4210 } | 4210 } |
4211 //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); | 4211 //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); |
4212 while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); | 4212 while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); |
4213 } | 4213 } |
4214 if ( dword_F8B198 == 1 ) | 4214 if ( dword_F8B198 == 1 ) |
4215 { | 4215 { |
4216 v52 = v8->ptr_1C; | 4216 v52 = v8->ptr_1C; |
4217 v53 = 0; | 4217 v53 = 0; |
4218 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) | 4218 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) |
4219 if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) | 4219 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) |
4220 { | 4220 { |
4221 do | 4221 do |
4222 { | 4222 { |
4223 // if ( pParty->field_C59C[9 * (v53 + 12 * (int)v52) + 724] ) | 4223 // if ( pParty->field_C59C[9 * (v53 + 12 * (int)v52) + 724] ) |
4224 if (pParty->Recipes_Item[(unsigned int)v52][v53].uItemID) | 4224 if (pParty->SpecialItemsInShop[(unsigned int)v52][v53].uItemID) |
4225 { | 4225 { |
4226 v54 = rand(); | 4226 v54 = rand(); |
4227 v8 = window_SpeakInHouse; | 4227 v8 = window_SpeakInHouse; |
4228 word_F8B158[v53] = v54 % (300 - dword_F8B168[v53]->uTextureHeight); | 4228 word_F8B158[v53] = v54 % (300 - dword_F8B168[v53]->uTextureHeight); |
4229 } | 4229 } |
4230 v52 = v8->ptr_1C; | 4230 v52 = v8->ptr_1C; |
4231 ++v53; | 4231 ++v53; |
4232 } | 4232 } |
4233 //while ( v53 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); | 4233 //while ( v53 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); |
4234 while ( v53 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType ] ); | 4234 while ( v53 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType ] ); |
4235 } | 4235 } |
4236 } | 4236 } |
4237 } | 4237 } |
4238 } | 4238 } |
4239 | 4239 |
4532 return; | 4532 return; |
4533 v30 = window_SpeakInHouse->ptr_1C; | 4533 v30 = window_SpeakInHouse->ptr_1C; |
4534 // v31 = 9 * (v29 - 1 + 12 * (int)v30); | 4534 // v31 = 9 * (v29 - 1 + 12 * (int)v30); |
4535 if ( dword_F8B19C == 2 ) | 4535 if ( dword_F8B19C == 2 ) |
4536 { | 4536 { |
4537 v32 = (ItemGen *)&pParty->field_777C[(int)v30][v29]; | 4537 v32 = (ItemGen *)&pParty->StandartItemsInShops[(int)v30][v29]; |
4538 _this = (ItemGen *)&pParty->field_777C[(int)v30][v29]; | 4538 _this = (ItemGen *)&pParty->StandartItemsInShops[(int)v30][v29]; |
4539 } | 4539 } |
4540 else | 4540 else |
4541 { | 4541 { |
4542 _this =&pParty->Recipes_Item[(int)v30][v29-1]; //(ItemGen *)&pParty->field_C59C[v31 + 724]; | 4542 _this =&pParty->SpecialItemsInShop[(int)v30][v29-1]; //(ItemGen *)&pParty->field_C59C[v31 + 724]; |
4543 v32 = &pParty->Recipes_Item[(int)v30][v29-1];//(ItemGen *)&pParty->field_C59C[v31 + 724]; | 4543 v32 = &pParty->SpecialItemsInShop[(int)v30][v29-1];//(ItemGen *)&pParty->field_C59C[v31 + 724]; |
4544 } | 4544 } |
4545 //v33 = p2DEvents_minus1__20[13 * (signed int)v30]; | 4545 //v33 = p2DEvents_minus1__20[13 * (signed int)v30]; |
4546 v33 = p2DEvents[(signed int)v30 - 1].fPriceMultiplier; | 4546 v33 = p2DEvents[(signed int)v30 - 1].fPriceMultiplier; |
4547 v34 = v32->GetValue(); | 4547 v34 = v32->GetValue(); |
4548 v80 = v0->_4B8142(v34, v33); | 4548 v80 = v0->_4B8142(v34, v33); |