Mercurial > mm7
comparison GUI/UI/UIHouses.cpp @ 2575:a76d408c5132 tip
DrawTranslucent -> DrawTextureGrayShade
Removed old texture drawing stuff
author | a.parshin |
---|---|
date | Wed, 09 Mar 2016 01:39:52 +0200 |
parents | dd36326a9994 |
children |
comparison
equal
deleted
inserted
replaced
2574:dd36326a9994 | 2575:a76d408c5132 |
---|---|
994 for (int i = 0; i < uNumDialogueNPCPortraits; ++i) | 994 for (int i = 0; i < uNumDialogueNPCPortraits; ++i) |
995 { | 995 { |
996 | 996 |
997 char icon_name[128]; | 997 char icon_name[128]; |
998 sprintfex(icon_name, "npc%03u", npc_id_arr[i]); | 998 sprintfex(icon_name, "npc%03u", npc_id_arr[i]); |
999 pDialogueNPCPortraits[i] = pIcons_LOD->LoadTexturePtr(icon_name, TEXTURE_16BIT_PALETTE); | 999 pDialogueNPCPortraits[i] = assets->GetImage_16BitColorKey(icon_name, 0x7FF); |
1000 } | 1000 } |
1001 | 1001 |
1002 if (uHouse_ExitPic) | 1002 if (uHouse_ExitPic) |
1003 { | 1003 { |
1004 pDialogueNPCPortraits[uNumDialogueNPCPortraits] = pIcons_LOD->LoadTexturePtr(pHouse_ExitPictures[uHouse_ExitPic], TEXTURE_16BIT_PALETTE); | 1004 pDialogueNPCPortraits[uNumDialogueNPCPortraits] = assets->GetImage_16BitColorKey(pHouse_ExitPictures[uHouse_ExitPic], 0x7FF); |
1005 ++uNumDialogueNPCPortraits; | 1005 ++uNumDialogueNPCPortraits; |
1006 uHouse_ExitPic = p2DEvents[house - 1].uExitMapID; | 1006 uHouse_ExitPic = p2DEvents[house - 1].uExitMapID; |
1007 } | 1007 } |
1008 } | 1008 } |
1009 //----- (004B1E92) -------------------------------------------------------- | 1009 //----- (004B1E92) -------------------------------------------------------- |
1095 if ( pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C - 139] >= (signed __int64)pParty->uTimePlayed ) | 1095 if ( pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C - 139] >= (signed __int64)pParty->uTimePlayed ) |
1096 { | 1096 { |
1097 for ( uint i = 0; i < 12; ++i ) | 1097 for ( uint i = 0; i < 12; ++i ) |
1098 { | 1098 { |
1099 if ( pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C - 139][i].uItemID ) | 1099 if ( pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C - 139][i].uItemID ) |
1100 ItemsInShopTexture[i] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C - 139][i].GetIconName(), TEXTURE_16BIT_PALETTE)]; | 1100 shop_ui_items_in_store[i] = assets->GetImage_16BitColorKey(pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C - 139][i].GetIconName(), 0x7FF); |
1101 } | 1101 } |
1102 } | 1102 } |
1103 else//generation new books | 1103 else//generation new books |
1104 { | 1104 { |
1105 SpellBookGenerator(); | 1105 SpellBookGenerator(); |
1338 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) | 1338 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) |
1339 { | 1339 { |
1340 for ( uint i = 0; i < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType]; ++i ) | 1340 for ( uint i = 0; i < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType]; ++i ) |
1341 { | 1341 { |
1342 if ( pParty->StandartItemsInShops[(int)window_SpeakInHouse->ptr_1C][i].uItemID ) | 1342 if ( pParty->StandartItemsInShops[(int)window_SpeakInHouse->ptr_1C][i].uItemID ) |
1343 ItemsInShopTexture[i] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pParty->StandartItemsInShops[(int)window_SpeakInHouse->ptr_1C][i].GetIconName(), TEXTURE_16BIT_PALETTE)]; | 1343 shop_ui_items_in_store[i] = assets->GetImage_16BitColorKey(pParty->StandartItemsInShops[(int)window_SpeakInHouse->ptr_1C][i].GetIconName(), 0x7FF); |
1344 } | 1344 } |
1345 } | 1345 } |
1346 if ( in_current_building_type == BuildingType_WeaponShop ) | 1346 if ( in_current_building_type == BuildingType_WeaponShop ) |
1347 { | 1347 { |
1348 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) | 1348 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) |
1349 { | 1349 { |
1350 for ( uint i = 0; i < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType]; ++i ) | 1350 for ( uint i = 0; i < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType]; ++i ) |
1351 { | 1351 { |
1352 if ( pParty->StandartItemsInShops[(int)window_SpeakInHouse->ptr_1C][i].uItemID) | 1352 if ( pParty->StandartItemsInShops[(int)window_SpeakInHouse->ptr_1C][i].uItemID) |
1353 weapons_Ypos[i] = rand() % (300 - ItemsInShopTexture[i]->uTextureHeight); | 1353 weapons_Ypos[i] = rand() % (300 - shop_ui_items_in_store[i]->GetHeight()); |
1354 } | 1354 } |
1355 } | 1355 } |
1356 } | 1356 } |
1357 } | 1357 } |
1358 if ( uMessageParam == HOUSE_DIALOGUE_SHOP_BUY_SPECIAL ) | 1358 if ( uMessageParam == HOUSE_DIALOGUE_SHOP_BUY_SPECIAL ) |
1360 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) | 1360 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) |
1361 { | 1361 { |
1362 for ( uint i = 0; i < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType]; ++i ) | 1362 for ( uint i = 0; i < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType]; ++i ) |
1363 { | 1363 { |
1364 if ( pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID ) | 1364 if ( pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID ) |
1365 ItemsInShopTexture[i] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].GetIconName(), TEXTURE_16BIT_PALETTE)]; | 1365 shop_ui_items_in_store[i] = assets->GetImage_16BitColorKey(pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].GetIconName(), 0x7FF); |
1366 } | 1366 } |
1367 } | 1367 } |
1368 if ( in_current_building_type == BuildingType_WeaponShop ) | 1368 if ( in_current_building_type == BuildingType_WeaponShop ) |
1369 { | 1369 { |
1370 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) | 1370 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) |
1371 { | 1371 { |
1372 for ( uint i = 0; i < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType]; ++i ) | 1372 for ( uint i = 0; i < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType]; ++i ) |
1373 { | 1373 { |
1374 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) | 1374 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID) |
1375 weapons_Ypos[i] = rand() % (300 - ItemsInShopTexture[i]->uTextureHeight); | 1375 weapons_Ypos[i] = rand() % (300 - shop_ui_items_in_store[i]->GetHeight()); |
1376 } | 1376 } |
1377 } | 1377 } |
1378 } | 1378 } |
1379 } | 1379 } |
1380 break; | 1380 break; |