Mercurial > mm7
comparison mm7_2.cpp @ 315:2a09e1d6fc8f
Some 0041D895 GameUI_DrawItemInfo overhaul
author | Nomad |
---|---|
date | Wed, 20 Feb 2013 01:17:13 +0200 |
parents | 3dcc9d945eeb |
children | ce39b96acf5c |
comparison
equal
deleted
inserted
replaced
306:e33f5a1cdc46 | 315:2a09e1d6fc8f |
---|---|
1444 if ( result ) | 1444 if ( result ) |
1445 { | 1445 { |
1446 v85 = 0; | 1446 v85 = 0; |
1447 v83 = 4; | 1447 v83 = 4; |
1448 v4 = (ItemGen *)&_this->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * (int)result + 5]; | 1448 v4 = (ItemGen *)&_this->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * (int)result + 5]; |
1449 if ( !(v4->uAttributes & 1) ) | 1449 if (!v4->Identified()) |
1450 { | 1450 { |
1451 v81 = ptr_507BC0->ptr_1C; | 1451 v81 = ptr_507BC0->ptr_1C; |
1452 v79 = v4; | 1452 v79 = v4; |
1453 v9 = (int)ptr_507BC0->ptr_1C; | 1453 v9 = (int)ptr_507BC0->ptr_1C; |
1454 v110 = uActiveCharacter - 1; | 1454 v110 = uActiveCharacter - 1; |
1843 || (result = (POINT *)v0->GetItemIDAtInventoryIndex((int *)&v109), v3 = 0, !result) ) | 1843 || (result = (POINT *)v0->GetItemIDAtInventoryIndex((int *)&v109), v3 = 0, !result) ) |
1844 return result; | 1844 return result; |
1845 v93 = 0; | 1845 v93 = 0; |
1846 v91 = 4; | 1846 v91 = 4; |
1847 v37 = (ItemGen *)&_this->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * (int)result + 5]; | 1847 v37 = (ItemGen *)&_this->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * (int)result + 5]; |
1848 if ( !(v37->uAttributes & 1) ) | 1848 if (!v37->Identified()) |
1849 { | 1849 { |
1850 v89 = ptr_507BC0->ptr_1C; | 1850 v89 = ptr_507BC0->ptr_1C; |
1851 v87 = v37; | 1851 v87 = v37; |
1852 v41 = (int)ptr_507BC0->ptr_1C; | 1852 v41 = (int)ptr_507BC0->ptr_1C; |
1853 v113 = uActiveCharacter - 1; | 1853 v113 = uActiveCharacter - 1; |
2892 { | 2892 { |
2893 v2 = v0->GetItemIDAtInventoryIndex((int *)&v149); | 2893 v2 = v0->GetItemIDAtInventoryIndex((int *)&v149); |
2894 if ( v2 ) | 2894 if ( v2 ) |
2895 { | 2895 { |
2896 v3 = (ItemGen *)&v0->pInventoryItems[v2-1]; | 2896 v3 = (ItemGen *)&v0->pInventoryItems[v2-1]; |
2897 if ( v3->uAttributes & 1 ) | 2897 if (v3->Identified()) |
2898 { | 2898 { |
2899 v118 = ptr_507BC0->ptr_1C; | 2899 v118 = ptr_507BC0->ptr_1C; |
2900 v4 = uActiveCharacter - 1; | 2900 v4 = uActiveCharacter - 1; |
2901 v5 = "%24"; | 2901 v5 = "%24"; |
2902 v114 = v3; | 2902 v114 = v3; |
4593 } | 4593 } |
4594 v25 = v0->AddItem(0xFFFFFFFFu, v20->uItemID); | 4594 v25 = v0->AddItem(0xFFFFFFFFu, v20->uItemID); |
4595 if ( v25 ) | 4595 if ( v25 ) |
4596 { | 4596 { |
4597 v26 = 1; | 4597 v26 = 1; |
4598 v20->uAttributes |= 1u; | 4598 v20->SetIdentified(); |
4599 memcpy(&v0->pInventoryItems[v25-1], v20, 0x24u); | 4599 memcpy(&v0->pInventoryItems[v25-1], v20, 0x24u); |
4600 goto LABEL_42; | 4600 goto LABEL_42; |
4601 } | 4601 } |
4602 v0->PlaySound(SPEECH_NoRoom, 0); | 4602 v0->PlaySound(SPEECH_NoRoom, 0); |
4603 v54 = 5; | 4603 v54 = 5; |
4661 } | 4661 } |
4662 } | 4662 } |
4663 v39 = v0->AddItem(0xFFFFFFFFu, v32->uItemID); | 4663 v39 = v0->AddItem(0xFFFFFFFFu, v32->uItemID); |
4664 if ( v39 ) | 4664 if ( v39 ) |
4665 { | 4665 { |
4666 v32->uAttributes |= 1u; | 4666 v32->SetIdentified(); |
4667 v7 = v73 == 1; | 4667 v7 = v73 == 1; |
4668 v40 = (int)((char *)v0 + 36 * v39); | 4668 v40 = (int)((char *)v0 + 36 * v39); |
4669 memcpy((void *)(v40 + 496), v32, 0x24u); | 4669 memcpy((void *)(v40 + 496), v32, 0x24u); |
4670 if ( v7 ) | 4670 if ( v7 ) |
4671 { | 4671 { |
8001 if ( v15 >= (signed int)pObjectList->uNumObjects ) | 8001 if ( v15 >= (signed int)pObjectList->uNumObjects ) |
8002 goto LABEL_24; | 8002 goto LABEL_24; |
8003 } | 8003 } |
8004 v18 = v15; | 8004 v18 = v15; |
8005 } | 8005 } |
8006 a1a.stru_24.uAttributes |= 1u; | 8006 a1a.stru_24.SetIdentified(); |
8007 a1a.uObjectDescID = v18; | 8007 a1a.uObjectDescID = v18; |
8008 a1a.stru_24.uAdditionalValue = v34; | 8008 a1a.stru_24.uAdditionalValue = v34; |
8009 goto LABEL_35; | 8009 goto LABEL_35; |
8010 } | 8010 } |
8011 v14 = rand() % 3001 + 2000; | 8011 v14 = rand() % 3001 + 2000; |
8160 v10 = rand() % 3001 + 2000; | 8160 v10 = rand() % 3001 + 2000; |
8161 goto LABEL_15; | 8161 goto LABEL_15; |
8162 } | 8162 } |
8163 } | 8163 } |
8164 LABEL_23: | 8164 LABEL_23: |
8165 v3->uAttributes |= 1u; | 8165 v3->SetIdentified(); |
8166 v3->uAdditionalValue = v10; | 8166 v3->uAdditionalValue = v10; |
8167 LABEL_25: | 8167 LABEL_25: |
8168 v11 = v4 - 1; | 8168 v11 = v4 - 1; |
8169 v12 = 0; | 8169 v12 = 0; |
8170 if ( v11 > 0 ) | 8170 if ( v11 > 0 ) |