Mercurial > mm7
comparison UI/UIShops.cpp @ 2215:e9625ad08541
fog fix and change 640,480 - window->GetWidth(), window->GetHeight()
author | Ritor1 |
---|---|
date | Fri, 14 Feb 2014 18:08:30 +0600 |
parents | e1e4a8a20b5f |
children | 8673f3aedfb9 |
comparison
equal
deleted
inserted
replaced
2214:20995bb8895a | 2215:e9625ad08541 |
---|---|
77 for ( uint i = 0; i < 6; ++i ) | 77 for ( uint i = 0; i < 6; ++i ) |
78 { | 78 { |
79 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) | 79 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) |
80 { | 80 { |
81 pRenderer->DrawTextureTransparent((60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X, weapons_Ypos[i] + 30, ItemsInShopTexture[i]); | 81 pRenderer->DrawTextureTransparent((60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X, weapons_Ypos[i] + 30, ItemsInShopTexture[i]); |
82 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[(60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X + 640 * (weapons_Ypos[i] + 30)], ItemsInShopTexture[i], i + 1); | 82 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[(60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X + window->GetWidth() * (weapons_Ypos[i] + 30)], ItemsInShopTexture[i], i + 1); |
83 } | 83 } |
84 item_X += 70; | 84 item_X += 70; |
85 } | 85 } |
86 if ( HouseUI_CheckIfPlayerCanInteract() ) | 86 if ( HouseUI_CheckIfPlayerCanInteract() ) |
87 { | 87 { |
128 for ( uint i = 0; i < 6; ++i ) | 128 for ( uint i = 0; i < 6; ++i ) |
129 { | 129 { |
130 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) | 130 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) |
131 { | 131 { |
132 pRenderer->DrawTextureTransparent((60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X, weapons_Ypos[i] + 30, ItemsInShopTexture[i]); | 132 pRenderer->DrawTextureTransparent((60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X, weapons_Ypos[i] + 30, ItemsInShopTexture[i]); |
133 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[(60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X + 640 * (weapons_Ypos[i] + 30)], ItemsInShopTexture[i], i + 1); | 133 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[(60 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_X + window->GetWidth() * (weapons_Ypos[i] + 30)], ItemsInShopTexture[i], i + 1); |
134 } | 134 } |
135 item_X += 70; | 135 item_X += 70; |
136 } | 136 } |
137 if ( HouseUI_CheckIfPlayerCanInteract() ) | 137 if ( HouseUI_CheckIfPlayerCanInteract() ) |
138 { | 138 { |
410 v59 = (90 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x + 80220; | 410 v59 = (90 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x + 80220; |
411 } | 411 } |
412 else | 412 else |
413 { | 413 { |
414 pRenderer->DrawTextureTransparent(( 86 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x, 98 - ItemsInShopTexture[i]->uTextureHeight, ItemsInShopTexture[i]); | 414 pRenderer->DrawTextureTransparent(( 86 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x, 98 - ItemsInShopTexture[i]->uTextureHeight, ItemsInShopTexture[i]); |
415 v59 = item_x + (86 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + 640 * (98 - ItemsInShopTexture[i]->uTextureHeight); | 415 v59 = item_x + (86 - (ItemsInShopTexture[i]->uTextureWidth / 2)) + window->GetWidth() * (98 - ItemsInShopTexture[i]->uTextureHeight); |
416 } | 416 } |
417 ZBuffer_DoFill(&pRenderer->pActiveZBuffer[v59], ItemsInShopTexture[i], i + 1); | 417 ZBuffer_DoFill(&pRenderer->pActiveZBuffer[v59], ItemsInShopTexture[i], i + 1); |
418 } | 418 } |
419 item_x += 105; | 419 item_x += 105; |
420 } | 420 } |
469 v59 = item_x + (90 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + 80220; | 469 v59 = item_x + (90 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + 80220; |
470 } | 470 } |
471 else | 471 else |
472 { | 472 { |
473 pRenderer->DrawTextureTransparent(86 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2) + item_x, 98 - ItemsInShopTexture[i]->uTextureHeight, ItemsInShopTexture[i]); | 473 pRenderer->DrawTextureTransparent(86 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2) + item_x, 98 - ItemsInShopTexture[i]->uTextureHeight, ItemsInShopTexture[i]); |
474 v59 = (86 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x + 640 * (98 - ItemsInShopTexture[i]->uTextureHeight); | 474 v59 = (86 - ((signed int)ItemsInShopTexture[i]->uTextureWidth / 2)) + item_x + window->GetWidth() * (98 - ItemsInShopTexture[i]->uTextureHeight); |
475 } | 475 } |
476 ZBuffer_DoFill(&pRenderer->pActiveZBuffer[v59], ItemsInShopTexture[i], i + 1); | 476 ZBuffer_DoFill(&pRenderer->pActiveZBuffer[v59], ItemsInShopTexture[i], i + 1); |
477 } | 477 } |
478 item_x += 105; | 478 item_x += 105; |
479 } | 479 } |
763 } | 763 } |
764 } | 764 } |
765 else if ( (signed int)product_width_1row < 18 ) | 765 else if ( (signed int)product_width_1row < 18 ) |
766 product_width_1row = 18; | 766 product_width_1row = 18; |
767 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); | 767 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); |
768 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + 640 * product_height_1row], ItemsInShopTexture[i], i + 1); | 768 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1); |
769 } | 769 } |
770 } | 770 } |
771 for ( uint i = 0; i < 6; ++i ) | 771 for ( uint i = 0; i < 6; ++i ) |
772 { | 772 { |
773 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i + 6].uItemID ) | 773 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i + 6].uItemID ) |
788 { | 788 { |
789 if ( (signed int)product_width_2row < 18 ) | 789 if ( (signed int)product_width_2row < 18 ) |
790 product_width_2row = 18; | 790 product_width_2row = 18; |
791 } | 791 } |
792 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); | 792 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); |
793 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + 640 * product_height_2row], ItemsInShopTexture[i + 6], i + 7); | 793 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7); |
794 } | 794 } |
795 } | 795 } |
796 if ( HouseUI_CheckIfPlayerCanInteract() ) | 796 if ( HouseUI_CheckIfPlayerCanInteract() ) |
797 { | 797 { |
798 item_num = 0; | 798 item_num = 0; |
851 { | 851 { |
852 if ( (signed int)product_width_1row < 18 ) | 852 if ( (signed int)product_width_1row < 18 ) |
853 product_width_1row = 18; | 853 product_width_1row = 18; |
854 } | 854 } |
855 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); | 855 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); |
856 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + 640 * product_height_1row], ItemsInShopTexture[i], i + 1); | 856 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1); |
857 } | 857 } |
858 } | 858 } |
859 for ( uint i = 0; i < 6; ++i ) | 859 for ( uint i = 0; i < 6; ++i ) |
860 { | 860 { |
861 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)i + 6].uItemID) //not itemid | 861 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][(signed int)i + 6].uItemID) //not itemid |
876 { | 876 { |
877 if ( (signed int)product_width_2row < 18 ) | 877 if ( (signed int)product_width_2row < 18 ) |
878 product_width_2row = 18; | 878 product_width_2row = 18; |
879 } | 879 } |
880 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); | 880 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); |
881 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + 640 * product_height_2row], ItemsInShopTexture[i + 6], i + 7); | 881 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7); |
882 } | 882 } |
883 } | 883 } |
884 if ( HouseUI_CheckIfPlayerCanInteract() ) | 884 if ( HouseUI_CheckIfPlayerCanInteract() ) |
885 { | 885 { |
886 item_num = 0; | 886 item_num = 0; |
1140 { | 1140 { |
1141 if ( (signed int)product_width_1row < 18 ) | 1141 if ( (signed int)product_width_1row < 18 ) |
1142 product_width_1row = 18; | 1142 product_width_1row = 18; |
1143 } | 1143 } |
1144 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); | 1144 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); |
1145 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + 640 * product_height_1row], ItemsInShopTexture[i], i + 1); | 1145 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1); |
1146 } | 1146 } |
1147 } | 1147 } |
1148 for ( uint i = 0; i < 6; ++i ) | 1148 for ( uint i = 0; i < 6; ++i ) |
1149 { | 1149 { |
1150 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i + 6].uItemID) | 1150 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i + 6].uItemID) |
1163 { | 1163 { |
1164 if ( (signed int)product_width_2row < 18 ) | 1164 if ( (signed int)product_width_2row < 18 ) |
1165 product_width_2row = 18; | 1165 product_width_2row = 18; |
1166 } | 1166 } |
1167 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); | 1167 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); |
1168 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + 640 * product_height_2row], ItemsInShopTexture[i + 6], i + 7); | 1168 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7); |
1169 } | 1169 } |
1170 } | 1170 } |
1171 if ( HouseUI_CheckIfPlayerCanInteract() ) | 1171 if ( HouseUI_CheckIfPlayerCanInteract() ) |
1172 { | 1172 { |
1173 item_num = 0; | 1173 item_num = 0; |
1226 { | 1226 { |
1227 if ( (signed int)product_width_1row < 18 ) | 1227 if ( (signed int)product_width_1row < 18 ) |
1228 product_width_1row = 18; | 1228 product_width_1row = 18; |
1229 } | 1229 } |
1230 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); | 1230 pRenderer->DrawTextureTransparent(product_width_1row, product_height_1row, ItemsInShopTexture[i]); |
1231 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + 640 * product_height_1row], ItemsInShopTexture[i], i + 1); | 1231 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_1row + window->GetWidth() * product_height_1row], ItemsInShopTexture[i], i + 1); |
1232 } | 1232 } |
1233 } | 1233 } |
1234 for ( uint i = 0; i < 6; ++i ) | 1234 for ( uint i = 0; i < 6; ++i ) |
1235 { | 1235 { |
1236 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i + 6].uItemID) | 1236 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i + 6].uItemID) |
1251 { | 1251 { |
1252 if ( (signed int)product_width_2row < 18 ) | 1252 if ( (signed int)product_width_2row < 18 ) |
1253 product_width_2row = 18; | 1253 product_width_2row = 18; |
1254 } | 1254 } |
1255 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); | 1255 pRenderer->DrawTextureTransparent(product_width_2row, product_height_2row, ItemsInShopTexture[i + 6]); |
1256 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + 640 * product_height_2row], ItemsInShopTexture[i + 6], i + 7); | 1256 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[product_width_2row + window->GetWidth() * product_height_2row], ItemsInShopTexture[i + 6], i + 7); |
1257 } | 1257 } |
1258 } | 1258 } |
1259 if ( HouseUI_CheckIfPlayerCanInteract() ) | 1259 if ( HouseUI_CheckIfPlayerCanInteract() ) |
1260 { | 1260 { |
1261 item_num = 0; | 1261 item_num = 0; |