Mercurial > mm7
changeset 1243:766ec1e7f4ea
fixing monster portrait not drawing when rightclicking + out of bounds error when opening inventory
author | Grumpy7 |
---|---|
date | Sun, 09 Jun 2013 23:51:53 +0200 |
parents | b237a61e61d3 |
children | 6279bf7a4d1a |
files | UICharacter.cpp mm7_data.cpp mm7_data.h |
diffstat | 3 files changed, 11 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/UICharacter.cpp Sun Jun 09 17:35:10 2013 +0200 +++ b/UICharacter.cpp Sun Jun 09 23:51:53 2013 +0200 @@ -1728,7 +1728,6 @@ uCellY = 32 * (i / 14) + 17; uCellX = 32 * (i % 14) + 14; - uint item_texture_id = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE); v7 = pIcons_LOD->GetTexture(item_texture_id); @@ -1744,7 +1743,7 @@ v14 = v7->uTextureHeight; if (v14 < 14 ) v14 = 14; - v17 = uCellX + ((v15 - v7->uTextureWidth) >> 1) + pSRZBufferLineOffsets[uCellY + ((((v14 - 14) & 0xFFFFFFE0) - v7->uTextureHeight + 32) >> 1)]; + v17 = uCellX + ((v15 - v7->uTextureWidth) >> 1) + pSRZBufferLineOffsets[uCellY + (( (int)((v14 - 14) & 0xFFFFFFE0) - v7->uTextureHeight + 32) >> 1)]; //added typecast. without it the value in the brackets got cat to unsigned which messed stuff up if (item->uAttributes & 0xF0) {
--- a/mm7_data.cpp Sun Jun 09 17:35:10 2013 +0200 +++ b/mm7_data.cpp Sun Jun 09 23:51:53 2013 +0200 @@ -487,16 +487,16 @@ std::array<unsigned int, 4> pHealthBarPos = {{22, 137, 251, 366}}; std::array<unsigned int, 4> pManaBarPos = {{102, 217, 331, 447}}; std::array<char, 80> _4E2B21_buff_spell_tooltip_colors; -std::array<unsigned char, 88> monster_popup_y_offsets = +std::array<char, 88> monster_popup_y_offsets = {{ - 236, 20, 0, 216, 0, 0, 0, 0, 0, 0, 206, - 20, 0, 246, 246, 236, 10, 246, 0, 0, 0, 236, - 10, 246, 0, 0, 0, 236, 246, 0, 0, 0, 216, - 236, 0, 0, 0, 206, 226, 226, 226, 226, 226, 226, - 0, 0, 0, 0, 0, 0, 236, 236, 236, 20, 20, - 20, 10, 10, 10, 10, 10, 10, 166, 196, 216, 236, - 236, 176, 246, 0, 0, 216, 0, 0, 0, 236, 10, - 0, 0, 0, 0, 0, 0, 196, 0, 0, 0, 0 + -20, 20, 0, -40, 0, 0, 0, 0, 0, 0, -50, + 20, 0, -10, -10, -20, 10, -10, 0, 0, 0, -20, + 10, -10, 0, 0, 0, -20, -10, 0, 0, 0, -40, + -20, 0, 0, 0, -50, -30, -30, -30, -30, -30, -30, + 0, 0, 0, 0, 0, 0, -20, -20, -20, 20, 20, + 20, 10, 10, 10, 10, 10, 10, -90, -60, -40, -20, + -20, -80, -10, 0, 0, -40, 0, 0, 0, -20, 10, + 0, 0, 0, 0, 0, 0, -60, 0, 0, 0, 0 }}; unsigned char hourglass_icon_idx = 12; // weak
--- a/mm7_data.h Sun Jun 09 17:35:10 2013 +0200 +++ b/mm7_data.h Sun Jun 09 23:51:53 2013 +0200 @@ -435,7 +435,7 @@ extern std::array<unsigned int, 4> pHealthBarPos; extern std::array<unsigned int, 4> pManaBarPos; extern std::array<char, 80> _4E2B21_buff_spell_tooltip_colors; -extern std::array<unsigned char, 88> monster_popup_y_offsets; // weak +extern std::array<char, 88> monster_popup_y_offsets; // weak extern unsigned char hourglass_icon_idx; // weak