diff Chest.cpp @ 600:db4a23580e6c

Chest item view fixed, gold can be taken
author Gloval
date Thu, 07 Mar 2013 00:35:10 +0400
parents 96f48cfdd657
children 5bf285f56fa8
line wrap: on
line diff
--- a/Chest.cpp	Wed Mar 06 22:47:21 2013 +0400
+++ b/Chest.cpp	Thu Mar 07 00:35:10 2013 +0400
@@ -302,9 +302,9 @@
             v13 = v12 + 32;
             if ( itemPixelHeght < 14 )
                 itemPixelHeght = 14;
-            itemPixelPosX = chest_offs_x + 32 * (item_counter % chestWidthCells) + ((v13 - itemPixelWidth) >> 1);
+            itemPixelPosX = chest_offs_x + 32 * (item_counter % chestWidthCells) + ((signed int)(v13 - itemPixelWidth)/2);
             itemPixelPosY = chest_offs_y + 32 * (item_counter / chestHeghtCells) +
-                ((((itemPixelHeght - 14) & 0xFFFFFFE0) - item_texture->uTextureHeight + 32) >> 1);
+                ((signed int)(((itemPixelHeght - 14) & 0xFFFFFFE0) + 32- item_texture->uTextureHeight ) /2);
             pRenderer->DrawTextureTransparent(  itemPixelPosX,   itemPixelPosY,  item_texture);
             sub_40F92A(&v16[itemPixelPosX + pSRZBufferLineOffsets[itemPixelPosY]], item_texture, item_counter + 1);
             }