forked from teamnwah/openmw-tes3coop
Merge remote-tracking branch 'endorph/master'
This commit is contained in:
commit
48a08c4c4d
4 changed files with 50 additions and 0 deletions
|
@ -183,6 +183,9 @@ if (WIN32)
|
|||
set(Boost_USE_STATIC_LIBS ON)
|
||||
set(PLATFORM_INCLUDE_DIR "platform")
|
||||
add_definitions(-DBOOST_ALL_NO_LIB)
|
||||
|
||||
# Suppress WinMain(), provided by SDL
|
||||
add_definitions(-DSDL_MAIN_HANDLED)
|
||||
else (WIN32)
|
||||
set(PLATFORM_INCLUDE_DIR "")
|
||||
find_path (UUID_INCLUDE_DIR uuid/uuid.h)
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <boost/iostreams/stream_buffer.hpp>
|
||||
|
||||
// For OutputDebugString
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
// makes __argc and __argv available on windows
|
||||
#include <cstdlib>
|
||||
|
|
|
@ -560,6 +560,11 @@ MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *contain
|
|||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Weapon>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Weapon), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mWeapon(iterator){}
|
||||
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator( const ContainerStoreIterator& src )
|
||||
{
|
||||
copy(src);
|
||||
}
|
||||
|
||||
void MWWorld::ContainerStoreIterator::incType()
|
||||
{
|
||||
if (mType==0)
|
||||
|
@ -812,6 +817,41 @@ const MWWorld::ContainerStore *MWWorld::ContainerStoreIterator::getContainerStor
|
|||
return mContainer;
|
||||
}
|
||||
|
||||
void MWWorld::ContainerStoreIterator::copy(const ContainerStoreIterator& src)
|
||||
{
|
||||
mType = src.mType;
|
||||
mMask = src.mMask;
|
||||
mContainer = src.mContainer;
|
||||
mPtr = src.mPtr;
|
||||
|
||||
switch (mType)
|
||||
{
|
||||
case MWWorld::ContainerStore::Type_Potion: mPotion = src.mPotion; break;
|
||||
case MWWorld::ContainerStore::Type_Apparatus: mApparatus = src.mApparatus; break;
|
||||
case MWWorld::ContainerStore::Type_Armor: mArmor = src.mArmor; break;
|
||||
case MWWorld::ContainerStore::Type_Book: mBook = src.mBook; break;
|
||||
case MWWorld::ContainerStore::Type_Clothing: mClothing = src.mClothing; break;
|
||||
case MWWorld::ContainerStore::Type_Ingredient: mIngredient = src.mIngredient; break;
|
||||
case MWWorld::ContainerStore::Type_Light: mLight = src.mLight; break;
|
||||
case MWWorld::ContainerStore::Type_Lockpick: mLockpick = src.mLockpick; break;
|
||||
case MWWorld::ContainerStore::Type_Miscellaneous: mMiscellaneous = src.mMiscellaneous; break;
|
||||
case MWWorld::ContainerStore::Type_Probe: mProbe = src.mProbe; break;
|
||||
case MWWorld::ContainerStore::Type_Repair: mRepair = src.mRepair; break;
|
||||
case MWWorld::ContainerStore::Type_Weapon: mWeapon = src.mWeapon; break;
|
||||
case -1: break;
|
||||
default: assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
MWWorld::ContainerStoreIterator& MWWorld::ContainerStoreIterator::operator=( const ContainerStoreIterator& rhs )
|
||||
{
|
||||
if (this!=&rhs)
|
||||
{
|
||||
copy(rhs);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool MWWorld::operator== (const ContainerStoreIterator& left, const ContainerStoreIterator& right)
|
||||
{
|
||||
return left.isEqual (right);
|
||||
|
|
|
@ -167,6 +167,8 @@ namespace MWWorld
|
|||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Repair>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Weapon>::List::iterator);
|
||||
|
||||
void copy (const ContainerStoreIterator& src);
|
||||
|
||||
void incType();
|
||||
|
||||
void nextType();
|
||||
|
@ -183,6 +185,8 @@ namespace MWWorld
|
|||
|
||||
public:
|
||||
|
||||
ContainerStoreIterator(const ContainerStoreIterator& src);
|
||||
|
||||
Ptr *operator->() const;
|
||||
|
||||
Ptr operator*() const;
|
||||
|
@ -191,6 +195,8 @@ namespace MWWorld
|
|||
|
||||
ContainerStoreIterator operator++ (int);
|
||||
|
||||
ContainerStoreIterator& operator= (const ContainerStoreIterator& rhs);
|
||||
|
||||
bool isEqual (const ContainerStoreIterator& iter) const;
|
||||
|
||||
int getType() const;
|
||||
|
|
Loading…
Reference in a new issue