comparison Player.cpp @ 1006:e865f349aa41

ui cleanup
author Gloval
date Sat, 18 May 2013 22:01:26 +0400
parents dcdfbb6eede9
children 446175a32a15
comparison
equal deleted inserted replaced
1004:eac5af72b614 1006:e865f349aa41
1374 v5 = GetSizeInInventorySlots(v4->uTextureWidth); 1374 v5 = GetSizeInInventorySlots(v4->uTextureWidth);
1375 uItemIDa = GetSizeInInventorySlots(v4->uTextureHeight); 1375 uItemIDa = GetSizeInInventorySlots(v4->uTextureHeight);
1376 if ( !areWeLoadingTexture ) 1376 if ( !areWeLoadingTexture )
1377 { 1377 {
1378 v4->Release(); 1378 v4->Release();
1379 pIcons_LOD->_40F9C5(); 1379 pIcons_LOD->SyncLoadedFilesCount();
1380 } 1380 }
1381 if ( (signed int)(v5 + (signed int)uSlot % 14) <= 14 && (signed int)(uItemIDa + (signed int)uSlot / 14) <= 9 ) 1381 if ( (signed int)(v5 + (signed int)uSlot % 14) <= 14 && (signed int)(uItemIDa + (signed int)uSlot / 14) <= 9 )
1382 { 1382 {
1383 v6 = 0; 1383 v6 = 0;
1384 if ( (signed int)uItemIDa <= 0 ) 1384 if ( (signed int)uItemIDa <= 0 )
1469 v10 = GetSizeInInventorySlots(v8->uTextureWidth); 1469 v10 = GetSizeInInventorySlots(v8->uTextureWidth);
1470 uItemIDa = GetSizeInInventorySlots(v8->uTextureHeight); 1470 uItemIDa = GetSizeInInventorySlots(v8->uTextureHeight);
1471 if ( !areWeLoadingTexture ) 1471 if ( !areWeLoadingTexture )
1472 { 1472 {
1473 v8->Release(); 1473 v8->Release();
1474 pIcons_LOD->_40F9C5(); 1474 pIcons_LOD->SyncLoadedFilesCount();
1475 } 1475 }
1476 if ( (signed int)uItemIDa > 0 ) 1476 if ( (signed int)uItemIDa > 0 )
1477 { 1477 {
1478 v9 = &v11->pInventoryIndices[uSlot]; 1478 v9 = &v11->pInventoryIndices[uSlot];
1479 do 1479 do
1678 v10 = GetSizeInInventorySlots(v7->uTextureWidth); 1678 v10 = GetSizeInInventorySlots(v7->uTextureWidth);
1679 v11 = GetSizeInInventorySlots(v7->uTextureHeight); 1679 v11 = GetSizeInInventorySlots(v7->uTextureHeight);
1680 if ( !areWeLoadingTexture ) 1680 if ( !areWeLoadingTexture )
1681 { 1681 {
1682 v7->Release(); 1682 v7->Release();
1683 pIcons_LOD->_40F9C5(); 1683 pIcons_LOD->SyncLoadedFilesCount();
1684 } 1684 }
1685 v8 = uSlot; 1685 v8 = uSlot;
1686 if ( (signed int)v11 > 0 ) 1686 if ( (signed int)v11 > 0 )
1687 { 1687 {
1688 uSlota = v11; 1688 uSlota = v11;
1718 v9 = GetSizeInInventorySlots(v6->uTextureWidth); 1718 v9 = GetSizeInInventorySlots(v6->uTextureWidth);
1719 a2a = GetSizeInInventorySlots(v6->uTextureHeight); 1719 a2a = GetSizeInInventorySlots(v6->uTextureHeight);
1720 if ( !areWeLoadingTexture ) 1720 if ( !areWeLoadingTexture )
1721 { 1721 {
1722 v6->Release(); 1722 v6->Release();
1723 pIcons_LOD->_40F9C5(); 1723 pIcons_LOD->SyncLoadedFilesCount();
1724 } 1724 }
1725 if ( (signed int)a2a > 0 ) 1725 if ( (signed int)a2a > 0 )
1726 { 1726 {
1727 v7 = &pInventoryIndices[a4]; 1727 v7 = &pInventoryIndices[a4];
1728 do 1728 do
1739 } 1739 }
1740 1740
1741 // 506128: using guessed type int areWeLoadingTexture; 1741 // 506128: using guessed type int areWeLoadingTexture;
1742 1742
1743 //----- (00492A36) -------------------------------------------------------- 1743 //----- (00492A36) --------------------------------------------------------
1744 unsigned int Player::RemoveItemAtInventoryIndex(unsigned int uSlot) 1744 void Player::RemoveItemAtInventoryIndex( unsigned int uSlot )
1745 { 1745 {
1746 int *pIndices; // edi@1 1746 int *pIndices; // edi@1
1747 ItemGen *v3; // ecx@1 1747 ItemGen *v3; // ecx@1
1748 unsigned int v4; // esi@1 1748 unsigned int v4; // esi@1
1749 //unsigned int v5; // eax@1 1749 //unsigned int v5; // eax@1
1750 Texture *v6; // esi@1 1750 Texture *v6; // esi@1
1762 result = GetSizeInInventorySlots(v6->uTextureHeight); 1762 result = GetSizeInInventorySlots(v6->uTextureHeight);
1763 v8 = result; 1763 v8 = result;
1764 if ( !areWeLoadingTexture ) 1764 if ( !areWeLoadingTexture )
1765 { 1765 {
1766 v6->Release(); 1766 v6->Release();
1767 result = pIcons_LOD->_40F9C5(); 1767 pIcons_LOD->SyncLoadedFilesCount();
1768 } 1768 }
1769 if ( (signed int)v8 > 0 ) 1769 if ( (signed int)v8 > 0 )
1770 { 1770 {
1771 v9 = pIndices; 1771 v9 = pIndices;
1772 do 1772 do
1779 v9 = (char *)v9 + 56; 1779 v9 = (char *)v9 + 56;
1780 --v8; 1780 --v8;
1781 } 1781 }
1782 while ( v8 ); 1782 while ( v8 );
1783 } 1783 }
1784 return result; 1784
1785 } 1785 }
1786 // 506128: using guessed type int areWeLoadingTexture; 1786 // 506128: using guessed type int areWeLoadingTexture;
1787 1787
1788 //identf 1788 //identf
1789 //----- (00490EEE) -------------------------------------------------------- 1789 //----- (00490EEE) --------------------------------------------------------
2429 if ( v8 >= 4 ) 2429 if ( v8 >= 4 )
2430 { 2430 {
2431 if ( !v21 ) 2431 if ( !v21 )
2432 { 2432 {
2433 v7->Release(); 2433 v7->Release();
2434 pIcons_LOD->_40F9C5(); 2434 pIcons_LOD->SyncLoadedFilesCount();
2435 } 2435 }
2436 goto LABEL_15; 2436 goto LABEL_15;
2437 } 2437 }
2438 } 2438 }
2439 memcpy(&v9->pInventoryItems[v10-1], pItem, 0x24u); 2439 memcpy(&v9->pInventoryItems[v10-1], pItem, 0x24u);
2441 pAudioPlayer->PlaySound(SOUND_GoldReceived, 0, 0, -1, 0, 0, 0, 0); 2441 pAudioPlayer->PlaySound(SOUND_GoldReceived, 0, 0, -1, 0, 0, 0, 0);
2442 v19->PlaySound(SPEECH_60, 0); 2442 v19->PlaySound(SPEECH_60, 0);
2443 if ( !v21 ) 2443 if ( !v21 )
2444 { 2444 {
2445 v7->Release(); 2445 v7->Release();
2446 pIcons_LOD->_40F9C5(); 2446 pIcons_LOD->SyncLoadedFilesCount();
2447 } 2447 }
2448 result = 1; 2448 result = 1;
2449 } 2449 }
2450 else 2450 else
2451 { 2451 {