comparison GUI/UI/UIShops.cpp @ 2573:0c67be4ec900

DrawTextureIndexed renamed to DrawTextureTransparentColorKey Changing more class Texture to class Image.
author a.parshin
date Sat, 05 Mar 2016 16:25:53 +0200
parents c674d547cc7c
children a76d408c5132
comparison
equal deleted inserted replaced
2572:d87bfbd3bb3b 2573:0c67be4ec900
21 #include "..\../Engine/MapInfo.h" 21 #include "..\../Engine/MapInfo.h"
22 #include "..\../Engine/Graphics/Viewport.h" 22 #include "..\../Engine/Graphics/Viewport.h"
23 #include "..\../Engine/Graphics/Outdoor.h" 23 #include "..\../Engine/Graphics/Outdoor.h"
24 #include "..\../Engine/Graphics/Indoor.h" 24 #include "..\../Engine/Graphics/Indoor.h"
25 25
26
27 Image *shop_ui_background = nullptr;
26 28
27 29
28 //----- (004B910F) -------------------------------------------------------- 30 //----- (004B910F) --------------------------------------------------------
29 void WeaponShopDialog() 31 void WeaponShopDialog()
30 { 32 {
82 } 84 }
83 break; 85 break;
84 } 86 }
85 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: 87 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD:
86 { 88 {
87 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); 89 pRenderer->DrawTextureAlphaNew(8/640.0f, 8/480.0f, shop_ui_background);
88 item_X = 0; 90 item_X = 0;
89 for ( uint i = 0; i < 6; ++i ) 91 for ( uint i = 0; i < 6; ++i )
90 { 92 {
91 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) 93 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID)
92 { 94 {
133 break; 135 break;
134 } 136 }
135 137
136 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: 138 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL:
137 { 139 {
138 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); 140 pRenderer->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, shop_ui_background);
139 item_X = 0; 141 item_X = 0;
140 for ( uint i = 0; i < 6; ++i ) 142 for ( uint i = 0; i < 6; ++i )
141 { 143 {
142 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) 144 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID)
143 { 145 {
408 } 410 }
409 break; 411 break;
410 412
411 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: 413 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD:
412 { 414 {
413 pRenderer->DrawTextureIndexed(8, 8, ShopTexture);// �������� 415 pRenderer->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, shop_ui_background);
414 item_x = 0; 416 item_x = 0;
415 for ( int i = 0; i < 8; ++i )// ���������� ���� 417 for ( int i = 0; i < 8; ++i )// ���������� ����
416 { 418 {
417 if ( pParty->StandartItemsInShops[window_SpeakInHouse->par1C][i].uItemID) 419 if ( pParty->StandartItemsInShops[window_SpeakInHouse->par1C][i].uItemID)
418 { 420 {
467 } 469 }
468 break; 470 break;
469 471
470 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: 472 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL:
471 { 473 {
472 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); 474 pRenderer->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, shop_ui_background);
473 item_x = 0; 475 item_x = 0;
474 for ( int i = 0; i < 8; ++i ) 476 for ( int i = 0; i < 8; ++i )
475 { 477 {
476 if ( pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][i].uItemID ) 478 if ( pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][i].uItemID )
477 { 479 {
755 return; 757 return;
756 } 758 }
757 759
758 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: 760 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD:
759 { 761 {
760 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); 762 pRenderer->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, shop_ui_background);
761 for ( uint i = 0; i < 6; ++i ) 763 for ( uint i = 0; i < 6; ++i )
762 { 764 {
763 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID ) 765 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID )
764 { 766 {
765 product_height_1row = 152 - ItemsInShopTexture[i]->uTextureHeight; 767 product_height_1row = 152 - ItemsInShopTexture[i]->uTextureHeight;
840 return; 842 return;
841 } 843 }
842 844
843 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: 845 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL:
844 { 846 {
845 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); 847 pRenderer->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, shop_ui_background);
846 for ( uint i = 0; i < 6; ++i ) 848 for ( uint i = 0; i < 6; ++i )
847 { 849 {
848 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) 850 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID)
849 { 851 {
850 product_height_1row = 152 - ItemsInShopTexture[i]->uTextureHeight; 852 product_height_1row = 152 - ItemsInShopTexture[i]->uTextureHeight;
1129 return; 1131 return;
1130 } 1132 }
1131 1133
1132 if ( dialog_menu_id == HOUSE_DIALOGUE_SHOP_BUY_STANDARD) 1134 if ( dialog_menu_id == HOUSE_DIALOGUE_SHOP_BUY_STANDARD)
1133 { 1135 {
1134 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); 1136 pRenderer->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, shop_ui_background);
1135 for ( uint i = 0; i < 6; ++i ) 1137 for ( uint i = 0; i < 6; ++i )
1136 { 1138 {
1137 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) 1139 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID)
1138 { 1140 {
1139 product_height_1row = 152 - ItemsInShopTexture[i]->uTextureHeight; 1141 product_height_1row = 152 - ItemsInShopTexture[i]->uTextureHeight;
1215 return; 1217 return;
1216 } 1218 }
1217 1219
1218 if ( dialog_menu_id == HOUSE_DIALOGUE_SHOP_BUY_SPECIAL) 1220 if ( dialog_menu_id == HOUSE_DIALOGUE_SHOP_BUY_SPECIAL)
1219 { 1221 {
1220 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); 1222 pRenderer->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, shop_ui_background);
1221 for ( uint i = 0; i < 6; ++i ) 1223 for ( uint i = 0; i < 6; ++i )
1222 { 1224 {
1223 if ( pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID ) 1225 if ( pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID )
1224 { 1226 {
1225 product_height_1row = 152 - ItemsInShopTexture[i]->uTextureHeight; 1227 product_height_1row = 152 - ItemsInShopTexture[i]->uTextureHeight;