Mercurial > mm7
diff 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 |
line wrap: on
line diff
--- a/mm7_2.cpp Sun Feb 24 20:47:46 2013 +0400 +++ b/mm7_2.cpp Mon Feb 25 08:30:49 2013 +0400 @@ -1414,7 +1414,7 @@ do { // 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); + if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][(int)v48].uItemID); { v49 = word_F8B158[(signed int)v48]; v50 = dword_F8B168[(signed int)v48]; @@ -1440,7 +1440,7 @@ do { // 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) + if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v109].uItemID) { v52 = word_F8B158[(signed int)v109] + 30; v53 = dword_F8B168[(signed int)v109]; @@ -1466,7 +1466,7 @@ v106.x = 0; do { - if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID);//9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) + if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID);//9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) ++v106.x; ++v55; } @@ -1477,7 +1477,7 @@ do { // 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) + if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID) ++v106.x; ++v55; } @@ -1507,9 +1507,9 @@ v106.x = v60; v61 = (int)window_SpeakInHouse->ptr_1C; // v62 = 9 * (v60 + 12 * v61); - v63 = (ItemGen *)&pParty->field_777C[(int)v61][v60]; + v63 = (ItemGen *)&pParty->StandartItemsInShops[(int)v61][v60]; if ( dword_F8B19C != 2 ) - v63 = &pParty->Recipes_Item[(int)v61][v60];//v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; + v63 = &pParty->SpecialItemsInShop[(int)v61][v60];//v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; if ( !v56 || !Str ) { v85 = 0; @@ -1955,7 +1955,7 @@ do { // 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); + if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID); { v46 = dword_F8B168[v114]; v47 = 152 - v46->uTextureHeight; @@ -1986,7 +1986,7 @@ do { // 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); + if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v114+1].uItemID); { v50 = dword_F8B168[v114 + 6]; v51 = 308 - v50->uTextureHeight; @@ -2019,7 +2019,7 @@ do { //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) + if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v114].uItemID) { v54 = dword_F8B168[v114]; v55 = 152 - v54->uTextureHeight; @@ -2050,7 +2050,7 @@ do { // 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 + if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v114].uItemID) //not itemid { v58 = dword_F8B168[v114 + 6]; v59 = 308 - v58->uTextureHeight; @@ -2088,7 +2088,7 @@ do { // 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); + if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID); ++v109; ++v62; } @@ -2099,7 +2099,7 @@ do { //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) + if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v62].uItemID) ++v109; ++v62; } @@ -2133,9 +2133,9 @@ v109 = v67; v68 = (int)window_SpeakInHouse->ptr_1C; // v69 = 9 * (v67 + 12 * v68); - v70 = (ItemGen *)&pParty->field_777C[v68][v67]; + v70 = (ItemGen *)&pParty->StandartItemsInShops[v68][v67]; if ( dword_F8B19C != 2 ) - v70 = &pParty->Recipes_Item[(int)v68][v67];//v70 = (ItemGen *)&pParty->field_C59C[v69 + 724]; + v70 = &pParty->SpecialItemsInShop[(int)v68][v67];//v70 = (ItemGen *)&pParty->field_C59C[v69 + 724]; if ( !v63 || !Str ) { v93 = 0; @@ -2340,7 +2340,7 @@ do { // 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) + if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v93].uItemID) ++v149; ++v93; } @@ -2357,7 +2357,7 @@ v97 = uActiveCharacter - 1; // v98 = (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724]; v99 = _this->_490EEE( - &pParty->Recipes_Item[(int)v96][v95-1],// (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724], + &pParty->SpecialItemsInShop[(int)v96][v95-1],// (ItemGen *)&pParty->field_C59C[9 * (v95 - 1 + 12 * (int)v96) + 724], 2, (int)window_SpeakInHouse->ptr_1C, 2); @@ -2372,7 +2372,7 @@ do { //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) + if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v104].uItemID) { v105 = dword_F8B168[v104]; if ( v104 >= 4 ) @@ -2560,7 +2560,7 @@ 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); + if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v55].uItemID); { v56 = dword_F8B168[v55]; if ( v55 >= 4 ) @@ -2595,7 +2595,7 @@ do { // 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) + if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v61].uItemID) { v62 = dword_F8B168[v61]; if ( v61 >= 4 ) @@ -2632,7 +2632,7 @@ do { // 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); + if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v68].uItemID); ++v149; ++v68; } @@ -2643,7 +2643,7 @@ do { // 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) + if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)v68].uItemID) ++v149; ++v68; } @@ -2673,9 +2673,9 @@ v75 = (int)window_SpeakInHouse->ptr_1C; v76 = 9 * (v74 - 1 + 12 * v75); if ( dword_F8B19C == 2 ) - v77 = (ItemGen *)&pParty->field_777C[v76]; + v77 = (ItemGen *)&pParty->StandartItemsInShops[v76]; else - v77 = &pParty->Recipes_Item[(int)75][v74-1];//(ItemGen *)&pParty->field_C59C[v76 + 724]; + v77 = &pParty->SpecialItemsInShop[(int)75][v74-1];//(ItemGen *)&pParty->field_C59C[v76 + 724]; if ( v69 == (short)v11 || Str == v11 ) { v124 = (__int64 *)v11; @@ -4022,7 +4022,7 @@ case 96: pDialogueWindow->eWindowType = WINDOW_MainMenu; UI_CreateEndConversationButton(); - sub_4B3703((void *)dword_F8B198); + sub_4B3703(dword_F8B198); break; case 101: pDialogueWindow->eWindowType = WINDOW_MainMenu; @@ -4130,8 +4130,8 @@ pParty->field_3C.field_50[2 * (unsigned int)v8->ptr_1C + 1], pParty->field_3C.field_50[2 * (unsigned int)v8->ptr_1C]) < (signed __int64)pParty->uTimePlayed ) { - GenerateShopItems(); - sub_4B8F94(); + GenerateStandartShopItems(); + GenerateSpecialShopItems(); v8 = window_SpeakInHouse; v40 = window_SpeakInHouse->ptr_1C; //v3 = dword_F8B198; @@ -4148,11 +4148,11 @@ v44 = p2DEvents[(unsigned int)v8->ptr_1C - 1].uType; if ( a1 == 2 ) { - if ( _4F063C_smthn_by_2da_uType[v44] ) + if ( uItemsAmountPerShopType[v44] ) { do { - v45 = pParty->field_777C[(int)v42][v43].uItemID; + v45 = pParty->StandartItemsInShops[(int)v42][v43].uItemID; if ( v45 ) { v46 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v45].pIconName, TEXTURE_16BIT_PALETTE); @@ -4164,19 +4164,19 @@ ++v43; } //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); - while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); + while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); } if ( dword_F8B198 == 1 ) { v47 = v8->ptr_1C; v48 = 0; //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) - if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) + if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) { do { // if ( pParty->field_777C[9 * (v48 + 12 * (int)v47)] ) - if ( pParty->field_777C[(int)v47][v48].uItemID); + if ( pParty->StandartItemsInShops[(int)v47][v48].uItemID); { v49 = rand(); v8 = window_SpeakInHouse; @@ -4186,18 +4186,18 @@ ++v48; } //while ( v48 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); - while ( v48 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); + while ( v48 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); } } } else { - if ( _4F063C_smthn_by_2da_uType[v44] ) + if ( uItemsAmountPerShopType[v44] ) { do { //v50 = pParty->field_C59C[9 * (v43 + 12 * (int)v42) + 724]; - v50=pParty->Recipes_Item[(unsigned int)v42][(signed int)v43].uItemID; + v50=pParty->SpecialItemsInShop[(unsigned int)v42][(signed int)v43].uItemID; if ( v50 ) { v51 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v50].pIconName, TEXTURE_16BIT_PALETTE); @@ -4209,19 +4209,19 @@ ++v43; } //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); - while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); + while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); } if ( dword_F8B198 == 1 ) { v52 = v8->ptr_1C; v53 = 0; //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) - if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) + if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) { do { // if ( pParty->field_C59C[9 * (v53 + 12 * (int)v52) + 724] ) - if (pParty->Recipes_Item[(unsigned int)v52][v53].uItemID) + if (pParty->SpecialItemsInShop[(unsigned int)v52][v53].uItemID) { v54 = rand(); v8 = window_SpeakInHouse; @@ -4231,7 +4231,7 @@ ++v53; } //while ( v53 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); - while ( v53 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType ] ); + while ( v53 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType ] ); } } } @@ -4534,13 +4534,13 @@ // v31 = 9 * (v29 - 1 + 12 * (int)v30); if ( dword_F8B19C == 2 ) { - v32 = (ItemGen *)&pParty->field_777C[(int)v30][v29]; - _this = (ItemGen *)&pParty->field_777C[(int)v30][v29]; + v32 = (ItemGen *)&pParty->StandartItemsInShops[(int)v30][v29]; + _this = (ItemGen *)&pParty->StandartItemsInShops[(int)v30][v29]; } else { - _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]; + _this =&pParty->SpecialItemsInShop[(int)v30][v29-1]; //(ItemGen *)&pParty->field_C59C[v31 + 724]; + v32 = &pParty->SpecialItemsInShop[(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;