FULLPIPE: Implement Inventory2::clear()

This commit is contained in:
Eugene Sandulenko 2014-04-21 09:47:03 +03:00
parent 3091d0ae7f
commit c73a10606e
3 changed files with 19 additions and 1 deletions

View File

@ -429,7 +429,14 @@ Interaction::Interaction() {
}
Interaction::~Interaction() {
warning("STUB: Interaction::~Interaction()");
if (_messageQueue) {
while (_messageQueue->getExCommandByIndex(0))
_messageQueue->deleteExCommandByIndex(0, 1);
}
delete _messageQueue;
free(_actionName);
}
bool Interaction::load(MfcArchive &file) {

View File

@ -447,6 +447,15 @@ int Inventory2::getHoveredItem(Common::Point *point) {
return 0;
}
void Inventory2::clear() {
unselectItem(0);
for (uint i = 0; i < _inventoryItems.size(); i++)
getInventoryPoolItemFieldCById(_inventoryItems[i]->itemId);
_inventoryItems.clear();
}
void FullpipeEngine::getAllInventory() {
Inventory2 *inv = getGameLoaderInventory();

View File

@ -129,6 +129,8 @@ class Inventory2 : public Inventory {
bool unselectItem(bool flag);
void draw();
void clear();
};
} // End of namespace Fullpipe