|
|
@ -4,6 +4,8 @@
|
|
|
|
#include <string>
|
|
|
|
#include <string>
|
|
|
|
#include <map>
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Interpreter
|
|
|
|
namespace Interpreter
|
|
|
|
{
|
|
|
|
{
|
|
|
|
class Context;
|
|
|
|
class Context;
|
|
|
@ -17,11 +19,6 @@ namespace MWSound
|
|
|
|
// not sure, if that is what Morrowind does. Beyond the dummy code in this class the script
|
|
|
|
// not sure, if that is what Morrowind does. Beyond the dummy code in this class the script
|
|
|
|
// system does not make any assumption about the number of sound effects.
|
|
|
|
// system does not make any assumption about the number of sound effects.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// - the handle argument below is the ogre handle. Since we can assume, that all objects
|
|
|
|
|
|
|
|
// that play a sound are in an active cell, they must have a handle. Sound script instructions
|
|
|
|
|
|
|
|
// that reference objects not in an active cell will be taken care of long before the flow
|
|
|
|
|
|
|
|
// of control reached this class.
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// - all text-output (error messages and such) must be directed through the
|
|
|
|
// - all text-output (error messages and such) must be directed through the
|
|
|
|
// context.messageBox interface.
|
|
|
|
// context.messageBox interface.
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -35,16 +32,14 @@ namespace MWSound
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
void say (const std::string& handle, const std::string& filename,
|
|
|
|
void say (MWWorld::Ptr reference, const std::string& filename,
|
|
|
|
const std::string& text, Interpreter::Context& context);
|
|
|
|
const std::string& text, Interpreter::Context& context);
|
|
|
|
///< Make an actor say some text.
|
|
|
|
///< Make an actor say some text.
|
|
|
|
/// \param handle Handle as returned from render-subsystem
|
|
|
|
|
|
|
|
/// \param filename name of a sound file in "Sound/Vo/" in the data directory.
|
|
|
|
/// \param filename name of a sound file in "Sound/Vo/" in the data directory.
|
|
|
|
/// \param text Subtitle
|
|
|
|
/// \param text Subtitle
|
|
|
|
|
|
|
|
|
|
|
|
bool sayDone (const std::string& handle, Interpreter::Context& context) const;
|
|
|
|
bool sayDone (MWWorld::Ptr reference, Interpreter::Context& context) const;
|
|
|
|
///< Is actor not speaking?
|
|
|
|
///< Is actor not speaking?
|
|
|
|
/// \param handle Handle as returned from render-subsystem
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void streamMusic (const std::string& filename, Interpreter::Context& context);
|
|
|
|
void streamMusic (const std::string& filename, Interpreter::Context& context);
|
|
|
|
///< Play a soundifle
|
|
|
|
///< Play a soundifle
|
|
|
@ -54,20 +49,17 @@ namespace MWSound
|
|
|
|
Interpreter::Context& context);
|
|
|
|
Interpreter::Context& context);
|
|
|
|
///< Play a sound, independently of 3D-position
|
|
|
|
///< Play a sound, independently of 3D-position
|
|
|
|
|
|
|
|
|
|
|
|
void playSound3D (const std::string& handle, const std::string& soundId,
|
|
|
|
void playSound3D (MWWorld::Ptr reference, const std::string& soundId,
|
|
|
|
float volume, float pitch, Interpreter::Context& context);
|
|
|
|
float volume, float pitch, Interpreter::Context& context);
|
|
|
|
///< Play a sound from an object
|
|
|
|
///< Play a sound from an object
|
|
|
|
/// \param handle Handle as returned from render-subsystem
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void stopSound3D (const std::string& handle, const std::string& soundId,
|
|
|
|
void stopSound3D (MWWorld::Ptr reference, const std::string& soundId,
|
|
|
|
Interpreter::Context& context);
|
|
|
|
Interpreter::Context& context);
|
|
|
|
///< Stop the given object from playing the given sound.
|
|
|
|
///< Stop the given object from playing the given sound.
|
|
|
|
/// \param handle Handle as returned from render-subsystem
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool getSoundPlaying (const std::string& handle, const std::string& soundId,
|
|
|
|
bool getSoundPlaying (MWWorld::Ptr reference, const std::string& soundId,
|
|
|
|
Interpreter::Context& context) const;
|
|
|
|
Interpreter::Context& context) const;
|
|
|
|
///< Is the given sound currently playing on the given object?
|
|
|
|
///< Is the given sound currently playing on the given object?
|
|
|
|
/// \param handle Handle as returned from render-subsystem
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|