forked from teamnwah/openmw-tes3coop
removed an outdated typedef and some dead code
This commit is contained in:
parent
537b2efe8e
commit
e818d43bc3
19 changed files with 82 additions and 109 deletions
|
@ -351,7 +351,7 @@ namespace MWBase
|
|||
virtual bool isSwimming(const MWWorld::Ptr &object) const = 0;
|
||||
///Is the head of the creature underwater?
|
||||
virtual bool isSubmerged(const MWWorld::Ptr &object) const = 0;
|
||||
virtual bool isUnderwater(const MWWorld::Ptr::CellStore* cell, const Ogre::Vector3 &pos) const = 0;
|
||||
virtual bool isUnderwater(const MWWorld::CellStore* cell, const Ogre::Vector3 &pos) const = 0;
|
||||
virtual bool isOnGround(const MWWorld::Ptr &ptr) const = 0;
|
||||
|
||||
virtual void togglePOV() = 0;
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace MWGui
|
|||
|
||||
void ReferenceInterface::checkReferenceAvailable()
|
||||
{
|
||||
MWWorld::Ptr::CellStore* playerCell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
MWWorld::CellStore* playerCell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
|
||||
// check if player has changed cell, or count of the reference has become 0
|
||||
if ((playerCell != mCurrentPlayerCell && mCurrentPlayerCell != NULL)
|
||||
|
|
|
@ -750,7 +750,7 @@ namespace MWGui
|
|||
mCompanionWindow->onFrame();
|
||||
}
|
||||
|
||||
void WindowManager::changeCell(MWWorld::Ptr::CellStore* cell)
|
||||
void WindowManager::changeCell(MWWorld::CellStore* cell)
|
||||
{
|
||||
std::string name = MWBase::Environment::get().getWorld()->getCellName (cell);
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ namespace MWMechanics
|
|||
}
|
||||
}
|
||||
|
||||
void Actors::dropActors (const MWWorld::Ptr::CellStore *cellStore)
|
||||
void Actors::dropActors (const MWWorld::CellStore *cellStore)
|
||||
{
|
||||
PtrControllerMap::iterator iter = mActors.begin();
|
||||
while(iter != mActors.end())
|
||||
|
|
|
@ -45,7 +45,7 @@ void Objects::updateObject(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr)
|
|||
}
|
||||
}
|
||||
|
||||
void Objects::dropObjects (const MWWorld::Ptr::CellStore *cellStore)
|
||||
void Objects::dropObjects (const MWWorld::CellStore *cellStore)
|
||||
{
|
||||
PtrControllerMap::iterator iter = mObjects.begin();
|
||||
while(iter != mObjects.end())
|
||||
|
|
|
@ -126,7 +126,7 @@ bool Actors::deleteObject (const MWWorld::Ptr& ptr)
|
|||
return true;
|
||||
}
|
||||
|
||||
void Actors::removeCell(MWWorld::Ptr::CellStore* store)
|
||||
void Actors::removeCell(MWWorld::CellStore* store)
|
||||
{
|
||||
for(PtrAnimationMap::iterator iter = mAllActors.begin();iter != mAllActors.end();)
|
||||
{
|
||||
|
|
|
@ -185,14 +185,14 @@ bool Debugging::toggleRenderMode (int mode){
|
|||
return false;
|
||||
}
|
||||
|
||||
void Debugging::cellAdded(MWWorld::Ptr::CellStore *store)
|
||||
void Debugging::cellAdded(MWWorld::CellStore *store)
|
||||
{
|
||||
mActiveCells.push_back(store);
|
||||
if (mPathgridEnabled)
|
||||
enableCellPathgrid(store);
|
||||
}
|
||||
|
||||
void Debugging::cellRemoved(MWWorld::Ptr::CellStore *store)
|
||||
void Debugging::cellRemoved(MWWorld::CellStore *store)
|
||||
{
|
||||
mActiveCells.erase(std::remove(mActiveCells.begin(), mActiveCells.end(), store), mActiveCells.end());
|
||||
if (mPathgridEnabled)
|
||||
|
@ -227,7 +227,7 @@ void Debugging::togglePathgrid()
|
|||
}
|
||||
}
|
||||
|
||||
void Debugging::enableCellPathgrid(MWWorld::Ptr::CellStore *store)
|
||||
void Debugging::enableCellPathgrid(MWWorld::CellStore *store)
|
||||
{
|
||||
const ESM::Pathgrid *pathgrid =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Pathgrid>().search(*store->mCell);
|
||||
|
@ -254,7 +254,7 @@ void Debugging::enableCellPathgrid(MWWorld::Ptr::CellStore *store)
|
|||
}
|
||||
}
|
||||
|
||||
void Debugging::disableCellPathgrid(MWWorld::Ptr::CellStore *store)
|
||||
void Debugging::disableCellPathgrid(MWWorld::CellStore *store)
|
||||
{
|
||||
if (store->mCell->isExterior())
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ std::string LocalMap::coordStr(const int x, const int y)
|
|||
return StringConverter::toString(x) + "_" + StringConverter::toString(y);
|
||||
}
|
||||
|
||||
void LocalMap::saveFogOfWar(MWWorld::Ptr::CellStore* cell)
|
||||
void LocalMap::saveFogOfWar(MWWorld::CellStore* cell)
|
||||
{
|
||||
if (!mInterior)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ void LocalMap::saveFogOfWar(MWWorld::Ptr::CellStore* cell)
|
|||
}
|
||||
}
|
||||
|
||||
void LocalMap::requestMap(MWWorld::Ptr::CellStore* cell, float zMin, float zMax)
|
||||
void LocalMap::requestMap(MWWorld::CellStore* cell, float zMin, float zMax)
|
||||
{
|
||||
mInterior = false;
|
||||
|
||||
|
@ -125,7 +125,7 @@ void LocalMap::requestMap(MWWorld::Ptr::CellStore* cell, float zMin, float zMax)
|
|||
render((x+0.5)*sSize, (y+0.5)*sSize, zMin, zMax, sSize, sSize, name);
|
||||
}
|
||||
|
||||
void LocalMap::requestMap(MWWorld::Ptr::CellStore* cell,
|
||||
void LocalMap::requestMap(MWWorld::CellStore* cell,
|
||||
AxisAlignedBox bounds)
|
||||
{
|
||||
// if we're in an empty cell, don't bother rendering anything
|
||||
|
|
|
@ -172,7 +172,7 @@ bool Objects::deleteObject (const MWWorld::Ptr& ptr)
|
|||
}
|
||||
|
||||
|
||||
void Objects::removeCell(MWWorld::Ptr::CellStore* store)
|
||||
void Objects::removeCell(MWWorld::CellStore* store)
|
||||
{
|
||||
for(PtrAnimationMap::iterator iter = mObjects.begin();iter != mObjects.end();)
|
||||
{
|
||||
|
@ -212,7 +212,7 @@ void Objects::removeCell(MWWorld::Ptr::CellStore* store)
|
|||
}
|
||||
}
|
||||
|
||||
void Objects::buildStaticGeometry(MWWorld::Ptr::CellStore& cell)
|
||||
void Objects::buildStaticGeometry(MWWorld::CellStore& cell)
|
||||
{
|
||||
if(mStaticGeometry.find(&cell) != mStaticGeometry.end())
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ void Objects::buildStaticGeometry(MWWorld::Ptr::CellStore& cell)
|
|||
}
|
||||
}
|
||||
|
||||
Ogre::AxisAlignedBox Objects::getDimensions(MWWorld::Ptr::CellStore* cell)
|
||||
Ogre::AxisAlignedBox Objects::getDimensions(MWWorld::CellStore* cell)
|
||||
{
|
||||
return mBounds[cell];
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ OEngine::Render::Fader* RenderingManager::getFader()
|
|||
return mRendering.getFader();
|
||||
}
|
||||
|
||||
void RenderingManager::removeCell (MWWorld::Ptr::CellStore *store)
|
||||
void RenderingManager::removeCell (MWWorld::CellStore *store)
|
||||
{
|
||||
mObjects.removeCell(store);
|
||||
mActors.removeCell(store);
|
||||
|
@ -238,7 +238,7 @@ void RenderingManager::toggleWater()
|
|||
mWater->toggle();
|
||||
}
|
||||
|
||||
void RenderingManager::cellAdded (MWWorld::Ptr::CellStore *store)
|
||||
void RenderingManager::cellAdded (MWWorld::CellStore *store)
|
||||
{
|
||||
mObjects.buildStaticGeometry (*store);
|
||||
sh::Factory::getInstance().unloadUnreferencedMaterials();
|
||||
|
@ -410,7 +410,7 @@ void RenderingManager::postRenderTargetUpdate(const RenderTargetEvent &evt)
|
|||
mOcclusionQuery->setActive(false);
|
||||
}
|
||||
|
||||
void RenderingManager::waterAdded (MWWorld::Ptr::CellStore *store)
|
||||
void RenderingManager::waterAdded (MWWorld::CellStore *store)
|
||||
{
|
||||
const MWWorld::Store<ESM::Land> &lands =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Land>();
|
||||
|
@ -501,7 +501,7 @@ bool RenderingManager::toggleRenderMode(int mode)
|
|||
}
|
||||
}
|
||||
|
||||
void RenderingManager::configureFog(MWWorld::Ptr::CellStore &mCell)
|
||||
void RenderingManager::configureFog(MWWorld::CellStore &mCell)
|
||||
{
|
||||
Ogre::ColourValue color;
|
||||
color.setAsABGR (mCell.mCell->mAmbi.mFog);
|
||||
|
@ -554,7 +554,7 @@ void RenderingManager::setAmbientMode()
|
|||
}
|
||||
}
|
||||
|
||||
void RenderingManager::configureAmbient(MWWorld::Ptr::CellStore &mCell)
|
||||
void RenderingManager::configureAmbient(MWWorld::CellStore &mCell)
|
||||
{
|
||||
if (mCell.mCell->mData.mFlags & ESM::Cell::Interior)
|
||||
mAmbientColor.setAsABGR (mCell.mCell->mAmbi.mAmbient);
|
||||
|
@ -651,7 +651,7 @@ void RenderingManager::setGlare(bool glare)
|
|||
mSkyManager->setGlare(glare);
|
||||
}
|
||||
|
||||
void RenderingManager::requestMap(MWWorld::Ptr::CellStore* cell)
|
||||
void RenderingManager::requestMap(MWWorld::CellStore* cell)
|
||||
{
|
||||
if (cell->mCell->isExterior())
|
||||
{
|
||||
|
@ -670,7 +670,7 @@ void RenderingManager::requestMap(MWWorld::Ptr::CellStore* cell)
|
|||
mLocalMap->requestMap(cell, mObjects.getDimensions(cell));
|
||||
}
|
||||
|
||||
void RenderingManager::preCellChange(MWWorld::Ptr::CellStore* cell)
|
||||
void RenderingManager::preCellChange(MWWorld::CellStore* cell)
|
||||
{
|
||||
mLocalMap->saveFogOfWar(cell);
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ namespace MWScript
|
|||
|
||||
virtual void execute (Interpreter::Runtime& runtime)
|
||||
{
|
||||
MWWorld::Ptr::CellStore *cell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
MWWorld::CellStore *cell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
runtime.push (cell->mWaterLevel);
|
||||
}
|
||||
};
|
||||
|
@ -138,7 +138,7 @@ namespace MWScript
|
|||
{
|
||||
Interpreter::Type_Float level = runtime[0].mFloat;
|
||||
|
||||
MWWorld::Ptr::CellStore *cell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
MWWorld::CellStore *cell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
|
||||
if (cell->mCell->isExterior())
|
||||
throw std::runtime_error("Can't set water level in exterior cell");
|
||||
|
@ -156,7 +156,7 @@ namespace MWScript
|
|||
{
|
||||
Interpreter::Type_Float level = runtime[0].mFloat;
|
||||
|
||||
MWWorld::Ptr::CellStore *cell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
MWWorld::CellStore *cell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
|
||||
if (cell->mCell->isExterior())
|
||||
throw std::runtime_error("Can't set water level in exterior cell");
|
||||
|
|
|
@ -399,7 +399,7 @@ namespace MWSound
|
|||
}
|
||||
}
|
||||
|
||||
void SoundManager::stopSound(const MWWorld::Ptr::CellStore *cell)
|
||||
void SoundManager::stopSound(const MWWorld::CellStore *cell)
|
||||
{
|
||||
SoundMap::iterator snditer = mActiveSounds.begin();
|
||||
while(snditer != mActiveSounds.end())
|
||||
|
@ -595,7 +595,7 @@ namespace MWSound
|
|||
soundDuration=snditer->first->mFadeOutTime;
|
||||
snditer->first->setVolume(snditer->first->mVolume
|
||||
- soundDuration / snditer->first->mFadeOutTime * snditer->first->mVolume);
|
||||
snditer->first->mFadeOutTime -= soundDuration;
|
||||
snditer->first->mFadeOutTime -= soundDuration;
|
||||
}
|
||||
snditer->first->update();
|
||||
++snditer;
|
||||
|
|
|
@ -7,28 +7,28 @@
|
|||
#include "esmstore.hpp"
|
||||
#include "containerstore.hpp"
|
||||
|
||||
MWWorld::Ptr::CellStore *MWWorld::Cells::getCellStore (const ESM::Cell *cell)
|
||||
MWWorld::CellStore *MWWorld::Cells::getCellStore (const ESM::Cell *cell)
|
||||
{
|
||||
if (cell->mData.mFlags & ESM::Cell::Interior)
|
||||
{
|
||||
std::map<std::string, Ptr::CellStore>::iterator result = mInteriors.find (Misc::StringUtils::lowerCase(cell->mName));
|
||||
std::map<std::string, CellStore>::iterator result = mInteriors.find (Misc::StringUtils::lowerCase(cell->mName));
|
||||
|
||||
if (result==mInteriors.end())
|
||||
{
|
||||
result = mInteriors.insert (std::make_pair (Misc::StringUtils::lowerCase(cell->mName), Ptr::CellStore (cell))).first;
|
||||
result = mInteriors.insert (std::make_pair (Misc::StringUtils::lowerCase(cell->mName), CellStore (cell))).first;
|
||||
}
|
||||
|
||||
return &result->second;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::map<std::pair<int, int>, Ptr::CellStore>::iterator result =
|
||||
std::map<std::pair<int, int>, CellStore>::iterator result =
|
||||
mExteriors.find (std::make_pair (cell->getGridX(), cell->getGridY()));
|
||||
|
||||
if (result==mExteriors.end())
|
||||
{
|
||||
result = mExteriors.insert (std::make_pair (
|
||||
std::make_pair (cell->getGridX(), cell->getGridY()), Ptr::CellStore (cell))).first;
|
||||
std::make_pair (cell->getGridX(), cell->getGridY()), CellStore (cell))).first;
|
||||
|
||||
}
|
||||
|
||||
|
@ -40,11 +40,11 @@ void MWWorld::Cells::clear()
|
|||
{
|
||||
mInteriors.clear();
|
||||
mExteriors.clear();
|
||||
std::fill(mIdCache.begin(), mIdCache.end(), std::make_pair("", (MWWorld::Ptr::CellStore*)0));
|
||||
std::fill(mIdCache.begin(), mIdCache.end(), std::make_pair("", (MWWorld::CellStore*)0));
|
||||
mIdCacheIndex = 0;
|
||||
}
|
||||
|
||||
MWWorld::Ptr MWWorld::Cells::getPtrAndCache (const std::string& name, Ptr::CellStore& cellStore)
|
||||
MWWorld::Ptr MWWorld::Cells::getPtrAndCache (const std::string& name, CellStore& cellStore)
|
||||
{
|
||||
Ptr ptr = getPtr (name, cellStore);
|
||||
|
||||
|
@ -61,13 +61,13 @@ MWWorld::Ptr MWWorld::Cells::getPtrAndCache (const std::string& name, Ptr::CellS
|
|||
|
||||
MWWorld::Cells::Cells (const MWWorld::ESMStore& store, std::vector<ESM::ESMReader>& reader)
|
||||
: mStore (store), mReader (reader),
|
||||
mIdCache (40, std::pair<std::string, Ptr::CellStore *> ("", (Ptr::CellStore*)0)), /// \todo make cache size configurable
|
||||
mIdCache (40, std::pair<std::string, CellStore *> ("", (CellStore*)0)), /// \todo make cache size configurable
|
||||
mIdCacheIndex (0)
|
||||
{}
|
||||
|
||||
MWWorld::Ptr::CellStore *MWWorld::Cells::getExterior (int x, int y)
|
||||
MWWorld::CellStore *MWWorld::Cells::getExterior (int x, int y)
|
||||
{
|
||||
std::map<std::pair<int, int>, Ptr::CellStore>::iterator result =
|
||||
std::map<std::pair<int, int>, CellStore>::iterator result =
|
||||
mExteriors.find (std::make_pair (x, y));
|
||||
|
||||
if (result==mExteriors.end())
|
||||
|
@ -92,7 +92,7 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getExterior (int x, int y)
|
|||
std::make_pair (x, y), CellStore (cell))).first;
|
||||
}
|
||||
|
||||
if (result->second.mState!=Ptr::CellStore::State_Loaded)
|
||||
if (result->second.mState!=CellStore::State_Loaded)
|
||||
{
|
||||
// Multiple plugin support for landscape data is much easier than for references. The last plugin wins.
|
||||
result->second.load (mStore, mReader);
|
||||
|
@ -101,19 +101,19 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getExterior (int x, int y)
|
|||
return &result->second;
|
||||
}
|
||||
|
||||
MWWorld::Ptr::CellStore *MWWorld::Cells::getInterior (const std::string& name)
|
||||
MWWorld::CellStore *MWWorld::Cells::getInterior (const std::string& name)
|
||||
{
|
||||
std::string lowerName = Misc::StringUtils::lowerCase(name);
|
||||
std::map<std::string, Ptr::CellStore>::iterator result = mInteriors.find (lowerName);
|
||||
std::map<std::string, CellStore>::iterator result = mInteriors.find (lowerName);
|
||||
|
||||
if (result==mInteriors.end())
|
||||
{
|
||||
const ESM::Cell *cell = mStore.get<ESM::Cell>().find(lowerName);
|
||||
|
||||
result = mInteriors.insert (std::make_pair (lowerName, Ptr::CellStore (cell))).first;
|
||||
result = mInteriors.insert (std::make_pair (lowerName, CellStore (cell))).first;
|
||||
}
|
||||
|
||||
if (result->second.mState!=Ptr::CellStore::State_Loaded)
|
||||
if (result->second.mState!=CellStore::State_Loaded)
|
||||
{
|
||||
result->second.load (mStore, mReader);
|
||||
}
|
||||
|
@ -121,13 +121,13 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getInterior (const std::string& name)
|
|||
return &result->second;
|
||||
}
|
||||
|
||||
MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name, Ptr::CellStore& cell,
|
||||
MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name, CellStore& cell,
|
||||
bool searchInContainers)
|
||||
{
|
||||
if (cell.mState==Ptr::CellStore::State_Unloaded)
|
||||
if (cell.mState==CellStore::State_Unloaded)
|
||||
cell.preload (mStore, mReader);
|
||||
|
||||
if (cell.mState==Ptr::CellStore::State_Preloaded)
|
||||
if (cell.mState==CellStore::State_Preloaded)
|
||||
{
|
||||
std::string lowerCase = Misc::StringUtils::lowerCase(name);
|
||||
|
||||
|
@ -208,7 +208,7 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name, Ptr::CellStore& ce
|
|||
MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name)
|
||||
{
|
||||
// First check the cache
|
||||
for (std::vector<std::pair<std::string, Ptr::CellStore *> >::iterator iter (mIdCache.begin());
|
||||
for (std::vector<std::pair<std::string, CellStore *> >::iterator iter (mIdCache.begin());
|
||||
iter!=mIdCache.end(); ++iter)
|
||||
if (iter->first==name && iter->second)
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name)
|
|||
}
|
||||
|
||||
// Then check cells that are already listed
|
||||
for (std::map<std::pair<int, int>, Ptr::CellStore>::iterator iter = mExteriors.begin();
|
||||
for (std::map<std::pair<int, int>, CellStore>::iterator iter = mExteriors.begin();
|
||||
iter!=mExteriors.end(); ++iter)
|
||||
{
|
||||
Ptr ptr = getPtrAndCache (name, iter->second);
|
||||
|
@ -226,7 +226,7 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
for (std::map<std::string, Ptr::CellStore>::iterator iter = mInteriors.begin();
|
||||
for (std::map<std::string, CellStore>::iterator iter = mInteriors.begin();
|
||||
iter!=mInteriors.end(); ++iter)
|
||||
{
|
||||
Ptr ptr = getPtrAndCache (name, iter->second);
|
||||
|
@ -240,7 +240,7 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name)
|
|||
|
||||
for (iter = cells.extBegin(); iter != cells.extEnd(); ++iter)
|
||||
{
|
||||
Ptr::CellStore *cellStore = getCellStore (&(*iter));
|
||||
CellStore *cellStore = getCellStore (&(*iter));
|
||||
|
||||
Ptr ptr = getPtrAndCache (name, *cellStore);
|
||||
|
||||
|
@ -250,7 +250,7 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name)
|
|||
|
||||
for (iter = cells.intBegin(); iter != cells.intEnd(); ++iter)
|
||||
{
|
||||
Ptr::CellStore *cellStore = getCellStore (&(*iter));
|
||||
CellStore *cellStore = getCellStore (&(*iter));
|
||||
|
||||
Ptr ptr = getPtrAndCache (name, *cellStore);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace
|
|||
{
|
||||
template<typename T>
|
||||
void listCellScripts (MWWorld::LocalScripts& localScripts,
|
||||
MWWorld::CellRefList<T>& cellRefList, MWWorld::Ptr::CellStore *cell)
|
||||
MWWorld::CellRefList<T>& cellRefList, MWWorld::CellStore *cell)
|
||||
{
|
||||
for (typename MWWorld::CellRefList<T>::List::iterator iter (
|
||||
cellRefList.mList.begin());
|
||||
|
@ -27,15 +27,15 @@ namespace
|
|||
// Adds scripts for items in containers (containers/npcs/creatures)
|
||||
template<typename T>
|
||||
void listCellScriptsCont (MWWorld::LocalScripts& localScripts,
|
||||
MWWorld::CellRefList<T>& cellRefList, MWWorld::Ptr::CellStore *cell)
|
||||
MWWorld::CellRefList<T>& cellRefList, MWWorld::CellStore *cell)
|
||||
{
|
||||
for (typename MWWorld::CellRefList<T>::List::iterator iter (
|
||||
cellRefList.mList.begin());
|
||||
iter!=cellRefList.mList.end(); ++iter)
|
||||
{
|
||||
|
||||
MWWorld::Ptr containerPtr (&*iter, cell);
|
||||
|
||||
|
||||
MWWorld::Ptr containerPtr (&*iter, cell);
|
||||
|
||||
MWWorld::ContainerStore& container = MWWorld::Class::get(containerPtr).getContainerStore(containerPtr);
|
||||
for(MWWorld::ContainerStoreIterator it3 = container.begin(); it3 != container.end(); ++it3)
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ void MWWorld::LocalScripts::add (const std::string& scriptName, const Ptr& ptr)
|
|||
}
|
||||
}
|
||||
|
||||
void MWWorld::LocalScripts::addCell (Ptr::CellStore *cell)
|
||||
void MWWorld::LocalScripts::addCell (CellStore *cell)
|
||||
{
|
||||
listCellScripts (*this, cell->mActivators, cell);
|
||||
listCellScripts (*this, cell->mPotions, cell);
|
||||
|
@ -128,7 +128,7 @@ void MWWorld::LocalScripts::clear()
|
|||
mScripts.clear();
|
||||
}
|
||||
|
||||
void MWWorld::LocalScripts::clearCell (Ptr::CellStore *cell)
|
||||
void MWWorld::LocalScripts::clearCell (CellStore *cell)
|
||||
{
|
||||
std::list<std::pair<std::string, Ptr> >::iterator iter = mScripts.begin();
|
||||
|
||||
|
|
|
@ -14,9 +14,6 @@ namespace MWWorld
|
|||
{
|
||||
public:
|
||||
|
||||
typedef MWWorld::CellStore CellStore;
|
||||
///< \deprecated
|
||||
|
||||
MWWorld::LiveCellRefBase *mRef;
|
||||
CellStore *mCell;
|
||||
ContainerStore *mContainerStore;
|
||||
|
@ -59,7 +56,7 @@ namespace MWWorld
|
|||
|
||||
RefData& getRefData() const;
|
||||
|
||||
Ptr::CellStore *getCell() const
|
||||
CellStore *getCell() const
|
||||
{
|
||||
assert(mCell);
|
||||
return mCell;
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace MWWorld
|
|||
mActiveCells.erase(*iter);
|
||||
}
|
||||
|
||||
void Scene::loadCell (Ptr::CellStore *cell, Loading::Listener* loadingListener)
|
||||
void Scene::loadCell (CellStore *cell, Loading::Listener* loadingListener)
|
||||
{
|
||||
std::pair<CellStoreCollection::iterator, bool> result = mActiveCells.insert(cell);
|
||||
|
||||
|
@ -161,7 +161,7 @@ namespace MWWorld
|
|||
MWBase::Environment::get().getWorld()->getLocalScripts().addCell (cell);
|
||||
}
|
||||
|
||||
void Scene::playerCellChange(MWWorld::CellStore *cell, const ESM::Position& pos, bool adjustPlayerPos)
|
||||
void Scene::playerCellChange(CellStore *cell, const ESM::Position& pos, bool adjustPlayerPos)
|
||||
{
|
||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||
world->getPlayer().setCell(cell);
|
||||
|
@ -441,7 +441,7 @@ namespace MWWorld
|
|||
changeCell (x, y, position, true);
|
||||
}
|
||||
|
||||
Ptr::CellStore* Scene::getCurrentCell ()
|
||||
CellStore* Scene::getCurrentCell ()
|
||||
{
|
||||
return mCurrentCell;
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ namespace MWWorld
|
|||
mCellChanged = false;
|
||||
}
|
||||
|
||||
int Scene::countRefs (const Ptr::CellStore& cell)
|
||||
int Scene::countRefs (const CellStore& cell)
|
||||
{
|
||||
return cell.mActivators.mList.size()
|
||||
+ cell.mPotions.mList.size()
|
||||
|
@ -475,7 +475,7 @@ namespace MWWorld
|
|||
+ cell.mNpcs.mList.size();
|
||||
}
|
||||
|
||||
void Scene::insertCell (Ptr::CellStore &cell, bool rescale, Loading::Listener* loadingListener)
|
||||
void Scene::insertCell (CellStore &cell, bool rescale, Loading::Listener* loadingListener)
|
||||
{
|
||||
// Loop through all references in the cell
|
||||
insertCellRefList(mRendering, cell.mActivators, cell, *mPhysics, rescale, loadingListener);
|
||||
|
|
|
@ -56,9 +56,9 @@ namespace MWWorld
|
|||
void playerCellChange (CellStore *cell, const ESM::Position& position,
|
||||
bool adjustPlayerPos = true);
|
||||
|
||||
void insertCell (Ptr::CellStore &cell, bool rescale, Loading::Listener* loadingListener);
|
||||
void insertCell (CellStore &cell, bool rescale, Loading::Listener* loadingListener);
|
||||
|
||||
int countRefs (const Ptr::CellStore& cell);
|
||||
int countRefs (const CellStore& cell);
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -48,30 +48,6 @@ using namespace Ogre;
|
|||
|
||||
namespace
|
||||
{
|
||||
/* // NOTE this code is never instantiated (proper copy in localscripts.cpp),
|
||||
// so this commented out to not produce syntactic errors
|
||||
|
||||
template<typename T>
|
||||
void listCellScripts (const MWWorld::ESMStore& store,
|
||||
MWWorld::CellRefList<T>& cellRefList, MWWorld::LocalScripts& localScripts,
|
||||
MWWorld::Ptr::CellStore *cell)
|
||||
{
|
||||
for (typename MWWorld::CellRefList<T>::List::iterator iter (
|
||||
cellRefList.mList.begin());
|
||||
iter!=cellRefList.mList.end(); ++iter)
|
||||
{
|
||||
if (!iter->mBase->mScript.empty() && iter->mData.getCount())
|
||||
{
|
||||
if (const ESM::Script *script = store.get<ESM::Script>().find (iter->mBase->mScript))
|
||||
{
|
||||
iter->mData.setLocals (*script);
|
||||
|
||||
localScripts.add (iter->mBase->mScript, MWWorld::Ptr (&*iter, cell));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
template<typename T>
|
||||
MWWorld::LiveCellRef<T> *searchViaHandle (const std::string& handle,
|
||||
MWWorld::CellRefList<T>& refList)
|
||||
|
@ -125,7 +101,7 @@ namespace MWWorld
|
|||
LoadersContainer mLoaders;
|
||||
};
|
||||
|
||||
Ptr World::getPtrViaHandle (const std::string& handle, Ptr::CellStore& cell)
|
||||
Ptr World::getPtrViaHandle (const std::string& handle, CellStore& cell)
|
||||
{
|
||||
if (MWWorld::LiveCellRef<ESM::Activator> *ref =
|
||||
searchViaHandle (handle, cell.mActivators))
|
||||
|
@ -388,12 +364,12 @@ namespace MWWorld
|
|||
return &mFallback;
|
||||
}
|
||||
|
||||
Ptr::CellStore *World::getExterior (int x, int y)
|
||||
CellStore *World::getExterior (int x, int y)
|
||||
{
|
||||
return mCells.getExterior (x, y);
|
||||
}
|
||||
|
||||
Ptr::CellStore *World::getInterior (const std::string& name)
|
||||
CellStore *World::getInterior (const std::string& name)
|
||||
{
|
||||
return mCells.getInterior (name);
|
||||
}
|
||||
|
@ -504,7 +480,7 @@ namespace MWWorld
|
|||
for (Scene::CellStoreCollection::const_iterator iter (mWorldScene->getActiveCells().begin());
|
||||
iter!=mWorldScene->getActiveCells().end(); ++iter)
|
||||
{
|
||||
Ptr::CellStore* cellstore = *iter;
|
||||
CellStore* cellstore = *iter;
|
||||
Ptr ptr = mCells.getPtr (name, *cellstore, true);
|
||||
|
||||
if (!ptr.isEmpty())
|
||||
|
@ -537,7 +513,7 @@ namespace MWWorld
|
|||
for (Scene::CellStoreCollection::const_iterator iter (mWorldScene->getActiveCells().begin());
|
||||
iter!=mWorldScene->getActiveCells().end(); ++iter)
|
||||
{
|
||||
Ptr::CellStore* cellstore = *iter;
|
||||
CellStore* cellstore = *iter;
|
||||
Ptr ptr = getPtrViaHandle (handle, *cellstore);
|
||||
|
||||
if (!ptr.isEmpty())
|
||||
|
@ -547,7 +523,7 @@ namespace MWWorld
|
|||
return MWWorld::Ptr();
|
||||
}
|
||||
|
||||
void World::addContainerScripts(const Ptr& reference, Ptr::CellStore * cell)
|
||||
void World::addContainerScripts(const Ptr& reference, CellStore * cell)
|
||||
{
|
||||
if( reference.getTypeName()==typeid (ESM::Container).name() ||
|
||||
reference.getTypeName()==typeid (ESM::NPC).name() ||
|
||||
|
@ -1400,7 +1376,7 @@ namespace MWWorld
|
|||
|
||||
bool World::isCellExterior() const
|
||||
{
|
||||
Ptr::CellStore *currentCell = mWorldScene->getCurrentCell();
|
||||
CellStore *currentCell = mWorldScene->getCurrentCell();
|
||||
if (currentCell)
|
||||
{
|
||||
return currentCell->mCell->isExterior();
|
||||
|
@ -1410,7 +1386,7 @@ namespace MWWorld
|
|||
|
||||
bool World::isCellQuasiExterior() const
|
||||
{
|
||||
Ptr::CellStore *currentCell = mWorldScene->getCurrentCell();
|
||||
CellStore *currentCell = mWorldScene->getCurrentCell();
|
||||
if (currentCell)
|
||||
{
|
||||
if (!(currentCell->mCell->mData.mFlags & ESM::Cell::QuasiEx))
|
||||
|
@ -1587,7 +1563,7 @@ namespace MWWorld
|
|||
|
||||
void World::dropObjectOnGround (const Ptr& actor, const Ptr& object, int amount)
|
||||
{
|
||||
MWWorld::Ptr::CellStore* cell = actor.getCell();
|
||||
MWWorld::CellStore* cell = actor.getCell();
|
||||
|
||||
ESM::Position pos =
|
||||
actor.getRefData().getPosition();
|
||||
|
@ -1684,7 +1660,7 @@ namespace MWWorld
|
|||
}
|
||||
|
||||
bool
|
||||
World::isUnderwater(const MWWorld::Ptr::CellStore* cell, const Ogre::Vector3 &pos) const
|
||||
World::isUnderwater(const MWWorld::CellStore* cell, const Ogre::Vector3 &pos) const
|
||||
{
|
||||
if (!(cell->mCell->mData.mFlags & ESM::Cell::HasWater)) {
|
||||
return false;
|
||||
|
@ -1704,9 +1680,9 @@ namespace MWWorld
|
|||
return mRendering->vanityRotateCamera(rot);
|
||||
}
|
||||
|
||||
void World::setCameraDistance(float dist, bool adjust, bool override)
|
||||
void World::setCameraDistance(float dist, bool adjust, bool override_)
|
||||
{
|
||||
return mRendering->setCameraDistance(dist, adjust, override);;
|
||||
return mRendering->setCameraDistance(dist, adjust, override_);
|
||||
}
|
||||
|
||||
void World::setupPlayer()
|
||||
|
@ -1734,7 +1710,7 @@ namespace MWWorld
|
|||
|
||||
int World::canRest ()
|
||||
{
|
||||
Ptr::CellStore *currentCell = mWorldScene->getCurrentCell();
|
||||
CellStore *currentCell = mWorldScene->getCurrentCell();
|
||||
|
||||
Ptr player = mPlayer->getPlayer();
|
||||
RefData &refdata = player.getRefData();
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace MWWorld
|
|||
World (const World&);
|
||||
World& operator= (const World&);
|
||||
|
||||
Ptr getPtrViaHandle (const std::string& handle, Ptr::CellStore& cellStore);
|
||||
Ptr getPtrViaHandle (const std::string& handle, CellStore& cellStore);
|
||||
|
||||
int mActivationDistanceOverride;
|
||||
std::string mFacedHandle;
|
||||
|
@ -121,7 +121,7 @@ namespace MWWorld
|
|||
float getObjectActivationDistance ();
|
||||
|
||||
void removeContainerScripts(const Ptr& reference);
|
||||
void addContainerScripts(const Ptr& reference, Ptr::CellStore* cell);
|
||||
void addContainerScripts(const Ptr& reference, CellStore* cell);
|
||||
void PCDropped (const Ptr& item);
|
||||
|
||||
void processDoors(float duration);
|
||||
|
@ -413,7 +413,7 @@ namespace MWWorld
|
|||
///Is the head of the creature underwater?
|
||||
virtual bool isSubmerged(const MWWorld::Ptr &object) const;
|
||||
virtual bool isSwimming(const MWWorld::Ptr &object) const;
|
||||
virtual bool isUnderwater(const MWWorld::Ptr::CellStore* cell, const Ogre::Vector3 &pos) const;
|
||||
virtual bool isUnderwater(const MWWorld::CellStore* cell, const Ogre::Vector3 &pos) const;
|
||||
virtual bool isOnGround(const MWWorld::Ptr &ptr) const;
|
||||
|
||||
virtual void togglePOV() {
|
||||
|
|
Loading…
Reference in a new issue