diff UI/UIPopup.cpp @ 2095:577c081b8019

Merge
author Ritor1
date Thu, 12 Dec 2013 21:44:02 +0600
parents 52415f8bf7c2
children 7810cb3a5fb7
line wrap: on
line diff
--- a/UI/UIPopup.cpp	Thu Dec 12 21:42:18 2013 +0600
+++ b/UI/UIPopup.cpp	Thu Dec 12 21:44:02 2013 +0600
@@ -314,7 +314,7 @@
                                      TEXTURE_16BIT_PALETTE)->uTextureHeight + v81 + 54;
   if ( (signed int)Str > (signed int)iteminfo_window.uFrameHeight )
     iteminfo_window.uFrameHeight = (unsigned int)Str;
-  if ( inspect_item->uAttributes & 8 && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
+  if ( inspect_item->uAttributes & ITEM_TEMP_BONUS && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
     iteminfo_window.uFrameHeight += LOBYTE(pFontComic->uFontHeight);
   v85 = 0;
   if ( pFontArrus->uFontHeight )
@@ -366,7 +366,7 @@
   }
   else
   {
-    if ( (inspect_item->uAttributes & 8) && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
+    if ( (inspect_item->uAttributes & ITEM_TEMP_BONUS) && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
     {
       init_summoned_item(&v67, inspect_item->uExpireTime - pParty->uTimePlayed);
       strcpy(pTmpBuf.data(), "Duration:");
@@ -393,11 +393,11 @@
     }
     sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], inspect_item->GetValue());
     iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0);
-    if ( BYTE1(inspect_item->uAttributes) & 1 )
+    if ( inspect_item->uAttributes & ITEM_STOLEN )
       pText = pGlobalTXT_LocalizationStrings[187]; //"Stolen"
     else
     {
-      if ( !(BYTE1(inspect_item->uAttributes) & 2) )
+      if ( !(inspect_item->uAttributes & ITEM_HARDENED) )
       {
         pRenderer->ResetTextureClipRect();
         if ( !areWeLoadingTexture )
@@ -485,9 +485,8 @@
     memcpy(&pMonsterInfoUI_Doll, &pActors[uActorID], sizeof(pMonsterInfoUI_Doll));
     pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored;
     pMonsterInfoUI_Doll.uCurrentActionTime = 0;
-    v8 = rand();
-    v9 = v8 % 256 + 128;
-    pMonsterInfoUI_Doll.uCurrentActionLength = v8 % 256 + 128;
+    v9 = rand() % 256 + 128;
+    pMonsterInfoUI_Doll.uCurrentActionLength = v9;
   }
 
   if ( (signed int)pMonsterInfoUI_Doll.uCurrentActionTime > (signed __int16)v9 )
@@ -523,11 +522,11 @@
   v106.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v10->uPaletteIndex, 0, 1);
   v106.sZValue = 0;
   v106.uFlags = 0;
-  pRenderer->SetRasterClipRect(0, 0, 0x27Fu, 0x1DFu);
-  pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, Color16(0xE1u, 255, 0x9Bu));
-  pRenderer->RasterLine2D( v106.uViewportX + 129,  v106.uViewportY - 1,  v106.uViewportX + 129,    v106.uViewportW + 1, Color16(0xE1u, 255, 0x9Bu));
-  pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, Color16(0xE1u, 255, 0x9Bu));
-  pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, Color16(0xE1u, 255, 0x9Bu));
+  pRenderer->SetRasterClipRect(0, 0, 639, 479);
+  pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, Color16(0xE1u, 255, 0x9Bu));//горизонтальная верхняя линия
+  pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, Color16(0xE1u, 255, 0x9Bu));//горизонтальная нижняя линия
+  pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, Color16(0xE1u, 255, 0x9Bu));//левая вертикальная линия
+  pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportW + 1, Color16(0xE1u, 255, 0x9Bu));//правая вертикальная линия
   if ( pRenderer->pRenderD3D )
   {
     v106.uScreenSpaceY = v115 + v106.uViewportY + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferHeight;
@@ -634,7 +633,7 @@
                        pDesc.dwWidth  * src_x / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaWidth;
             uint b = src[idx] & 0x1F;
             //*dst++ = b | 2 * (src[idx] & 0xFFE0);
-            pRenderer->WritePixel16(y, x, b | 2 * (src[idx] & 0xFFE0));
+            pRenderer->WritePixel16(x, y, b | 2 * (src[idx] & 0xFFE0));
           }
         }
         pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->Unlock(0);