Mercurial > mm7
changeset 244:bb9e946cbcbf
cleaning, ring fixed
author | zipi |
---|---|
date | Sun, 17 Feb 2013 23:59:30 +0000 |
parents | a6a8fa73b4ec |
children | f070b49d40dd |
files | mm7_1.cpp mm7_5.cpp |
diffstat | 2 files changed, 58 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/mm7_1.cpp Sun Feb 17 23:40:46 2013 +0000 +++ b/mm7_1.cpp Sun Feb 17 23:59:30 2013 +0000 @@ -5655,64 +5655,66 @@ && (v2 = pPlayers[uActiveCharacter]->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID)) != 0 ) { memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v2-1], &pParty->pPickedItem, 0x24u); + pMouse->RemoveHoldingItem(); } else { v12 = 0; v3 = pParty->pPlayers; - while ( 1 ) + while ( v3 <= &pParty->pPlayers[3] ) { v4 = v3->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID); if ( v4 ) - break; - ++v12; + { + memcpy(&pParty->pPlayers[v12].pInventoryItems[v4], &pParty->pPickedItem, 0x24u); + pMouse->RemoveHoldingItem(); + break; + } + ++v12; ++v3; - if ( (signed int)v3 >= (signed int)pParty->pHirelings ) - goto LABEL_10; - } - memcpy(&pParty->pPlayers[v12].spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v4 + 5], &pParty->pPickedItem, 0x24u); - pMouse->RemoveHoldingItem(); -LABEL_10: - if ( v12 != 4 ) - goto LABEL_18; - v5 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; - v6 = 0; - a1.uItemType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; - if ( (signed int)pObjectList->uNumObjects <= 0 ) - { -LABEL_15: - LOWORD(v6) = 0; - } - else - { - v7 = (char *)&pObjectList->pObjects->uObjectID; - while ( v5 != *(short *)v7 ) - { - ++v6; - v7 += 56; - if ( v6 >= (signed int)pObjectList->uNumObjects ) - goto LABEL_15; - } - } - a1.field_58 = 4; - a1.uObjectDescID = v6; - a1.vPosition.y = pParty->vPosition.y; - a1.vPosition.x = pParty->vPosition.x; - a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z; - a1.uSoundID = 0; - a1.uFacing = 0; - a1.uAttributes = 8; - v8 = pIndoor->GetSector( - pParty->vPosition.x, - pParty->vPosition.y, - pParty->sEyelevel + pParty->vPosition.z); - a1.uSpriteFrameID = 0; - a1.uSectorID = v8; - memcpy(&a1.stru_24, &pParty->pPickedItem, sizeof(a1.stru_24)); - a1.Create(pParty->sRotationY, 184, 200, 0); - } - pMouse->RemoveHoldingItem(); -LABEL_18: + } + if ( v12 == 4 ) + { + v5 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; + v6 = 0; + a1.uItemType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; + if ( (signed int)pObjectList->uNumObjects <= 0 ) + { + LOWORD(v6) = 0; + } + else + { + v7 = (char *)&pObjectList->pObjects->uObjectID; + while ( v5 != *(short *)v7 ) + { + ++v6; + v7 += 56; + if ( v6 >= (signed int)pObjectList->uNumObjects ) + { + LOWORD(v6) = 0; + break; + } + } + } + a1.field_58 = 4; + a1.uObjectDescID = v6; + a1.vPosition.y = pParty->vPosition.y; + a1.vPosition.x = pParty->vPosition.x; + a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z; + a1.uSoundID = 0; + a1.uFacing = 0; + a1.uAttributes = 8; + v8 = pIndoor->GetSector( + pParty->vPosition.x, + pParty->vPosition.y, + pParty->sEyelevel + pParty->vPosition.z); + a1.uSpriteFrameID = 0; + a1.uSectorID = v8; + memcpy(&a1.stru_24, &pParty->pPickedItem, sizeof(a1.stru_24)); + a1.Create(pParty->sRotationY, 184, 200, 0); + pMouse->RemoveHoldingItem(); + } + } if ( !v11 ) { v1->Release();
--- a/mm7_5.cpp Sun Feb 17 23:40:46 2013 +0000 +++ b/mm7_5.cpp Sun Feb 17 23:59:30 2013 +0000 @@ -8586,7 +8586,7 @@ unsigned int v1; // ebx@1 Player *pPlayer; // edi@1 int v3; // ecx@1 - int v4; // edi@3 + int *v4; // edi@3 unsigned int v5; // ebx@3 int v6; // eax@3 LODFile_IconsBitmaps *v7; // ecx@7 @@ -8628,7 +8628,7 @@ int v43; // [sp+10h] [bp-20h]@47 unsigned int a3; // [sp+14h] [bp-1Ch]@3 unsigned int a2; // [sp+18h] [bp-18h]@3 - int v46; // [sp+1Ch] [bp-14h]@1 + unsigned int *v46; // [sp+1Ch] [bp-14h]@1 Player *v47; // [sp+20h] [bp-10h]@1 int v48; // [sp+24h] [bp-Ch]@1 int v49; // [sp+24h] [bp-Ch]@26 @@ -8643,17 +8643,17 @@ pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY, (Texture *)(uTextureID_5118C8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5118C8] : 0)); v3 = 0; - v46 = (int)&pPlayer->pEquipment.field_28; + v46 = &pPlayer->pEquipment.field_28; v48 = 0; do { - if ( !*(int *)v46 ) + if ( !*v46 ) goto LABEL_24; - v39 = *(int *)v46; - v4 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *(int *)v46 + 5]; + v39 = *v46; + v4 = (int *)&pPlayer->pInventoryItems[*v46-1].uItemID; a3 = pPaperdollRingsY[v3]; a2 = pPaperdollRingsX[v3]; - v5 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v4].pIconName, TEXTURE_16BIT_PALETTE); + v5 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*v4].pIconName, TEXTURE_16BIT_PALETTE); v6 = *(int *)(v4 + 20); if ( *(int *)(v4 + 20) & 0xF0 ) {