Mercurial > mm7
comparison UI/UIShops.cpp @ 1409:c9e3b93ec570
Highlighted locations with "using uninitialized variable" warning.
author | Nomad |
---|---|
date | Fri, 26 Jul 2013 21:16:51 +0200 |
parents | d4f57df4c299 |
children | 38df78aba732 |
comparison
equal
deleted
inserted
replaced
1408:204cce84300b | 1409:c9e3b93ec570 |
---|---|
666 int v153; // [sp+100h] [bp-4h]@44 | 666 int v153; // [sp+100h] [bp-4h]@44 |
667 int th; | 667 int th; |
668 short text_color; | 668 short text_color; |
669 int pActiveButton; | 669 int pActiveButton; |
670 | 670 |
671 __debugbreak(); // uishops.cpp(952): warning C4700: uninitialized local variable 'v33' used | |
672 __debugbreak(); // uishops.cpp(981): warning C4700: uninitialized local variable 'v98' used | |
671 memcpy(&dialog_window, window_SpeakInHouse, sizeof(dialog_window)); | 673 memcpy(&dialog_window, window_SpeakInHouse, sizeof(dialog_window)); |
672 dialog_window.uFrameX = 483; | 674 dialog_window.uFrameX = 483; |
673 dialog_window.uFrameWidth = 148; | 675 dialog_window.uFrameWidth = 148; |
674 dialog_window.uFrameZ = 334; | 676 dialog_window.uFrameZ = 334; |
675 pWhiteColor = TargetColor(0xFFu, 0xFFu, 0xFFu); | 677 pWhiteColor = TargetColor(0xFFu, 0xFFu, 0xFFu); |
947 pMouse->GetCursorPos(&v140)->x <= 13) | 949 pMouse->GetCursorPos(&v140)->x <= 13) |
948 || pMouse->GetCursorPos(&v138)->x >= 462 | 950 || pMouse->GetCursorPos(&v138)->x >= 462 |
949 || (v32 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&pItemCount), v11 = 0, !v32) | 951 || (v32 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&pItemCount), v11 = 0, !v32) |
950 || (!(pPlayers[uActiveCharacter]->pOwnItems[v32-1].uAttributes& 2)) ) | 952 || (!(pPlayers[uActiveCharacter]->pOwnItems[v32-1].uAttributes& 2)) ) |
951 return; | 953 return; |
954 __debugbreak(); // warning C4700: uninitialized local variable 'v33' used | |
952 v116 = &pPlayers[uActiveCharacter]->pInventoryItemList[v33 - 1]; | 955 v116 = &pPlayers[uActiveCharacter]->pInventoryItemList[v33 - 1]; |
953 v35 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItemList[v32 - 1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 5); | 956 v35 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItemList[v32 - 1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 5); |
954 v15 = (char *)pMerchantsRepairPhrases[v35]; | 957 v15 = (char *)pMerchantsRepairPhrases[v35]; |
955 v36 = BuilDialogueString(v15, uActiveCharacter - 1, v116, (char *)window_SpeakInHouse->ptr_1C, 5, 0); | 958 v36 = BuilDialogueString(v15, uActiveCharacter - 1, v116, (char *)window_SpeakInHouse->ptr_1C, 5, 0); |
956 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; | 959 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; |
975 v95 = pItemCount; | 978 v95 = pItemCount; |
976 if ( pItemCount && pItemCount != -65536 ) | 979 if ( pItemCount && pItemCount != -65536 ) |
977 { | 980 { |
978 --pItemCount; | 981 --pItemCount; |
979 v97 = uActiveCharacter - 1; | 982 v97 = uActiveCharacter - 1; |
983 __debugbreak(); // warning C4700: uninitialized local variable 'v98' used | |
980 v99 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][v95-1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 2); | 984 v99 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][v95-1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 2); |
981 v100 = BuilDialogueString((char *)pMerchantsBuyPhrases[v99], uActiveCharacter - 1, v98, (char *)window_SpeakInHouse->par1C, 2, 0); | 985 v100 = BuilDialogueString((char *)pMerchantsBuyPhrases[v99], uActiveCharacter - 1, v98, (char *)window_SpeakInHouse->par1C, 2, 0); |
982 v103 = pFontArrus->CalcTextHeight(v100, &dialog_window, 0, 0); | 986 v103 = pFontArrus->CalcTextHeight(v100, &dialog_window, 0, 0); |
983 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v103) / 2 + 138, pWhiteColor, v100, 3); | 987 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v103) / 2 + 138, pWhiteColor, v100, 3); |
984 } | 988 } |