forked from teamnwah/openmw-tes3coop
replaced boost::shared_ptr with std::shared_ptr
This commit is contained in:
parent
35bbb7d552
commit
ff108b4c6b
120 changed files with 389 additions and 386 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include <osgDB/ReadFile>
|
#include <osgDB/ReadFile>
|
||||||
#include <osg/ImageUtils>
|
#include <osg/ImageUtils>
|
||||||
|
|
@ -260,37 +260,37 @@ namespace ESSImport
|
||||||
const unsigned int recGAME = ESM::FourCC<'G','A','M','E'>::value;
|
const unsigned int recGAME = ESM::FourCC<'G','A','M','E'>::value;
|
||||||
const unsigned int recJOUR = ESM::FourCC<'J','O','U','R'>::value;
|
const unsigned int recJOUR = ESM::FourCC<'J','O','U','R'>::value;
|
||||||
|
|
||||||
std::map<unsigned int, boost::shared_ptr<Converter> > converters;
|
std::map<unsigned int, std::shared_ptr<Converter> > converters;
|
||||||
converters[ESM::REC_GLOB] = boost::shared_ptr<Converter>(new ConvertGlobal());
|
converters[ESM::REC_GLOB] = std::shared_ptr<Converter>(new ConvertGlobal());
|
||||||
converters[ESM::REC_BOOK] = boost::shared_ptr<Converter>(new ConvertBook());
|
converters[ESM::REC_BOOK] = std::shared_ptr<Converter>(new ConvertBook());
|
||||||
converters[ESM::REC_NPC_] = boost::shared_ptr<Converter>(new ConvertNPC());
|
converters[ESM::REC_NPC_] = std::shared_ptr<Converter>(new ConvertNPC());
|
||||||
converters[ESM::REC_CREA] = boost::shared_ptr<Converter>(new ConvertCREA());
|
converters[ESM::REC_CREA] = std::shared_ptr<Converter>(new ConvertCREA());
|
||||||
converters[ESM::REC_NPCC] = boost::shared_ptr<Converter>(new ConvertNPCC());
|
converters[ESM::REC_NPCC] = std::shared_ptr<Converter>(new ConvertNPCC());
|
||||||
converters[ESM::REC_CREC] = boost::shared_ptr<Converter>(new ConvertCREC());
|
converters[ESM::REC_CREC] = std::shared_ptr<Converter>(new ConvertCREC());
|
||||||
converters[recREFR ] = boost::shared_ptr<Converter>(new ConvertREFR());
|
converters[recREFR ] = std::shared_ptr<Converter>(new ConvertREFR());
|
||||||
converters[recPCDT ] = boost::shared_ptr<Converter>(new ConvertPCDT());
|
converters[recPCDT ] = std::shared_ptr<Converter>(new ConvertPCDT());
|
||||||
converters[recFMAP ] = boost::shared_ptr<Converter>(new ConvertFMAP());
|
converters[recFMAP ] = std::shared_ptr<Converter>(new ConvertFMAP());
|
||||||
converters[recKLST ] = boost::shared_ptr<Converter>(new ConvertKLST());
|
converters[recKLST ] = std::shared_ptr<Converter>(new ConvertKLST());
|
||||||
converters[recSTLN ] = boost::shared_ptr<Converter>(new ConvertSTLN());
|
converters[recSTLN ] = std::shared_ptr<Converter>(new ConvertSTLN());
|
||||||
converters[recGAME ] = boost::shared_ptr<Converter>(new ConvertGAME());
|
converters[recGAME ] = std::shared_ptr<Converter>(new ConvertGAME());
|
||||||
converters[ESM::REC_CELL] = boost::shared_ptr<Converter>(new ConvertCell());
|
converters[ESM::REC_CELL] = std::shared_ptr<Converter>(new ConvertCell());
|
||||||
converters[ESM::REC_ALCH] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Potion>());
|
converters[ESM::REC_ALCH] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Potion>());
|
||||||
converters[ESM::REC_CLAS] = boost::shared_ptr<Converter>(new ConvertClass());
|
converters[ESM::REC_CLAS] = std::shared_ptr<Converter>(new ConvertClass());
|
||||||
converters[ESM::REC_SPEL] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Spell>());
|
converters[ESM::REC_SPEL] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Spell>());
|
||||||
converters[ESM::REC_ARMO] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Armor>());
|
converters[ESM::REC_ARMO] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Armor>());
|
||||||
converters[ESM::REC_WEAP] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Weapon>());
|
converters[ESM::REC_WEAP] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Weapon>());
|
||||||
converters[ESM::REC_CLOT] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Clothing>());
|
converters[ESM::REC_CLOT] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Clothing>());
|
||||||
converters[ESM::REC_ENCH] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Enchantment>());
|
converters[ESM::REC_ENCH] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Enchantment>());
|
||||||
converters[ESM::REC_WEAP] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Weapon>());
|
converters[ESM::REC_WEAP] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Weapon>());
|
||||||
converters[ESM::REC_LEVC] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::CreatureLevList>());
|
converters[ESM::REC_LEVC] = std::shared_ptr<Converter>(new DefaultConverter<ESM::CreatureLevList>());
|
||||||
converters[ESM::REC_LEVI] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::ItemLevList>());
|
converters[ESM::REC_LEVI] = std::shared_ptr<Converter>(new DefaultConverter<ESM::ItemLevList>());
|
||||||
converters[ESM::REC_CNTC] = boost::shared_ptr<Converter>(new ConvertCNTC());
|
converters[ESM::REC_CNTC] = std::shared_ptr<Converter>(new ConvertCNTC());
|
||||||
converters[ESM::REC_FACT] = boost::shared_ptr<Converter>(new ConvertFACT());
|
converters[ESM::REC_FACT] = std::shared_ptr<Converter>(new ConvertFACT());
|
||||||
converters[ESM::REC_INFO] = boost::shared_ptr<Converter>(new ConvertINFO());
|
converters[ESM::REC_INFO] = std::shared_ptr<Converter>(new ConvertINFO());
|
||||||
converters[ESM::REC_DIAL] = boost::shared_ptr<Converter>(new ConvertDIAL());
|
converters[ESM::REC_DIAL] = std::shared_ptr<Converter>(new ConvertDIAL());
|
||||||
converters[ESM::REC_QUES] = boost::shared_ptr<Converter>(new ConvertQUES());
|
converters[ESM::REC_QUES] = std::shared_ptr<Converter>(new ConvertQUES());
|
||||||
converters[recJOUR ] = boost::shared_ptr<Converter>(new ConvertJOUR());
|
converters[recJOUR ] = std::shared_ptr<Converter>(new ConvertJOUR());
|
||||||
converters[ESM::REC_SCPT] = boost::shared_ptr<Converter>(new ConvertSCPT());
|
converters[ESM::REC_SCPT] = std::shared_ptr<Converter>(new ConvertSCPT());
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// - REGN (weather in certain regions?)
|
// - REGN (weather in certain regions?)
|
||||||
|
|
@ -300,7 +300,7 @@ namespace ESSImport
|
||||||
|
|
||||||
std::set<unsigned int> unknownRecords;
|
std::set<unsigned int> unknownRecords;
|
||||||
|
|
||||||
for (std::map<unsigned int, boost::shared_ptr<Converter> >::const_iterator it = converters.begin();
|
for (std::map<unsigned int, std::shared_ptr<Converter> >::const_iterator it = converters.begin();
|
||||||
it != converters.end(); ++it)
|
it != converters.end(); ++it)
|
||||||
{
|
{
|
||||||
it->second->setContext(context);
|
it->second->setContext(context);
|
||||||
|
|
@ -311,7 +311,7 @@ namespace ESSImport
|
||||||
ESM::NAME n = esm.getRecName();
|
ESM::NAME n = esm.getRecName();
|
||||||
esm.getRecHeader();
|
esm.getRecHeader();
|
||||||
|
|
||||||
std::map<unsigned int, boost::shared_ptr<Converter> >::iterator it = converters.find(n.val);
|
std::map<unsigned int, std::shared_ptr<Converter> >::iterator it = converters.find(n.val);
|
||||||
if (it != converters.end())
|
if (it != converters.end())
|
||||||
{
|
{
|
||||||
it->second->read(esm);
|
it->second->read(esm);
|
||||||
|
|
@ -370,7 +370,7 @@ namespace ESSImport
|
||||||
|
|
||||||
// Writing order should be Dynamic Store -> Cells -> Player,
|
// Writing order should be Dynamic Store -> Cells -> Player,
|
||||||
// so that references to dynamic records can be recognized when loading
|
// so that references to dynamic records can be recognized when loading
|
||||||
for (std::map<unsigned int, boost::shared_ptr<Converter> >::const_iterator it = converters.begin();
|
for (std::map<unsigned int, std::shared_ptr<Converter> >::const_iterator it = converters.begin();
|
||||||
it != converters.end(); ++it)
|
it != converters.end(); ++it)
|
||||||
{
|
{
|
||||||
if (it->second->getStage() != 0)
|
if (it->second->getStage() != 0)
|
||||||
|
|
@ -383,7 +383,7 @@ namespace ESSImport
|
||||||
context.mPlayerBase.save(writer);
|
context.mPlayerBase.save(writer);
|
||||||
writer.endRecord(ESM::REC_NPC_);
|
writer.endRecord(ESM::REC_NPC_);
|
||||||
|
|
||||||
for (std::map<unsigned int, boost::shared_ptr<Converter> >::const_iterator it = converters.begin();
|
for (std::map<unsigned int, std::shared_ptr<Converter> >::const_iterator it = converters.begin();
|
||||||
it != converters.end(); ++it)
|
it != converters.end(); ++it)
|
||||||
{
|
{
|
||||||
if (it->second->getStage() != 1)
|
if (it->second->getStage() != 1)
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
#include <boost/filesystem/path.hpp>
|
#include <boost/filesystem/path.hpp>
|
||||||
|
|
||||||
#include <QUndoStack>
|
#include <QUndoStack>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
CSMFilter::AndNode::AndNode (const std::vector<boost::shared_ptr<Node> >& nodes)
|
CSMFilter::AndNode::AndNode (const std::vector<std::shared_ptr<Node> >& nodes)
|
||||||
: NAryNode (nodes, "and")
|
: NAryNode (nodes, "and")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ namespace CSMFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
AndNode (const std::vector<boost::shared_ptr<Node> >& nodes);
|
AndNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
CSMFilter::NAryNode::NAryNode (const std::vector<boost::shared_ptr<Node> >& nodes,
|
CSMFilter::NAryNode::NAryNode (const std::vector<std::shared_ptr<Node> >& nodes,
|
||||||
const std::string& name)
|
const std::string& name)
|
||||||
: mNodes (nodes), mName (name)
|
: mNodes (nodes), mName (name)
|
||||||
{}
|
{}
|
||||||
|
|
@ -22,7 +22,7 @@ std::vector<int> CSMFilter::NAryNode::getReferencedColumns() const
|
||||||
{
|
{
|
||||||
std::vector<int> columns;
|
std::vector<int> columns;
|
||||||
|
|
||||||
for (std::vector<boost::shared_ptr<Node> >::const_iterator iter (mNodes.begin());
|
for (std::vector<std::shared_ptr<Node> >::const_iterator iter (mNodes.begin());
|
||||||
iter!=mNodes.end(); ++iter)
|
iter!=mNodes.end(); ++iter)
|
||||||
{
|
{
|
||||||
std::vector<int> columns2 = (*iter)->getReferencedColumns();
|
std::vector<int> columns2 = (*iter)->getReferencedColumns();
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include "node.hpp"
|
#include "node.hpp"
|
||||||
|
|
||||||
|
|
@ -12,12 +12,12 @@ namespace CSMFilter
|
||||||
{
|
{
|
||||||
class NAryNode : public Node
|
class NAryNode : public Node
|
||||||
{
|
{
|
||||||
std::vector<boost::shared_ptr<Node> > mNodes;
|
std::vector<std::shared_ptr<Node> > mNodes;
|
||||||
std::string mName;
|
std::string mName;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
NAryNode (const std::vector<boost::shared_ptr<Node> >& nodes, const std::string& name);
|
NAryNode (const std::vector<std::shared_ptr<Node> >& nodes, const std::string& name);
|
||||||
|
|
||||||
int getSize() const;
|
int getSize() const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <memory>
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
|
|
||||||
|
|
@ -48,6 +47,6 @@ namespace CSMFilter
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_DECLARE_METATYPE (boost::shared_ptr<CSMFilter::Node>)
|
Q_DECLARE_METATYPE (std::shared_ptr<CSMFilter::Node>)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
#include "notnode.hpp"
|
#include "notnode.hpp"
|
||||||
|
|
||||||
CSMFilter::NotNode::NotNode (boost::shared_ptr<Node> child) : UnaryNode (child, "not") {}
|
CSMFilter::NotNode::NotNode (std::shared_ptr<Node> child) : UnaryNode (child, "not") {}
|
||||||
|
|
||||||
bool CSMFilter::NotNode::test (const CSMWorld::IdTableBase& table, int row,
|
bool CSMFilter::NotNode::test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const
|
const std::map<int, int>& columns) const
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ namespace CSMFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
NotNode (boost::shared_ptr<Node> child);
|
NotNode (std::shared_ptr<Node> child);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
CSMFilter::OrNode::OrNode (const std::vector<boost::shared_ptr<Node> >& nodes)
|
CSMFilter::OrNode::OrNode (const std::vector<std::shared_ptr<Node> >& nodes)
|
||||||
: NAryNode (nodes, "or")
|
: NAryNode (nodes, "or")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ namespace CSMFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OrNode (const std::vector<boost::shared_ptr<Node> >& nodes);
|
OrNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const;
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ CSMFilter::Token CSMFilter::Parser::getNextToken()
|
||||||
return Token (Token::Type_None);
|
return Token (Token::Type_None);
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty, bool ignoreOneShot)
|
std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty, bool ignoreOneShot)
|
||||||
{
|
{
|
||||||
if (Token token = getNextToken())
|
if (Token token = getNextToken())
|
||||||
{
|
{
|
||||||
|
|
@ -248,11 +248,11 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty,
|
||||||
{
|
{
|
||||||
case Token::Type_Keyword_True:
|
case Token::Type_Keyword_True:
|
||||||
|
|
||||||
return boost::shared_ptr<CSMFilter::Node> (new BooleanNode (true));
|
return std::shared_ptr<CSMFilter::Node> (new BooleanNode (true));
|
||||||
|
|
||||||
case Token::Type_Keyword_False:
|
case Token::Type_Keyword_False:
|
||||||
|
|
||||||
return boost::shared_ptr<CSMFilter::Node> (new BooleanNode (false));
|
return std::shared_ptr<CSMFilter::Node> (new BooleanNode (false));
|
||||||
|
|
||||||
case Token::Type_Keyword_And:
|
case Token::Type_Keyword_And:
|
||||||
case Token::Type_Keyword_Or:
|
case Token::Type_Keyword_Or:
|
||||||
|
|
@ -261,12 +261,12 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty,
|
||||||
|
|
||||||
case Token::Type_Keyword_Not:
|
case Token::Type_Keyword_Not:
|
||||||
{
|
{
|
||||||
boost::shared_ptr<CSMFilter::Node> node = parseImp();
|
std::shared_ptr<CSMFilter::Node> node = parseImp();
|
||||||
|
|
||||||
if (mError)
|
if (mError)
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
|
|
||||||
return boost::shared_ptr<CSMFilter::Node> (new NotNode (node));
|
return std::shared_ptr<CSMFilter::Node> (new NotNode (node));
|
||||||
}
|
}
|
||||||
|
|
||||||
case Token::Type_Keyword_Text:
|
case Token::Type_Keyword_Text:
|
||||||
|
|
@ -282,7 +282,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty,
|
||||||
if (!allowEmpty)
|
if (!allowEmpty)
|
||||||
error();
|
error();
|
||||||
|
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
|
@ -290,27 +290,27 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& keyword)
|
std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& keyword)
|
||||||
{
|
{
|
||||||
std::vector<boost::shared_ptr<Node> > nodes;
|
std::vector<std::shared_ptr<Node> > nodes;
|
||||||
|
|
||||||
Token token = getNextToken();
|
Token token = getNextToken();
|
||||||
|
|
||||||
if (token.mType!=Token::Type_Open)
|
if (token.mType!=Token::Type_Open)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Node> node = parseImp();
|
std::shared_ptr<Node> node = parseImp();
|
||||||
|
|
||||||
if (mError)
|
if (mError)
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
|
|
||||||
nodes.push_back (node);
|
nodes.push_back (node);
|
||||||
|
|
||||||
|
|
@ -319,7 +319,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& ke
|
||||||
if (!token || (token.mType!=Token::Type_Close && token.mType!=Token::Type_Comma))
|
if (!token || (token.mType!=Token::Type_Close && token.mType!=Token::Type_Comma))
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (token.mType==Token::Type_Close)
|
if (token.mType==Token::Type_Close)
|
||||||
|
|
@ -329,31 +329,31 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& ke
|
||||||
if (nodes.empty())
|
if (nodes.empty())
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (keyword.mType)
|
switch (keyword.mType)
|
||||||
{
|
{
|
||||||
case Token::Type_Keyword_And: return boost::shared_ptr<CSMFilter::Node> (new AndNode (nodes));
|
case Token::Type_Keyword_And: return std::shared_ptr<CSMFilter::Node> (new AndNode (nodes));
|
||||||
case Token::Type_Keyword_Or: return boost::shared_ptr<CSMFilter::Node> (new OrNode (nodes));
|
case Token::Type_Keyword_Or: return std::shared_ptr<CSMFilter::Node> (new OrNode (nodes));
|
||||||
default: error(); return boost::shared_ptr<Node>();
|
default: error(); return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
|
std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
|
||||||
{
|
{
|
||||||
Token token = getNextToken();
|
Token token = getNextToken();
|
||||||
|
|
||||||
if (token.mType!=Token::Type_Open)
|
if (token.mType!=Token::Type_Open)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
token = getNextToken();
|
token = getNextToken();
|
||||||
|
|
||||||
if (!token)
|
if (!token)
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
|
|
||||||
// parse column ID
|
// parse column ID
|
||||||
int columnId = -1;
|
int columnId = -1;
|
||||||
|
|
@ -371,7 +371,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
|
||||||
if (columnId<0)
|
if (columnId<0)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
token = getNextToken();
|
token = getNextToken();
|
||||||
|
|
@ -379,7 +379,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
|
||||||
if (token.mType!=Token::Type_Comma)
|
if (token.mType!=Token::Type_Comma)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse text pattern
|
// parse text pattern
|
||||||
|
|
@ -388,7 +388,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
|
||||||
if (!token.isString())
|
if (!token.isString())
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string text = token.mString;
|
std::string text = token.mString;
|
||||||
|
|
@ -398,26 +398,26 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
|
||||||
if (token.mType!=Token::Type_Close)
|
if (token.mType!=Token::Type_Close)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return boost::shared_ptr<Node> (new TextNode (columnId, text));
|
return std::shared_ptr<Node> (new TextNode (columnId, text));
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
|
std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
|
||||||
{
|
{
|
||||||
Token token = getNextToken();
|
Token token = getNextToken();
|
||||||
|
|
||||||
if (token.mType!=Token::Type_Open)
|
if (token.mType!=Token::Type_Open)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
token = getNextToken();
|
token = getNextToken();
|
||||||
|
|
||||||
if (!token)
|
if (!token)
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
|
|
||||||
// parse column ID
|
// parse column ID
|
||||||
int columnId = -1;
|
int columnId = -1;
|
||||||
|
|
@ -435,7 +435,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
|
||||||
if (columnId<0)
|
if (columnId<0)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
token = getNextToken();
|
token = getNextToken();
|
||||||
|
|
@ -443,7 +443,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
|
||||||
if (token.mType!=Token::Type_Comma)
|
if (token.mType!=Token::Type_Comma)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse value
|
// parse value
|
||||||
|
|
@ -468,7 +468,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
|
||||||
else if (token.mType!=Token::Type_CloseSquare && token.mType!=Token::Type_Open)
|
else if (token.mType!=Token::Type_CloseSquare && token.mType!=Token::Type_Open)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
token = getNextToken();
|
token = getNextToken();
|
||||||
|
|
@ -482,7 +482,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
|
||||||
if (token.mType!=Token::Type_Comma)
|
if (token.mType!=Token::Type_Comma)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (token.mType==Token::Type_Comma)
|
else if (token.mType==Token::Type_Comma)
|
||||||
|
|
@ -492,7 +492,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
token = getNextToken();
|
token = getNextToken();
|
||||||
|
|
@ -514,7 +514,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
|
||||||
else if (token.mType!=Token::Type_OpenSquare && token.mType!=Token::Type_Close)
|
else if (token.mType!=Token::Type_OpenSquare && token.mType!=Token::Type_Close)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -523,10 +523,10 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
|
||||||
if (token.mType!=Token::Type_Close)
|
if (token.mType!=Token::Type_Close)
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
return boost::shared_ptr<Node>();
|
return std::shared_ptr<Node>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return boost::shared_ptr<Node> (new ValueNode (columnId, lowerType, upperType, lower, upper));
|
return std::shared_ptr<Node> (new ValueNode (columnId, lowerType, upperType, lower, upper));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMFilter::Parser::error()
|
void CSMFilter::Parser::error()
|
||||||
|
|
@ -557,7 +557,7 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined)
|
||||||
}
|
}
|
||||||
else if (!allowPredefined || token==Token (Token::Type_OneShot))
|
else if (!allowPredefined || token==Token (Token::Type_OneShot))
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Node> node = parseImp (true, token!=Token (Token::Type_OneShot));
|
std::shared_ptr<Node> node = parseImp (true, token!=Token (Token::Type_OneShot));
|
||||||
|
|
||||||
if (mError)
|
if (mError)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -613,7 +613,7 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::getFilter() const
|
std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::getFilter() const
|
||||||
{
|
{
|
||||||
if (mError)
|
if (mError)
|
||||||
throw std::logic_error ("No filter available");
|
throw std::logic_error ("No filter available");
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CSM_FILTER_PARSER_H
|
#ifndef CSM_FILTER_PARSER_H
|
||||||
#define CSM_FILTER_PARSER_H
|
#define CSM_FILTER_PARSER_H
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include "node.hpp"
|
#include "node.hpp"
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace CSMFilter
|
||||||
|
|
||||||
class Parser
|
class Parser
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Node> mFilter;
|
std::shared_ptr<Node> mFilter;
|
||||||
std::string mInput;
|
std::string mInput;
|
||||||
int mIndex;
|
int mIndex;
|
||||||
bool mError;
|
bool mError;
|
||||||
|
|
@ -31,14 +31,14 @@ namespace CSMFilter
|
||||||
Token checkKeywords (const Token& token);
|
Token checkKeywords (const Token& token);
|
||||||
///< Turn string token into keyword token, if possible.
|
///< Turn string token into keyword token, if possible.
|
||||||
|
|
||||||
boost::shared_ptr<Node> parseImp (bool allowEmpty = false, bool ignoreOneShot = false);
|
std::shared_ptr<Node> parseImp (bool allowEmpty = false, bool ignoreOneShot = false);
|
||||||
///< Will return a null-pointer, if there is nothing more to parse.
|
///< Will return a null-pointer, if there is nothing more to parse.
|
||||||
|
|
||||||
boost::shared_ptr<Node> parseNAry (const Token& keyword);
|
std::shared_ptr<Node> parseNAry (const Token& keyword);
|
||||||
|
|
||||||
boost::shared_ptr<Node> parseText();
|
std::shared_ptr<Node> parseText();
|
||||||
|
|
||||||
boost::shared_ptr<Node> parseValue();
|
std::shared_ptr<Node> parseValue();
|
||||||
|
|
||||||
void error();
|
void error();
|
||||||
|
|
||||||
|
|
@ -51,7 +51,7 @@ namespace CSMFilter
|
||||||
///
|
///
|
||||||
/// \return Success?
|
/// \return Success?
|
||||||
|
|
||||||
boost::shared_ptr<Node> getFilter() const;
|
std::shared_ptr<Node> getFilter() const;
|
||||||
///< Throws an exception if the last call to parse did not return true.
|
///< Throws an exception if the last call to parse did not return true.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
#include "unarynode.hpp"
|
#include "unarynode.hpp"
|
||||||
|
|
||||||
CSMFilter::UnaryNode::UnaryNode (boost::shared_ptr<Node> child, const std::string& name)
|
CSMFilter::UnaryNode::UnaryNode (std::shared_ptr<Node> child, const std::string& name)
|
||||||
: mChild (child), mName (name)
|
: mChild (child), mName (name)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CSM_FILTER_UNARYNODE_H
|
#ifndef CSM_FILTER_UNARYNODE_H
|
||||||
#define CSM_FILTER_UNARYNODE_H
|
#define CSM_FILTER_UNARYNODE_H
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include "node.hpp"
|
#include "node.hpp"
|
||||||
|
|
||||||
|
|
@ -9,12 +9,12 @@ namespace CSMFilter
|
||||||
{
|
{
|
||||||
class UnaryNode : public Node
|
class UnaryNode : public Node
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Node> mChild;
|
std::shared_ptr<Node> mChild;
|
||||||
std::string mName;
|
std::string mName;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UnaryNode (boost::shared_ptr<Node> child, const std::string& name);
|
UnaryNode (std::shared_ptr<Node> child, const std::string& name);
|
||||||
|
|
||||||
const Node& getChild() const;
|
const Node& getChild() const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -858,7 +858,7 @@ void CSMWorld::Data::merge()
|
||||||
int CSMWorld::Data::startLoading (const boost::filesystem::path& path, bool base, bool project)
|
int CSMWorld::Data::startLoading (const boost::filesystem::path& path, bool base, bool project)
|
||||||
{
|
{
|
||||||
// Don't delete the Reader yet. Some record types store a reference to the Reader to handle on-demand loading
|
// Don't delete the Reader yet. Some record types store a reference to the Reader to handle on-demand loading
|
||||||
boost::shared_ptr<ESM::ESMReader> ptr(mReader);
|
std::shared_ptr<ESM::ESMReader> ptr(mReader);
|
||||||
mReaders.push_back(ptr);
|
mReaders.push_back(ptr);
|
||||||
mReader = 0;
|
mReader = 0;
|
||||||
|
|
||||||
|
|
@ -896,7 +896,7 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages)
|
||||||
// Don't delete the Reader yet. Some record types store a reference to the Reader to handle on-demand loading.
|
// Don't delete the Reader yet. Some record types store a reference to the Reader to handle on-demand loading.
|
||||||
// We don't store non-base reader, because everything going into modified will be
|
// We don't store non-base reader, because everything going into modified will be
|
||||||
// fully loaded during the initial loading process.
|
// fully loaded during the initial loading process.
|
||||||
boost::shared_ptr<ESM::ESMReader> ptr(mReader);
|
std::shared_ptr<ESM::ESMReader> ptr(mReader);
|
||||||
mReaders.push_back(ptr);
|
mReaders.push_back(ptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ namespace CSMWorld
|
||||||
|
|
||||||
Resource::ResourceSystem mResourceSystem;
|
Resource::ResourceSystem mResourceSystem;
|
||||||
|
|
||||||
std::vector<boost::shared_ptr<ESM::ESMReader> > mReaders;
|
std::vector<std::shared_ptr<ESM::ESMReader> > mReaders;
|
||||||
|
|
||||||
// not implemented
|
// not implemented
|
||||||
Data (const Data&);
|
Data (const Data&);
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ bool CSMWorld::IdCompletionManager::hasCompleterFor(CSMWorld::ColumnBase::Displa
|
||||||
return mCompleters.find(display) != mCompleters.end();
|
return mCompleters.find(display) != mCompleters.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<QCompleter> CSMWorld::IdCompletionManager::getCompleter(CSMWorld::ColumnBase::Display display)
|
std::shared_ptr<QCompleter> CSMWorld::IdCompletionManager::getCompleter(CSMWorld::ColumnBase::Display display)
|
||||||
{
|
{
|
||||||
if (!hasCompleterFor(display))
|
if (!hasCompleterFor(display))
|
||||||
{
|
{
|
||||||
|
|
@ -95,7 +95,7 @@ void CSMWorld::IdCompletionManager::generateCompleters(CSMWorld::Data &data)
|
||||||
int idColumn = table->searchColumnIndex(CSMWorld::Columns::ColumnId_Id);
|
int idColumn = table->searchColumnIndex(CSMWorld::Columns::ColumnId_Id);
|
||||||
if (idColumn != -1)
|
if (idColumn != -1)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<QCompleter> completer = boost::make_shared<QCompleter>(table);
|
std::shared_ptr<QCompleter> completer = std::make_shared<QCompleter>(table);
|
||||||
completer->setCompletionColumn(idColumn);
|
completer->setCompletionColumn(idColumn);
|
||||||
// The completion role must be Qt::DisplayRole to get the ID values from the model
|
// The completion role must be Qt::DisplayRole to get the ID values from the model
|
||||||
completer->setCompletionRole(Qt::DisplayRole);
|
completer->setCompletionRole(Qt::DisplayRole);
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <memory>
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include "columnbase.hpp"
|
#include "columnbase.hpp"
|
||||||
#include "universalid.hpp"
|
#include "universalid.hpp"
|
||||||
|
|
@ -20,7 +19,7 @@ namespace CSMWorld
|
||||||
{
|
{
|
||||||
static const std::map<ColumnBase::Display, UniversalId::Type> sCompleterModelTypes;
|
static const std::map<ColumnBase::Display, UniversalId::Type> sCompleterModelTypes;
|
||||||
|
|
||||||
std::map<ColumnBase::Display, boost::shared_ptr<QCompleter> > mCompleters;
|
std::map<ColumnBase::Display, std::shared_ptr<QCompleter> > mCompleters;
|
||||||
|
|
||||||
// Don't allow copying
|
// Don't allow copying
|
||||||
IdCompletionManager(const IdCompletionManager &);
|
IdCompletionManager(const IdCompletionManager &);
|
||||||
|
|
@ -34,7 +33,7 @@ namespace CSMWorld
|
||||||
IdCompletionManager(Data &data);
|
IdCompletionManager(Data &data);
|
||||||
|
|
||||||
bool hasCompleterFor(ColumnBase::Display display) const;
|
bool hasCompleterFor(ColumnBase::Display display) const;
|
||||||
boost::shared_ptr<QCompleter> getCompleter(ColumnBase::Display display);
|
std::shared_ptr<QCompleter> getCompleter(ColumnBase::Display display);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ QModelIndex CSMWorld::IdTableProxyModel::getModelIndex (const std::string& id, i
|
||||||
return mapFromSource (dynamic_cast<IdTableBase&> (*sourceModel()).getModelIndex (id, column));
|
return mapFromSource (dynamic_cast<IdTableBase&> (*sourceModel()).getModelIndex (id, column));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMWorld::IdTableProxyModel::setFilter (const boost::shared_ptr<CSMFilter::Node>& filter)
|
void CSMWorld::IdTableProxyModel::setFilter (const std::shared_ptr<CSMFilter::Node>& filter)
|
||||||
{
|
{
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
mFilter = filter;
|
mFilter = filter;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace CSMWorld
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
boost::shared_ptr<CSMFilter::Node> mFilter;
|
std::shared_ptr<CSMFilter::Node> mFilter;
|
||||||
std::map<int, int> mColumnMap; // column ID, column index in this model (or -1)
|
std::map<int, int> mColumnMap; // column ID, column index in this model (or -1)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
@ -30,7 +30,7 @@ namespace CSMWorld
|
||||||
|
|
||||||
virtual QModelIndex getModelIndex (const std::string& id, int column) const;
|
virtual QModelIndex getModelIndex (const std::string& id, int column) const;
|
||||||
|
|
||||||
void setFilter (const boost::shared_ptr<CSMFilter::Node>& filter);
|
void setFilter (const std::shared_ptr<CSMFilter::Node>& filter);
|
||||||
|
|
||||||
void refreshFilter();
|
void refreshFilter();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
#define CSM_WORLD_LAND_H
|
#define CSM_WORLD_LAND_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include <components/esm/loadland.hpp>
|
#include <components/esm/loadland.hpp>
|
||||||
|
|
||||||
namespace CSMWorld
|
namespace CSMWorld
|
||||||
|
|
@ -15,7 +16,7 @@ namespace CSMWorld
|
||||||
{
|
{
|
||||||
Land();
|
Land();
|
||||||
|
|
||||||
boost::shared_ptr<ESM::Land> mLand;
|
std::shared_ptr<ESM::Land> mLand;
|
||||||
|
|
||||||
std::string mId;
|
std::string mId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CSV_FILTER_EDITWIDGET_H
|
#ifndef CSV_FILTER_EDITWIDGET_H
|
||||||
#define CSV_FILTER_EDITWIDGET_H
|
#define CSV_FILTER_EDITWIDGET_H
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
|
|
@ -35,7 +35,7 @@ namespace CSVFilter
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void filterChanged (boost::shared_ptr<CSMFilter::Node> filter);
|
void filterChanged (std::shared_ptr<CSMFilter::Node> filter);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string generateFilter(std::pair<std::string, std::vector<std::string> >& seekedString) const;
|
std::string generateFilter(std::pair<std::string, std::vector<std::string> >& seekedString) const;
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ CSVFilter::FilterBox::FilterBox (CSMWorld::Data& data, QWidget *parent)
|
||||||
setLayout (layout);
|
setLayout (layout);
|
||||||
|
|
||||||
connect (mRecordFilterBox,
|
connect (mRecordFilterBox,
|
||||||
SIGNAL (filterChanged (boost::shared_ptr<CSMFilter::Node>)),
|
SIGNAL (filterChanged (std::shared_ptr<CSMFilter::Node>)),
|
||||||
this, SIGNAL (recordFilterChanged (boost::shared_ptr<CSMFilter::Node>)));
|
this, SIGNAL (recordFilterChanged (std::shared_ptr<CSMFilter::Node>)));
|
||||||
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ namespace CSVFilter
|
||||||
void dragMoveEvent(QDragMoveEvent *event);
|
void dragMoveEvent(QDragMoveEvent *event);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void recordFilterChanged (boost::shared_ptr<CSMFilter::Node> filter);
|
void recordFilterChanged (std::shared_ptr<CSMFilter::Node> filter);
|
||||||
void recordDropped (std::vector<CSMWorld::UniversalId>& types, Qt::DropAction action);
|
void recordDropped (std::vector<CSMWorld::UniversalId>& types, Qt::DropAction action);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ CSVFilter::RecordFilterBox::RecordFilterBox (CSMWorld::Data& data, QWidget *pare
|
||||||
setLayout (layout);
|
setLayout (layout);
|
||||||
|
|
||||||
connect (
|
connect (
|
||||||
mEdit, SIGNAL (filterChanged (boost::shared_ptr<CSMFilter::Node>)),
|
mEdit, SIGNAL (filterChanged (std::shared_ptr<CSMFilter::Node>)),
|
||||||
this, SIGNAL (filterChanged (boost::shared_ptr<CSMFilter::Node>)));
|
this, SIGNAL (filterChanged (std::shared_ptr<CSMFilter::Node>)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVFilter::RecordFilterBox::setFilter (const std::string& filter)
|
void CSVFilter::RecordFilterBox::setFilter (const std::string& filter)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CSV_FILTER_RECORDFILTERBOX_H
|
#ifndef CSV_FILTER_RECORDFILTERBOX_H
|
||||||
#define CSV_FILTER_RECORDFILTERBOX_H
|
#define CSV_FILTER_RECORDFILTERBOX_H
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QtCore/qnamespace.h>
|
#include <QtCore/qnamespace.h>
|
||||||
|
|
@ -38,7 +38,7 @@ namespace CSVFilter
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void filterChanged (boost::shared_ptr<CSMFilter::Node> filter);
|
void filterChanged (std::shared_ptr<CSMFilter::Node> filter);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef OPENCS_VIEW_WORLDSPACEWIDGET_H
|
#ifndef OPENCS_VIEW_WORLDSPACEWIDGET_H
|
||||||
#define OPENCS_VIEW_WORLDSPACEWIDGET_H
|
#define OPENCS_VIEW_WORLDSPACEWIDGET_H
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include "scenewidget.hpp"
|
#include "scenewidget.hpp"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -672,7 +672,7 @@ void CSVWorld::Table::requestFocus (const std::string& id)
|
||||||
scrollTo (index, QAbstractItemView::PositionAtTop);
|
scrollTo (index, QAbstractItemView::PositionAtTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWorld::Table::recordFilterChanged (boost::shared_ptr<CSMFilter::Node> filter)
|
void CSVWorld::Table::recordFilterChanged (std::shared_ptr<CSMFilter::Node> filter)
|
||||||
{
|
{
|
||||||
mProxyModel->setFilter (filter);
|
mProxyModel->setFilter (filter);
|
||||||
tableSizeUpdate();
|
tableSizeUpdate();
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ namespace CSVWorld
|
||||||
|
|
||||||
void requestFocus (const std::string& id);
|
void requestFocus (const std::string& id);
|
||||||
|
|
||||||
void recordFilterChanged (boost::shared_ptr<CSMFilter::Node> filter);
|
void recordFilterChanged (std::shared_ptr<CSMFilter::Node> filter);
|
||||||
|
|
||||||
void updateUserSetting (const QString &name, const QStringList &list);
|
void updateUserSetting (const QString &name, const QStringList &list);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,8 @@ CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::D
|
||||||
mTable, SLOT (requestFocus (const std::string&)));
|
mTable, SLOT (requestFocus (const std::string&)));
|
||||||
|
|
||||||
connect (mFilterBox,
|
connect (mFilterBox,
|
||||||
SIGNAL (recordFilterChanged (boost::shared_ptr<CSMFilter::Node>)),
|
SIGNAL (recordFilterChanged (std::shared_ptr<CSMFilter::Node>)),
|
||||||
mTable, SLOT (recordFilterChanged (boost::shared_ptr<CSMFilter::Node>)));
|
mTable, SLOT (recordFilterChanged (std::shared_ptr<CSMFilter::Node>)));
|
||||||
|
|
||||||
connect(mFilterBox, SIGNAL(recordDropped(std::vector<CSMWorld::UniversalId>&, Qt::DropAction)),
|
connect(mFilterBox, SIGNAL(recordDropped(std::vector<CSMWorld::UniversalId>&, Qt::DropAction)),
|
||||||
this, SLOT(createFilterRequest(std::vector<CSMWorld::UniversalId>&, Qt::DropAction)));
|
this, SLOT(createFilterRequest(std::vector<CSMWorld::UniversalId>&, Qt::DropAction)));
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
|
|
@ -16,12 +16,12 @@ namespace MWSound
|
||||||
{
|
{
|
||||||
class Sound;
|
class Sound;
|
||||||
struct Sound_Decoder;
|
struct Sound_Decoder;
|
||||||
typedef boost::shared_ptr<Sound_Decoder> DecoderPtr;
|
typedef std::shared_ptr<Sound_Decoder> DecoderPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace MWBase
|
namespace MWBase
|
||||||
{
|
{
|
||||||
typedef boost::shared_ptr<MWSound::Sound> SoundPtr;
|
typedef std::shared_ptr<MWSound::Sound> SoundPtr;
|
||||||
|
|
||||||
/// \brief Interface for sound manager (implemented in MWSound)
|
/// \brief Interface for sound manager (implemented in MWSound)
|
||||||
class SoundManager
|
class SoundManager
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Activator::registerSelf()
|
void Activator::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Activator);
|
std::shared_ptr<Class> instance (new Activator);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Activator).name(), instance);
|
registerClass (typeid (ESM::Activator).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -109,19 +109,19 @@ namespace MWClass
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Activator::activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const
|
std::shared_ptr<MWWorld::Action> Activator::activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const
|
||||||
{
|
{
|
||||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||||
{
|
{
|
||||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfActivator");
|
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfActivator");
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
||||||
if(sound) action->setSound(sound->mId);
|
if(sound) action->setSound(sound->mId);
|
||||||
|
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::NullAction);
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::NullAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ namespace MWClass
|
||||||
virtual std::string getScript (const MWWorld::Ptr& ptr) const;
|
virtual std::string getScript (const MWWorld::Ptr& ptr) const;
|
||||||
///< Return name of the script attached to ptr
|
///< Return name of the script attached to ptr
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const;
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
static void registerSelf();
|
static void registerSelf();
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Apparatus::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Apparatus::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -83,7 +83,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Apparatus::registerSelf()
|
void Apparatus::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Apparatus);
|
std::shared_ptr<Class> instance (new Apparatus);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Apparatus).name(), instance);
|
registerClass (typeid (ESM::Apparatus).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -138,9 +138,9 @@ namespace MWClass
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Apparatus::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Apparatus::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionAlchemy());
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionAlchemy());
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr
|
MWWorld::Ptr
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -54,7 +54,7 @@ namespace MWClass
|
||||||
virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const;
|
virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const;
|
||||||
///< Return name of inventory icon.
|
///< Return name of inventory icon.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Armor::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Armor::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -180,7 +180,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Armor::registerSelf()
|
void Armor::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Armor);
|
std::shared_ptr<Class> instance (new Armor);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Armor).name(), instance);
|
registerClass (typeid (ESM::Armor).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -367,9 +367,9 @@ namespace MWClass
|
||||||
return std::make_pair(1,"");
|
return std::make_pair(1,"");
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Armor::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Armor::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
action->setSound(getUpSoundId(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -77,7 +77,7 @@ namespace MWClass
|
||||||
///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that. \n
|
///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that. \n
|
||||||
/// Second item in the pair specifies the error message
|
/// Second item in the pair specifies the error message
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Book::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Book::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||||
|
|
@ -69,13 +69,13 @@ namespace MWClass
|
||||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfItem");
|
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfItem");
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
||||||
if(sound) action->setSound(sound->mId);
|
if(sound) action->setSound(sound->mId);
|
||||||
|
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionRead(ptr));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionRead(ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Book::getScript (const MWWorld::Ptr& ptr) const
|
std::string Book::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
|
@ -96,7 +96,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Book::registerSelf()
|
void Book::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Book);
|
std::shared_ptr<Class> instance (new Book);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Book).name(), instance);
|
registerClass (typeid (ESM::Book).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -176,9 +176,9 @@ namespace MWClass
|
||||||
return record->mId;
|
return record->mId;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Book::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Book::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionRead(ptr));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionRead(ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr
|
MWWorld::Ptr
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace MWClass
|
||||||
virtual std::string applyEnchantment(const MWWorld::Ptr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const;
|
virtual std::string applyEnchantment(const MWWorld::Ptr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const;
|
||||||
///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it.
|
///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) const;
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
virtual std::string getModel(const MWWorld::Ptr &ptr) const;
|
virtual std::string getModel(const MWWorld::Ptr &ptr) const;
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Clothing::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Clothing::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -136,7 +136,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Clothing::registerSelf()
|
void Clothing::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Clothing);
|
std::shared_ptr<Class> instance (new Clothing);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Clothing).name(), instance);
|
registerClass (typeid (ESM::Clothing).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -262,9 +262,9 @@ namespace MWClass
|
||||||
return std::make_pair (1, "");
|
return std::make_pair (1, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Clothing::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Clothing::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
action->setSound(getUpSoundId(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -69,7 +69,7 @@ namespace MWClass
|
||||||
///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that.
|
///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that.
|
||||||
/// Second item in the pair specifies the error message
|
/// Second item in the pair specifies the error message
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,18 +117,18 @@ namespace MWClass
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Container::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Container::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
if (!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
|
if (!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
|
||||||
return boost::shared_ptr<MWWorld::Action> (new MWWorld::NullAction ());
|
return std::shared_ptr<MWWorld::Action> (new MWWorld::NullAction ());
|
||||||
|
|
||||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||||
{
|
{
|
||||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfContainer");
|
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfContainer");
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
||||||
if(sound) action->setSound(sound->mId);
|
if(sound) action->setSound(sound->mId);
|
||||||
|
|
||||||
return action;
|
return action;
|
||||||
|
|
@ -171,20 +171,20 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
if(ptr.getCellRef().getTrap().empty())
|
if(ptr.getCellRef().getTrap().empty())
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action (new MWWorld::ActionOpen(ptr));
|
std::shared_ptr<MWWorld::Action> action (new MWWorld::ActionOpen(ptr));
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Activate trap
|
// Activate trap
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr));
|
||||||
action->setSound(trapActivationSound);
|
action->setSound(trapActivationSound);
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
||||||
action->setSound(lockedSound);
|
action->setSound(lockedSound);
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +216,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Container::registerSelf()
|
void Container::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Container);
|
std::shared_ptr<Class> instance (new Container);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Container).name(), instance);
|
registerClass (typeid (ESM::Container).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -450,7 +450,7 @@ namespace MWClass
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Creature::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Creature::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||||
|
|
@ -458,17 +458,17 @@ namespace MWClass
|
||||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfCreature");
|
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfCreature");
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
||||||
if(sound) action->setSound(sound->mId);
|
if(sound) action->setSound(sound->mId);
|
||||||
|
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(getCreatureStats(ptr).isDead())
|
if(getCreatureStats(ptr).isDead())
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr, true));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr, true));
|
||||||
if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat())
|
if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat())
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::FailedAction(""));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::FailedAction(""));
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::ContainerStore& Creature::getContainerStore (const MWWorld::Ptr& ptr) const
|
MWWorld::ContainerStore& Creature::getContainerStore (const MWWorld::Ptr& ptr) const
|
||||||
|
|
@ -512,7 +512,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Creature::registerSelf()
|
void Creature::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Creature);
|
std::shared_ptr<Class> instance (new Creature);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Creature).name(), instance);
|
registerClass (typeid (ESM::Creature).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ namespace MWClass
|
||||||
|
|
||||||
virtual void setActorHealth(const MWWorld::Ptr& ptr, float health, const MWWorld::Ptr& attacker) const;
|
virtual void setActorHealth(const MWWorld::Ptr& ptr, float health, const MWWorld::Ptr& attacker) const;
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ namespace MWClass
|
||||||
|
|
||||||
void CreatureLevList::registerSelf()
|
void CreatureLevList::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new CreatureLevList);
|
std::shared_ptr<Class> instance (new CreatureLevList);
|
||||||
|
|
||||||
registerClass (typeid (ESM::CreatureLevList).name(), instance);
|
registerClass (typeid (ESM::CreatureLevList).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Door::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Door::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Door> *ref = ptr.get<ESM::Door>();
|
MWWorld::LiveCellRef<ESM::Door> *ref = ptr.get<ESM::Door>();
|
||||||
|
|
@ -139,14 +139,14 @@ namespace MWClass
|
||||||
if(!ptr.getCellRef().getTrap().empty())
|
if(!ptr.getCellRef().getTrap().empty())
|
||||||
{
|
{
|
||||||
// Trap activation
|
// Trap activation
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr));
|
||||||
action->setSound(trapActivationSound);
|
action->setSound(trapActivationSound);
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ptr.getCellRef().getTeleport())
|
if (ptr.getCellRef().getTeleport())
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTeleport (ptr.getCellRef().getDestCell(), ptr.getCellRef().getDoorDest(), true));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTeleport (ptr.getCellRef().getDestCell(), ptr.getCellRef().getDoorDest(), true));
|
||||||
|
|
||||||
action->setSound(openSound);
|
action->setSound(openSound);
|
||||||
|
|
||||||
|
|
@ -155,7 +155,7 @@ namespace MWClass
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// animated door
|
// animated door
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionDoor(ptr));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionDoor(ptr));
|
||||||
int doorstate = getDoorState(ptr);
|
int doorstate = getDoorState(ptr);
|
||||||
bool opening = true;
|
bool opening = true;
|
||||||
if (doorstate == 1)
|
if (doorstate == 1)
|
||||||
|
|
@ -188,7 +188,7 @@ namespace MWClass
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// locked, and we can't open.
|
// locked, and we can't open.
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
||||||
action->setSound(lockedSound);
|
action->setSound(lockedSound);
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
@ -217,7 +217,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Door::registerSelf()
|
void Door::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Door);
|
std::shared_ptr<Class> instance (new Door);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Door).name(), instance);
|
registerClass (typeid (ESM::Door).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Ingredient::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Ingredient::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -88,9 +88,9 @@ namespace MWClass
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Ingredient::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Ingredient::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action (new MWWorld::ActionEat (ptr));
|
std::shared_ptr<MWWorld::Action> action (new MWWorld::ActionEat (ptr));
|
||||||
|
|
||||||
action->setSound ("Swallow");
|
action->setSound ("Swallow");
|
||||||
|
|
||||||
|
|
@ -99,7 +99,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Ingredient::registerSelf()
|
void Ingredient::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Ingredient);
|
std::shared_ptr<Class> instance (new Ingredient);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Ingredient).name(), instance);
|
registerClass (typeid (ESM::Ingredient).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ namespace MWClass
|
||||||
virtual int getValue (const MWWorld::Ptr& ptr) const;
|
virtual int getValue (const MWWorld::Ptr& ptr) const;
|
||||||
///< Return trade value of the object. Throws an exception, if the object can't be traded.
|
///< Return trade value of the object. Throws an exception, if the object can't be traded.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace MWClass
|
||||||
|
|
||||||
void ItemLevList::registerSelf()
|
void ItemLevList::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new ItemLevList);
|
std::shared_ptr<Class> instance (new ItemLevList);
|
||||||
|
|
||||||
registerClass (typeid (ESM::ItemLevList).name(), instance);
|
registerClass (typeid (ESM::ItemLevList).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,15 +83,15 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Light::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Light::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
if(!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
|
if(!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::NullAction());
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::NullAction());
|
||||||
|
|
||||||
MWWorld::LiveCellRef<ESM::Light> *ref = ptr.get<ESM::Light>();
|
MWWorld::LiveCellRef<ESM::Light> *ref = ptr.get<ESM::Light>();
|
||||||
if(!(ref->mBase->mData.mFlags&ESM::Light::Carry))
|
if(!(ref->mBase->mData.mFlags&ESM::Light::Carry))
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::FailedAction());
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::FailedAction());
|
||||||
|
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
}
|
}
|
||||||
|
|
@ -127,7 +127,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Light::registerSelf()
|
void Light::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Light);
|
std::shared_ptr<Class> instance (new Light);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Light).name(), instance);
|
registerClass (typeid (ESM::Light).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -186,9 +186,9 @@ namespace MWClass
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Light::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Light::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
action->setSound(getUpSoundId(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ namespace MWClass
|
||||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::Ptr& ptr) const;
|
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::Ptr& ptr) const;
|
||||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ namespace MWClass
|
||||||
virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const;
|
virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const;
|
||||||
///< Return name of inventory icon.
|
///< Return name of inventory icon.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Lockpick::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Lockpick::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -93,7 +93,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Lockpick::registerSelf()
|
void Lockpick::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Lockpick);
|
std::shared_ptr<Class> instance (new Lockpick);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Lockpick).name(), instance);
|
registerClass (typeid (ESM::Lockpick).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -152,9 +152,9 @@ namespace MWClass
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Lockpick::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Lockpick::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
action->setSound(getUpSoundId(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ namespace MWClass
|
||||||
virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const;
|
virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const;
|
||||||
///< Return name of inventory icon.
|
///< Return name of inventory icon.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Miscellaneous::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Miscellaneous::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -111,7 +111,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Miscellaneous::registerSelf()
|
void Miscellaneous::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Miscellaneous);
|
std::shared_ptr<Class> instance (new Miscellaneous);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Miscellaneous).name(), instance);
|
registerClass (typeid (ESM::Miscellaneous).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -231,12 +231,12 @@ namespace MWClass
|
||||||
return newPtr;
|
return newPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Miscellaneous::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Miscellaneous::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
if (ptr.getCellRef().getSoul().empty())
|
if (ptr.getCellRef().getSoul().empty())
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::NullAction());
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::NullAction());
|
||||||
else
|
else
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionSoulgem(ptr));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionSoulgem(ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Miscellaneous::canSell (const MWWorld::Ptr& item, int npcServices) const
|
bool Miscellaneous::canSell (const MWWorld::Ptr& item, int npcServices) const
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ namespace MWClass
|
||||||
|
|
||||||
virtual std::string getModel(const MWWorld::Ptr &ptr) const;
|
virtual std::string getModel(const MWWorld::Ptr &ptr) const;
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -804,12 +804,12 @@ namespace MWClass
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Npc::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Npc::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
// player got activated by another NPC
|
// player got activated by another NPC
|
||||||
if(ptr == MWBase::Environment::get().getWorld()->getPlayerPtr())
|
if(ptr == MWBase::Environment::get().getWorld()->getPlayerPtr())
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(actor));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(actor));
|
||||||
|
|
||||||
// Werewolfs can't activate NPCs
|
// Werewolfs can't activate NPCs
|
||||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||||
|
|
@ -817,23 +817,23 @@ namespace MWClass
|
||||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfNPC");
|
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfNPC");
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
|
||||||
if(sound) action->setSound(sound->mId);
|
if(sound) action->setSound(sound->mId);
|
||||||
|
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(getCreatureStats(ptr).isDead())
|
if(getCreatureStats(ptr).isDead())
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr, true));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr, true));
|
||||||
if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat())
|
if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat())
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::FailedAction("#{sActorInCombat}"));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::FailedAction("#{sActorInCombat}"));
|
||||||
if(getCreatureStats(actor).getStance(MWMechanics::CreatureStats::Stance_Sneak)
|
if(getCreatureStats(actor).getStance(MWMechanics::CreatureStats::Stance_Sneak)
|
||||||
|| ptr.getClass().getCreatureStats(ptr).getKnockedDown())
|
|| ptr.getClass().getCreatureStats(ptr).getKnockedDown())
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr)); // stealing
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr)); // stealing
|
||||||
// Can't talk to werewolfs
|
// Can't talk to werewolfs
|
||||||
if(ptr.getClass().isNpc() && ptr.getClass().getNpcStats(ptr).isWerewolf())
|
if(ptr.getClass().isNpc() && ptr.getClass().getNpcStats(ptr).isWerewolf())
|
||||||
return boost::shared_ptr<MWWorld::Action> (new MWWorld::FailedAction(""));
|
return std::shared_ptr<MWWorld::Action> (new MWWorld::FailedAction(""));
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::ContainerStore& Npc::getContainerStore (const MWWorld::Ptr& ptr)
|
MWWorld::ContainerStore& Npc::getContainerStore (const MWWorld::Ptr& ptr)
|
||||||
|
|
@ -981,7 +981,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Npc::registerSelf()
|
void Npc::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Npc);
|
std::shared_ptr<Class> instance (new Npc);
|
||||||
registerClass (typeid (ESM::NPC).name(), instance);
|
registerClass (typeid (ESM::NPC).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ namespace MWClass
|
||||||
|
|
||||||
virtual void setActorHealth(const MWWorld::Ptr& ptr, float health, const MWWorld::Ptr& attacker) const;
|
virtual void setActorHealth(const MWWorld::Ptr& ptr, float health, const MWWorld::Ptr& attacker) const;
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Potion::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Potion::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -87,7 +87,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Potion::registerSelf()
|
void Potion::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Potion);
|
std::shared_ptr<Class> instance (new Potion);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Potion).name(), instance);
|
registerClass (typeid (ESM::Potion).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -160,12 +160,12 @@ namespace MWClass
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Potion::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Potion::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||||
ptr.get<ESM::Potion>();
|
ptr.get<ESM::Potion>();
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> action (
|
std::shared_ptr<MWWorld::Action> action (
|
||||||
new MWWorld::ActionApply (ptr, ref->mBase->mId));
|
new MWWorld::ActionApply (ptr, ref->mBase->mId));
|
||||||
|
|
||||||
action->setSound ("Drink");
|
action->setSound ("Drink");
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ namespace MWClass
|
||||||
virtual int getValue (const MWWorld::Ptr& ptr) const;
|
virtual int getValue (const MWWorld::Ptr& ptr) const;
|
||||||
///< Return trade value of the object. Throws an exception, if the object can't be traded.
|
///< Return trade value of the object. Throws an exception, if the object can't be traded.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) const;
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
static void registerSelf();
|
static void registerSelf();
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ namespace MWClass
|
||||||
|
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
boost::shared_ptr<MWWorld::Action> Probe::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Probe::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -92,7 +92,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Probe::registerSelf()
|
void Probe::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Probe);
|
std::shared_ptr<Class> instance (new Probe);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Probe).name(), instance);
|
registerClass (typeid (ESM::Probe).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -151,9 +151,9 @@ namespace MWClass
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Probe::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Probe::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
action->setSound(getUpSoundId(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ namespace MWClass
|
||||||
virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const;
|
virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const;
|
||||||
///< Return name of inventory icon.
|
///< Return name of inventory icon.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Repair::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Repair::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -83,7 +83,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Repair::registerSelf()
|
void Repair::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Repair);
|
std::shared_ptr<Class> instance (new Repair);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Repair).name(), instance);
|
registerClass (typeid (ESM::Repair).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -164,9 +164,9 @@ namespace MWClass
|
||||||
return MWWorld::Ptr(&cell.get<ESM::Repair>().insert(*ref), &cell);
|
return MWWorld::Ptr(&cell.get<ESM::Repair>().insert(*ref), &cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Repair::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Repair::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionRepair(ptr));
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionRepair(ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Repair::canSell (const MWWorld::Ptr& item, int npcServices) const
|
bool Repair::canSell (const MWWorld::Ptr& item, int npcServices) const
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ namespace MWClass
|
||||||
|
|
||||||
virtual std::string getModel(const MWWorld::Ptr &ptr) const;
|
virtual std::string getModel(const MWWorld::Ptr &ptr) const;
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu (default implementation: return a
|
///< Generate action for using via inventory menu (default implementation: return a
|
||||||
/// null action).
|
/// null action).
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Static::registerSelf()
|
void Static::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Static);
|
std::shared_ptr<Class> instance (new Static);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Static).name(), instance);
|
registerClass (typeid (ESM::Static).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ namespace MWClass
|
||||||
return ref->mBase->mName;
|
return ref->mBase->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Weapon::activate (const MWWorld::Ptr& ptr,
|
std::shared_ptr<MWWorld::Action> Weapon::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
return defaultItemActivate(ptr, actor);
|
return defaultItemActivate(ptr, actor);
|
||||||
|
|
@ -157,7 +157,7 @@ namespace MWClass
|
||||||
|
|
||||||
void Weapon::registerSelf()
|
void Weapon::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Weapon);
|
std::shared_ptr<Class> instance (new Weapon);
|
||||||
|
|
||||||
registerClass (typeid (ESM::Weapon).name(), instance);
|
registerClass (typeid (ESM::Weapon).name(), instance);
|
||||||
}
|
}
|
||||||
|
|
@ -403,9 +403,9 @@ namespace MWClass
|
||||||
return std::make_pair(1, "");
|
return std::make_pair(1, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Weapon::use (const MWWorld::Ptr& ptr) const
|
std::shared_ptr<MWWorld::Action> Weapon::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
action->setSound(getUpSoundId(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const;
|
const MWWorld::Ptr& actor) const;
|
||||||
///< Generate action for activation
|
///< Generate action for activation
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ namespace MWClass
|
||||||
///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that.
|
///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that.
|
||||||
/// Second item in the pair specifies the error message
|
/// Second item in the pair specifies the error message
|
||||||
|
|
||||||
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
|
||||||
const;
|
const;
|
||||||
///< Generate action for using via inventory menu
|
///< Generate action for using via inventory menu
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
|
|
||||||
#include <components/misc/utf8stream.hpp>
|
#include <components/misc/utf8stream.hpp>
|
||||||
|
|
@ -207,7 +207,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TypesetBookImpl Book;
|
typedef TypesetBookImpl Book;
|
||||||
typedef boost::shared_ptr <Book> BookPtr;
|
typedef std::shared_ptr <Book> BookPtr;
|
||||||
typedef std::vector<PartialText>::const_iterator PartialTextConstIterator;
|
typedef std::vector<PartialText>::const_iterator PartialTextConstIterator;
|
||||||
|
|
||||||
int mPageWidth;
|
int mPageWidth;
|
||||||
|
|
@ -231,7 +231,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
mCurrentContent (NULL),
|
mCurrentContent (NULL),
|
||||||
mCurrentAlignment (AlignLeft)
|
mCurrentAlignment (AlignLeft)
|
||||||
{
|
{
|
||||||
mBook = boost::make_shared <Book> ();
|
mBook = std::make_shared <Book> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~Typesetter ()
|
virtual ~Typesetter ()
|
||||||
|
|
@ -254,7 +254,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
style.mActiveColour = fontColour;
|
style.mActiveColour = fontColour;
|
||||||
style.mNormalColour = fontColour;
|
style.mNormalColour = fontColour;
|
||||||
style.mInteractiveId = 0;
|
style.mInteractiveId = 0;
|
||||||
|
|
||||||
return &style;
|
return &style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -315,7 +315,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
|
|
||||||
writeImpl (static_cast <StyleImpl*> (style), begin_, end_);
|
writeImpl (static_cast <StyleImpl*> (style), begin_, end_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lineBreak (float margin)
|
void lineBreak (float margin)
|
||||||
{
|
{
|
||||||
assert (margin == 0); //TODO: figure out proper behavior here...
|
assert (margin == 0); //TODO: figure out proper behavior here...
|
||||||
|
|
@ -325,7 +325,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
mRun = NULL;
|
mRun = NULL;
|
||||||
mLine = NULL;
|
mLine = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sectionBreak (int margin)
|
void sectionBreak (int margin)
|
||||||
{
|
{
|
||||||
add_partial_text();
|
add_partial_text();
|
||||||
|
|
@ -597,7 +597,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
|
|
||||||
BookTypesetter::Ptr BookTypesetter::create (int pageWidth, int pageHeight)
|
BookTypesetter::Ptr BookTypesetter::create (int pageWidth, int pageHeight)
|
||||||
{
|
{
|
||||||
return boost::make_shared <TypesetBookImpl::Typesetter> (pageWidth, pageHeight);
|
return std::make_shared <TypesetBookImpl::Typesetter> (pageWidth, pageHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
|
|
@ -869,7 +869,7 @@ public:
|
||||||
boost::function <void (intptr_t)> mLinkClicked;
|
boost::function <void (intptr_t)> mLinkClicked;
|
||||||
|
|
||||||
|
|
||||||
boost::shared_ptr <TypesetBookImpl> mBook;
|
std::shared_ptr <TypesetBookImpl> mBook;
|
||||||
|
|
||||||
MyGUI::ILayerNode* mNode;
|
MyGUI::ILayerNode* mNode;
|
||||||
ActiveTextFormats mActiveTextFormats;
|
ActiveTextFormats mActiveTextFormats;
|
||||||
|
|
@ -990,7 +990,7 @@ public:
|
||||||
|
|
||||||
void showPage (TypesetBook::Ptr book, size_t newPage)
|
void showPage (TypesetBook::Ptr book, size_t newPage)
|
||||||
{
|
{
|
||||||
boost::shared_ptr <TypesetBookImpl> newBook = boost::dynamic_pointer_cast <TypesetBookImpl> (book);
|
std::shared_ptr <TypesetBookImpl> newBook = std::dynamic_pointer_cast <TypesetBookImpl> (book);
|
||||||
|
|
||||||
if (mBook != newBook)
|
if (mBook != newBook)
|
||||||
{
|
{
|
||||||
|
|
@ -1079,7 +1079,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void createActiveFormats (boost::shared_ptr <TypesetBookImpl> newBook)
|
void createActiveFormats (std::shared_ptr <TypesetBookImpl> newBook)
|
||||||
{
|
{
|
||||||
newBook->visitRuns (0, 0x7FFFFFFF, CreateActiveFormat (this));
|
newBook->visitRuns (0, 0x7FFFFFFF, CreateActiveFormat (this));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
@ -15,7 +15,7 @@ namespace MWGui
|
||||||
/// the book page widget.
|
/// the book page widget.
|
||||||
struct TypesetBook
|
struct TypesetBook
|
||||||
{
|
{
|
||||||
typedef boost::shared_ptr <TypesetBook> Ptr;
|
typedef std::shared_ptr <TypesetBook> Ptr;
|
||||||
typedef intptr_t InteractiveId;
|
typedef intptr_t InteractiveId;
|
||||||
|
|
||||||
/// Returns the number of pages in the document.
|
/// Returns the number of pages in the document.
|
||||||
|
|
@ -33,7 +33,7 @@ namespace MWGui
|
||||||
/// A factory class for creating a typeset book instance.
|
/// A factory class for creating a typeset book instance.
|
||||||
struct BookTypesetter
|
struct BookTypesetter
|
||||||
{
|
{
|
||||||
typedef boost::shared_ptr <BookTypesetter> Ptr;
|
typedef std::shared_ptr <BookTypesetter> Ptr;
|
||||||
typedef TypesetBook::InteractiveId InteractiveId;
|
typedef TypesetBook::InteractiveId InteractiveId;
|
||||||
typedef MyGUI::Colour Colour;
|
typedef MyGUI::Colour Colour;
|
||||||
typedef uint8_t const * Utf8Point;
|
typedef uint8_t const * Utf8Point;
|
||||||
|
|
|
||||||
|
|
@ -449,7 +449,7 @@ namespace MWGui
|
||||||
|
|
||||||
if (script.empty() || ptr.getRefData().getLocals().getIntVar(script, "pcskipequip") == 0)
|
if (script.empty() || ptr.getRefData().getLocals().getIntVar(script, "pcskipequip") == 0)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action = ptr.getClass().use(ptr);
|
std::shared_ptr<MWWorld::Action> action = ptr.getClass().use(ptr);
|
||||||
|
|
||||||
action->execute (MWBase::Environment::get().getWorld()->getPlayerPtr());
|
action->execute (MWBase::Environment::get().getWorld()->getPlayerPtr());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -360,7 +360,7 @@ struct JournalViewModelImpl : JournalViewModel
|
||||||
|
|
||||||
JournalViewModel::Ptr JournalViewModel::create ()
|
JournalViewModel::Ptr JournalViewModel::create ()
|
||||||
{
|
{
|
||||||
return boost::make_shared <JournalViewModelImpl> ();
|
return std::make_shared <JournalViewModelImpl> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
@ -18,7 +18,7 @@ namespace MWGui
|
||||||
/// game data store.
|
/// game data store.
|
||||||
struct JournalViewModel
|
struct JournalViewModel
|
||||||
{
|
{
|
||||||
typedef boost::shared_ptr <JournalViewModel> Ptr;
|
typedef std::shared_ptr <JournalViewModel> Ptr;
|
||||||
|
|
||||||
typedef intptr_t QuestId;
|
typedef intptr_t QuestId;
|
||||||
typedef intptr_t TopicId;
|
typedef intptr_t TopicId;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef MWGUI_JOURNAL_H
|
#ifndef MWGUI_JOURNAL_H
|
||||||
#define MWGUI_JOURNAL_H
|
#define MWGUI_JOURNAL_H
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
namespace MWBase { class WindowManager; }
|
namespace MWBase { class WindowManager; }
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace MWGui
|
||||||
struct JournalWindow
|
struct JournalWindow
|
||||||
{
|
{
|
||||||
/// construct a new instance of the one JournalWindow implementation
|
/// construct a new instance of the one JournalWindow implementation
|
||||||
static JournalWindow * create (boost::shared_ptr <JournalViewModel> Model);
|
static JournalWindow * create (std::shared_ptr <JournalViewModel> Model);
|
||||||
|
|
||||||
/// destroy this instance of the JournalWindow implementation
|
/// destroy this instance of the JournalWindow implementation
|
||||||
virtual ~JournalWindow () {};
|
virtual ~JournalWindow () {};
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ namespace MWGui
|
||||||
osg::ref_ptr<osg::Texture2D> tex = mLocalMapRender->getFogOfWarTexture(x, y);
|
osg::ref_ptr<osg::Texture2D> tex = mLocalMapRender->getFogOfWarTexture(x, y);
|
||||||
if (tex)
|
if (tex)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MyGUI::ITexture> myguitex (new osgMyGUI::OSGTexture(tex));
|
std::shared_ptr<MyGUI::ITexture> myguitex (new osgMyGUI::OSGTexture(tex));
|
||||||
fog->setRenderItemTexture(myguitex.get());
|
fog->setRenderItemTexture(myguitex.get());
|
||||||
fog->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
fog->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||||
fogTextures.push_back(myguitex);
|
fogTextures.push_back(myguitex);
|
||||||
|
|
@ -371,7 +371,7 @@ namespace MWGui
|
||||||
osg::ref_ptr<osg::Texture2D> texture = mLocalMapRender->getMapTexture(mapX, mapY);
|
osg::ref_ptr<osg::Texture2D> texture = mLocalMapRender->getMapTexture(mapX, mapY);
|
||||||
if (texture)
|
if (texture)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MyGUI::ITexture> guiTex (new osgMyGUI::OSGTexture(texture));
|
std::shared_ptr<MyGUI::ITexture> guiTex (new osgMyGUI::OSGTexture(texture));
|
||||||
textures.push_back(guiTex);
|
textures.push_back(guiTex);
|
||||||
box->setRenderItemTexture(guiTex.get());
|
box->setRenderItemTexture(guiTex.get());
|
||||||
box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 1.f, 1.f, 0.f));
|
box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 1.f, 1.f, 0.f));
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include "windowpinnablebase.hpp"
|
#include "windowpinnablebase.hpp"
|
||||||
|
|
||||||
|
|
@ -111,7 +111,7 @@ namespace MWGui
|
||||||
std::vector<MyGUI::ImageBox*> mMapWidgets;
|
std::vector<MyGUI::ImageBox*> mMapWidgets;
|
||||||
std::vector<MyGUI::ImageBox*> mFogWidgets;
|
std::vector<MyGUI::ImageBox*> mFogWidgets;
|
||||||
|
|
||||||
typedef std::vector<boost::shared_ptr<MyGUI::ITexture> > TextureVector;
|
typedef std::vector<std::shared_ptr<MyGUI::ITexture> > TextureVector;
|
||||||
TextureVector mMapTextures;
|
TextureVector mMapTextures;
|
||||||
TextureVector mFogTextures;
|
TextureVector mFogTextures;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include "windowbase.hpp"
|
#include "windowbase.hpp"
|
||||||
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
||||||
class FadeOp
|
class FadeOp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef boost::shared_ptr<FadeOp> Ptr;
|
typedef std::shared_ptr<FadeOp> Ptr;
|
||||||
|
|
||||||
FadeOp(ScreenFader * fader, float time, float targetAlpha);
|
FadeOp(ScreenFader * fader, float time, float targetAlpha);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ namespace MWMechanics
|
||||||
bool mCombatMove;
|
bool mCombatMove;
|
||||||
osg::Vec3f mLastTargetPos;
|
osg::Vec3f mLastTargetPos;
|
||||||
const MWWorld::CellStore* mCell;
|
const MWWorld::CellStore* mCell;
|
||||||
boost::shared_ptr<Action> mCurrentAction;
|
std::shared_ptr<Action> mCurrentAction;
|
||||||
float mActionCooldown;
|
float mActionCooldown;
|
||||||
float mStrength;
|
float mStrength;
|
||||||
bool mForceNoShortcut;
|
bool mForceNoShortcut;
|
||||||
|
|
@ -273,7 +273,7 @@ namespace MWMechanics
|
||||||
|
|
||||||
float rangeAttack = 0;
|
float rangeAttack = 0;
|
||||||
float rangeFollow = 0;
|
float rangeFollow = 0;
|
||||||
boost::shared_ptr<Action>& currentAction = storage.mCurrentAction;
|
std::shared_ptr<Action>& currentAction = storage.mCurrentAction;
|
||||||
if (characterController.readyToPrepareAttack())
|
if (characterController.readyToPrepareAttack())
|
||||||
{
|
{
|
||||||
currentAction = prepareNextAction(actor, target);
|
currentAction = prepareNextAction(actor, target);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -454,13 +454,13 @@ namespace MWMechanics
|
||||||
// Already done in AiCombat itself
|
// Already done in AiCombat itself
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<Action> prepareNextAction(const MWWorld::Ptr &actor, const MWWorld::Ptr &target)
|
std::shared_ptr<Action> prepareNextAction(const MWWorld::Ptr &actor, const MWWorld::Ptr &target)
|
||||||
{
|
{
|
||||||
Spells& spells = actor.getClass().getCreatureStats(actor).getSpells();
|
Spells& spells = actor.getClass().getCreatureStats(actor).getSpells();
|
||||||
|
|
||||||
float bestActionRating = 0.f;
|
float bestActionRating = 0.f;
|
||||||
// Default to hand-to-hand combat
|
// Default to hand-to-hand combat
|
||||||
boost::shared_ptr<Action> bestAction (new ActionWeapon(MWWorld::Ptr()));
|
std::shared_ptr<Action> bestAction (new ActionWeapon(MWWorld::Ptr()));
|
||||||
if (actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
if (actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||||
{
|
{
|
||||||
bestAction->prepare(actor);
|
bestAction->prepare(actor);
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
#ifndef OPENMW_AICOMBAT_ACTION_H
|
#ifndef OPENMW_AICOMBAT_ACTION_H
|
||||||
#define OPENMW_AICOMBAT_ACTION_H
|
#define OPENMW_AICOMBAT_ACTION_H
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
|
#include <components/esm/loadspel.hpp>
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
#include "../mwworld/containerstore.hpp"
|
#include "../mwworld/containerstore.hpp"
|
||||||
|
|
||||||
#include <components/esm/loadspel.hpp>
|
|
||||||
|
|
||||||
namespace MWMechanics
|
namespace MWMechanics
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ namespace MWMechanics
|
||||||
/// @note target may be empty
|
/// @note target may be empty
|
||||||
float rateEffects (const ESM::EffectList& list, const MWWorld::Ptr& actor, const MWWorld::Ptr& target);
|
float rateEffects (const ESM::EffectList& list, const MWWorld::Ptr& actor, const MWWorld::Ptr& target);
|
||||||
|
|
||||||
boost::shared_ptr<Action> prepareNextAction (const MWWorld::Ptr& actor, const MWWorld::Ptr& target);
|
std::shared_ptr<Action> prepareNextAction (const MWWorld::Ptr& actor, const MWWorld::Ptr& target);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -341,7 +341,7 @@ namespace MWRender
|
||||||
if(!mResourceSystem->getVFS()->exists(kfname))
|
if(!mResourceSystem->getVFS()->exists(kfname))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
boost::shared_ptr<AnimSource> animsrc;
|
std::shared_ptr<AnimSource> animsrc;
|
||||||
animsrc.reset(new AnimSource);
|
animsrc.reset(new AnimSource);
|
||||||
animsrc->mKeyframes = mResourceSystem->getSceneManager()->getKeyframes(kfname);
|
animsrc->mKeyframes = mResourceSystem->getSceneManager()->getKeyframes(kfname);
|
||||||
|
|
||||||
|
|
@ -391,7 +391,7 @@ namespace MWRender
|
||||||
mStates.clear();
|
mStates.clear();
|
||||||
|
|
||||||
for(size_t i = 0;i < sNumGroups;i++)
|
for(size_t i = 0;i < sNumGroups;i++)
|
||||||
mAnimationTimePtr[i]->setTimePtr(boost::shared_ptr<float>());
|
mAnimationTimePtr[i]->setTimePtr(std::shared_ptr<float>());
|
||||||
|
|
||||||
mAccumCtrl = NULL;
|
mAccumCtrl = NULL;
|
||||||
|
|
||||||
|
|
@ -657,12 +657,12 @@ namespace MWRender
|
||||||
active = state;
|
active = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
mAnimationTimePtr[grp]->setTimePtr(active == mStates.end() ? boost::shared_ptr<float>() : active->second.mTime);
|
mAnimationTimePtr[grp]->setTimePtr(active == mStates.end() ? std::shared_ptr<float>() : active->second.mTime);
|
||||||
|
|
||||||
// add external controllers for the AnimSource active in this group
|
// add external controllers for the AnimSource active in this group
|
||||||
if (active != mStates.end())
|
if (active != mStates.end())
|
||||||
{
|
{
|
||||||
boost::shared_ptr<AnimSource> animsrc = active->second.mSource;
|
std::shared_ptr<AnimSource> animsrc = active->second.mSource;
|
||||||
|
|
||||||
for (AnimSource::ControllerMap::iterator it = animsrc->mControllerMap[grp].begin(); it != animsrc->mControllerMap[grp].end(); ++it)
|
for (AnimSource::ControllerMap::iterator it = animsrc->mControllerMap[grp].begin(); it != animsrc->mControllerMap[grp].end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
@ -1146,9 +1146,9 @@ namespace MWRender
|
||||||
params.mEffectId = effectId;
|
params.mEffectId = effectId;
|
||||||
params.mBoneName = bonename;
|
params.mBoneName = bonename;
|
||||||
|
|
||||||
params.mAnimTime = boost::shared_ptr<EffectAnimationTime>(new EffectAnimationTime);
|
params.mAnimTime = std::shared_ptr<EffectAnimationTime>(new EffectAnimationTime);
|
||||||
|
|
||||||
SceneUtil::AssignControllerSourcesVisitor assignVisitor(boost::shared_ptr<SceneUtil::ControllerSource>(params.mAnimTime));
|
SceneUtil::AssignControllerSourcesVisitor assignVisitor(std::shared_ptr<SceneUtil::ControllerSource>(params.mAnimTime));
|
||||||
node->accept(assignVisitor);
|
node->accept(assignVisitor);
|
||||||
|
|
||||||
overrideTexture(texture, mResourceSystem, node);
|
overrideTexture(texture, mResourceSystem, node);
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ public:
|
||||||
private:
|
private:
|
||||||
osg::ref_ptr<osg::Node> mNode;
|
osg::ref_ptr<osg::Node> mNode;
|
||||||
};
|
};
|
||||||
typedef boost::shared_ptr<PartHolder> PartHolderPtr;
|
typedef std::shared_ptr<PartHolder> PartHolderPtr;
|
||||||
|
|
||||||
class Animation
|
class Animation
|
||||||
{
|
{
|
||||||
|
|
@ -95,13 +95,13 @@ protected:
|
||||||
class AnimationTime : public SceneUtil::ControllerSource
|
class AnimationTime : public SceneUtil::ControllerSource
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
boost::shared_ptr<float> mTimePtr;
|
std::shared_ptr<float> mTimePtr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void setTimePtr(boost::shared_ptr<float> time)
|
void setTimePtr(std::shared_ptr<float> time)
|
||||||
{ mTimePtr = time; }
|
{ mTimePtr = time; }
|
||||||
boost::shared_ptr<float> getTimePtr() const
|
std::shared_ptr<float> getTimePtr() const
|
||||||
{ return mTimePtr; }
|
{ return mTimePtr; }
|
||||||
|
|
||||||
virtual float getValue(osg::NodeVisitor* nv);
|
virtual float getValue(osg::NodeVisitor* nv);
|
||||||
|
|
@ -119,13 +119,13 @@ protected:
|
||||||
struct AnimSource;
|
struct AnimSource;
|
||||||
|
|
||||||
struct AnimState {
|
struct AnimState {
|
||||||
boost::shared_ptr<AnimSource> mSource;
|
std::shared_ptr<AnimSource> mSource;
|
||||||
float mStartTime;
|
float mStartTime;
|
||||||
float mLoopStartTime;
|
float mLoopStartTime;
|
||||||
float mLoopStopTime;
|
float mLoopStopTime;
|
||||||
float mStopTime;
|
float mStopTime;
|
||||||
|
|
||||||
typedef boost::shared_ptr<float> TimePtr;
|
typedef std::shared_ptr<float> TimePtr;
|
||||||
TimePtr mTime;
|
TimePtr mTime;
|
||||||
float mSpeedMult;
|
float mSpeedMult;
|
||||||
|
|
||||||
|
|
@ -155,7 +155,7 @@ protected:
|
||||||
typedef std::map<std::string,AnimState> AnimStateMap;
|
typedef std::map<std::string,AnimState> AnimStateMap;
|
||||||
AnimStateMap mStates;
|
AnimStateMap mStates;
|
||||||
|
|
||||||
typedef std::vector<boost::shared_ptr<AnimSource> > AnimSourceList;
|
typedef std::vector<std::shared_ptr<AnimSource> > AnimSourceList;
|
||||||
AnimSourceList mAnimSources;
|
AnimSourceList mAnimSources;
|
||||||
|
|
||||||
osg::ref_ptr<osg::Group> mInsert;
|
osg::ref_ptr<osg::Group> mInsert;
|
||||||
|
|
@ -176,7 +176,7 @@ protected:
|
||||||
typedef std::multimap<osg::ref_ptr<osg::Node>, osg::ref_ptr<osg::NodeCallback> > ControllerMap;
|
typedef std::multimap<osg::ref_ptr<osg::Node>, osg::ref_ptr<osg::NodeCallback> > ControllerMap;
|
||||||
ControllerMap mActiveControllers;
|
ControllerMap mActiveControllers;
|
||||||
|
|
||||||
boost::shared_ptr<AnimationTime> mAnimationTimePtr[sNumGroups];
|
std::shared_ptr<AnimationTime> mAnimationTimePtr[sNumGroups];
|
||||||
|
|
||||||
// Stored in all lowercase for a case-insensitive lookup
|
// Stored in all lowercase for a case-insensitive lookup
|
||||||
typedef std::map<std::string, osg::ref_ptr<osg::MatrixTransform> > NodeMap;
|
typedef std::map<std::string, osg::ref_ptr<osg::MatrixTransform> > NodeMap;
|
||||||
|
|
@ -192,7 +192,7 @@ protected:
|
||||||
{
|
{
|
||||||
std::string mModelName; // Just here so we don't add the same effect twice
|
std::string mModelName; // Just here so we don't add the same effect twice
|
||||||
PartHolderPtr mObjects;
|
PartHolderPtr mObjects;
|
||||||
boost::shared_ptr<EffectAnimationTime> mAnimTime;
|
std::shared_ptr<EffectAnimationTime> mAnimTime;
|
||||||
float mMaxControllerLength;
|
float mMaxControllerLength;
|
||||||
int mEffectId;
|
int mEffectId;
|
||||||
bool mLoop;
|
bool mLoop;
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ CreatureWeaponAnimation::CreatureWeaponAnimation(const MWWorld::Ptr &ptr, const
|
||||||
updateParts();
|
updateParts();
|
||||||
}
|
}
|
||||||
|
|
||||||
mWeaponAnimationTime = boost::shared_ptr<WeaponAnimationTime>(new WeaponAnimationTime(this));
|
mWeaponAnimationTime = std::shared_ptr<WeaponAnimationTime>(new WeaponAnimationTime(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreatureWeaponAnimation::showWeapons(bool showWeapon)
|
void CreatureWeaponAnimation::showWeapons(bool showWeapon)
|
||||||
|
|
@ -130,7 +130,7 @@ void CreatureWeaponAnimation::updatePart(PartHolderPtr& scene, int slot)
|
||||||
else
|
else
|
||||||
mAmmunition.reset();
|
mAmmunition.reset();
|
||||||
|
|
||||||
boost::shared_ptr<SceneUtil::ControllerSource> source;
|
std::shared_ptr<SceneUtil::ControllerSource> source;
|
||||||
|
|
||||||
if (slot == MWWorld::InventoryStore::Slot_CarriedRight)
|
if (slot == MWWorld::InventoryStore::Slot_CarriedRight)
|
||||||
source = mWeaponAnimationTime;
|
source = mWeaponAnimationTime;
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ namespace MWRender
|
||||||
bool mShowWeapons;
|
bool mShowWeapons;
|
||||||
bool mShowCarriedLeft;
|
bool mShowCarriedLeft;
|
||||||
|
|
||||||
boost::shared_ptr<WeaponAnimationTime> mWeaponAnimationTime;
|
std::shared_ptr<WeaponAnimationTime> mWeaponAnimationTime;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,10 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
namespace osg
|
namespace osg
|
||||||
{
|
{
|
||||||
class Group;
|
class Group;
|
||||||
|
|
@ -44,7 +43,7 @@ namespace MWRender
|
||||||
struct Effect
|
struct Effect
|
||||||
{
|
{
|
||||||
float mMaxControllerLength;
|
float mMaxControllerLength;
|
||||||
boost::shared_ptr<EffectAnimationTime> mAnimTime;
|
std::shared_ptr<EffectAnimationTime> mAnimTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<osg::ref_ptr<osg::PositionAttitudeTransform>, Effect> EffectMap;
|
typedef std::map<osg::ref_ptr<osg::PositionAttitudeTransform>, Effect> EffectMap;
|
||||||
|
|
|
||||||
|
|
@ -282,8 +282,8 @@ NpcAnimation::NpcAnimation(const MWWorld::Ptr& ptr, osg::ref_ptr<osg::Group> par
|
||||||
{
|
{
|
||||||
mNpc = mPtr.get<ESM::NPC>()->mBase;
|
mNpc = mPtr.get<ESM::NPC>()->mBase;
|
||||||
|
|
||||||
mHeadAnimationTime = boost::shared_ptr<HeadAnimationTime>(new HeadAnimationTime(mPtr));
|
mHeadAnimationTime = std::shared_ptr<HeadAnimationTime>(new HeadAnimationTime(mPtr));
|
||||||
mWeaponAnimationTime = boost::shared_ptr<WeaponAnimationTime>(new WeaponAnimationTime(this));
|
mWeaponAnimationTime = std::shared_ptr<WeaponAnimationTime>(new WeaponAnimationTime(this));
|
||||||
|
|
||||||
for(size_t i = 0;i < ESM::PRT_Count;i++)
|
for(size_t i = 0;i < ESM::PRT_Count;i++)
|
||||||
{
|
{
|
||||||
|
|
@ -756,7 +756,7 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<SceneUtil::ControllerSource> src;
|
std::shared_ptr<SceneUtil::ControllerSource> src;
|
||||||
if (type == ESM::PRT_Head)
|
if (type == ESM::PRT_Head)
|
||||||
{
|
{
|
||||||
src = mHeadAnimationTime;
|
src = mHeadAnimationTime;
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,8 @@ private:
|
||||||
|
|
||||||
osg::Vec3f mFirstPersonOffset;
|
osg::Vec3f mFirstPersonOffset;
|
||||||
|
|
||||||
boost::shared_ptr<HeadAnimationTime> mHeadAnimationTime;
|
std::shared_ptr<HeadAnimationTime> mHeadAnimationTime;
|
||||||
boost::shared_ptr<WeaponAnimationTime> mWeaponAnimationTime;
|
std::shared_ptr<WeaponAnimationTime> mWeaponAnimationTime;
|
||||||
|
|
||||||
float mAlpha;
|
float mAlpha;
|
||||||
bool mSoundsDisabled;
|
bool mSoundsDisabled;
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ namespace
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::ref_ptr<NifOsg::FlipController> controller (new NifOsg::FlipController(0, 0.3f/rippleFrameCount, textures));
|
osg::ref_ptr<NifOsg::FlipController> controller (new NifOsg::FlipController(0, 0.3f/rippleFrameCount, textures));
|
||||||
controller->setSource(boost::shared_ptr<SceneUtil::ControllerSource>(new SceneUtil::FrameTimeSource));
|
controller->setSource(std::shared_ptr<SceneUtil::ControllerSource>(new SceneUtil::FrameTimeSource));
|
||||||
node->addUpdateCallback(controller);
|
node->addUpdateCallback(controller);
|
||||||
|
|
||||||
osg::ref_ptr<osg::StateSet> stateset (new osg::StateSet);
|
osg::ref_ptr<osg::StateSet> stateset (new osg::StateSet);
|
||||||
|
|
|
||||||
|
|
@ -996,7 +996,7 @@ void SkyManager::setWeather(const MWWorld::WeatherResult& weather)
|
||||||
}
|
}
|
||||||
mParticleEffect = mSceneManager->createInstance(mCurrentParticleEffect, mParticleNode);
|
mParticleEffect = mSceneManager->createInstance(mCurrentParticleEffect, mParticleNode);
|
||||||
|
|
||||||
SceneUtil::AssignControllerSourcesVisitor assignVisitor(boost::shared_ptr<SceneUtil::ControllerSource>(new SceneUtil::FrameTimeSource));
|
SceneUtil::AssignControllerSourcesVisitor assignVisitor(std::shared_ptr<SceneUtil::ControllerSource>(new SceneUtil::FrameTimeSource));
|
||||||
mParticleEffect->accept(assignVisitor);
|
mParticleEffect->accept(assignVisitor);
|
||||||
|
|
||||||
AlphaFader::SetupVisitor alphaFaderSetupVisitor;
|
AlphaFader::SetupVisitor alphaFaderSetupVisitor;
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ namespace
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::ref_ptr<NifOsg::FlipController> controller (new NifOsg::FlipController(0, 2/32.f, textures));
|
osg::ref_ptr<NifOsg::FlipController> controller (new NifOsg::FlipController(0, 2/32.f, textures));
|
||||||
controller->setSource(boost::shared_ptr<SceneUtil::ControllerSource>(new SceneUtil::FrameTimeSource));
|
controller->setSource(std::shared_ptr<SceneUtil::ControllerSource>(new SceneUtil::FrameTimeSource));
|
||||||
node->addUpdateCallback(controller);
|
node->addUpdateCallback(controller);
|
||||||
node->setStateSet(stateset);
|
node->setStateSet(stateset);
|
||||||
stateset->setTextureAttributeAndModes(0, textures[0], osg::StateAttribute::ON);
|
stateset->setTextureAttributeAndModes(0, textures[0], osg::StateAttribute::ON);
|
||||||
|
|
|
||||||
|
|
@ -502,7 +502,7 @@ namespace MWScript
|
||||||
|
|
||||||
void InterpreterContext::executeActivation(MWWorld::Ptr ptr, MWWorld::Ptr actor)
|
void InterpreterContext::executeActivation(MWWorld::Ptr ptr, MWWorld::Ptr actor)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWWorld::Action> action = (ptr.getClass().activate(ptr, actor));
|
std::shared_ptr<MWWorld::Action> action = (ptr.getClass().activate(ptr, actor));
|
||||||
action->execute (actor);
|
action->execute (actor);
|
||||||
if (mActivated == ptr)
|
if (mActivated == ptr)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef GAME_SCRIPT_INTERPRETERCONTEXT_H
|
#ifndef GAME_SCRIPT_INTERPRETERCONTEXT_H
|
||||||
#define GAME_SCRIPT_INTERPRETERCONTEXT_H
|
#define GAME_SCRIPT_INTERPRETERCONTEXT_H
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include <components/interpreter/context.hpp>
|
#include <components/interpreter/context.hpp>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ namespace MWSound
|
||||||
}
|
}
|
||||||
|
|
||||||
MWBase::SoundPtr mAudioTrack;
|
MWBase::SoundPtr mAudioTrack;
|
||||||
boost::shared_ptr<MWSoundDecoderBridge> mDecoderBridge;
|
std::shared_ptr<MWSoundDecoderBridge> mDecoderBridge;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -155,9 +155,9 @@ namespace MWSound
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boost::shared_ptr<Video::MovieAudioDecoder> MovieAudioFactory::createDecoder(Video::VideoState* videoState)
|
std::shared_ptr<Video::MovieAudioDecoder> MovieAudioFactory::createDecoder(Video::VideoState* videoState)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<MWSound::MovieAudioDecoder> decoder(new MWSound::MovieAudioDecoder(videoState));
|
std::shared_ptr<MWSound::MovieAudioDecoder> decoder(new MWSound::MovieAudioDecoder(videoState));
|
||||||
decoder->setupFormat();
|
decoder->setupFormat();
|
||||||
|
|
||||||
MWBase::SoundPtr sound = MWBase::Environment::get().getSoundManager()->playTrack(decoder->mDecoderBridge, MWBase::SoundManager::Play_TypeMovie);
|
MWBase::SoundPtr sound = MWBase::Environment::get().getSoundManager()->playTrack(decoder->mDecoderBridge, MWBase::SoundManager::Play_TypeMovie);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace MWSound
|
||||||
|
|
||||||
class MovieAudioFactory : public Video::MovieAudioFactory
|
class MovieAudioFactory : public Video::MovieAudioFactory
|
||||||
{
|
{
|
||||||
virtual boost::shared_ptr<Video::MovieAudioDecoder> createDecoder(Video::VideoState* videoState);
|
virtual std::shared_ptr<Video::MovieAudioDecoder> createDecoder(Video::VideoState* videoState);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -856,7 +856,7 @@ void OpenAL_Output::bufferFinished(ALuint buf)
|
||||||
|
|
||||||
MWBase::SoundPtr OpenAL_Output::playSound(const std::string &fname, float vol, float basevol, float pitch, int flags,float offset)
|
MWBase::SoundPtr OpenAL_Output::playSound(const std::string &fname, float vol, float basevol, float pitch, int flags,float offset)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<OpenAL_Sound> sound;
|
std::shared_ptr<OpenAL_Sound> sound;
|
||||||
ALuint src=0, buf=0;
|
ALuint src=0, buf=0;
|
||||||
|
|
||||||
if(mFreeSources.empty())
|
if(mFreeSources.empty())
|
||||||
|
|
@ -895,7 +895,7 @@ MWBase::SoundPtr OpenAL_Output::playSound(const std::string &fname, float vol, f
|
||||||
MWBase::SoundPtr OpenAL_Output::playSound3D(const std::string &fname, const osg::Vec3f &pos, float vol, float basevol, float pitch,
|
MWBase::SoundPtr OpenAL_Output::playSound3D(const std::string &fname, const osg::Vec3f &pos, float vol, float basevol, float pitch,
|
||||||
float min, float max, int flags, float offset, bool extractLoudness)
|
float min, float max, int flags, float offset, bool extractLoudness)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<OpenAL_Sound> sound;
|
std::shared_ptr<OpenAL_Sound> sound;
|
||||||
ALuint src=0, buf=0;
|
ALuint src=0, buf=0;
|
||||||
|
|
||||||
if(mFreeSources.empty())
|
if(mFreeSources.empty())
|
||||||
|
|
@ -940,7 +940,7 @@ MWBase::SoundPtr OpenAL_Output::playSound3D(const std::string &fname, const osg:
|
||||||
|
|
||||||
MWBase::SoundPtr OpenAL_Output::streamSound(DecoderPtr decoder, float volume, float pitch, int flags)
|
MWBase::SoundPtr OpenAL_Output::streamSound(DecoderPtr decoder, float volume, float pitch, int flags)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<OpenAL_SoundStream> sound;
|
std::shared_ptr<OpenAL_SoundStream> sound;
|
||||||
ALuint src;
|
ALuint src;
|
||||||
|
|
||||||
if(mFreeSources.empty())
|
if(mFreeSources.empty())
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ namespace MWSound
|
||||||
float mVoiceVolume;
|
float mVoiceVolume;
|
||||||
float mFootstepsVolume;
|
float mFootstepsVolume;
|
||||||
|
|
||||||
boost::shared_ptr<Sound> mMusic;
|
std::shared_ptr<Sound> mMusic;
|
||||||
std::string mCurrentPlaylist;
|
std::string mCurrentPlaylist;
|
||||||
|
|
||||||
typedef std::pair<MWWorld::Ptr,std::string> PtrIDPair;
|
typedef std::pair<MWWorld::Ptr,std::string> PtrIDPair;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue