diff GUI/UI/UICharacter.cpp @ 2524:c7264ab7132f

Main menu rendered using d3d11
author a.parshin
date Fri, 10 Oct 2014 17:42:05 +0300
parents a77c34acdbc9
children a902abdfc7f2
line wrap: on
line diff
--- a/GUI/UI/UICharacter.cpp	Thu Oct 09 23:33:36 2014 +0300
+++ b/GUI/UI/UICharacter.cpp	Fri Oct 10 17:42:05 2014 +0300
@@ -769,11 +769,11 @@
       break;
     }
 
-  pRenderer->ResetTextureClipRect();
+  pRenderer->ResetUIClipRect();
   pRenderer->DrawTextureIndexed(467, 0, pIcons_LOD->GetTexture(uTextureID_BACKDOLL));//Подложка
   if ( IsPlayerWearingWatersuit[uPlayerID] )//акваланг
   {
-    pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
+    pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
     if ( !bRingsShownInCharScreen )
       pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor);
     //Рука не занята или ...
@@ -781,7 +781,7 @@
          || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_TWO_HANDED)
          && (player->GetMainHandItem()->GetItemEquipType() != PLAYER_SKILL_SPEAR
          || player->GetItem(&PlayerEquipment::uShield)) )
-      pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
+      pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
                                         pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
     //-----------------------------------------------------(Hand/Рука)---------------------------------------------------------------
     if ( player->GetItem(&PlayerEquipment::uMainHand) )
@@ -817,7 +817,7 @@
 	  else if ( item->uAttributes & ITEM_BROKEN )
         pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)));
       else if ( item->uAttributes & ITEM_IDENTIFIED )
-        pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)));
+        pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)));
       else
         pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)));
 
@@ -859,7 +859,7 @@
       else if ( !(item->uAttributes & ITEM_IDENTIFIED) )//не опознанный лук зелёный
         pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)));
       else // опознанный лук
-        pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)));
+        pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)));
 
       if ( !bRingsShownInCharScreen )
         pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)),
@@ -918,7 +918,7 @@
 	    else if ( item->uAttributes & ITEM_BROKEN )
           pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]));
         else
-          pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]));
+          pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]));
 
         if ( !bRingsShownInCharScreen )
           pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]),
@@ -926,7 +926,7 @@
       }
     }
     //-------------------------------(Paperdoll/Кукла)-------------------------------------------
-    pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
+    pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
     //-------------------------------(Armor/Броня)-----------------------------------------------
     if ( player->GetItem(&PlayerEquipment::uArmor) )
     {
@@ -979,7 +979,7 @@
         else if ( !(item->uAttributes & ITEM_IDENTIFIED) )
           pRenderer->DrawTransparentGreenShade(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]]);
         else
-          pRenderer->DrawTextureTransparent(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]]);
+          pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]]);
 
         if ( !bRingsShownInCharScreen )
           pRenderer->DrawMaskToZBuffer(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]],
@@ -1033,7 +1033,7 @@
 		else if ( item->uAttributes & ITEM_BROKEN )
           pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v59));
         else if ( item->uAttributes & ITEM_IDENTIFIED )
-          pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v59));
+          pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v59));
         else
           pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v59));
 
@@ -1046,7 +1046,7 @@
         || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_TWO_HANDED)
         && (player->GetMainHandItem()->GetPlayerSkillType() != PLAYER_SKILL_SPEAR
         || player->GetItem(&PlayerEquipment::uShield)) )
-      pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
+      pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
                             pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
     //--------------------------------------------(Belt/Пояс)-------------------------------------------------------
     if ( player->GetItem(&PlayerEquipment::uBelt))
@@ -1096,7 +1096,7 @@
 		else if ( item->uAttributes & ITEM_BROKEN )
           pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v75));
         else if ( item->uAttributes & ITEM_IDENTIFIED )
-          pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v75));
+          pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v75));
         else
           pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v75));
 
@@ -1172,7 +1172,7 @@
 		    else if ( item->uAttributes & ITEM_BROKEN )
               pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
             else if ( item->uAttributes & ITEM_IDENTIFIED )
-              pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94));
+              pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v94));
             else
               pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
 
@@ -1209,7 +1209,7 @@
 			else if ( item->uAttributes & ITEM_BROKEN )
               pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
             else if ( item->uAttributes & ITEM_IDENTIFIED )
-              pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
+              pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
             else
               pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
 
@@ -1272,7 +1272,7 @@
 		    else if ( item->uAttributes & ITEM_BROKEN )
               pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]));
             else
-              pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]));
+              pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]));
 
             if ( !bRingsShownInCharScreen )
               pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]),
@@ -1284,7 +1284,7 @@
       if ( player->uCurrentFace == 12 || player->uCurrentFace == 13 )
       {
         if ( papredoll_dbrds[player->uCurrentFace] != pIcons_LOD->FindTextureByName("Pending") )
-          pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * player->uCurrentFace - 24],
+          pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_Beards[2 * player->uCurrentFace - 24],
                      pPaperdoll_BodyY + pPaperdoll_Beards[2 * player->uCurrentFace - 23],
                      pIcons_LOD->GetTexture(papredoll_dbrds[player->uCurrentFace]));
       }
@@ -1344,7 +1344,7 @@
         else if ( item->uAttributes & ITEM_BROKEN )
           pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v127));
         else if ( item->uAttributes & ITEM_IDENTIFIED )
-          pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v127));
+          pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v127));
         else
           pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v127));
 
@@ -1386,7 +1386,7 @@
 	  else if ( item->uAttributes & ITEM_BROKEN )
         pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)));
       else if ( item->uAttributes & ITEM_IDENTIFIED )
-        pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)));
+        pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)));
       else
         pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)));
 
@@ -1455,24 +1455,24 @@
       else if ( !(item->uAttributes & ITEM_IDENTIFIED) )
         pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v153));
       else
-        pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v153));
+        pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v153));
 
       if ( two_handed_left_fist )//two-handed - left fist/двуручие - левая кисть
-        pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0],
+        pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0],
                  pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1]));
       if ( !bRingsShownInCharScreen )
         pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v153), player->pEquipment.uShield);
     }
   }
   //--------------------------------------------------------(RightHand/Правая кисть)--------------------------------------------------
-  pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1]));
+  pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1]));
   //---------------------------------------------(two-handed - hand/Двуручие - рука)--------------------------------------------------
   if ( player->GetItem(&PlayerEquipment::uMainHand) )
   {
     if ( player->GetMainHandItem()->GetItemEquipType() == EQUIP_TWO_HANDED
          || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
          && !player->GetItem(&PlayerEquipment::uShield) )
-      pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
+      pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
                  pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1]));
   }
   //--------------------------------------------------------(two-handed - fist/двуручие - кисть)----------------------------------------------------
@@ -1482,13 +1482,13 @@
     if ( item->GetItemEquipType() == EQUIP_TWO_HANDED
         || item->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
         && !player->GetItem(&PlayerEquipment::uShield) )
-      pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], 
+      pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], 
                                         pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], 
                                         pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1]));
   }
   if ( !bRingsShownInCharScreen )//рисование лупы
-    pRenderer->DrawTextureTransparent(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B));
-  pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));//обрамление
+    pRenderer->DrawTextureIndexedAlpha(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B));
+  pRenderer->DrawTextureIndexedAlpha(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));//обрамление
 }
 
 //----- (0041A2D1) --------------------------------------------------------
@@ -1551,7 +1551,7 @@
         if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].IsBroken())
           pRenderer->DrawTransparentRedShade(uCellX, uCellY, pTexture);
         else
-          pRenderer->DrawTextureTransparent(uCellX, uCellY, pTexture);
+          pRenderer->DrawTextureIndexedAlpha(uCellX, uCellY, pTexture);
       }
       else
         pRenderer->DrawTransparentGreenShade(uCellX, uCellY, pTexture);
@@ -1592,7 +1592,7 @@
     else if (!item->IsIdentified())
       pRenderer->DrawTransparentGreenShade(x, y, item_texture);
     else
-      pRenderer->DrawTextureTransparent(x, y, item_texture);
+      pRenderer->DrawTextureIndexedAlpha(x, y, item_texture);
 
     pRenderer->ZBuffer_Fill_2(x, y, item_texture, id);
   }
@@ -1602,8 +1602,8 @@
 void CharacterUI_DrawPaperdollWithRingOverlay(Player *player)
 {
   CharacterUI_DrawPaperdoll(player);
-  pRenderer->DrawTextureTransparent(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND));
-  pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));
+  pRenderer->DrawTextureIndexedAlpha(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND));
+  pRenderer->DrawTextureIndexedAlpha(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));
   pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY,
                                 pIcons_LOD->GetTexture(uTextureID_detaliz_close_button));
   for (uint i = 0; i < 6; ++i)