# HG changeset patch # User Grumpy7 # Date 1370814713 -7200 # Node ID 766ec1e7f4ea332cbeda46121d56b63eb30f0d87 # Parent b237a61e61d318eabd837cc49639ec0a779cb178 fixing monster portrait not drawing when rightclicking + out of bounds error when opening inventory diff -r b237a61e61d3 -r 766ec1e7f4ea UICharacter.cpp --- 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) { diff -r b237a61e61d3 -r 766ec1e7f4ea mm7_data.cpp --- 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 pHealthBarPos = {{22, 137, 251, 366}}; std::array pManaBarPos = {{102, 217, 331, 447}}; std::array _4E2B21_buff_spell_tooltip_colors; -std::array monster_popup_y_offsets = +std::array 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 diff -r b237a61e61d3 -r 766ec1e7f4ea mm7_data.h --- 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 pHealthBarPos; extern std::array pManaBarPos; extern std::array _4E2B21_buff_spell_tooltip_colors; -extern std::array monster_popup_y_offsets; // weak +extern std::array monster_popup_y_offsets; // weak extern unsigned char hourglass_icon_idx; // weak