Mercurial > mm7
changeset 1978:2233efdc8d00
fixing wrong shape of element being enchanted in inventory
author | Grumpy7 |
---|---|
date | Mon, 28 Oct 2013 20:29:53 -0700 |
parents | 780dd567f1da |
children | 92dfa0cafbe3 |
files | UI/UICharacter.cpp |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/UI/UICharacter.cpp Mon Oct 28 00:57:37 2013 -0700 +++ b/UI/UICharacter.cpp Mon Oct 28 20:29:53 2013 -0700 @@ -1575,12 +1575,13 @@ 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 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & 0xF0) { + Texture *loadedTextureptr = nullptr; switch (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & 0xF0) { - case ITEM_AURA_EFFECT_RED: pTexture = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break; - case ITEM_AURA_EFFECT_BLUE: pTexture = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break; - case ITEM_AURA_EFFECT_GREEN: pTexture = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break; - case ITEM_AURA_EFFECT_PURPLE: pTexture = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break; + case ITEM_AURA_EFFECT_RED: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break; + case ITEM_AURA_EFFECT_BLUE: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break; + case ITEM_AURA_EFFECT_GREEN: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break; + case ITEM_AURA_EFFECT_PURPLE: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break; } _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; if (_50C9A8_item_enchantment_timer <= 0) @@ -1589,7 +1590,8 @@ LOBYTE(player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes) &= 0xF; ptr_50C9A4_ItemToEnchant = 0; } - pRenderer->DrawAura(uCellX, uCellY, pTexture, pTexture, GetTickCount() * 0.1, 0, 255); + + pRenderer->DrawAura(uCellX, uCellY, pTexture, loadedTextureptr, GetTickCount() * 0.1, 0, 255); ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]); } else