Mercurial > mm7
diff UI/UIShops.cpp @ 1384:b51332ab228f
changed a few member variables in Player to slightly less confusing names
author | Grumpy7 |
---|---|
date | Tue, 16 Jul 2013 20:51:29 +0200 |
parents | bedc304ab617 |
children | 28f87f5234a1 |
line wrap: on
line diff
--- a/UI/UIShops.cpp Tue Jul 16 00:40:01 2013 +0200 +++ b/UI/UIShops.cpp Tue Jul 16 20:51:29 2013 +0200 @@ -266,7 +266,7 @@ pMouse->GetCursorPos(&v94)->x <= 13) || pMouse->GetCursorPos(&v90)->x >= 462 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v106.x), !pNumActiveItem) ) return; - v79 = (ItemGen *)&pPlayer->pInventoryItems[pNumActiveItem - 1]; + v79 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; v13 = pPlayer->SelectPhrasesTransaction(v79, BildingType_WeaponShop, (int)window_SpeakInHouse->ptr_1C, 3); v7 = BuilDialogueString((char *)pMerchantsSellPhrases[v13], uActiveCharacter - 1, v79, (char *)window_SpeakInHouse->ptr_1C, 3, 0); pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); @@ -285,7 +285,7 @@ pMouse->GetCursorPos(&v100)->x <= 13) || pMouse->GetCursorPos(&v92)->x >= 462 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v106.x), !pNumActiveItem) ) return; - v4 = (ItemGen *)&pPlayer->pInventoryItems[pNumActiveItem - 1]; + v4 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; if (!v4->Identified()) { v10 = pPlayer->SelectPhrasesTransaction(v4, BildingType_WeaponShop, (int)window_SpeakInHouse->ptr_1C, 4); @@ -314,7 +314,7 @@ || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v106.x), !pNumActiveItem) || (!(pPlayer->pOwnItems[pNumActiveItem-1].uAttributes& 2)) ) return; - v4 = (ItemGen *)&pPlayer->pInventoryItems[pNumActiveItem - 1]; + v4 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; v10 = pPlayer->SelectPhrasesTransaction(v4, BildingType_ArmorShop, (int)window_SpeakInHouse->ptr_1C, 5); v7 = BuilDialogueString((char *)pMerchantsRepairPhrases[v10], uActiveCharacter - 1, v4, (char *)window_SpeakInHouse->ptr_1C, 5, 0); pTextHeight = (174 - pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0)) / 2 + 138; @@ -892,7 +892,7 @@ pMouse->GetCursorPos(&v137)->x <= 13) || pMouse->GetCursorPos(&v129)->x >= 462 || (v10 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&pItemCount), v11 = 0, !v10) ) return; - v116 = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItems[v10 - 1]; + v116 = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItemList[v10 - 1]; v13 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(v116, BildingType_ArmorShop, window_SpeakInHouse->par1C, 3); v15 = (char *)pMerchantsSellPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(v116, BildingType_ArmorShop, window_SpeakInHouse->par1C, 3)]; v36 = BuilDialogueString(v15, uActiveCharacter - 1, v116, (char *) window_SpeakInHouse->par1C, 3, 0); @@ -917,7 +917,7 @@ v2 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&pItemCount); if ( v2 ) { - v3 = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItems[v2-1]; + v3 = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItemList[v2-1]; if (v3->Identified()) v5 = "%24"; else @@ -949,8 +949,8 @@ || (v32 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&pItemCount), v11 = 0, !v32) || (!(pPlayers[uActiveCharacter]->pOwnItems[v32-1].uAttributes& 2)) ) return; - v116 = &pPlayers[uActiveCharacter]->pInventoryItems[v33 - 1]; - v35 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItems[v32 - 1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 5); + v116 = &pPlayers[uActiveCharacter]->pInventoryItemList[v33 - 1]; + v35 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItemList[v32 - 1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 5); v15 = (char *)pMerchantsRepairPhrases[v35]; v36 = BuilDialogueString(v15, uActiveCharacter - 1, v116, (char *)window_SpeakInHouse->ptr_1C, 5, 0); v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; @@ -1386,7 +1386,7 @@ pMouse->GetCursorPos(&v102)->x <= 13) || pMouse->GetCursorPos(&v100)->x >= 462 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v109), !pNumActiveItem) ) return; - v87 = (ItemGen *)&pPlayer->pInventoryItems[pNumActiveItem - 1]; + v87 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; v45 = pPlayer->SelectPhrasesTransaction(v87, BildingType_AlchemistShop, (int)window_SpeakInHouse->ptr_1C, 3); v21 = BuilDialogueString((char *)pMerchantsSellPhrases[v45], uActiveCharacter - 1, v87, (char *)window_SpeakInHouse->ptr_1C, 3, 0); pTextHeight = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); @@ -1404,7 +1404,7 @@ pMouse->GetCursorPos(&v101)->x <= 13) || pMouse->GetCursorPos(&v97)->x >= 462 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v109), !pNumActiveItem) ) return; - v37 = (ItemGen *)&pPlayer->pInventoryItems[pNumActiveItem - 1]; + v37 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; if (!v37->Identified()) { v42 = pPlayer->SelectPhrasesTransaction(v37, BildingType_AlchemistShop, (int)window_SpeakInHouse->ptr_1C, 4); @@ -2137,7 +2137,7 @@ || (result = (int)pMouse->GetCursorPos(&v101), *(int *)result >= 462) || (result = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v117), v3 = 0, !result) ) return; - item = &pPlayers[uActiveCharacter]->pInventoryItems[result - 1]; + item = &pPlayers[uActiveCharacter]->pInventoryItemList[result - 1]; v13 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 3); v30 = BuilDialogueString((char *)pMerchantsSellPhrases[v13], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 3, 0); v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; @@ -2162,7 +2162,7 @@ result = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v117); if ( result ) { - item = &pPlayers[uActiveCharacter]->pInventoryItems[result-1]; + item = &pPlayers[uActiveCharacter]->pInventoryItemList[result-1]; if ( item->uAttributes & 1 ) { v5 = BuilDialogueString("%24", uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 4, 0); @@ -2196,8 +2196,8 @@ // || (result *= 9, !(pPlayers[uActiveCharacter]->field_1F5[4 * result + 15] & 2)) ) || (!(pPlayers[uActiveCharacter]->pOwnItems[result-1].uAttributes& 2)) ) return; - item = &pPlayers[uActiveCharacter]->pInventoryItems[result - 1]; - v29 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItems[result - 1], BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 5); + item = &pPlayers[uActiveCharacter]->pInventoryItemList[result - 1]; + v29 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItemList[result - 1], BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 5); v30 = BuilDialogueString((char *)pMerchantsRepairPhrases[v29], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 5, 0); v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; dialog_window.DrawTitleText(pFontArrus, v3, v6, pWhiteColor, v30, 3); @@ -2352,7 +2352,7 @@ if ( taken_item ) { bought_item->SetIdentified(); - memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[taken_item - 1], bought_item, 0x24u); + memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[taken_item - 1], bought_item, 0x24u); dword_F8B1E4 = 1; Party::TakeGold(uPriceItemService); viewparams->bRedrawGameUI = 1; @@ -2372,7 +2372,7 @@ || pMouse->GetCursorPos(&cursor)->x >= 462 || (v15 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v79), !v15) ) return; - if ( MerchandiseTest(&pPlayers[uActiveCharacter]->pInventoryItems[v15 - 1], (int)window_SpeakInHouse->ptr_1C) ) + if ( MerchandiseTest(&pPlayers[uActiveCharacter]->pInventoryItemList[v15 - 1], (int)window_SpeakInHouse->ptr_1C) ) { dword_F8B1E4 = 1; pPlayers[uActiveCharacter]->SalesProcess(v79, v15 - 1, (int)window_SpeakInHouse->ptr_1C); @@ -2395,7 +2395,7 @@ if ( pItemID ) { uPriceItemService = pPlayers[uActiveCharacter]->GetPriceIdentification(p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier); - item = &pPlayers[uActiveCharacter]->pInventoryItems[pItemID - 1]; + item = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1]; if ( !(item->uAttributes & 1) ) { if ( MerchandiseTest(item, (int)window_SpeakInHouse->ptr_1C) ) @@ -2432,9 +2432,9 @@ pItemID = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v79); if ( pItemID ) { - item = &pPlayers[uActiveCharacter]->pInventoryItems[pItemID - 1]; + item = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1]; pPriceMultiplier = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier; - auto _v = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItems[pItemID - 1]; + auto _v = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1]; uPriceItemService = pPlayers[uActiveCharacter]->GetPriceRepair(_v->GetValue(), pPriceMultiplier); if ( item->uAttributes & 2 ) { @@ -2510,14 +2510,14 @@ if ( v39 ) { bought_item->SetIdentified(); - memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v39 - 1], bought_item, sizeof(ItemGen)); + memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v39 - 1], bought_item, sizeof(ItemGen)); if ( pPlayers[uActiveCharacter]->CanSteal() ) { if ( GetAsyncKeyState(VK_CONTROL) ) { if ( uNumSeconds == 1 || uNumSeconds == 2 ) { - pPlayers[uActiveCharacter]->pInventoryItems[v39 - 1].SetStolen(); + pPlayers[uActiveCharacter]->pInventoryItemList[v39 - 1].SetStolen(); sub_4B1447_party_fine((int)window_SpeakInHouse->ptr_1C, uNumSeconds, a6); viewparams->bRedrawGameUI = 1; bought_item->Reset(); @@ -2614,7 +2614,7 @@ || pMouse->GetCursorPos(&v12)->x >= 462 || (v9 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex(&v5)) == 0 ) return; - GameUI_DrawItemInfo(&pPlayers[uActiveCharacter]->pInventoryItems[v9 - 1]); + GameUI_DrawItemInfo(&pPlayers[uActiveCharacter]->pInventoryItemList[v9 - 1]); return; } if ( dialog_menu_id != HOUSE_DIALOGUE_SHOP_BUY_SPECIAL )