mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-01 17:11:23 +00:00
Merge branch 'next' into quick_keys
This commit is contained in:
commit
5ebcaeb098
26 changed files with 910 additions and 866 deletions
|
@ -115,7 +115,9 @@ endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
find_library(CARBON_FRAMEWORK Carbon)
|
find_library(CARBON_FRAMEWORK Carbon)
|
||||||
target_link_libraries(openmw ${CARBON_FRAMEWORK})
|
find_library(COCOA_FRAMEWORK Cocoa)
|
||||||
|
find_library(IOKIT_FRAMEWORK IOKit)
|
||||||
|
target_link_libraries(openmw ${CARBON_FRAMEWORK} ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK})
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
if(DPKG_PROGRAM)
|
if(DPKG_PROGRAM)
|
||||||
|
|
|
@ -254,7 +254,6 @@ namespace MWBase
|
||||||
virtual bool toggleVanityMode(bool enable, bool force) = 0;
|
virtual bool toggleVanityMode(bool enable, bool force) = 0;
|
||||||
virtual void allowVanityMode(bool allow) = 0;
|
virtual void allowVanityMode(bool allow) = 0;
|
||||||
virtual void togglePlayerLooking(bool enable) = 0;
|
virtual void togglePlayerLooking(bool enable) = 0;
|
||||||
virtual bool isVanityEnabled() = 0;
|
|
||||||
|
|
||||||
virtual void renderPlayer() = 0;
|
virtual void renderPlayer() = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -63,10 +62,12 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Apparatus::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Apparatus::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
|
||||||
new MWWorld::ActionTake (ptr));
|
new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Apparatus::getScript (const MWWorld::Ptr& ptr) const
|
std::string Apparatus::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -66,10 +65,11 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Armor::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Armor::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
action->setSound(getUpSoundId(ptr));
|
||||||
new MWWorld::ActionTake (ptr));
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Armor::hasItemHealth (const MWWorld::Ptr& ptr) const
|
bool Armor::hasItemHealth (const MWWorld::Ptr& ptr) const
|
||||||
|
@ -271,9 +271,11 @@ namespace MWClass
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Armor::use (const MWWorld::Ptr& ptr) const
|
boost::shared_ptr<MWWorld::Action> Armor::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound (getUpSoundId(ptr), 1.0, 1.0);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionEquip(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr
|
MWWorld::Ptr
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -64,10 +63,11 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Clothing::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Clothing::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
action->setSound(getUpSoundId(ptr));
|
||||||
new MWWorld::ActionTake (ptr));
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Clothing::getScript (const MWWorld::Ptr& ptr) const
|
std::string Clothing::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
@ -222,9 +222,11 @@ namespace MWClass
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Clothing::use (const MWWorld::Ptr& ptr) const
|
boost::shared_ptr<MWWorld::Action> Clothing::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound (getUpSoundId(ptr), 1.0, 1.0);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionEquip(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr
|
MWWorld::Ptr
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -93,8 +92,9 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
// TODO check for key
|
// TODO check for key
|
||||||
std::cout << "Locked container" << std::endl;
|
std::cout << "Locked container" << std::endl;
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, lockedSound, 1.0, 1.0);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::NullAction);
|
||||||
return boost::shared_ptr<MWWorld::Action> (new MWWorld::NullAction);
|
action->setSound(lockedSound);
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -109,9 +109,10 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
// Trap activation goes here
|
// Trap activation goes here
|
||||||
std::cout << "Activated trap: " << ptr.getCellRef().trap << std::endl;
|
std::cout << "Activated trap: " << ptr.getCellRef().trap << std::endl;
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, trapActivationSound, 1.0, 1.0);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::NullAction);
|
||||||
|
action->setSound(trapActivationSound);
|
||||||
ptr.getCellRef().trap = "";
|
ptr.getCellRef().trap = "";
|
||||||
return boost::shared_ptr<MWWorld::Action> (new MWWorld::NullAction);
|
return action;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/player.hpp"
|
#include "../mwworld/player.hpp"
|
||||||
|
@ -80,17 +79,25 @@ namespace MWClass
|
||||||
// TODO check for key
|
// TODO check for key
|
||||||
// TODO report failure to player (message, sound?). Look up behaviour of original MW.
|
// TODO report failure to player (message, sound?). Look up behaviour of original MW.
|
||||||
std::cout << "Locked!" << std::endl;
|
std::cout << "Locked!" << std::endl;
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, lockedSound, 1.0, 1.0);
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (new MWWorld::NullAction);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::NullAction);
|
||||||
|
|
||||||
|
action->setSound(lockedSound);
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!ptr.getCellRef().trap.empty())
|
if(!ptr.getCellRef().trap.empty())
|
||||||
{
|
{
|
||||||
// Trap activation
|
// Trap activation
|
||||||
std::cout << "Activated trap: " << ptr.getCellRef().trap << std::endl;
|
std::cout << "Activated trap: " << ptr.getCellRef().trap << std::endl;
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D(ptr, trapActivationSound, 1.0, 1.0);
|
|
||||||
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::NullAction);
|
||||||
|
|
||||||
|
action->setSound(trapActivationSound);
|
||||||
ptr.getCellRef().trap = "";
|
ptr.getCellRef().trap = "";
|
||||||
return boost::shared_ptr<MWWorld::Action> (new MWWorld::NullAction);
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ref->ref.teleport)
|
if (ref->ref.teleport)
|
||||||
|
@ -99,11 +106,11 @@ namespace MWClass
|
||||||
/// \todo remove this if clause once ActionTeleport can also support other actors
|
/// \todo remove this if clause once ActionTeleport can also support other actors
|
||||||
if (MWBase::Environment::get().getWorld()->getPlayer().getPlayer()==actor)
|
if (MWBase::Environment::get().getWorld()->getPlayer().getPlayer()==actor)
|
||||||
{
|
{
|
||||||
// the player is using the door
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTeleport (ref->ref.destCell, ref->ref.doorDest));
|
||||||
// The reason this is not 3D is that it would get interrupted when you teleport
|
|
||||||
MWBase::Environment::get().getSoundManager()->playSound(openSound, 1.0, 1.0);
|
action->setSound(openSound);
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
|
||||||
new MWWorld::ActionTeleport (ref->ref.destCell, ref->ref.doorDest));
|
return action;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -117,8 +124,11 @@ namespace MWClass
|
||||||
// TODO return action for rotating the door
|
// TODO return action for rotating the door
|
||||||
|
|
||||||
// This is a little pointless, but helps with testing
|
// This is a little pointless, but helps with testing
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, openSound, 1.0, 1.0);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::NullAction);
|
||||||
return boost::shared_ptr<MWWorld::Action> (new MWWorld::NullAction);
|
|
||||||
|
action->setSound(openSound);
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -62,10 +61,11 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Ingredient::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Ingredient::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
action->setSound(getUpSoundId(ptr));
|
||||||
new MWWorld::ActionTake (ptr));
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Ingredient::getScript (const MWWorld::Ptr& ptr) const
|
std::string Ingredient::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
|
|
@ -94,10 +94,11 @@ namespace MWClass
|
||||||
if (!(ref->base->data.flags & ESM::Light::Carry))
|
if (!(ref->base->data.flags & ESM::Light::Carry))
|
||||||
return boost::shared_ptr<MWWorld::Action> (new MWWorld::NullAction);
|
return boost::shared_ptr<MWWorld::Action> (new MWWorld::NullAction);
|
||||||
|
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
action->setSound(getUpSoundId(ptr));
|
||||||
new MWWorld::ActionTake (ptr));
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Light::getScript (const MWWorld::Ptr& ptr) const
|
std::string Light::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
@ -191,9 +192,11 @@ namespace MWClass
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Light::use (const MWWorld::Ptr& ptr) const
|
boost::shared_ptr<MWWorld::Action> Light::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound (getUpSoundId(ptr), 1.0, 1.0);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionEquip(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr
|
MWWorld::Ptr
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -64,10 +63,11 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Lockpick::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Lockpick::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
action->setSound(getUpSoundId(ptr));
|
||||||
new MWWorld::ActionTake (ptr));
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Lockpick::getScript (const MWWorld::Ptr& ptr) const
|
std::string Lockpick::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
@ -160,9 +160,11 @@ namespace MWClass
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Lockpick::use (const MWWorld::Ptr& ptr) const
|
boost::shared_ptr<MWWorld::Action> Lockpick::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound (getUpSoundId(ptr), 1.0, 1.0);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionEquip(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr
|
MWWorld::Ptr
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -67,10 +66,11 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Miscellaneous::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Miscellaneous::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
action->setSound(getUpSoundId(ptr));
|
||||||
new MWWorld::ActionTake (ptr));
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Miscellaneous::getScript (const MWWorld::Ptr& ptr) const
|
std::string Miscellaneous::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -64,10 +63,12 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Potion::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Potion::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
|
||||||
new MWWorld::ActionTake (ptr));
|
new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
|
action->setSound (getUpSoundId(ptr));
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Potion::getScript (const MWWorld::Ptr& ptr) const
|
std::string Potion::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -63,10 +62,11 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Probe::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Probe::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
action->setSound(getUpSoundId(ptr));
|
||||||
new MWWorld::ActionTake (ptr));
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Probe::getScript (const MWWorld::Ptr& ptr) const
|
std::string Probe::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
@ -159,9 +159,11 @@ namespace MWClass
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Probe::use (const MWWorld::Ptr& ptr) const
|
boost::shared_ptr<MWWorld::Action> Probe::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound (getUpSoundId(ptr), 1.0, 1.0);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionEquip(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr
|
MWWorld::Ptr
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -62,10 +61,11 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Repair::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Repair::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
action->setSound(getUpSoundId(ptr));
|
||||||
new MWWorld::ActionTake (ptr));
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Repair::getScript (const MWWorld::Ptr& ptr) const
|
std::string Repair::getScript (const MWWorld::Ptr& ptr) const
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -64,10 +63,11 @@ namespace MWClass
|
||||||
boost::shared_ptr<MWWorld::Action> Weapon::activate (const MWWorld::Ptr& ptr,
|
boost::shared_ptr<MWWorld::Action> Weapon::activate (const MWWorld::Ptr& ptr,
|
||||||
const MWWorld::Ptr& actor) const
|
const MWWorld::Ptr& actor) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (ptr, getUpSoundId(ptr), 1.0, 1.0, MWBase::SoundManager::Play_NoTrack);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTake (ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action> (
|
action->setSound(getUpSoundId(ptr));
|
||||||
new MWWorld::ActionTake (ptr));
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Weapon::hasItemHealth (const MWWorld::Ptr& ptr) const
|
bool Weapon::hasItemHealth (const MWWorld::Ptr& ptr) const
|
||||||
|
@ -360,9 +360,11 @@ namespace MWClass
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> Weapon::use (const MWWorld::Ptr& ptr) const
|
boost::shared_ptr<MWWorld::Action> Weapon::use (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound (getUpSoundId(ptr), 1.0, 1.0);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
|
||||||
|
|
||||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionEquip(ptr));
|
action->setSound(getUpSoundId(ptr));
|
||||||
|
|
||||||
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr
|
MWWorld::Ptr
|
||||||
|
|
|
@ -424,8 +424,15 @@ namespace MWInput
|
||||||
bool InputManager::keyPressed( const OIS::KeyEvent &arg )
|
bool InputManager::keyPressed( const OIS::KeyEvent &arg )
|
||||||
{
|
{
|
||||||
mInputCtrl->keyPressed (arg);
|
mInputCtrl->keyPressed (arg);
|
||||||
|
unsigned int text = arg.text;
|
||||||
|
#ifdef __APPLE__ // filter \016 symbol for F-keys on OS X
|
||||||
|
if ((arg.key >= OIS::KC_F1 && arg.key <= OIS::KC_F10) ||
|
||||||
|
(arg.key >= OIS::KC_F11 && arg.key <= OIS::KC_F15)) {
|
||||||
|
text = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MyGUI::InputManager::getInstance().injectKeyPress(MyGUI::KeyCode::Enum(arg.key), arg.text);
|
MyGUI::InputManager::getInstance().injectKeyPress(MyGUI::KeyCode::Enum(arg.key), text);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,10 +107,6 @@ namespace MWRender
|
||||||
void getSightAngles(float &pitch, float &yaw);
|
void getSightAngles(float &pitch, float &yaw);
|
||||||
|
|
||||||
void togglePlayerLooking(bool enable);
|
void togglePlayerLooking(bool enable);
|
||||||
|
|
||||||
bool isVanityEnabled() {
|
|
||||||
return mVanity.enabled;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,10 +68,6 @@ class RenderingManager: private RenderingInterface, public Ogre::WindowEventList
|
||||||
return mPlayer->toggleVanityMode(enable, force);
|
return mPlayer->toggleVanityMode(enable, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isVanityEnabled() {
|
|
||||||
return mPlayer->isVanityEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
void allowVanityMode(bool allow) {
|
void allowVanityMode(bool allow) {
|
||||||
mPlayer->allowVanityMode(allow);
|
mPlayer->allowVanityMode(allow);
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,6 +209,8 @@ namespace MWScript
|
||||||
|
|
||||||
class OpToggleVanityMode : public Interpreter::Opcode0
|
class OpToggleVanityMode : public Interpreter::Opcode0
|
||||||
{
|
{
|
||||||
|
static bool sActivate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void execute(Interpreter::Runtime &runtime)
|
virtual void execute(Interpreter::Runtime &runtime)
|
||||||
|
@ -219,16 +221,17 @@ namespace MWScript
|
||||||
MWBase::World *world =
|
MWBase::World *world =
|
||||||
MWBase::Environment::get().getWorld();
|
MWBase::Environment::get().getWorld();
|
||||||
|
|
||||||
bool value = !world->isVanityEnabled();
|
if (world->toggleVanityMode(sActivate, true)) {
|
||||||
if (world->toggleVanityMode(value, true)) {
|
|
||||||
context.report(
|
context.report(
|
||||||
(value) ? "Vanity Mode -> On" : "Vanity Mode -> Off"
|
(sActivate) ? "Vanity Mode -> On" : "Vanity Mode -> Off"
|
||||||
);
|
);
|
||||||
|
sActivate = !sActivate;
|
||||||
} else {
|
} else {
|
||||||
context.report("Vanity Mode -> No");
|
context.report("Vanity Mode -> No");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
bool OpToggleVanityMode::sActivate = true;
|
||||||
|
|
||||||
const int opcodeXBox = 0x200000c;
|
const int opcodeXBox = 0x200000c;
|
||||||
const int opcodeOnActivate = 0x200000d;
|
const int opcodeOnActivate = 0x200000d;
|
||||||
|
|
|
@ -2,17 +2,31 @@
|
||||||
#include "action.hpp"
|
#include "action.hpp"
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
|
#include "../mwbase/world.hpp"
|
||||||
|
|
||||||
#include "../mwbase/soundmanager.hpp"
|
#include "../mwbase/soundmanager.hpp"
|
||||||
|
|
||||||
MWWorld::Action::Action() {}
|
MWWorld::Action::Action (bool teleport) : mTeleport (teleport)
|
||||||
|
{}
|
||||||
|
|
||||||
MWWorld::Action::~Action() {}
|
MWWorld::Action::~Action() {}
|
||||||
|
|
||||||
void MWWorld::Action::execute (const Ptr& actor)
|
void MWWorld::Action::execute (const Ptr& actor)
|
||||||
{
|
{
|
||||||
if (!mSoundId.empty())
|
if (!mSoundId.empty())
|
||||||
|
{
|
||||||
|
if (mTeleport == true)
|
||||||
|
{
|
||||||
|
//this is a teleport action, so we need to call playSound
|
||||||
|
MWBase::Environment::get().getSoundManager()->playSound(mSoundId, 1.0, 1.0,
|
||||||
|
MWBase::SoundManager::Play_NoTrack);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D (actor, mSoundId, 1.0, 1.0,
|
MWBase::Environment::get().getSoundManager()->playSound3D (actor, mSoundId, 1.0, 1.0,
|
||||||
MWBase::SoundManager::Play_NoTrack);
|
MWBase::SoundManager::Play_NoTrack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
executeImp (actor);
|
executeImp (actor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace MWWorld
|
||||||
class Action
|
class Action
|
||||||
{
|
{
|
||||||
std::string mSoundId;
|
std::string mSoundId;
|
||||||
|
bool mTeleport;
|
||||||
|
|
||||||
// not implemented
|
// not implemented
|
||||||
Action (const Action& action);
|
Action (const Action& action);
|
||||||
|
@ -20,7 +21,8 @@ namespace MWWorld
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Action();
|
Action (bool teleport = false);
|
||||||
|
///< \param teleport action will teleport the actor
|
||||||
|
|
||||||
virtual ~Action();
|
virtual ~Action();
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,9 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
ActionTeleport::ActionTeleport (const std::string& cellName,
|
ActionTeleport::ActionTeleport (const std::string& cellName,
|
||||||
const ESM::Position& position)
|
const ESM::Position& position)
|
||||||
: mCellName (cellName), mPosition (position)
|
: Action (true), mCellName (cellName), mPosition (position)
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void ActionTeleport::executeImp (const Ptr& actor)
|
void ActionTeleport::executeImp (const Ptr& actor)
|
||||||
{
|
{
|
||||||
|
|
|
@ -298,10 +298,6 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void renderPlayer();
|
virtual void renderPlayer();
|
||||||
|
|
||||||
virtual bool isVanityEnabled() {
|
|
||||||
return mRendering->isVanityEnabled();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -16,6 +16,7 @@ Artem Kotsynyak (greye)
|
||||||
athile
|
athile
|
||||||
BrotherBrick
|
BrotherBrick
|
||||||
Cris Mihalache (Mirceam)
|
Cris Mihalache (Mirceam)
|
||||||
|
Douglas Diniz (Dgdiniz)
|
||||||
Eli2
|
Eli2
|
||||||
gugus / gus
|
gugus / gus
|
||||||
Jacob Essex (Yacoby)
|
Jacob Essex (Yacoby)
|
||||||
|
|
|
@ -112,6 +112,7 @@ Bug #341: Building with Ogre Debug libraries does not use debug version of plugi
|
||||||
Bug #347: Crash when running openmw with --start="XYZ"
|
Bug #347: Crash when running openmw with --start="XYZ"
|
||||||
Bug #353: FindMyGUI.cmake breaks path on Windows
|
Bug #353: FindMyGUI.cmake breaks path on Windows
|
||||||
Bug #359: WindowManager throws exception at destruction
|
Bug #359: WindowManager throws exception at destruction
|
||||||
|
Bug #364: Laggy input on OS X due to bug in Ogre's event pump implementation
|
||||||
Feature #33: Allow objects to cross cell-borders
|
Feature #33: Allow objects to cross cell-borders
|
||||||
Feature #59: Dropping Items (replaced stopgap implementation with a proper one)
|
Feature #59: Dropping Items (replaced stopgap implementation with a proper one)
|
||||||
Feature #93: Main Menu
|
Feature #93: Main Menu
|
||||||
|
|
Loading…
Reference in a new issue