comparison GUI/UI/UIShops.cpp @ 2524:c7264ab7132f

Main menu rendered using d3d11
author a.parshin
date Fri, 10 Oct 2014 17:42:05 +0300
parents a77c34acdbc9
children a902abdfc7f2
comparison
equal deleted inserted replaced
2523:c532d5242055 2524:c7264ab7132f
86 item_X = 0; 86 item_X = 0;
87 for ( uint i = 0; i < 6; ++i ) 87 for ( uint i = 0; i < 6; ++i )
88 { 88 {
89 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) 89 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID)
90 { 90 {
91 pRenderer->DrawTextureTransparent((60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X, weapons_Ypos[i] + 30, ItemsInShopTexture[i]); 91 pRenderer->DrawTextureIndexedAlpha((60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X, weapons_Ypos[i] + 30, ItemsInShopTexture[i]);
92 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[(60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X + window->GetWidth() * (weapons_Ypos[i] + 30)], ItemsInShopTexture[i], i + 1); 92 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[(60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X + window->GetWidth() * (weapons_Ypos[i] + 30)], ItemsInShopTexture[i], i + 1);
93 } 93 }
94 item_X += 70; 94 item_X += 70;
95 } 95 }
96 if ( HouseUI_CheckIfPlayerCanInteract() ) 96 if ( HouseUI_CheckIfPlayerCanInteract() )
137 item_X = 0; 137 item_X = 0;
138 for ( uint i = 0; i < 6; ++i ) 138 for ( uint i = 0; i < 6; ++i )
139 { 139 {
140 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) 140 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID)
141 { 141 {
142 pRenderer->DrawTextureTransparent((60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X, weapons_Ypos[i] + 30, ItemsInShopTexture[i]); 142 pRenderer->DrawTextureIndexedAlpha((60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X, weapons_Ypos[i] + 30, ItemsInShopTexture[i]);
143 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[(60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X + window->GetWidth() * (weapons_Ypos[i] + 30)], ItemsInShopTexture[i], i + 1); 143 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[(60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X + window->GetWidth() * (weapons_Ypos[i] + 30)], ItemsInShopTexture[i], i + 1);
144 } 144 }
145 item_X += 70; 145 item_X += 70;
146 } 146 }
147 if ( HouseUI_CheckIfPlayerCanInteract() ) 147 if ( HouseUI_CheckIfPlayerCanInteract() )
414 { 414 {
415 if ( pParty->StandartItemsInShops[window_SpeakInHouse->par1C][i].uItemID) 415 if ( pParty->StandartItemsInShops[window_SpeakInHouse->par1C][i].uItemID)
416 { 416 {
417 if ( i >= 4 ) //low row 417 if ( i >= 4 ) //low row
418 { 418 {
419 pRenderer->DrawTextureTransparent((90 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x - 420, 126, ItemsInShopTexture[i]); 419 pRenderer->DrawTextureIndexedAlpha((90 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x - 420, 126, ItemsInShopTexture[i]);
420 v59 = (90 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x + 80220; 420 v59 = (90 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x + 80220;
421 } 421 }
422 else 422 else
423 { 423 {
424 pRenderer->DrawTextureTransparent(( 86 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x, 98 - ItemsInShopTexture[i]->uTextureHeight, ItemsInShopTexture[i]); 424 pRenderer->DrawTextureIndexedAlpha(( 86 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x, 98 - ItemsInShopTexture[i]->uTextureHeight, ItemsInShopTexture[i]);
425 v59 = item_x + (86 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + window->GetWidth() * (98 - ItemsInShopTexture[i]->uTextureHeight); 425 v59 = item_x + (86 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + window->GetWidth() * (98 - ItemsInShopTexture[i]->uTextureHeight);
426 } 426 }
427 ZBuffer_DoFill(&pRenderer->pActiveZBuffer[v59], ItemsInShopTexture[i], i + 1); 427 ZBuffer_DoFill(&pRenderer->pActiveZBuffer[v59], ItemsInShopTexture[i], i + 1);
428 } 428 }
429 item_x += 105; 429 item_x += 105;
473 { 473 {
474 if ( pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][i].uItemID ) 474 if ( pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][i].uItemID )
475 { 475 {
476 if ( i >= 4 ) 476 if ( i >= 4 )
477 { 477 {
478 pRenderer->DrawTextureTransparent(item_x + (90 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) - 420, 126, ItemsInShopTexture[i]); 478 pRenderer->DrawTextureIndexedAlpha(item_x + (90 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) - 420, 126, ItemsInShopTexture[i]);
479 v59 = item_x + (90 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + 80220; 479 v59 = item_x + (90 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + 80220;
480 } 480 }
481 else 481 else
482 { 482 {
483 pRenderer->DrawTextureTransparent(86 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2) + item_x, 98 - ItemsInShopTexture[i]->uTextureHeight, ItemsInShopTexture[i]); 483 pRenderer->DrawTextureIndexedAlpha(86 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2) + item_x, 98 - ItemsInShopTexture[i]->uTextureHeight, ItemsInShopTexture[i]);
484 v59 = (86 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x + window->GetWidth() * (98 - ItemsInShopTexture[i]->uTextureHeight); 484 v59 = (86 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x + window->GetWidth() * (98 - ItemsInShopTexture[i]->uTextureHeight);
485 } 485 }
486 ZBuffer_DoFill(&pRenderer->pActiveZBuffer[v59], ItemsInShopTexture[i], i + 1); 486 ZBuffer_DoFill(&pRenderer->pActiveZBuffer[v59], ItemsInShopTexture[i], i + 1);
487 } 487 }
488 item_x += 105; 488 item_x += 105;
772 product_width_1row = 457 - ItemsInShopTexture[5]->uTextureWidth; 772 product_width_1row = 457 - ItemsInShopTexture[5]->uTextureWidth;
773 } 773 }
774 } 774 }
775 else if ( (signed int)product_width_1row < 18 ) 775 else if ( (signed int)product_width_1row < 18 )
776 product_width_1row = 18; 776 product_width_1row = 18;
777 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); 777 pRenderer->DrawTextureIndexedAlpha(product_width_1row, product_height_1row, ItemsInShopTexture[i]);
778 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1); 778 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1);
779 } 779 }
780 } 780 }
781 for ( uint i = 0; i < 6; ++i ) 781 for ( uint i = 0; i < 6; ++i )
782 { 782 {
797 else 797 else
798 { 798 {
799 if ( (signed int)product_width_2row < 18 ) 799 if ( (signed int)product_width_2row < 18 )
800 product_width_2row = 18; 800 product_width_2row = 18;
801 } 801 }
802 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); 802 pRenderer->DrawTextureIndexedAlpha(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]);
803 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7); 803 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7);
804 } 804 }
805 } 805 }
806 if ( HouseUI_CheckIfPlayerCanInteract() ) 806 if ( HouseUI_CheckIfPlayerCanInteract() )
807 { 807 {
860 else 860 else
861 { 861 {
862 if ( (signed int)product_width_1row < 18 ) 862 if ( (signed int)product_width_1row < 18 )
863 product_width_1row = 18; 863 product_width_1row = 18;
864 } 864 }
865 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); 865 pRenderer->DrawTextureIndexedAlpha(product_width_1row, product_height_1row, ItemsInShopTexture[i]);
866 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1); 866 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1);
867 } 867 }
868 } 868 }
869 for ( uint i = 0; i < 6; ++i ) 869 for ( uint i = 0; i < 6; ++i )
870 { 870 {
885 else 885 else
886 { 886 {
887 if ( (signed int)product_width_2row < 18 ) 887 if ( (signed int)product_width_2row < 18 )
888 product_width_2row = 18; 888 product_width_2row = 18;
889 } 889 }
890 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); 890 pRenderer->DrawTextureIndexedAlpha(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]);
891 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7); 891 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7);
892 } 892 }
893 } 893 }
894 if ( HouseUI_CheckIfPlayerCanInteract() ) 894 if ( HouseUI_CheckIfPlayerCanInteract() )
895 { 895 {
1149 else 1149 else
1150 { 1150 {
1151 if ( (signed int)product_width_1row < 18 ) 1151 if ( (signed int)product_width_1row < 18 )
1152 product_width_1row = 18; 1152 product_width_1row = 18;
1153 } 1153 }
1154 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); 1154 pRenderer->DrawTextureIndexedAlpha(product_width_1row, product_height_1row, ItemsInShopTexture[i]);
1155 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1); 1155 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1);
1156 } 1156 }
1157 } 1157 }
1158 for ( uint i = 0; i < 6; ++i ) 1158 for ( uint i = 0; i < 6; ++i )
1159 { 1159 {
1172 else 1172 else
1173 { 1173 {
1174 if ( (signed int)product_width_2row < 18 ) 1174 if ( (signed int)product_width_2row < 18 )
1175 product_width_2row = 18; 1175 product_width_2row = 18;
1176 } 1176 }
1177 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); 1177 pRenderer->DrawTextureIndexedAlpha(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]);
1178 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7); 1178 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7);
1179 } 1179 }
1180 } 1180 }
1181 if ( HouseUI_CheckIfPlayerCanInteract() ) 1181 if ( HouseUI_CheckIfPlayerCanInteract() )
1182 { 1182 {
1235 else 1235 else
1236 { 1236 {
1237 if ( (signed int)product_width_1row < 18 ) 1237 if ( (signed int)product_width_1row < 18 )
1238 product_width_1row = 18; 1238 product_width_1row = 18;
1239 } 1239 }
1240 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); 1240 pRenderer->DrawTextureIndexedAlpha(product_width_1row, product_height_1row, ItemsInShopTexture[i]);
1241 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1); 1241 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1);
1242 } 1242 }
1243 } 1243 }
1244 for ( uint i = 0; i < 6; ++i ) 1244 for ( uint i = 0; i < 6; ++i )
1245 { 1245 {
1260 else 1260 else
1261 { 1261 {
1262 if ( (signed int)product_width_2row < 18 ) 1262 if ( (signed int)product_width_2row < 18 )
1263 product_width_2row = 18; 1263 product_width_2row = 18;
1264 } 1264 }
1265 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); 1265 pRenderer->DrawTextureIndexedAlpha(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]);
1266 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7); 1266 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7);
1267 } 1267 }
1268 } 1268 }
1269 if ( HouseUI_CheckIfPlayerCanInteract() ) 1269 if ( HouseUI_CheckIfPlayerCanInteract() )
1270 { 1270 {