comparison mm7_1.cpp @ 244:bb9e946cbcbf

cleaning, ring fixed
author zipi
date Sun, 17 Feb 2013 23:59:30 +0000
parents a6a8fa73b4ec
children 37dcbe8f3cca
comparison
equal deleted inserted replaced
243:a6a8fa73b4ec 244:bb9e946cbcbf
5653 v11 = areWeLoadingTexture; 5653 v11 = areWeLoadingTexture;
5654 if ( uActiveCharacter 5654 if ( uActiveCharacter
5655 && (v2 = pPlayers[uActiveCharacter]->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID)) != 0 ) 5655 && (v2 = pPlayers[uActiveCharacter]->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID)) != 0 )
5656 { 5656 {
5657 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v2-1], &pParty->pPickedItem, 0x24u); 5657 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v2-1], &pParty->pPickedItem, 0x24u);
5658 pMouse->RemoveHoldingItem();
5658 } 5659 }
5659 else 5660 else
5660 { 5661 {
5661 v12 = 0; 5662 v12 = 0;
5662 v3 = pParty->pPlayers; 5663 v3 = pParty->pPlayers;
5663 while ( 1 ) 5664 while ( v3 <= &pParty->pPlayers[3] )
5664 { 5665 {
5665 v4 = v3->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID); 5666 v4 = v3->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID);
5666 if ( v4 ) 5667 if ( v4 )
5667 break; 5668 {
5668 ++v12; 5669 memcpy(&pParty->pPlayers[v12].pInventoryItems[v4], &pParty->pPickedItem, 0x24u);
5670 pMouse->RemoveHoldingItem();
5671 break;
5672 }
5673 ++v12;
5669 ++v3; 5674 ++v3;
5670 if ( (signed int)v3 >= (signed int)pParty->pHirelings ) 5675 }
5671 goto LABEL_10; 5676 if ( v12 == 4 )
5672 } 5677 {
5673 memcpy(&pParty->pPlayers[v12].spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v4 + 5], &pParty->pPickedItem, 0x24u); 5678 v5 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID;
5674 pMouse->RemoveHoldingItem(); 5679 v6 = 0;
5675 LABEL_10: 5680 a1.uItemType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID;
5676 if ( v12 != 4 ) 5681 if ( (signed int)pObjectList->uNumObjects <= 0 )
5677 goto LABEL_18; 5682 {
5678 v5 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; 5683 LOWORD(v6) = 0;
5679 v6 = 0; 5684 }
5680 a1.uItemType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; 5685 else
5681 if ( (signed int)pObjectList->uNumObjects <= 0 ) 5686 {
5682 { 5687 v7 = (char *)&pObjectList->pObjects->uObjectID;
5683 LABEL_15: 5688 while ( v5 != *(short *)v7 )
5684 LOWORD(v6) = 0; 5689 {
5685 } 5690 ++v6;
5686 else 5691 v7 += 56;
5687 { 5692 if ( v6 >= (signed int)pObjectList->uNumObjects )
5688 v7 = (char *)&pObjectList->pObjects->uObjectID; 5693 {
5689 while ( v5 != *(short *)v7 ) 5694 LOWORD(v6) = 0;
5690 { 5695 break;
5691 ++v6; 5696 }
5692 v7 += 56; 5697 }
5693 if ( v6 >= (signed int)pObjectList->uNumObjects ) 5698 }
5694 goto LABEL_15; 5699 a1.field_58 = 4;
5695 } 5700 a1.uObjectDescID = v6;
5696 } 5701 a1.vPosition.y = pParty->vPosition.y;
5697 a1.field_58 = 4; 5702 a1.vPosition.x = pParty->vPosition.x;
5698 a1.uObjectDescID = v6; 5703 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z;
5699 a1.vPosition.y = pParty->vPosition.y; 5704 a1.uSoundID = 0;
5700 a1.vPosition.x = pParty->vPosition.x; 5705 a1.uFacing = 0;
5701 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z; 5706 a1.uAttributes = 8;
5702 a1.uSoundID = 0; 5707 v8 = pIndoor->GetSector(
5703 a1.uFacing = 0; 5708 pParty->vPosition.x,
5704 a1.uAttributes = 8; 5709 pParty->vPosition.y,
5705 v8 = pIndoor->GetSector( 5710 pParty->sEyelevel + pParty->vPosition.z);
5706 pParty->vPosition.x, 5711 a1.uSpriteFrameID = 0;
5707 pParty->vPosition.y, 5712 a1.uSectorID = v8;
5708 pParty->sEyelevel + pParty->vPosition.z); 5713 memcpy(&a1.stru_24, &pParty->pPickedItem, sizeof(a1.stru_24));
5709 a1.uSpriteFrameID = 0; 5714 a1.Create(pParty->sRotationY, 184, 200, 0);
5710 a1.uSectorID = v8; 5715 pMouse->RemoveHoldingItem();
5711 memcpy(&a1.stru_24, &pParty->pPickedItem, sizeof(a1.stru_24)); 5716 }
5712 a1.Create(pParty->sRotationY, 184, 200, 0); 5717 }
5713 }
5714 pMouse->RemoveHoldingItem();
5715 LABEL_18:
5716 if ( !v11 ) 5718 if ( !v11 )
5717 { 5719 {
5718 v1->Release(); 5720 v1->Release();
5719 pIcons_LOD->_40F9C5(); 5721 pIcons_LOD->_40F9C5();
5720 } 5722 }