31 {{ui_exit_cancel_button_background}});
39 render->ClearZBuffer(0, 479);
46 auto uChestID = (
unsigned int)
ptr_1C;
48 int *v16 =
render->pActiveZBuffer;
49 render->ClearZBuffer(0, 479);
50 int chestBitmapId =
vChests[uChestID].uChestBitmapID;
58 render->DrawTextureAlphaNew(8 / 640.0
f, 8 / 480.0
f, chest_background);
60 for (
int item_counter = 0;
61 item_counter < chestWidthCells * chestHeghtCells; ++item_counter) {
62 int chest_item_index =
vChests[uChestID].pInventoryIndices[item_counter];
63 if (chest_item_index > 0) {
65 vChests[uChestID].igChestItems[chest_item_index - 1].GetIconName(),
68 int itemPixelWidth = item_texture->
GetWidth();
69 int itemPixelHeght = item_texture->GetHeight();
70 if (itemPixelWidth < 14) itemPixelWidth = 14;
71 if (itemPixelHeght < 14) itemPixelHeght = 14;
72 signed int X_offset = (((
signed int)((itemPixelWidth - 14) & 0xFFFFFFE0) + 32) - itemPixelWidth) / 2;
73 signed int Y_offset = (((
signed int)((itemPixelHeght - 14) & 0xFFFFFFE0) + 32) - itemPixelHeght) / 2;
74 int itemPixelPosX = chest_offs_x + 32 * (item_counter % chestWidthCells) + X_offset;
75 int itemPixelPosY = chest_offs_y + 32 * (item_counter / chestHeghtCells) + Y_offset;
76 render->DrawTextureAlphaNew(itemPixelPosX / 640.0
f,
77 itemPixelPosY / 480.0
f,