Mercurial > mm7
comparison UI/UICharacter.cpp @ 2114:68fbaf45ef66
_42FB5C_check_spell cleaned
author | Ritor1 |
---|---|
date | Mon, 23 Dec 2013 17:30:22 +0600 |
parents | e460ca22fe8a |
children | d28d3c006077 |
comparison
equal
deleted
inserted
replaced
2113:a94c5bee0225 | 2114:68fbaf45ef66 |
---|---|
1543 //----- (0041A2D1) -------------------------------------------------------- | 1543 //----- (0041A2D1) -------------------------------------------------------- |
1544 void CharacterUI_InventoryTab_Draw(Player *player, bool a2) | 1544 void CharacterUI_InventoryTab_Draw(Player *player, bool a2) |
1545 { | 1545 { |
1546 Texture *pTexture; // esi@6 | 1546 Texture *pTexture; // esi@6 |
1547 int v13; // eax@13 | 1547 int v13; // eax@13 |
1548 int v15; // eax@13 | 1548 //int v15; // eax@13 |
1549 unsigned int v17; // edi@15 | 1549 unsigned int v17; // edi@15 |
1550 unsigned int uCellX; // [sp+30h] [bp-8h]@5 | 1550 unsigned int uCellX; // [sp+30h] [bp-8h]@5 |
1551 unsigned int uCellY; // [sp+34h] [bp-4h]@5 | 1551 unsigned int uCellY; // [sp+34h] [bp-4h]@5 |
1552 | 1552 |
1553 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_CharacterUI_InventoryBackground)); | 1553 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_CharacterUI_InventoryBackground)); |
1565 pTexture = pIcons_LOD->GetTexture(item_texture_id); | 1565 pTexture = pIcons_LOD->GetTexture(item_texture_id); |
1566 if (pTexture->uTextureWidth < 14) | 1566 if (pTexture->uTextureWidth < 14) |
1567 pTexture->uTextureWidth = 14; | 1567 pTexture->uTextureWidth = 14; |
1568 if ( (pTexture->uTextureWidth - 14) / 32 == 0 && pTexture->uTextureWidth < 32) | 1568 if ( (pTexture->uTextureWidth - 14) / 32 == 0 && pTexture->uTextureWidth < 32) |
1569 uCellX += (32 - pTexture->uTextureWidth) / 2; | 1569 uCellX += (32 - pTexture->uTextureWidth) / 2; |
1570 v13 = pTexture->uTextureWidth - 14; | 1570 //v13 = pTexture->uTextureWidth - 14; |
1571 LOBYTE(v13) = v13 & 0xE0; | 1571 //LOBYTE(v13) = v13 & 0xE0; |
1572 v15 = v13 + 32; | 1572 //v15 = v13 + 32; |
1573 if (pTexture->uTextureHeight < 14 ) | 1573 if (pTexture->uTextureHeight < 14 ) |
1574 pTexture->uTextureHeight = 14; | 1574 pTexture->uTextureHeight = 14; |
1575 v17 = uCellX + ((v15 - pTexture->uTextureWidth) >> 1) + pSRZBufferLineOffsets[uCellY + (( (int)((pTexture->uTextureHeight - 14) & 0xFFFFFFE0) - pTexture->uTextureHeight + 32) >> 1)]; //added typecast. without it the value in the brackets got cat to unsigned which messed stuff up | 1575 v17 = uCellX + (( (int)((pTexture->uTextureWidth - 14) & 0xE0) + 32 - pTexture->uTextureWidth) / 2) |
1576 + pSRZBufferLineOffsets[uCellY + (( (int)((pTexture->uTextureHeight - 14) & 0xFFFFFFE0) - pTexture->uTextureHeight + 32) / 2)]; //added typecast. without it the value in the brackets got cat to unsigned which messed stuff up | |
1576 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & ITEM_ENCHANT_ANIMATION) | 1577 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & ITEM_ENCHANT_ANIMATION) |
1577 { | 1578 { |
1578 Texture *loadedTextureptr = nullptr; | 1579 Texture *loadedTextureptr = nullptr; |
1579 switch (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & ITEM_ENCHANT_ANIMATION) | 1580 switch (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & ITEM_ENCHANT_ANIMATION) |
1580 { | 1581 { |