various interface fixes, commented unused code

actorid
greye 12 years ago
parent b3ad872845
commit 242a9b5a59

@ -269,7 +269,7 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name)
for (iter = cells.intBegin(); iter != cells.intEnd(); ++iter)
{
Ptr::CellStore *cellStore = getCellStore (*iter);
Ptr::CellStore *cellStore = getCellStore (&(*iter));
Ptr ptr = getPtrAndCache (name, *cellStore);
@ -277,9 +277,9 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name)
return ptr;
}
for (iter = cells.extBegin(); iter != cells.extEnd(); ++it)
for (iter = cells.extBegin(); iter != cells.extEnd(); ++iter)
{
Ptr::CellStore *cellStore = getCellStore (*iter);
Ptr::CellStore *cellStore = getCellStore (&(*iter));
Ptr ptr = getPtrAndCache (name, *cellStore);

@ -29,33 +29,34 @@ namespace MWWorld
Globals::Globals (const MWWorld::ESMStore& store)
{
for (MWWorld::RecListT<ESM::Global>::MapType::const_iterator iter
(store.globals.list.begin()); iter != store.globals.list.end(); ++iter)
const MWWorld::Store<ESM::Global> &globals = store.get<ESM::Global>();
MWWorld::Store<ESM::Global>::iterator iter = globals.begin();
for (; iter != globals.end(); ++iter)
{
char type = ' ';
Data value;
switch (iter->second.mType)
switch (iter->mType)
{
case ESM::VT_Short:
type = 's';
value.mShort = *reinterpret_cast<const Interpreter::Type_Float *> (
&iter->second.mValue);
&iter->mValue);
break;
case ESM::VT_Int:
type = 'l';
value.mLong = *reinterpret_cast<const Interpreter::Type_Float *> (
&iter->second.mValue);
&iter->mValue);
break;
case ESM::VT_Float:
type = 'f';
value.mFloat = *reinterpret_cast<const Interpreter::Type_Float *> (
&iter->second.mValue);
&iter->mValue);
break;
default:
@ -63,7 +64,7 @@ namespace MWWorld
throw std::runtime_error ("unsupported global variable type");
}
mVariables.insert (std::make_pair (iter->first, std::make_pair (type, value)));
mVariables.insert (std::make_pair (iter->mId, std::make_pair (type, value)));
}
if (mVariables.find ("dayspassed")==mVariables.end())

@ -19,6 +19,9 @@ 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,
@ -28,18 +31,18 @@ namespace
cellRefList.mList.begin());
iter!=cellRefList.mList.end(); ++iter)
{
if (!iter->mBase->script.empty() && iter->mData.getCount())
if (!iter->mBase->mScript.empty() && iter->mData.getCount())
{
if (const ESM::Script *script = store.scripts.find (iter->base->script))
if (const ESM::Script *script = store.get<ESM::Script>().find (iter->mBase->mScript))
{
iter->mData.setLocals (*script);
localScripts.add (iter->base->script, MWWorld::Ptr (&*iter, cell));
localScripts.add (iter->mBase->mScript, MWWorld::Ptr (&*iter, cell));
}
}
}
}
*/
template<typename T>
MWWorld::LiveCellRef<T> *searchViaHandle (const std::string& handle,
MWWorld::CellRefList<T>& refList)
@ -793,10 +796,15 @@ namespace MWWorld
mStore.all.insert (std::make_pair (stream.str(), ESM::REC_ALCH));
return std::make_pair (stream.str(), created);
*/}
*/
std::string id = "";
const ESM::Potion *ptr = 0;
return std::make_pair(id, ptr);
}
std::pair<std::string, const ESM::Class *> World::createRecord (const ESM::Class& record)
{/*
{
/*
/// \todo See function above.
std::ostringstream stream;
stream << "$dynamic" << mNextDynamicRecord++;
@ -807,10 +815,15 @@ namespace MWWorld
mStore.all.insert (std::make_pair (stream.str(), ESM::REC_CLAS));
return std::make_pair (stream.str(), created);
*/}
*/
std::string id = "";
const ESM::Class *ptr = 0;
return std::make_pair(id, ptr);
}
std::pair<std::string, const ESM::Spell *> World::createRecord (const ESM::Spell& record)
{/*
{
/*
/// \todo See function above.
std::ostringstream stream;
stream << "$dynamic" << mNextDynamicRecord++;
@ -821,10 +834,15 @@ namespace MWWorld
mStore.all.insert (std::make_pair (stream.str(), ESM::REC_SPEL));
return std::make_pair (stream.str(), created);
*/}
*/
std::string id = "";
const ESM::Spell *ptr = 0;
return std::make_pair(id, ptr);
}
const ESM::Cell *World::createRecord (const ESM::Cell& record)
{/*
{
/*
if (record.mData.mFlags & ESM::Cell::Interior)
{
if (mStore.cells.searchInt (record.mName))
@ -844,7 +862,9 @@ namespace MWWorld
std::make_pair (std::make_pair (record.mData.mX, record.mData.mY), cell));
return cell;
}
*/}
*/
return 0;
}
void World::playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, int mode,
int number)

Loading…
Cancel
Save