forked from teamnwah/openmw-tes3coop
purge all instances of <boost/shared_ptr.hpp>, clean up unused headers
This commit is contained in:
parent
07f75e1104
commit
d785344fad
75 changed files with 179 additions and 206 deletions
|
@ -1,9 +1,9 @@
|
|||
#ifndef GAME_MWBASE_SOUNDMANAGER_H
|
||||
#define GAME_MWBASE_SOUNDMANAGER_H
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace MWClass
|
|||
|
||||
void Activator::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Activator);
|
||||
std::shared_ptr<Class> instance (new Activator);
|
||||
|
||||
registerClass (typeid (ESM::Activator).name(), instance);
|
||||
}
|
||||
|
@ -107,19 +107,19 @@ namespace MWClass
|
|||
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())
|
||||
{
|
||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||
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);
|
||||
|
||||
return action;
|
||||
}
|
||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::NullAction);
|
||||
return std::shared_ptr<MWWorld::Action>(new MWWorld::NullAction);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace MWClass
|
|||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
///< 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
|
||||
|
||||
static void registerSelf();
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -73,7 +73,7 @@ namespace MWClass
|
|||
|
||||
void Apparatus::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Apparatus);
|
||||
std::shared_ptr<Class> instance (new Apparatus);
|
||||
|
||||
registerClass (typeid (ESM::Apparatus).name(), instance);
|
||||
}
|
||||
|
@ -125,9 +125,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 Apparatus::copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace MWClass
|
|||
virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
|
||||
///< 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;
|
||||
///< Generate action for using via inventory menu
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -165,7 +165,7 @@ namespace MWClass
|
|||
|
||||
void Armor::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Armor);
|
||||
std::shared_ptr<Class> instance (new Armor);
|
||||
|
||||
registerClass (typeid (ESM::Armor).name(), instance);
|
||||
}
|
||||
|
@ -354,9 +354,9 @@ namespace MWClass
|
|||
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));
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -73,7 +73,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
|
||||
/// 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;
|
||||
///< Generate action for using via inventory menu
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace MWClass
|
|||
|
||||
void BodyPart::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<MWWorld::Class> instance (new BodyPart);
|
||||
std::shared_ptr<MWWorld::Class> instance (new BodyPart);
|
||||
|
||||
registerClass (typeid (ESM::BodyPart).name(), instance);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||
|
@ -62,13 +62,13 @@ namespace MWClass
|
|||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||
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);
|
||||
|
||||
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::ConstPtr& ptr) const
|
||||
|
@ -87,7 +87,7 @@ namespace MWClass
|
|||
|
||||
void Book::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Book);
|
||||
std::shared_ptr<Class> instance (new Book);
|
||||
|
||||
registerClass (typeid (ESM::Book).name(), instance);
|
||||
}
|
||||
|
@ -162,9 +162,9 @@ namespace MWClass
|
|||
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 Book::copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -53,7 +53,7 @@ namespace MWClass
|
|||
virtual std::string applyEnchantment(const MWWorld::ConstPtr &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.
|
||||
|
||||
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
|
||||
|
||||
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -124,7 +124,7 @@ namespace MWClass
|
|||
|
||||
void Clothing::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Clothing);
|
||||
std::shared_ptr<Class> instance (new Clothing);
|
||||
|
||||
registerClass (typeid (ESM::Clothing).name(), instance);
|
||||
}
|
||||
|
@ -243,9 +243,9 @@ namespace MWClass
|
|||
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));
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -65,7 +65,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.
|
||||
/// 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;
|
||||
///< Generate action for using via inventory menu
|
||||
|
||||
|
|
|
@ -118,18 +118,18 @@ namespace MWClass
|
|||
return true;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
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())
|
||||
{
|
||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||
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);
|
||||
|
||||
return action;
|
||||
|
@ -181,20 +181,20 @@ namespace MWClass
|
|||
{
|
||||
if(!isTrapped)
|
||||
{
|
||||
boost::shared_ptr<MWWorld::Action> action (new MWWorld::ActionOpen(ptr));
|
||||
std::shared_ptr<MWWorld::Action> action (new MWWorld::ActionOpen(ptr));
|
||||
return action;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Activate trap
|
||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr));
|
||||
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr));
|
||||
action->setSound(trapActivationSound);
|
||||
return action;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr));
|
||||
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr));
|
||||
action->setSound(lockedSound);
|
||||
return action;
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ namespace MWClass
|
|||
|
||||
void Container::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Container);
|
||||
std::shared_ptr<Class> instance (new Container);
|
||||
|
||||
registerClass (typeid (ESM::Container).name(), instance);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
|
|
@ -434,7 +434,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
|
||||
{
|
||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||
|
@ -442,17 +442,17 @@ namespace MWClass
|
|||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||
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);
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
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())
|
||||
return boost::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::FailedAction(""));
|
||||
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr));
|
||||
}
|
||||
|
||||
MWWorld::ContainerStore& Creature::getContainerStore (const MWWorld::Ptr& ptr) const
|
||||
|
@ -489,7 +489,7 @@ namespace MWClass
|
|||
|
||||
void Creature::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Creature);
|
||||
std::shared_ptr<Class> instance (new Creature);
|
||||
|
||||
registerClass (typeid (ESM::Creature).name(), instance);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace MWClass
|
|||
|
||||
virtual void onHit(const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, const osg::Vec3f &hitPosition, bool successful) 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace MWClass
|
|||
|
||||
void CreatureLevList::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new CreatureLevList);
|
||||
std::shared_ptr<Class> instance (new CreatureLevList);
|
||||
|
||||
registerClass (typeid (ESM::CreatureLevList).name(), instance);
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
MWWorld::LiveCellRef<ESM::Door> *ref = ptr.get<ESM::Door>();
|
||||
|
@ -166,7 +166,7 @@ namespace MWClass
|
|||
if(isTrapped)
|
||||
{
|
||||
// Trap activation
|
||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr));
|
||||
std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr));
|
||||
action->setSound(trapActivationSound);
|
||||
return action;
|
||||
}
|
||||
|
@ -176,12 +176,12 @@ namespace MWClass
|
|||
if (actor == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getDistanceToFacedObject() > MWBase::Environment::get().getWorld()->getMaxActivationDistance())
|
||||
{
|
||||
// player activated teleport door with telekinesis
|
||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
||||
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
||||
return action;
|
||||
}
|
||||
else
|
||||
{
|
||||
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);
|
||||
return action;
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ namespace MWClass
|
|||
else
|
||||
{
|
||||
// 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);
|
||||
bool opening = true;
|
||||
float doorRot = ptr.getRefData().getPosition().rot[2] - ptr.getCellRef().getPosition().rot[2];
|
||||
|
@ -223,7 +223,7 @@ namespace MWClass
|
|||
else
|
||||
{
|
||||
// locked, and we can't open.
|
||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr));
|
||||
std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr));
|
||||
action->setSound(lockedSound);
|
||||
return action;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ namespace MWClass
|
|||
|
||||
void Door::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Door);
|
||||
std::shared_ptr<Class> instance (new Door);
|
||||
|
||||
registerClass (typeid (ESM::Door).name(), instance);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -75,9 +75,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");
|
||||
|
||||
|
@ -86,7 +86,7 @@ namespace MWClass
|
|||
|
||||
void Ingredient::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Ingredient);
|
||||
std::shared_ptr<Class> instance (new Ingredient);
|
||||
|
||||
registerClass (typeid (ESM::Ingredient).name(), instance);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -36,7 +36,7 @@ namespace MWClass
|
|||
virtual int getValue (const MWWorld::ConstPtr& ptr) const;
|
||||
///< 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;
|
||||
///< Generate action for using via inventory menu
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace MWClass
|
|||
|
||||
void ItemLevList::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new ItemLevList);
|
||||
std::shared_ptr<Class> instance (new ItemLevList);
|
||||
|
||||
registerClass (typeid (ESM::ItemLevList).name(), instance);
|
||||
}
|
||||
|
|
|
@ -79,15 +79,15 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
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>();
|
||||
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);
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ namespace MWClass
|
|||
|
||||
void Light::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Light);
|
||||
std::shared_ptr<Class> instance (new Light);
|
||||
|
||||
registerClass (typeid (ESM::Light).name(), instance);
|
||||
}
|
||||
|
@ -186,9 +186,9 @@ namespace MWClass
|
|||
return Class::showsInInventory(ptr);
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace MWClass
|
|||
|
||||
virtual bool showsInInventory (const MWWorld::ConstPtr& ptr) 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace MWClass
|
|||
virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
|
||||
///< 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;
|
||||
///< Generate action for using via inventory menu
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -83,7 +83,7 @@ namespace MWClass
|
|||
|
||||
void Lockpick::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Lockpick);
|
||||
std::shared_ptr<Class> instance (new Lockpick);
|
||||
|
||||
registerClass (typeid (ESM::Lockpick).name(), instance);
|
||||
}
|
||||
|
@ -139,9 +139,9 @@ namespace MWClass
|
|||
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));
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -51,7 +51,7 @@ namespace MWClass
|
|||
virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
|
||||
///< 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;
|
||||
///< Generate action for using via inventory menu
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -97,7 +97,7 @@ namespace MWClass
|
|||
|
||||
void Miscellaneous::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Miscellaneous);
|
||||
std::shared_ptr<Class> instance (new Miscellaneous);
|
||||
|
||||
registerClass (typeid (ESM::Miscellaneous).name(), instance);
|
||||
}
|
||||
|
@ -213,12 +213,12 @@ namespace MWClass
|
|||
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())
|
||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::NullAction());
|
||||
return std::shared_ptr<MWWorld::Action>(new MWWorld::NullAction());
|
||||
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::ConstPtr& item, int npcServices) const
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace MWClass
|
|||
|
||||
virtual std::string getModel(const MWWorld::ConstPtr &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;
|
||||
///< Generate action for using via inventory menu
|
||||
|
||||
|
|
|
@ -844,12 +844,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
|
||||
{
|
||||
// player got activated by another NPC
|
||||
if(ptr == MWMechanics::getPlayer())
|
||||
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
|
||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||
|
@ -857,23 +857,23 @@ namespace MWClass
|
|||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||
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);
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
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())
|
||||
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)
|
||||
|| 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
|
||||
if(ptr.getClass().isNpc() && ptr.getClass().getNpcStats(ptr).isWerewolf())
|
||||
return boost::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::FailedAction(""));
|
||||
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr));
|
||||
}
|
||||
|
||||
MWWorld::ContainerStore& Npc::getContainerStore (const MWWorld::Ptr& ptr)
|
||||
|
@ -1009,7 +1009,7 @@ namespace MWClass
|
|||
|
||||
void Npc::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Npc);
|
||||
std::shared_ptr<Class> instance (new Npc);
|
||||
registerClass (typeid (ESM::NPC).name(), instance);
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace MWClass
|
|||
virtual void getModelsToPreload(const MWWorld::Ptr& ptr, std::vector<std::string>& models) const;
|
||||
///< Get a list of models to preload that this object may use (directly or indirectly). default implementation: list getModel().
|
||||
|
||||
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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -78,7 +78,7 @@ namespace MWClass
|
|||
|
||||
void Potion::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Potion);
|
||||
std::shared_ptr<Class> instance (new Potion);
|
||||
|
||||
registerClass (typeid (ESM::Potion).name(), instance);
|
||||
}
|
||||
|
@ -139,12 +139,12 @@ namespace MWClass
|
|||
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 =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
boost::shared_ptr<MWWorld::Action> action (
|
||||
std::shared_ptr<MWWorld::Action> action (
|
||||
new MWWorld::ActionApply (ptr, ref->mBase->mId));
|
||||
|
||||
action->setSound ("Drink");
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -36,7 +36,7 @@ namespace MWClass
|
|||
virtual int getValue (const MWWorld::ConstPtr& ptr) const;
|
||||
///< 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
|
||||
|
||||
static void registerSelf();
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace MWClass
|
|||
|
||||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -83,7 +83,7 @@ namespace MWClass
|
|||
|
||||
void Probe::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Probe);
|
||||
std::shared_ptr<Class> instance (new Probe);
|
||||
|
||||
registerClass (typeid (ESM::Probe).name(), instance);
|
||||
}
|
||||
|
@ -139,9 +139,9 @@ namespace MWClass
|
|||
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));
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -51,7 +51,7 @@ namespace MWClass
|
|||
virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
|
||||
///< 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;
|
||||
///< Generate action for using via inventory menu
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -74,7 +74,7 @@ namespace MWClass
|
|||
|
||||
void Repair::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Repair);
|
||||
std::shared_ptr<Class> instance (new Repair);
|
||||
|
||||
registerClass (typeid (ESM::Repair).name(), instance);
|
||||
}
|
||||
|
@ -149,9 +149,9 @@ namespace MWClass
|
|||
return MWWorld::Ptr(cell.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::ConstPtr& item, int npcServices) const
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace MWClass
|
|||
|
||||
virtual std::string getModel(const MWWorld::ConstPtr &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;
|
||||
///< Generate action for using via inventory menu (default implementation: return a
|
||||
/// null action).
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace MWClass
|
|||
|
||||
void Static::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Static);
|
||||
std::shared_ptr<Class> instance (new Static);
|
||||
|
||||
registerClass (typeid (ESM::Static).name(), instance);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace MWClass
|
|||
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
|
||||
{
|
||||
return defaultItemActivate(ptr, actor);
|
||||
|
@ -143,7 +143,7 @@ namespace MWClass
|
|||
|
||||
void Weapon::registerSelf()
|
||||
{
|
||||
boost::shared_ptr<Class> instance (new Weapon);
|
||||
std::shared_ptr<Class> instance (new Weapon);
|
||||
|
||||
registerClass (typeid (ESM::Weapon).name(), instance);
|
||||
}
|
||||
|
@ -392,9 +392,9 @@ namespace MWClass
|
|||
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));
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace MWClass
|
|||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// 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;
|
||||
///< Generate action for activation
|
||||
|
||||
|
@ -72,7 +72,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.
|
||||
/// 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;
|
||||
///< Generate action for using via inventory menu
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
#include <components/misc/utf8stream.hpp>
|
||||
|
@ -235,7 +234,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
};
|
||||
|
||||
typedef TypesetBookImpl Book;
|
||||
typedef boost::shared_ptr <Book> BookPtr;
|
||||
typedef std::shared_ptr <Book> BookPtr;
|
||||
typedef std::vector<PartialText>::const_iterator PartialTextConstIterator;
|
||||
|
||||
int mPageWidth;
|
||||
|
@ -259,7 +258,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
mCurrentContent (NULL),
|
||||
mCurrentAlignment (AlignLeft)
|
||||
{
|
||||
mBook = boost::make_shared <Book> ();
|
||||
mBook = std::make_shared <Book> ();
|
||||
}
|
||||
|
||||
virtual ~Typesetter ()
|
||||
|
@ -628,7 +627,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
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
|
||||
|
@ -900,7 +899,7 @@ public:
|
|||
boost::function <void (intptr_t)> mLinkClicked;
|
||||
|
||||
|
||||
boost::shared_ptr <TypesetBookImpl> mBook;
|
||||
std::shared_ptr <TypesetBookImpl> mBook;
|
||||
|
||||
MyGUI::ILayerNode* mNode;
|
||||
ActiveTextFormats mActiveTextFormats;
|
||||
|
@ -1034,7 +1033,7 @@ public:
|
|||
|
||||
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)
|
||||
{
|
||||
|
@ -1123,7 +1122,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
void createActiveFormats (boost::shared_ptr <TypesetBookImpl> newBook)
|
||||
void createActiveFormats (std::shared_ptr <TypesetBookImpl> newBook)
|
||||
{
|
||||
newBook->visitRuns (0, 0x7FFFFFFF, CreateActiveFormat (this));
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <functional>
|
||||
#include <stdint.h>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
@ -15,7 +14,7 @@ namespace MWGui
|
|||
/// the book page widget.
|
||||
struct TypesetBook
|
||||
{
|
||||
typedef boost::shared_ptr <TypesetBook> Ptr;
|
||||
typedef std::shared_ptr <TypesetBook> Ptr;
|
||||
typedef intptr_t InteractiveId;
|
||||
|
||||
/// Returns the number of pages in the document.
|
||||
|
@ -33,7 +32,7 @@ namespace MWGui
|
|||
/// A factory class for creating a typeset book instance.
|
||||
struct BookTypesetter
|
||||
{
|
||||
typedef boost::shared_ptr <BookTypesetter> Ptr;
|
||||
typedef std::shared_ptr <BookTypesetter> Ptr;
|
||||
typedef TypesetBook::InteractiveId InteractiveId;
|
||||
typedef MyGUI::Colour Colour;
|
||||
typedef uint8_t const * Utf8Point;
|
||||
|
|
|
@ -493,7 +493,7 @@ namespace MWGui
|
|||
{
|
||||
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 (player);
|
||||
}
|
||||
|
|
|
@ -356,7 +356,7 @@ struct JournalViewModelImpl : JournalViewModel
|
|||
|
||||
JournalViewModel::Ptr JournalViewModel::create ()
|
||||
{
|
||||
return boost::make_shared <JournalViewModelImpl> ();
|
||||
return std::make_shared <JournalViewModelImpl> ();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <functional>
|
||||
#include <stdint.h>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
@ -18,7 +17,7 @@ namespace MWGui
|
|||
/// game data store.
|
||||
struct JournalViewModel
|
||||
{
|
||||
typedef boost::shared_ptr <JournalViewModel> Ptr;
|
||||
typedef std::shared_ptr <JournalViewModel> Ptr;
|
||||
|
||||
typedef intptr_t QuestId;
|
||||
typedef intptr_t TopicId;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef MWGUI_JOURNAL_H
|
||||
#define MWGUI_JOURNAL_H
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace MWBase { class WindowManager; }
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace MWGui
|
|||
struct JournalWindow
|
||||
{
|
||||
/// construct a new instance of the one JournalWindow implementation
|
||||
static JournalWindow * create (boost::shared_ptr <JournalViewModel> Model, bool questList);
|
||||
static JournalWindow * create (std::shared_ptr <JournalViewModel> Model, bool questList);
|
||||
|
||||
/// destroy this instance of the JournalWindow implementation
|
||||
virtual ~JournalWindow () {};
|
||||
|
|
|
@ -252,7 +252,7 @@ namespace MWGui
|
|||
osg::ref_ptr<osg::Texture2D> tex = mLocalMapRender->getFogOfWarTexture(x, y);
|
||||
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->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 1.f, 1.f, 0.f));
|
||||
fogTextures.push_back(myguitex);
|
||||
|
@ -382,7 +382,7 @@ namespace MWGui
|
|||
osg::ref_ptr<osg::Texture2D> texture = mLocalMapRender->getMapTexture(mapX, mapY);
|
||||
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);
|
||||
box->setRenderItemTexture(guiTex.get());
|
||||
box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include "windowpinnablebase.hpp"
|
||||
|
||||
#include <components/esm/cellid.hpp>
|
||||
|
@ -130,7 +128,7 @@ namespace MWGui
|
|||
std::vector<MyGUI::ImageBox*> mMapWidgets;
|
||||
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 mFogTextures;
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <deque>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include "windowbase.hpp"
|
||||
|
||||
namespace MWGui
|
||||
|
@ -14,7 +12,7 @@ namespace MWGui
|
|||
class FadeOp
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<FadeOp> Ptr;
|
||||
typedef std::shared_ptr<FadeOp> Ptr;
|
||||
|
||||
FadeOp(ScreenFader * fader, float time, float targetAlpha);
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ namespace MWGui
|
|||
|
||||
if ((mFilter & Filter_OnlyUsableItems) && base.getClass().getScript(base).empty())
|
||||
{
|
||||
boost::shared_ptr<MWWorld::Action> actionOnUse = base.getClass().use(base);
|
||||
std::shared_ptr<MWWorld::Action> actionOnUse = base.getClass().use(base);
|
||||
if (!actionOnUse || actionOnUse->isNullAction())
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace MWMechanics
|
|||
bool mCombatMove;
|
||||
osg::Vec3f mLastTargetPos;
|
||||
const MWWorld::CellStore* mCell;
|
||||
boost::shared_ptr<Action> mCurrentAction;
|
||||
std::shared_ptr<Action> mCurrentAction;
|
||||
float mActionCooldown;
|
||||
float mStrength;
|
||||
bool mForceNoShortcut;
|
||||
|
@ -249,7 +249,7 @@ namespace MWMechanics
|
|||
actorClass.getCreatureStats(actor).setMovementFlag(CreatureStats::Flag_Run, true);
|
||||
|
||||
float& actionCooldown = storage.mActionCooldown;
|
||||
boost::shared_ptr<Action>& currentAction = storage.mCurrentAction;
|
||||
std::shared_ptr<Action>& currentAction = storage.mCurrentAction;
|
||||
|
||||
if (!forceFlee)
|
||||
{
|
||||
|
@ -512,7 +512,7 @@ namespace MWMechanics
|
|||
targetWeapon = *weaponSlot;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Action> targetWeaponAction (new ActionWeapon(targetWeapon));
|
||||
std::shared_ptr<Action> targetWeaponAction (new ActionWeapon(targetWeapon));
|
||||
|
||||
if (targetWeaponAction.get())
|
||||
{
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include "aipackage.hpp"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include "../mwworld/cellstore.hpp" // for Doors
|
||||
|
||||
#include "../mwbase/world.hpp"
|
||||
|
|
|
@ -709,14 +709,14 @@ namespace MWMechanics
|
|||
return mWeapon.get<ESM::Weapon>()->mBase;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Action> prepareNextAction(const MWWorld::Ptr &actor, const MWWorld::Ptr &enemy)
|
||||
std::shared_ptr<Action> prepareNextAction(const MWWorld::Ptr &actor, const MWWorld::Ptr &enemy)
|
||||
{
|
||||
Spells& spells = actor.getClass().getCreatureStats(actor).getSpells();
|
||||
|
||||
float bestActionRating = 0.f;
|
||||
float antiFleeRating = 0.f;
|
||||
// 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())
|
||||
{
|
||||
bestAction->prepare(actor);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef OPENMW_AICOMBAT_ACTION_H
|
||||
#define OPENMW_AICOMBAT_ACTION_H
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
|
||||
#include <components/esm/loadspel.hpp>
|
||||
|
||||
|
@ -100,7 +100,7 @@ namespace MWMechanics
|
|||
/// @note target may be empty
|
||||
float rateEffects (const ESM::EffectList& list, const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy);
|
||||
|
||||
boost::shared_ptr<Action> prepareNextAction (const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy);
|
||||
std::shared_ptr<Action> prepareNextAction (const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy);
|
||||
|
||||
float getDistanceMinusHalfExtents(const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy, bool minusZDist=false);
|
||||
float getMaxAttackDistance(const MWWorld::Ptr& actor);
|
||||
|
|
|
@ -199,7 +199,7 @@ namespace MWScript
|
|||
MWBase::Environment::get().getWindowManager()->useItem(*it);
|
||||
else
|
||||
{
|
||||
boost::shared_ptr<MWWorld::Action> action = it->getClass().use(*it);
|
||||
std::shared_ptr<MWWorld::Action> action = it->getClass().use(*it);
|
||||
// No equip sound for actors other than the player
|
||||
action->execute(ptr, true);
|
||||
}
|
||||
|
|
|
@ -478,7 +478,7 @@ namespace MWScript
|
|||
|
||||
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);
|
||||
if (action->getTarget() != MWWorld::Ptr() && action->getTarget() != ptr)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef GAME_SCRIPT_INTERPRETERCONTEXT_H
|
||||
#define GAME_SCRIPT_INTERPRETERCONTEXT_H
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <components/interpreter/context.hpp>
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
#include <deque>
|
||||
#include <map>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include <components/fallback/fallback.hpp>
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
#include <string>
|
||||
#include <typeinfo>
|
||||
#include <map>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
|
||||
#include "livecellref.hpp"
|
||||
#include "cellreflist.hpp"
|
||||
|
@ -67,7 +66,7 @@ namespace MWWorld
|
|||
// Even though fog actually belongs to the player and not cells,
|
||||
// it makes sense to store it here since we need it once for each cell.
|
||||
// Note this is NULL until the cell is explored to save some memory
|
||||
boost::shared_ptr<ESM::FogState> mFogState;
|
||||
std::shared_ptr<ESM::FogState> mFogState;
|
||||
|
||||
const ESM::Cell *mCell;
|
||||
State mState;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace MWWorld
|
||||
{
|
||||
std::map<std::string, boost::shared_ptr<Class> > Class::sClasses;
|
||||
std::map<std::string, std::shared_ptr<Class> > Class::sClasses;
|
||||
|
||||
Class::Class() {}
|
||||
|
||||
|
@ -108,14 +108,14 @@ namespace MWWorld
|
|||
throw std::runtime_error("class cannot be hit");
|
||||
}
|
||||
|
||||
boost::shared_ptr<Action> Class::activate (const Ptr& ptr, const Ptr& actor) const
|
||||
std::shared_ptr<Action> Class::activate (const Ptr& ptr, const Ptr& actor) const
|
||||
{
|
||||
return boost::shared_ptr<Action> (new NullAction);
|
||||
return std::shared_ptr<Action> (new NullAction);
|
||||
}
|
||||
|
||||
boost::shared_ptr<Action> Class::use (const Ptr& ptr) const
|
||||
std::shared_ptr<Action> Class::use (const Ptr& ptr) const
|
||||
{
|
||||
return boost::shared_ptr<Action> (new NullAction);
|
||||
return std::shared_ptr<Action> (new NullAction);
|
||||
}
|
||||
|
||||
ContainerStore& Class::getContainerStore (const Ptr& ptr) const
|
||||
|
@ -233,7 +233,7 @@ namespace MWWorld
|
|||
if (key.empty())
|
||||
throw std::logic_error ("Class::get(): attempting to get an empty key");
|
||||
|
||||
std::map<std::string, boost::shared_ptr<Class> >::const_iterator iter = sClasses.find (key);
|
||||
std::map<std::string, std::shared_ptr<Class> >::const_iterator iter = sClasses.find (key);
|
||||
|
||||
if (iter==sClasses.end())
|
||||
throw std::logic_error ("Class::get(): unknown class key: " + key);
|
||||
|
@ -246,7 +246,7 @@ namespace MWWorld
|
|||
throw std::runtime_error ("class does not support persistence");
|
||||
}
|
||||
|
||||
void Class::registerClass(const std::string& key, boost::shared_ptr<Class> instance)
|
||||
void Class::registerClass(const std::string& key, std::shared_ptr<Class> instance)
|
||||
{
|
||||
instance->mTypeName = key;
|
||||
sClasses.insert(std::make_pair(key, instance));
|
||||
|
@ -330,23 +330,23 @@ namespace MWWorld
|
|||
{
|
||||
}
|
||||
|
||||
boost::shared_ptr<Action> Class::defaultItemActivate(const Ptr &ptr, const Ptr &actor) const
|
||||
std::shared_ptr<Action> Class::defaultItemActivate(const Ptr &ptr, const Ptr &actor) const
|
||||
{
|
||||
if(!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
|
||||
return boost::shared_ptr<Action>(new NullAction());
|
||||
return std::shared_ptr<Action>(new NullAction());
|
||||
|
||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||
{
|
||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||
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);
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
boost::shared_ptr<MWWorld::Action> action(new ActionTake(ptr));
|
||||
std::shared_ptr<MWWorld::Action> action(new ActionTake(ptr));
|
||||
action->setSound(getUpSoundId(ptr));
|
||||
|
||||
return action;
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
#define GAME_MWWORLD_CLASS_H
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include "ptr.hpp"
|
||||
|
||||
namespace ESM
|
||||
|
@ -51,7 +50,7 @@ namespace MWWorld
|
|||
/// \brief Base class for referenceable esm records
|
||||
class Class
|
||||
{
|
||||
static std::map<std::string, boost::shared_ptr<Class> > sClasses;
|
||||
static std::map<std::string, std::shared_ptr<Class> > sClasses;
|
||||
|
||||
std::string mTypeName;
|
||||
|
||||
|
@ -63,7 +62,7 @@ namespace MWWorld
|
|||
|
||||
Class();
|
||||
|
||||
boost::shared_ptr<Action> defaultItemActivate(const Ptr &ptr, const Ptr &actor) const;
|
||||
std::shared_ptr<Action> defaultItemActivate(const Ptr &ptr, const Ptr &actor) const;
|
||||
///< Generate default action for activating inventory items
|
||||
|
||||
virtual Ptr copyToCellImpl(const ConstPtr &ptr, CellStore &cell) const;
|
||||
|
@ -139,10 +138,10 @@ namespace MWWorld
|
|||
///< \return Can the player activate this object?
|
||||
/// (default implementation: true if object's user-readable name is not empty, false otherwise)
|
||||
|
||||
virtual boost::shared_ptr<Action> activate (const Ptr& ptr, const Ptr& actor) const;
|
||||
virtual std::shared_ptr<Action> activate (const Ptr& ptr, const Ptr& actor) const;
|
||||
///< Generate action for activation (default implementation: return a null action).
|
||||
|
||||
virtual boost::shared_ptr<Action> use (const Ptr& ptr)
|
||||
virtual std::shared_ptr<Action> use (const Ptr& ptr)
|
||||
const;
|
||||
///< Generate action for using via inventory menu (default implementation: return a
|
||||
/// null action).
|
||||
|
@ -332,7 +331,7 @@ namespace MWWorld
|
|||
static const Class& get (const std::string& key);
|
||||
///< If there is no class for this \a key, an exception is thrown.
|
||||
|
||||
static void registerClass (const std::string& key, boost::shared_ptr<Class> instance);
|
||||
static void registerClass (const std::string& key, std::shared_ptr<Class> instance);
|
||||
|
||||
virtual int getBaseGold(const MWWorld::ConstPtr& ptr) const;
|
||||
|
||||
|
|
|
@ -3359,7 +3359,7 @@ namespace MWWorld
|
|||
|
||||
if (object.getRefData().activate())
|
||||
{
|
||||
boost::shared_ptr<MWWorld::Action> action = (object.getClass().activate(object, actor));
|
||||
std::shared_ptr<MWWorld::Action> action = (object.getClass().activate(object, actor));
|
||||
action->execute (actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef GAME_MWWORLD_WORLDIMP_H
|
||||
#define GAME_MWWORLD_WORLDIMP_H
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <osg/ref_ptr>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
@ -100,7 +98,7 @@ namespace MWWorld
|
|||
|
||||
std::string mCurrentWorldSpace;
|
||||
|
||||
boost::shared_ptr<ProjectileManager> mProjectileManager;
|
||||
std::shared_ptr<ProjectileManager> mProjectileManager;
|
||||
|
||||
bool mGodMode;
|
||||
bool mScriptsEnabled;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "bsa_file.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <cassert>
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "loadordererror.hpp"
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
QString ContentSelectorModel::LoadOrderError::sErrorToolTips[ErrorCode_LoadOrder] =
|
||||
{
|
||||
|
|
|
@ -6,12 +6,9 @@
|
|||
|
||||
#include <QMenu>
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QMessageBox>
|
||||
#include <QModelIndex>
|
||||
#include <QDir>
|
||||
#include <assert.h>
|
||||
#include <QtGui/QAbstractItemView>
|
||||
|
||||
ContentSelectorView::ContentSelector::ContentSelector(QWidget *parent) :
|
||||
QObject(parent)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include <cassert>
|
||||
|
||||
#include "npcstats.hpp"
|
||||
|
||||
#include "esmreader.hpp"
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
#define OPENMW_CONSTRAINEDFILESTREAM_H
|
||||
|
||||
#include <istream>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace Files
|
||||
{
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
#include <sstream>
|
||||
#include <map>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include "niffile.hpp"
|
||||
|
||||
namespace Nif
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#ifndef OPENMW_COMPONENTS_NIF_NIFSTREAM_HPP
|
||||
#define OPENMW_COMPONENTS_NIF_NIFSTREAM_HPP
|
||||
|
||||
#include <cassert>
|
||||
#include <stdint.h>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
#include <components/sceneutil/controller.hpp>
|
||||
#include <components/sceneutil/statesetupdater.hpp>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <set> //UVController
|
||||
|
||||
// FlipController
|
||||
|
@ -101,8 +99,6 @@ namespace NifOsg
|
|||
// cache for next time
|
||||
mLastHighKey = it;
|
||||
|
||||
assert (it != keys.begin()); // Shouldn't happen, was checked at beginning of this function
|
||||
|
||||
typename MapT::MapType::const_iterator last = --it;
|
||||
mLastLowKey = last;
|
||||
float aLastTime = last->first;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "imagemanager.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <osgDB/Registry>
|
||||
#include <osg/GLExtensions>
|
||||
|
||||
#include <components/vfs/manager.hpp>
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "resourcesystem.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "scenemanager.hpp"
|
||||
#include "imagemanager.hpp"
|
||||
#include "niffilemanager.hpp"
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
#include <osg/Texture2D>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace osg
|
||||
{
|
||||
class Texture2D;
|
||||
|
|
4
extern/osg-ffmpeg-videoplayer/videostate.cpp
vendored
4
extern/osg-ffmpeg-videoplayer/videostate.cpp
vendored
|
@ -1,7 +1,7 @@
|
|||
#include "videostate.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <osg/Texture2D>
|
||||
|
||||
|
@ -19,8 +19,6 @@ extern "C"
|
|||
#include <libavutil/time.h>
|
||||
#endif
|
||||
|
||||
#include <libavutil/mathematics.h>
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
|
||||
#define av_frame_alloc avcodec_alloc_frame
|
||||
#endif
|
||||
|
|
2
extern/osg-ffmpeg-videoplayer/videostate.hpp
vendored
2
extern/osg-ffmpeg-videoplayer/videostate.hpp
vendored
|
@ -5,8 +5,6 @@
|
|||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <OpenThreads/Thread>
|
||||
#include <OpenThreads/Mutex>
|
||||
#include <OpenThreads/Condition>
|
||||
|
|
Loading…
Reference in a new issue