comparison GUI/UI/Chest.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 fb42e2662c38
children dd36326a9994
comparison
equal deleted inserted replaced
2572:d87bfbd3bb3b 2573:0c67be4ec900
44 if (current_screen_type == SCREEN_CHEST_INVENTORY) 44 if (current_screen_type == SCREEN_CHEST_INVENTORY)
45 { 45 {
46 pRenderer->ClearZBuffer(0, 479); 46 pRenderer->ClearZBuffer(0, 479);
47 draw_leather(); 47 draw_leather();
48 CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true); 48 CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
49 pRenderer->DrawTextureIndexed(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uExitCancelTextureId)); 49 pRenderer->DrawTextureAlphaNew(pBtn_ExitCancel->uX/640.0f, pBtn_ExitCancel->uY/480.0f, ui_exit_cancel_button_background);
50 } 50 }
51 else if (current_screen_type == SCREEN_CHEST) 51 else if (current_screen_type == SCREEN_CHEST)
52 { 52 {
53 //Chest::DrawChestUI(par1C); 53 //Chest::DrawChestUI(par1C);
54 54
83 chest_offs_y = pChestPixelOffsetY[chestBitmapId]; 83 chest_offs_y = pChestPixelOffsetY[chestBitmapId];
84 chestWidthCells = pChestWidthsByType[chestBitmapId]; 84 chestWidthCells = pChestWidthsByType[chestBitmapId];
85 chestHeghtCells = pChestHeightsByType[chestBitmapId]; 85 chestHeghtCells = pChestHeightsByType[chestBitmapId];
86 sprintfex(pTmpBuf.data(), "chest%02d", pChestList->pChests[chestBitmapId].uTextureID); 86 sprintfex(pTmpBuf.data(), "chest%02d", pChestList->pChests[chestBitmapId].uTextureID);
87 v5 = pIcons_LOD->LoadTexture(pTmpBuf.data(), TEXTURE_16BIT_PALETTE); 87 v5 = pIcons_LOD->LoadTexture(pTmpBuf.data(), TEXTURE_16BIT_PALETTE);
88 pRenderer->DrawTextureIndexed(8u, 8u, pIcons_LOD->GetTexture(v5)); 88 pRenderer->DrawTextureTransparentColorKey(8u, 8u, pIcons_LOD->GetTexture(v5));
89 89
90 for (item_counter = 0; item_counter < chestWidthCells * chestHeghtCells; ++item_counter) 90 for (item_counter = 0; item_counter < chestWidthCells * chestHeghtCells; ++item_counter)
91 { 91 {
92 chest_item_index = pChests[uChestID].pInventoryIndices[item_counter]; 92 chest_item_index = pChests[uChestID].pInventoryIndices[item_counter];
93 if (chest_item_index > 0) 93 if (chest_item_index > 0)
110 ((signed int)(((itemPixelHeght - 14) & 0xFFFFFFE0) + 32 - item_texture->uTextureHeight) / 2); 110 ((signed int)(((itemPixelHeght - 14) & 0xFFFFFFE0) + 32 - item_texture->uTextureHeight) / 2);
111 pRenderer->DrawTextureIndexedAlpha(itemPixelPosX, itemPixelPosY, item_texture); 111 pRenderer->DrawTextureIndexedAlpha(itemPixelPosX, itemPixelPosY, item_texture);
112 ZBuffer_DoFill2(&v16[itemPixelPosX + pSRZBufferLineOffsets[itemPixelPosY]], item_texture, item_counter + 1); 112 ZBuffer_DoFill2(&v16[itemPixelPosX + pSRZBufferLineOffsets[itemPixelPosY]], item_texture, item_counter + 1);
113 } 113 }
114 } 114 }
115 pRenderer->DrawTextureIndexed(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uExitCancelTextureId)); 115 pRenderer->DrawTextureAlphaNew(pBtn_ExitCancel->uX/640.0f, pBtn_ExitCancel->uY/480.0f, ui_exit_cancel_button_background);
116 } 116 }
117 } 117 }