diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index e16cba9d6..e9c49c3f6 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -45,7 +45,7 @@ add_openmw_dir (mwsound add_openmw_dir (mwworld refdata world physicssystem scene environment globals class action nullaction actionteleport - containerstore actiontalk actiontake containerstore manualref containerutil player cellfunctors + containerstore actiontalk actiontake manualref player cellfunctors cells localscripts customdata ) diff --git a/apps/openmw/mwclass/containerutil.hpp b/apps/openmw/mwclass/containerutil.hpp deleted file mode 100644 index 76bdf0236..000000000 --- a/apps/openmw/mwclass/containerutil.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef GAME_MWCLASS_CONTAINERUTIL_H -#define GAME_MWCLASS_CONTAINERUTIL_H - -#include - -#include "../mwworld/ptr.hpp" -#include "../mwworld/containerstore.hpp" - -namespace MWClass -{ - template - void insertIntoContainerStore (const MWWorld::Ptr& ptr, - ESMS::CellRefList& containerStore) - { - if (!ptr.isEmpty()) - { - // TODO check stacking - - ESMS::LiveCellRef cellRef(ptr.getCellRef(), ptr.get()->base); - cellRef.mData = ptr.getRefData(); - - containerStore.list.push_back (cellRef); - - } - } -} - -#endif diff --git a/apps/openmw/mwworld/containerutil.cpp b/apps/openmw/mwworld/containerutil.cpp deleted file mode 100644 index ddcf8ad5e..000000000 --- a/apps/openmw/mwworld/containerutil.cpp +++ /dev/null @@ -1,43 +0,0 @@ - -#include "containerutil.hpp" - -namespace -{ - template - void listItemsInContainerImp (const std::string& id, - ESMS::CellRefList& containerStore, - const ESMS::RecListT& store, std::vector& list) - { - if (const T *record = store.search (id)) - { - for (typename ESMS::CellRefList::List::iterator iter - (containerStore.list.begin()); - iter!=containerStore.list.end(); ++iter) - { - if (iter->base==record) - list.push_back (MWWorld::Ptr (&*iter, 0)); - } - } - } -} - -namespace MWWorld -{ - void listItemsInContainer (const std::string& id, - ContainerStore& containerStore, - const ESMS::ESMStore& store, std::vector& list) - { - listItemsInContainerImp (id, containerStore.potions, store.potions, list); - listItemsInContainerImp (id, containerStore.appas, store.appas, list); - listItemsInContainerImp (id, containerStore.armors, store.armors, list); - listItemsInContainerImp (id, containerStore.books, store.books, list); - listItemsInContainerImp (id, containerStore.clothes, store.clothes, list); - listItemsInContainerImp (id, containerStore.ingreds, store.ingreds, list); - listItemsInContainerImp (id, containerStore.lights, store.lights, list); - listItemsInContainerImp (id, containerStore.lockpicks, store.lockpicks, list); - listItemsInContainerImp (id, containerStore.miscItems, store.miscItems, list); - listItemsInContainerImp (id, containerStore.probes, store.probes, list); - listItemsInContainerImp (id, containerStore.repairs, store.repairs, list); - listItemsInContainerImp (id, containerStore.weapons, store.weapons, list); - } -} diff --git a/apps/openmw/mwworld/containerutil.hpp b/apps/openmw/mwworld/containerutil.hpp deleted file mode 100644 index b7d0c8ea2..000000000 --- a/apps/openmw/mwworld/containerutil.hpp +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef GAME_MWWORLD_CONTAINERUTIL_H -#define GAME_MWWORLD_CONTAINERUTIL_H - -#include -#include - -#include - -#include "containerstore.hpp" -#include "ptr.hpp" - -namespace MWWorld -{ - void listItemsInContainer (const std::string& id, ContainerStore& containerStore, - const ESMS::ESMStore& store, std::vector& list); - ///< append all references with the given id to list. -} - -#endif