| 870 | } |
| 871 | |
| 872 | void AEquipScreen::populateInventoryItemsBattle() |
| 873 | { |
| 874 | // Expecting to have an agent |
| 875 | auto currentAgent = selectedAgents.front(); |
| 876 | |
| 877 | // The gap between the end of one inventory image and the start of the next |
| 878 | static const int INVENTORY_IMAGE_X_GAP = 4; |
| 879 | Vec2<int> inventoryPosition = inventoryControl->Location + formMain->Location; |
| 880 | |
| 881 | auto itemsOnGround = currentAgent->unit->tileObject->getOwningTile()->getItems(); |
| 882 | |
| 883 | for (auto &item : itemsOnGround) |
| 884 | { |
| 885 | auto &equipmentImage = item->item->type->equipscreen_sprite; |
| 886 | Vec2<int> inventoryEndPosition = inventoryPosition; |
| 887 | inventoryEndPosition.x += equipmentImage->size.x; |
| 888 | inventoryEndPosition.y += equipmentImage->size.y; |
| 889 | |
| 890 | inventoryItems.push_back( |
| 891 | std::make_tuple(Rect<int>{inventoryPosition, inventoryEndPosition}, 0, item->item)); |
| 892 | |
| 893 | inventoryPosition.x += INVENTORY_IMAGE_X_GAP + equipmentImage->size.x; |
| 894 | } |
| 895 | } |
| 896 | |
| 897 | void AEquipScreen::populateInventoryItemsBase() |
| 898 | { |
nothing calls this directly
no test coverage detected