Merged: From sound_dev to default (Summary: Sound CSheetId implementation, improved manual rolloff function performance)
This commit is contained in:
commit
5b22c91c93
45 changed files with 1100 additions and 264 deletions
|
@ -21,6 +21,7 @@
|
||||||
#include "nel/misc/string_mapper.h"
|
#include "nel/misc/string_mapper.h"
|
||||||
#include "nel/3d/ps_located.h"
|
#include "nel/3d/ps_located.h"
|
||||||
#include "nel/3d/ps_attrib.h"
|
#include "nel/3d/ps_attrib.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,13 +64,13 @@ public:
|
||||||
virtual void step(TPSProcessPass pass);
|
virtual void step(TPSProcessPass pass);
|
||||||
|
|
||||||
/// set the name of the sound
|
/// set the name of the sound
|
||||||
void setSoundName(const NLMISC::TStringId &soundName)
|
void setSoundName(const NLMISC::CSheetId &soundName)
|
||||||
{
|
{
|
||||||
_SoundName = soundName;
|
_SoundName = soundName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// get the name of the sound
|
/// get the name of the sound
|
||||||
const NLMISC::TStringId &getSoundName(void) const
|
const NLMISC::CSheetId &getSoundName(void) const
|
||||||
{
|
{
|
||||||
return _SoundName;
|
return _SoundName;
|
||||||
}
|
}
|
||||||
|
@ -161,7 +162,7 @@ protected:
|
||||||
void removeAllSources();
|
void removeAllSources();
|
||||||
|
|
||||||
CPSAttrib<UPSSoundInstance *> _Sounds;
|
CPSAttrib<UPSSoundInstance *> _Sounds;
|
||||||
NLMISC::TStringId _SoundName;
|
NLMISC::CSheetId _SoundName;
|
||||||
float _Gain;
|
float _Gain;
|
||||||
CPSAttribMaker<float> * _GainScheme;
|
CPSAttribMaker<float> * _GainScheme;
|
||||||
float _Pitch;
|
float _Pitch;
|
||||||
|
|
|
@ -162,7 +162,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
/// inherited from IPSSoundServer
|
/// inherited from IPSSoundServer
|
||||||
UPSSoundInstance *createSound(const NLMISC::TStringId &soundName, bool spawned = true)
|
UPSSoundInstance *createSound(const NLMISC::CSheetId &soundName, bool spawned = true)
|
||||||
{
|
{
|
||||||
if (!_AudioMixer)
|
if (!_AudioMixer)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/string_mapper.h"
|
#include "nel/misc/string_mapper.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace NLMISC
|
namespace NLMISC
|
||||||
|
@ -50,7 +51,7 @@ struct UPSSoundServer
|
||||||
* \param spawn true if the sound must be spawned e.g it continues after this interface is removed
|
* \param spawn true if the sound must be spawned e.g it continues after this interface is removed
|
||||||
* \param cb useful only for spawned sound, it tells when a spawned sound has been removed
|
* \param cb useful only for spawned sound, it tells when a spawned sound has been removed
|
||||||
*/
|
*/
|
||||||
virtual UPSSoundInstance *createSound(const NLMISC::TStringId &soundName, bool spawn = false) = 0;
|
virtual UPSSoundInstance *createSound(const NLMISC::CSheetId &soundName, bool spawn = false) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,12 @@ public :
|
||||||
*/
|
*/
|
||||||
explicit CSheetId( const std::string& sheetName );
|
explicit CSheetId( const std::string& sheetName );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor, uses defaultType as extension when sheetName
|
||||||
|
* contains no file extension.
|
||||||
|
*/
|
||||||
|
explicit CSheetId( const std::string& sheetName, const std::string &defaultType );
|
||||||
|
|
||||||
// build from a string and returns true if the build succeed
|
// build from a string and returns true if the build succeed
|
||||||
bool buildSheetId(const std::string& sheetName);
|
bool buildSheetId(const std::string& sheetName);
|
||||||
|
|
||||||
|
@ -141,6 +147,7 @@ public :
|
||||||
* Serial
|
* Serial
|
||||||
*/
|
*/
|
||||||
void serial(NLMISC::IStream &f) throw(NLMISC::EStream);
|
void serial(NLMISC::IStream &f) throw(NLMISC::EStream);
|
||||||
|
void serialString(NLMISC::IStream &f, const std::string &defaultType = "") throw(NLMISC::EStream);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the list of valid sheet ids with their associated file names
|
* Display the list of valid sheet ids with their associated file names
|
||||||
|
@ -221,7 +228,16 @@ private :
|
||||||
static void loadSheetAlias ();
|
static void loadSheetAlias ();
|
||||||
static void cbFileChange (const std::string &filename);
|
static void cbFileChange (const std::string &filename);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When initialized without sheet_id.bin, the sheet id are assigned
|
||||||
|
* dynamically. Separate maps are used, because in sheet_id.bin
|
||||||
|
* mode it uses static maps optimized during load.
|
||||||
|
*/
|
||||||
static bool _DontHaveSheetKnowledge;
|
static bool _DontHaveSheetKnowledge;
|
||||||
|
static std::map<std::string, uint32> _DevTypeNameToId;
|
||||||
|
/// outer vector is type, inner vector is sheet id
|
||||||
|
static std::vector<std::vector<std::string> > _DevSheetIdToName;
|
||||||
|
static std::map<std::string, uint32> _DevSheetNameToId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <nel/misc/time_nl.h>
|
#include <nel/misc/time_nl.h>
|
||||||
#include <nel/misc/stream.h>
|
#include <nel/misc/stream.h>
|
||||||
#include <nel/misc/singleton.h>
|
#include <nel/misc/singleton.h>
|
||||||
|
#include <nel/misc/sheet_id.h>
|
||||||
#include <nel/sound/u_audio_mixer.h>
|
#include <nel/sound/u_audio_mixer.h>
|
||||||
#include <nel/georges/u_form.h>
|
#include <nel/georges/u_form.h>
|
||||||
|
|
||||||
|
@ -180,7 +181,7 @@ public:
|
||||||
// Load environment sounds ; treeRoot can be null if you don't want an access to the envsounds
|
// Load environment sounds ; treeRoot can be null if you don't want an access to the envsounds
|
||||||
// virtual void loadEnvSounds( const char *filename, UEnvSound **treeRoot=NULL );
|
// virtual void loadEnvSounds( const char *filename, UEnvSound **treeRoot=NULL );
|
||||||
/// Get a TSoundId from a name (returns NULL if not found)
|
/// Get a TSoundId from a name (returns NULL if not found)
|
||||||
virtual TSoundId getSoundId( const NLMISC::TStringId &name );
|
virtual TSoundId getSoundId( const NLMISC::CSheetId &name );
|
||||||
|
|
||||||
/// Gets the group controller for the given group tree path with separator '/', if it doesn't exist yet it will be created.
|
/// Gets the group controller for the given group tree path with separator '/', if it doesn't exist yet it will be created.
|
||||||
/// Examples: "music", "effects", "dialog", "music/background", "music/loading", "music/player", etcetera
|
/// Examples: "music", "effects", "dialog", "music/background", "music/loading", "music/player", etcetera
|
||||||
|
@ -192,7 +193,7 @@ public:
|
||||||
* pass a callback function that will be called (if not NULL) just before deleting the spawned
|
* pass a callback function that will be called (if not NULL) just before deleting the spawned
|
||||||
* source.
|
* source.
|
||||||
*/
|
*/
|
||||||
virtual USource *createSource( const NLMISC::TStringId &name, bool spawn=false, TSpawnEndCallback cb=NULL, void *cbUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL);
|
virtual USource *createSource( const NLMISC::CSheetId &name, bool spawn=false, TSpawnEndCallback cb=NULL, void *cbUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL);
|
||||||
/// Add a logical sound source (by sound id). To remove a source, just delete it. See createSource(const char*)
|
/// Add a logical sound source (by sound id). To remove a source, just delete it. See createSource(const char*)
|
||||||
virtual USource *createSource( TSoundId id, bool spawn=false, TSpawnEndCallback cb=NULL, void *cbUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL);
|
virtual USource *createSource( TSoundId id, bool spawn=false, TSpawnEndCallback cb=NULL, void *cbUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL);
|
||||||
/// Add a source which was created by an EnvSound
|
/// Add a source which was created by an EnvSound
|
||||||
|
@ -223,7 +224,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
/// Return the names of the sounds (call this method after loadSounds())
|
/// Return the names of the sounds (call this method after loadSounds())
|
||||||
virtual void getSoundNames( std::vector<NLMISC::TStringId> &names ) const;
|
virtual void getSoundNames( std::vector<NLMISC::CSheetId> &names ) const;
|
||||||
/// Return the number of mixing tracks (voices)
|
/// Return the number of mixing tracks (voices)
|
||||||
virtual uint getPolyphony() const { return (uint)_Tracks.size(); }
|
virtual uint getPolyphony() const { return (uint)_Tracks.size(); }
|
||||||
/// Return the number of sources instance.
|
/// Return the number of sources instance.
|
||||||
|
@ -444,7 +445,7 @@ private:
|
||||||
/// Witch parameter to control
|
/// Witch parameter to control
|
||||||
TControledParamId ParamId;
|
TControledParamId ParamId;
|
||||||
/// The controled sounds names.
|
/// The controled sounds names.
|
||||||
std::vector<NLMISC::TStringId> SoundNames;
|
std::vector<NLMISC::CSheetId> SoundNames;
|
||||||
/// Current parameter value
|
/// Current parameter value
|
||||||
float Value;
|
float Value;
|
||||||
/// All the sources controled by this variable
|
/// All the sources controled by this variable
|
||||||
|
|
|
@ -64,22 +64,12 @@ public:
|
||||||
/// Associtation clas for storage of sound / filter.
|
/// Associtation clas for storage of sound / filter.
|
||||||
struct TSoundInfo
|
struct TSoundInfo
|
||||||
{
|
{
|
||||||
NLMISC::TStringId SoundName;
|
NLMISC::CSheetId SoundName;
|
||||||
UAudioMixer::TBackgroundFlags Filter;
|
UAudioMixer::TBackgroundFlags Filter;
|
||||||
|
|
||||||
void serial(NLMISC::IStream &s)
|
void serial(NLMISC::IStream &s)
|
||||||
{
|
{
|
||||||
std::string soundName;
|
SoundName.serialString(s, "sound");
|
||||||
if (s.isReading())
|
|
||||||
{
|
|
||||||
s.serial(soundName);
|
|
||||||
SoundName = NLMISC::CStringMapper::map(soundName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
soundName = NLMISC::CStringMapper::unmap(SoundName);
|
|
||||||
s.serial(soundName);
|
|
||||||
}
|
|
||||||
s.serial(Filter);
|
s.serial(Filter);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -229,7 +229,7 @@ private:
|
||||||
struct TSoundData
|
struct TSoundData
|
||||||
{
|
{
|
||||||
/// The name of the sound.
|
/// The name of the sound.
|
||||||
NLMISC::TStringId SoundName;
|
NLMISC::CSheetId SoundName;
|
||||||
/// The reference to the sound.
|
/// The reference to the sound.
|
||||||
CSound *Sound;
|
CSound *Sound;
|
||||||
/// A source instance of the sound (may be NULL).
|
/// A source instance of the sound (may be NULL).
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/string_mapper.h"
|
#include "nel/misc/string_mapper.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
@ -253,9 +254,9 @@ private:
|
||||||
/// The current cluster playing source indexed with sound group id
|
/// The current cluster playing source indexed with sound group id
|
||||||
TClusterSoundCont _Sources;
|
TClusterSoundCont _Sources;
|
||||||
|
|
||||||
typedef CHashMap<NLMISC::TStringId, NLMISC::TStringId, NLMISC::CStringIdHashMapTraits> TStringStringMap;
|
typedef CHashMap<NLMISC::TStringId, NLMISC::CSheetId, NLMISC::CStringIdHashMapTraits> TStringSheetMap;
|
||||||
/// The sound_group to sound assoc
|
/// The sound_group to sound assoc
|
||||||
TStringStringMap _SoundGroupToSound;
|
TStringSheetMap _SoundGroupToSound;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // NLSOUND
|
} // NLSOUND
|
||||||
|
|
|
@ -52,8 +52,8 @@ public:
|
||||||
|
|
||||||
const std::vector<uint32> &getSoundSeq() const { return _SoundSeq;}
|
const std::vector<uint32> &getSoundSeq() const { return _SoundSeq;}
|
||||||
const std::vector<uint32> &getDelaySeq() const { return _DelaySeq;}
|
const std::vector<uint32> &getDelaySeq() const { return _DelaySeq;}
|
||||||
NLMISC::TStringId getSound(uint index) const { return !_Sounds.empty() ? _Sounds[index%_Sounds.size()]:0;}
|
NLMISC::CSheetId getSound(uint index) const { return !_Sounds.empty() ? _Sounds[index%_Sounds.size()]:NLMISC::CSheetId::Unknown;}
|
||||||
const std::vector<NLMISC::TStringId> &getSounds() const { return _Sounds;}
|
const std::vector<NLMISC::CSheetId> &getSounds() const { return _Sounds;}
|
||||||
|
|
||||||
uint32 getFadeLength() const { return _XFadeLength;}
|
uint32 getFadeLength() const { return _XFadeLength;}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ private:
|
||||||
virtual float getMaxDistance() const;
|
virtual float getMaxDistance() const;
|
||||||
|
|
||||||
TPATTERN_MODE _PatternMode;
|
TPATTERN_MODE _PatternMode;
|
||||||
std::vector<NLMISC::TStringId> _Sounds;
|
std::vector<NLMISC::CSheetId> _Sounds;
|
||||||
float _TicksPerSeconds;
|
float _TicksPerSeconds;
|
||||||
std::vector<uint32> _SoundSeq;
|
std::vector<uint32> _SoundSeq;
|
||||||
/// Sequence of delay in millisec.
|
/// Sequence of delay in millisec.
|
||||||
|
|
|
@ -133,7 +133,7 @@ class CContextSoundContainer : public IContextSoundContainer
|
||||||
|
|
||||||
virtual void addSound(CSound *sound, const std::string &baseName)
|
virtual void addSound(CSound *sound, const std::string &baseName)
|
||||||
{
|
{
|
||||||
const std::string &patternName = NLMISC::CStringMapper::unmap(sound->getName());
|
const std::string &patternName = sound->getName().toString(); /*NLMISC::CStringMapper::unmap(sound->getName())*/;
|
||||||
nlassert(patternName.size() >= baseName.size());
|
nlassert(patternName.size() >= baseName.size());
|
||||||
|
|
||||||
std::string arg;
|
std::string arg;
|
||||||
|
@ -172,7 +172,7 @@ class CContextSoundContainer : public IContextSoundContainer
|
||||||
|
|
||||||
if (i != NbJoker)
|
if (i != NbJoker)
|
||||||
return;
|
return;
|
||||||
nlassertex(i==NbJoker, ("Error while adding sound '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str()));
|
nlassertex(i==NbJoker, ("Error while adding sound '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/));
|
||||||
|
|
||||||
sint randomValue = 0;
|
sint randomValue = 0;
|
||||||
if (UseRandom)
|
if (UseRandom)
|
||||||
|
@ -187,7 +187,7 @@ class CContextSoundContainer : public IContextSoundContainer
|
||||||
}
|
}
|
||||||
else if (!arg.empty())
|
else if (!arg.empty())
|
||||||
{
|
{
|
||||||
nlassertex (!ok, ("Error while adding sound '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str()));
|
nlassertex (!ok, ("Error while adding sound '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/));
|
||||||
// end of the argument.
|
// end of the argument.
|
||||||
NLMISC::fromString(arg, randomValue);
|
NLMISC::fromString(arg, randomValue);
|
||||||
arg.clear();
|
arg.clear();
|
||||||
|
@ -199,13 +199,13 @@ class CContextSoundContainer : public IContextSoundContainer
|
||||||
// read the potential last arg.
|
// read the potential last arg.
|
||||||
if (!arg.empty())
|
if (!arg.empty())
|
||||||
{
|
{
|
||||||
nlassertex (!ok, ("Error while adding sound '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str()));
|
nlassertex (!ok, ("Error while adding sound '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/));
|
||||||
// end of the argument.
|
// end of the argument.
|
||||||
NLMISC::fromString(arg, randomValue);
|
NLMISC::fromString(arg, randomValue);
|
||||||
arg.clear();
|
arg.clear();
|
||||||
ok = true;
|
ok = true;
|
||||||
}
|
}
|
||||||
nlassertex (ok, ("Error while adding sound '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str()));
|
nlassertex (ok, ("Error while adding sound '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -221,9 +221,9 @@ class CContextSoundContainer : public IContextSoundContainer
|
||||||
if (!ret.second)
|
if (!ret.second)
|
||||||
{
|
{
|
||||||
typename THashContextSound::iterator it = _ContextSounds.find(cm);
|
typename THashContextSound::iterator it = _ContextSounds.find(cm);
|
||||||
nlassertex(it != _ContextSounds.end(), ("Error wile adding soudn '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str()));
|
nlassertex(it != _ContextSounds.end(), ("Error wile adding soudn '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/));
|
||||||
|
|
||||||
nlwarning("Sound %s has the same context matcher as the sound %s", NLMISC::CStringMapper::unmap(sound->getName()).c_str(), NLMISC::CStringMapper::unmap(it->second->getName()).c_str());
|
nlwarning("Sound %s has the same context matcher as the sound %s", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/, it->second->getName().toString().c_str() /*NLMISC::CStringMapper::unmap(it->second->getName()).c_str()*/);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ class CContextSoundContainer : public IContextSoundContainer
|
||||||
typename THashContextSound::const_iterator first(_ContextSounds.begin()), last(_ContextSounds.end());
|
typename THashContextSound::const_iterator first(_ContextSounds.begin()), last(_ContextSounds.end());
|
||||||
for (; first != last; ++first)
|
for (; first != last; ++first)
|
||||||
{
|
{
|
||||||
subsounds.push_back(std::make_pair(NLMISC::CStringMapper::unmap(first->second->getName()), first->second));
|
subsounds.push_back(std::make_pair(first->second->getName().toString()/*NLMISC::CStringMapper::unmap(first->second->getName())*/, first->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "nel/misc/string_mapper.h"
|
#include "nel/misc/string_mapper.h"
|
||||||
#include "nel/sound/u_source.h"
|
#include "nel/sound/u_source.h"
|
||||||
#include "nel/georges/u_form_elm.h"
|
#include "nel/georges/u_form_elm.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace NLSOUND {
|
namespace NLSOUND {
|
||||||
|
@ -35,7 +36,7 @@ class CGroupController;
|
||||||
|
|
||||||
/// Sound names hash map
|
/// Sound names hash map
|
||||||
//typedef std::hash_map<std::string, CSound*> TSoundMap;
|
//typedef std::hash_map<std::string, CSound*> TSoundMap;
|
||||||
typedef CHashMap<NLMISC::TStringId, CSound*, NLMISC::CStringIdHashMapTraits> TSoundMap;
|
typedef CHashMap<NLMISC::CSheetId, CSound*, NLMISC::CStringIdHashMapTraits> TSoundMap;
|
||||||
|
|
||||||
/// Sound names set (for ambiant sounds)
|
/// Sound names set (for ambiant sounds)
|
||||||
typedef std::set<CSound*> TSoundSet;
|
typedef std::set<CSound*> TSoundSet;
|
||||||
|
@ -53,7 +54,7 @@ class CSound
|
||||||
friend class CAudioMixerUser;
|
friend class CAudioMixerUser;
|
||||||
public:
|
public:
|
||||||
/// Factory for specialized sound.
|
/// Factory for specialized sound.
|
||||||
static CSound *createSound(const std::string &filename, NLGEORGES::UFormElm& formRoot);
|
static CSound *createSound(const std::string &name, NLGEORGES::UFormElm& formRoot);
|
||||||
|
|
||||||
enum TSOUND_TYPE
|
enum TSOUND_TYPE
|
||||||
{
|
{
|
||||||
|
@ -99,7 +100,7 @@ public:
|
||||||
/// Return the length of the sound in ms
|
/// Return the length of the sound in ms
|
||||||
virtual uint32 getDuration() = 0;
|
virtual uint32 getDuration() = 0;
|
||||||
/// Return the name (must be unique)
|
/// Return the name (must be unique)
|
||||||
const NLMISC::TStringId& getName() const { return _Name; }
|
const NLMISC::CSheetId& getName() const { return _Name; }
|
||||||
|
|
||||||
/// Return the min distance (if detailed()) (default 1.0f if not implemented by sound type)
|
/// Return the min distance (if detailed()) (default 1.0f if not implemented by sound type)
|
||||||
virtual float getMinDistance() const { return _MinDist; }
|
virtual float getMinDistance() const { return _MinDist; }
|
||||||
|
@ -121,7 +122,8 @@ public:
|
||||||
|
|
||||||
bool operator<( const CSound& otherSound ) const
|
bool operator<( const CSound& otherSound ) const
|
||||||
{
|
{
|
||||||
return NLMISC::CStringMapper::unmap(_Name) < NLMISC::CStringMapper::unmap(otherSound._Name);
|
//return NLMISC::CStringMapper::unmap(_Name) < NLMISC::CStringMapper::unmap(otherSound._Name);
|
||||||
|
return _Name.toString() < otherSound._Name.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -142,7 +144,7 @@ protected:
|
||||||
float _MaxDist;
|
float _MaxDist;
|
||||||
|
|
||||||
// Sound name.
|
// Sound name.
|
||||||
NLMISC::TStringId _Name;
|
NLMISC::CSheetId _Name;
|
||||||
/// An optional user var controler.
|
/// An optional user var controler.
|
||||||
NLMISC::TStringId _UserVarControler;
|
NLMISC::TStringId _UserVarControler;
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "nel/misc/string_mapper.h"
|
#include "nel/misc/string_mapper.h"
|
||||||
#include "nel/3d/cluster.h"
|
#include "nel/3d/cluster.h"
|
||||||
#include "nel/sound/u_source.h"
|
#include "nel/sound/u_source.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
|
|
||||||
|
|
||||||
namespace NLMISC
|
namespace NLMISC
|
||||||
|
@ -31,7 +32,7 @@ namespace NLMISC
|
||||||
namespace NLSOUND {
|
namespace NLSOUND {
|
||||||
|
|
||||||
|
|
||||||
typedef std::set<NLMISC::TStringId> TMarkerSoundSet;
|
typedef std::set<NLMISC::CSheetId> TMarkerSoundSet;
|
||||||
|
|
||||||
class UAudioMixer;
|
class UAudioMixer;
|
||||||
|
|
||||||
|
@ -50,13 +51,13 @@ public:
|
||||||
virtual float getTime() const { return _Time; }
|
virtual float getTime() const { return _Time; }
|
||||||
|
|
||||||
/** Add a new sound in the set of to-be-played sounds for this marker */
|
/** Add a new sound in the set of to-be-played sounds for this marker */
|
||||||
virtual void addSound(const NLMISC::TStringId &soundName);
|
virtual void addSound(const NLMISC::CSheetId &soundName);
|
||||||
|
|
||||||
/** Remove a sound */
|
/** Remove a sound */
|
||||||
virtual void removeSound(const NLMISC::TStringId &soundName);
|
virtual void removeSound(const NLMISC::CSheetId &soundName);
|
||||||
|
|
||||||
/** Return the set of sounds of this marker */
|
/** Return the set of sounds of this marker */
|
||||||
virtual void getSounds(std::vector<NLMISC::TStringId> &sounds);
|
virtual void getSounds(std::vector<NLMISC::CSheetId> &sounds);
|
||||||
|
|
||||||
/** Play all the sounds of this marker */
|
/** Play all the sounds of this marker */
|
||||||
virtual void play(UAudioMixer* mixer, NL3D::CCluster *cluster, CSoundContext &context);
|
virtual void play(UAudioMixer* mixer, NL3D::CCluster *cluster, CSoundContext &context);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/string_mapper.h"
|
#include "nel/misc/string_mapper.h"
|
||||||
#include "nel/sound/audio_mixer_user.h"
|
#include "nel/sound/audio_mixer_user.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace NLSOUND {
|
namespace NLSOUND {
|
||||||
|
@ -67,16 +68,16 @@ public:
|
||||||
bool isLoaded();
|
bool isLoaded();
|
||||||
|
|
||||||
/// Return a sound corresponding to a name.
|
/// Return a sound corresponding to a name.
|
||||||
CSound *getSound(const NLMISC::TStringId &name);
|
CSound *getSound(const NLMISC::CSheetId &sheetId);
|
||||||
|
|
||||||
/// Return the names of the sounds
|
/// Return the names of the sounds
|
||||||
void getNames( std::vector<NLMISC::TStringId> &names );
|
void getNames( std::vector<NLMISC::CSheetId> &sheetIds );
|
||||||
|
|
||||||
/// Return the number of sounds in this bank.
|
/// Return the number of sounds in this bank.
|
||||||
uint countSounds();
|
uint countSounds();
|
||||||
|
|
||||||
void addSound(CSound *sound);
|
void addSound(CSound *sound);
|
||||||
void removeSound(const NLMISC::TStringId &name);
|
void removeSound(const NLMISC::CSheetId &sheetId);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -88,7 +89,8 @@ private:
|
||||||
typedef CHashMap<NLMISC::TStringId, TSimpleSoundContainer, NLMISC::CStringIdHashMapTraits> TBufferAssocContainer;
|
typedef CHashMap<NLMISC::TStringId, TSimpleSoundContainer, NLMISC::CStringIdHashMapTraits> TBufferAssocContainer;
|
||||||
/// Sound names hash map
|
/// Sound names hash map
|
||||||
// typedef std::hash_map<std::string, CSound*> TSoundTable;
|
// typedef std::hash_map<std::string, CSound*> TSoundTable;
|
||||||
typedef CHashMap<NLMISC::TStringId, CSound*, NLMISC::CStringIdHashMapTraits> TSoundTable;
|
// typedef CHashMap<NLMISC::CSheetId, CSound*, NLMISC::CSheetIdHashMapTraits> TSoundTable;
|
||||||
|
typedef std::vector<CSound *> TSoundTable; // list the sheets by shortId of the sheetId
|
||||||
|
|
||||||
/// Assoc from buffer to sound. Used for sound unloading.
|
/// Assoc from buffer to sound. Used for sound unloading.
|
||||||
TBufferAssocContainer _BufferAssoc;
|
TBufferAssocContainer _BufferAssoc;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "nel/3d/cluster.h"
|
#include "nel/3d/cluster.h"
|
||||||
#include "nel/sound/sound.h"
|
#include "nel/sound/sound.h"
|
||||||
#include "nel/sound/group_controller.h"
|
#include "nel/sound/group_controller.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
|
|
||||||
namespace NLSOUND {
|
namespace NLSOUND {
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/string_mapper.h"
|
#include "nel/misc/string_mapper.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
#include "nel/sound/u_source.h"
|
#include "nel/sound/u_source.h"
|
||||||
#include "nel/sound/u_group_controller.h"
|
#include "nel/sound/u_group_controller.h"
|
||||||
#include "nel/ligo/primitive.h"
|
#include "nel/ligo/primitive.h"
|
||||||
|
@ -284,7 +285,7 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/// Get a TSoundId from a name (returns NULL if not found)
|
/// Get a TSoundId from a name (returns NULL if not found)
|
||||||
virtual TSoundId getSoundId( const NLMISC::TStringId &name ) = 0;
|
virtual TSoundId getSoundId( const NLMISC::CSheetId &name ) = 0;
|
||||||
|
|
||||||
/// Gets the group controller for the given group tree path with separator '/', if it doesn't exist yet it will be created.
|
/// Gets the group controller for the given group tree path with separator '/', if it doesn't exist yet it will be created.
|
||||||
/// Examples: "music", "effects", "dialog", "music/background", "music/loading", "music/player", etcetera
|
/// Examples: "music", "effects", "dialog", "music/background", "music/loading", "music/player", etcetera
|
||||||
|
@ -296,7 +297,7 @@ public:
|
||||||
* pass a callback function that will be called (if not NULL) just before deleting the spawned
|
* pass a callback function that will be called (if not NULL) just before deleting the spawned
|
||||||
* source.
|
* source.
|
||||||
*/
|
*/
|
||||||
virtual USource *createSource(const NLMISC::TStringId &name, bool spawn=false, TSpawnEndCallback cb=NULL, void *callbackUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL) = 0;
|
virtual USource *createSource(const NLMISC::CSheetId &name, bool spawn=false, TSpawnEndCallback cb=NULL, void *callbackUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL) = 0;
|
||||||
/// Add a logical sound source (by sound id). To remove a source, just delete it. See createSource(const char*)
|
/// Add a logical sound source (by sound id). To remove a source, just delete it. See createSource(const char*)
|
||||||
virtual USource *createSource(TSoundId id, bool spawn=false, TSpawnEndCallback cb=NULL, void *callbackUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL) = 0;
|
virtual USource *createSource(TSoundId id, bool spawn=false, TSpawnEndCallback cb=NULL, void *callbackUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL) = 0;
|
||||||
|
|
||||||
|
@ -320,7 +321,7 @@ public:
|
||||||
//@{
|
//@{
|
||||||
//@name Statistic and utility methods
|
//@name Statistic and utility methods
|
||||||
/// Fill a vector with the names of all loaded sounds.
|
/// Fill a vector with the names of all loaded sounds.
|
||||||
virtual void getSoundNames( std::vector<NLMISC::TStringId> &names ) const = 0;
|
virtual void getSoundNames( std::vector<NLMISC::CSheetId> &names ) const = 0;
|
||||||
/// Return the number of mixing tracks (voices)
|
/// Return the number of mixing tracks (voices)
|
||||||
virtual uint getPolyphony() const = 0;
|
virtual uint getPolyphony() const = 0;
|
||||||
/// Return the number of sources
|
/// Return the number of sources
|
||||||
|
|
|
@ -49,6 +49,7 @@ void Init()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
CSheetId::initWithoutSheet();
|
||||||
|
|
||||||
CPath::addSearchPath(NL_SOUND_DATA"/data", true, false);
|
CPath::addSearchPath(NL_SOUND_DATA"/data", true, false);
|
||||||
|
|
||||||
|
@ -100,7 +101,7 @@ USource *OnAddSource( const char *name, float x, float y, float z )
|
||||||
/*
|
/*
|
||||||
* Create a source with sound 'name', and set some of its initial properties, if successful
|
* Create a source with sound 'name', and set some of its initial properties, if successful
|
||||||
*/
|
*/
|
||||||
USource *source = AudioMixer->createSource( CStringMapper::map(name) );
|
USource *source = AudioMixer->createSource(CSheetId(name, "sound"));
|
||||||
if ( source != NULL )
|
if ( source != NULL )
|
||||||
{
|
{
|
||||||
source->setPos( CVector(x,y,z) );
|
source->setPos( CVector(x,y,z) );
|
||||||
|
|
|
@ -62,6 +62,7 @@ static void initSample()
|
||||||
{
|
{
|
||||||
if (!INelContext::isContextInitialised())
|
if (!INelContext::isContextInitialised())
|
||||||
new CApplicationContext();
|
new CApplicationContext();
|
||||||
|
CSheetId::initWithoutSheet();
|
||||||
CPath::addSearchPath(NL_SOUND_DATA"/data", true, false);
|
CPath::addSearchPath(NL_SOUND_DATA"/data", true, false);
|
||||||
|
|
||||||
printf("Sample demonstrating OGG playback using stream file .sound sheets.");
|
printf("Sample demonstrating OGG playback using stream file .sound sheets.");
|
||||||
|
@ -97,7 +98,7 @@ static void initSample()
|
||||||
|
|
||||||
//NLMISC::CHTimer::startBench();
|
//NLMISC::CHTimer::startBench();
|
||||||
|
|
||||||
s_Source = s_AudioMixer->createSource(CStringMapper::map("stream_file"));
|
s_Source = s_AudioMixer->createSource(CSheetId("stream_file.sound"));
|
||||||
nlassert(s_Source);
|
nlassert(s_Source);
|
||||||
s_StreamFileSource = dynamic_cast<CStreamFileSource *>(s_Source);
|
s_StreamFileSource = dynamic_cast<CStreamFileSource *>(s_Source);
|
||||||
nlassert(s_StreamFileSource);
|
nlassert(s_StreamFileSource);
|
||||||
|
|
|
@ -59,6 +59,7 @@ static void initSample()
|
||||||
{
|
{
|
||||||
if (!INelContext::isContextInitialised())
|
if (!INelContext::isContextInitialised())
|
||||||
new CApplicationContext();
|
new CApplicationContext();
|
||||||
|
CSheetId::initWithoutSheet();
|
||||||
CPath::addSearchPath(NL_SOUND_DATA"/database/build/", true, false);
|
CPath::addSearchPath(NL_SOUND_DATA"/database/build/", true, false);
|
||||||
|
|
||||||
printf("Sample demonstrating OGG playback using UStreamSource.");
|
printf("Sample demonstrating OGG playback using UStreamSource.");
|
||||||
|
@ -87,7 +88,7 @@ static void initSample()
|
||||||
|
|
||||||
//NLMISC::CHTimer::startBench();
|
//NLMISC::CHTimer::startBench();
|
||||||
|
|
||||||
USource *source = s_AudioMixer->createSource(CStringMapper::map("default_stream"));
|
USource *source = s_AudioMixer->createSource(CSheetId("default_stream.sound"));
|
||||||
nlassert(source);
|
nlassert(source);
|
||||||
s_StreamSource = dynamic_cast<UStreamSource *>(source);
|
s_StreamSource = dynamic_cast<UStreamSource *>(source);
|
||||||
nlassert(s_StreamSource);
|
nlassert(s_StreamSource);
|
||||||
|
|
|
@ -43,7 +43,7 @@ CPSSound::CPSSound() : _Gain(1.f),
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_CPSSound)
|
NL_PS_FUNC(CPSSound_CPSSound)
|
||||||
if (CParticleSystem::getSerializeIdentifierFlag()) _Name = std::string("sound");
|
if (CParticleSystem::getSerializeIdentifierFlag()) _Name = std::string("sound");
|
||||||
_SoundName = NLMISC::CStringMapper::emptyId();
|
_SoundName = NLMISC::CSheetId::Unknown /*NLMISC::CStringMapper::emptyId()*/;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
|
@ -261,17 +261,16 @@ void CPSSound::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
CPSLocatedBindable::serial(f);
|
CPSLocatedBindable::serial(f);
|
||||||
// version 3 : added option to keep original pitch from the .sound
|
// version 3 : added option to keep original pitch from the .sound
|
||||||
sint ver = f.serialVersion(3);
|
sint ver = f.serialVersion(3);
|
||||||
if (f.isReading())
|
|
||||||
{
|
// FIXME: CPSSound is reserialized from the _ParticleSystemProto
|
||||||
std::string soundName;
|
// cache when a non-_Shared particle system is instanced, this
|
||||||
f.serial(soundName);
|
// causes unnecessary sheet id lookups from string.
|
||||||
_SoundName = NLMISC::CStringMapper::map(soundName);
|
// SLN1: Serialize as uint32, but this requires the editor to know
|
||||||
}
|
// the correct sheet id (and thus requires a built sheet_id.bin).
|
||||||
else
|
// SLN2: Create a tool that reserializes all ps with sound sheet id
|
||||||
{
|
// instead of sheet names, based on a global flag, and serialize
|
||||||
std::string soundName = NLMISC::CStringMapper::unmap(_SoundName);
|
// a flag that specifies if the ps is serialized with id or name.
|
||||||
f.serial(soundName);
|
_SoundName.serialString(f, "sound");
|
||||||
}
|
|
||||||
|
|
||||||
sint32 nbSounds;
|
sint32 nbSounds;
|
||||||
bool hasScheme;
|
bool hasScheme;
|
||||||
|
|
|
@ -40,6 +40,15 @@ vector<std::string> CSheetId::_FileExtensions;
|
||||||
bool CSheetId::_Initialised=false;
|
bool CSheetId::_Initialised=false;
|
||||||
bool CSheetId::_RemoveUnknownSheet=true;
|
bool CSheetId::_RemoveUnknownSheet=true;
|
||||||
bool CSheetId::_DontHaveSheetKnowledge = false;
|
bool CSheetId::_DontHaveSheetKnowledge = false;
|
||||||
|
std::map<std::string, uint32> CSheetId::_DevTypeNameToId;
|
||||||
|
std::vector<std::vector<std::string> > CSheetId::_DevSheetIdToName;
|
||||||
|
std::map<std::string, uint32> CSheetId::_DevSheetNameToId;
|
||||||
|
|
||||||
|
#define NL_TEMP_YUBO_NO_SOUND_SHEET_ID
|
||||||
|
|
||||||
|
#ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID
|
||||||
|
namespace { bool a_NoSoundSheetId = false; }
|
||||||
|
#endif
|
||||||
|
|
||||||
const CSheetId CSheetId::Unknown(0);
|
const CSheetId CSheetId::Unknown(0);
|
||||||
|
|
||||||
|
@ -103,6 +112,18 @@ CSheetId::CSheetId( const string& sheetName )
|
||||||
|
|
||||||
} // CSheetId //
|
} // CSheetId //
|
||||||
|
|
||||||
|
CSheetId::CSheetId( const std::string& sheetName, const std::string &defaultType )
|
||||||
|
{
|
||||||
|
if (CFile::getExtension(sheetName) == "" && defaultType != "")
|
||||||
|
{
|
||||||
|
std::string withType = sheetName + "." + defaultType;
|
||||||
|
*this = CSheetId(withType);
|
||||||
|
// nldebug("SHEETID: Constructing CSheetId from name '%s' without explicit type, defaulting as '%s' to '%s'", sheetName.c_str(), defaultType.c_str(), withType.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*this = CSheetId(sheetName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
// Build
|
// Build
|
||||||
|
@ -111,7 +132,41 @@ CSheetId::CSheetId( const string& sheetName )
|
||||||
bool CSheetId::buildSheetId(const std::string& sheetName)
|
bool CSheetId::buildSheetId(const std::string& sheetName)
|
||||||
{
|
{
|
||||||
nlassert(_Initialised);
|
nlassert(_Initialised);
|
||||||
nlassert(!_DontHaveSheetKnowledge);
|
|
||||||
|
// When no sheet_id.bin is loaded, use dynamically assigned IDs.
|
||||||
|
if (_DontHaveSheetKnowledge)
|
||||||
|
{
|
||||||
|
std::string sheetNameLc = toLower(sheetName);
|
||||||
|
std::map<std::string, uint32>::iterator it = _DevSheetNameToId.find(sheetNameLc);
|
||||||
|
if (it == _DevSheetNameToId.end())
|
||||||
|
{
|
||||||
|
// Create a new dynamic sheet ID.
|
||||||
|
// nldebug("SHEETID: Creating a dynamic sheet id for '%s'", sheetName.c_str());
|
||||||
|
std::string sheetType = CFile::getExtension(sheetNameLc);
|
||||||
|
std::string sheetName = CFile::getFilenameWithoutExtension(sheetNameLc);
|
||||||
|
std::map<std::string, uint32>::iterator tit = _DevTypeNameToId.find(sheetType);
|
||||||
|
uint32 typeId;
|
||||||
|
if (tit == _DevTypeNameToId.end())
|
||||||
|
{
|
||||||
|
_FileExtensions.push_back(sheetType);
|
||||||
|
_DevSheetIdToName.push_back(std::vector<std::string>());
|
||||||
|
typeId = _FileExtensions.size() - 1;
|
||||||
|
_DevTypeNameToId[sheetType] = typeId;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
typeId = tit->second;
|
||||||
|
}
|
||||||
|
_DevSheetIdToName[typeId].push_back(sheetName);
|
||||||
|
_Id.IdInfos.Type = typeId;
|
||||||
|
_Id.IdInfos.Id = _DevSheetIdToName[typeId].size() - 1;
|
||||||
|
// nldebug("SHEETID: Type %i, id %i, sheetid %i", _Id.IdInfos.Type, _Id.IdInfos.Id, _Id.Id);
|
||||||
|
_DevSheetNameToId[sheetNameLc] = _Id.Id;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
_Id.Id = it->second;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// try looking up the sheet name in _SheetNameToId
|
// try looking up the sheet name in _SheetNameToId
|
||||||
CStaticMap<CChar,uint32,CCharComp>::const_iterator itId;
|
CStaticMap<CChar,uint32,CCharComp>::const_iterator itId;
|
||||||
|
@ -143,6 +198,27 @@ bool CSheetId::buildSheetId(const std::string& sheetName)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID
|
||||||
|
if (a_NoSoundSheetId && sheetName.find(".sound") != std::string::npos)
|
||||||
|
{
|
||||||
|
std::string sheetNameLc = toLower(sheetName);
|
||||||
|
std::map<std::string, uint32>::iterator it = _DevSheetNameToId.find(sheetNameLc);
|
||||||
|
if (it == _DevSheetNameToId.end())
|
||||||
|
{
|
||||||
|
uint32 typeId = ((1 << (NL_SHEET_ID_TYPE_BITS)) - 1);
|
||||||
|
// nldebug("SHEETID: Creating a temporary sheet id for '%s'", sheetName.c_str());
|
||||||
|
_DevSheetIdToName[0].push_back(sheetName);
|
||||||
|
_Id.IdInfos.Type = typeId;
|
||||||
|
_Id.IdInfos.Id = _DevSheetIdToName[0].size() - 1;
|
||||||
|
_DevSheetNameToId[sheetNameLc] = _Id.Id;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
_Id.Id = it->second;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,7 +359,11 @@ void CSheetId::init(bool removeUnknownSheet)
|
||||||
{
|
{
|
||||||
// allow multiple calls to init in case libraries depending on sheetid call this init from their own
|
// allow multiple calls to init in case libraries depending on sheetid call this init from their own
|
||||||
if (_Initialised)
|
if (_Initialised)
|
||||||
|
{
|
||||||
|
if (_DontHaveSheetKnowledge)
|
||||||
|
nlinfo("SHEETID: CSheetId is already initialized without sheet_id.bin");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// CFile::addFileChangeCallback ("sheet_id.bin", cbFileChange);
|
// CFile::addFileChangeCallback ("sheet_id.bin", cbFileChange);
|
||||||
|
|
||||||
|
@ -292,13 +372,33 @@ void CSheetId::init(bool removeUnknownSheet)
|
||||||
loadSheetId ();
|
loadSheetId ();
|
||||||
_Initialised=true;
|
_Initialised=true;
|
||||||
|
|
||||||
|
#ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID
|
||||||
|
if (typeFromFileExtension("sound") == std::numeric_limits<uint32>::max())
|
||||||
|
{
|
||||||
|
nlwarning("SHEETID: Loading without known sound sheet id, please update sheet_id.bin with .sound sheets");
|
||||||
|
nlassert(_FileExtensions.size() == 1 << (NL_SHEET_ID_TYPE_BITS));
|
||||||
|
_FileExtensions[((1 << (NL_SHEET_ID_TYPE_BITS)) - 1)] == "sound";
|
||||||
|
_DevSheetIdToName.push_back(std::vector<std::string>());
|
||||||
|
a_NoSoundSheetId = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // init //
|
} // init //
|
||||||
|
|
||||||
void CSheetId::initWithoutSheet()
|
void CSheetId::initWithoutSheet()
|
||||||
{
|
{
|
||||||
|
if (_Initialised)
|
||||||
|
{
|
||||||
|
nlassert(_DontHaveSheetKnowledge);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_Initialised = true;
|
_Initialised = true;
|
||||||
_DontHaveSheetKnowledge = true;
|
_DontHaveSheetKnowledge = true;
|
||||||
|
|
||||||
|
// Initialize id 0,0 as unknown.unknown
|
||||||
|
CSheetId unknownunknown = CSheetId("unknown.unknown");
|
||||||
|
nlassert(unknownunknown == CSheetId::Unknown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -310,6 +410,10 @@ void CSheetId::initWithoutSheet()
|
||||||
void CSheetId::uninit()
|
void CSheetId::uninit()
|
||||||
{
|
{
|
||||||
delete [] _AllStrings.Ptr;
|
delete [] _AllStrings.Ptr;
|
||||||
|
_FileExtensions.clear();
|
||||||
|
_DevTypeNameToId.clear();
|
||||||
|
_DevSheetIdToName.clear();
|
||||||
|
_DevSheetNameToId.clear();
|
||||||
} // uninit //
|
} // uninit //
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
@ -343,23 +447,9 @@ CSheetId& CSheetId::operator=( const CSheetId& sheetId )
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
CSheetId& CSheetId::operator=( const string& sheetName )
|
CSheetId& CSheetId::operator=( const string& sheetName )
|
||||||
{
|
{
|
||||||
nlassert(_Initialised);
|
|
||||||
nlassert(!_DontHaveSheetKnowledge);
|
|
||||||
|
|
||||||
CStaticMap<CChar,uint32,CCharComp>::const_iterator itId;
|
if (!buildSheetId(sheetName))
|
||||||
CChar c;
|
*this = Unknown;
|
||||||
c.Ptr = new char [sheetName.size()+1];
|
|
||||||
strcpy(c.Ptr, sheetName.c_str());
|
|
||||||
toLower(c.Ptr);
|
|
||||||
|
|
||||||
itId = _SheetNameToId.find (c);
|
|
||||||
delete [] c.Ptr;
|
|
||||||
if( itId != _SheetNameToId.end() )
|
|
||||||
{
|
|
||||||
_Id.Id = (*itId).second;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
*this = Unknown;
|
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
} // operator= //
|
} // operator= //
|
||||||
|
@ -408,6 +498,13 @@ string CSheetId::toString(bool ifNotFoundUseNumericId) const
|
||||||
{
|
{
|
||||||
if (!_Initialised) init(false);
|
if (!_Initialised) init(false);
|
||||||
|
|
||||||
|
if (_DontHaveSheetKnowledge)
|
||||||
|
{
|
||||||
|
// FIXME: When someone punches in a fake sheet id this will
|
||||||
|
// fail.
|
||||||
|
return _DevSheetIdToName[_Id.IdInfos.Type][_Id.IdInfos.Id];
|
||||||
|
}
|
||||||
|
|
||||||
CStaticMap<uint32,CChar>::const_iterator itStr = _SheetIdToName.find (_Id.Id);
|
CStaticMap<uint32,CChar>::const_iterator itStr = _SheetIdToName.find (_Id.Id);
|
||||||
if( itStr != _SheetIdToName.end() )
|
if( itStr != _SheetIdToName.end() )
|
||||||
{
|
{
|
||||||
|
@ -415,6 +512,12 @@ string CSheetId::toString(bool ifNotFoundUseNumericId) const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID
|
||||||
|
if (a_NoSoundSheetId && _Id.IdInfos.Type == ((1 << (NL_SHEET_ID_TYPE_BITS)) - 1))
|
||||||
|
{
|
||||||
|
return _DevSheetIdToName[0][_Id.IdInfos.Id];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// This nlwarning is commented out because the loggers are mutexed, therefore
|
// This nlwarning is commented out because the loggers are mutexed, therefore
|
||||||
// you couldn't use toString() within a nlwarning().
|
// you couldn't use toString() within a nlwarning().
|
||||||
//nlwarning("<CSheetId::toString> The sheet %08x is not in sheet_id.bin",_Id.Id);
|
//nlwarning("<CSheetId::toString> The sheet %08x is not in sheet_id.bin",_Id.Id);
|
||||||
|
@ -432,6 +535,8 @@ string CSheetId::toString(bool ifNotFoundUseNumericId) const
|
||||||
|
|
||||||
void CSheetId::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CSheetId::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
|
nlassert(!_DontHaveSheetKnowledge);
|
||||||
|
|
||||||
f.serial( _Id.Id );
|
f.serial( _Id.Id );
|
||||||
|
|
||||||
#ifdef NL_DEBUG_SHEET_ID
|
#ifdef NL_DEBUG_SHEET_ID
|
||||||
|
@ -443,6 +548,24 @@ void CSheetId::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSheetId::serialString(NLMISC::IStream &f, const std::string &defaultType) throw(NLMISC::EStream)
|
||||||
|
{
|
||||||
|
nlassert(_Initialised);
|
||||||
|
|
||||||
|
if (f.isReading())
|
||||||
|
{
|
||||||
|
std::string sheetName;
|
||||||
|
f.serial(sheetName);
|
||||||
|
*this = CSheetId(sheetName, defaultType);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if this assert fails, you may be using an outdated id bin
|
||||||
|
nlassert(*this != CSheetId::Unknown);
|
||||||
|
std::string sheetName = toString();
|
||||||
|
f.serial(sheetName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "nel/misc/command.h"
|
#include "nel/misc/command.h"
|
||||||
#include "nel/misc/file.h"
|
#include "nel/misc/file.h"
|
||||||
#include "nel/misc/path.h"
|
#include "nel/misc/path.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
|
|
||||||
#include "nel/georges/u_form_loader.h"
|
#include "nel/georges/u_form_loader.h"
|
||||||
#include "nel/georges/u_form_elm.h"
|
#include "nel/georges/u_form_elm.h"
|
||||||
|
@ -467,7 +468,7 @@ void CAudioMixerUser::initDevice(const std::string &deviceName, const CInitInfo
|
||||||
nlwarning("AM: OptionSoftwareBuffer not available, forceSoftwareBuffer = false");
|
nlwarning("AM: OptionSoftwareBuffer not available, forceSoftwareBuffer = false");
|
||||||
forceSoftware = false; // not really needed, but set anyway in case this is still used later in this function
|
forceSoftware = false; // not really needed, but set anyway in case this is still used later in this function
|
||||||
}
|
}
|
||||||
if (manualRolloff && !_SoundDriver->getOption(ISoundDriver::OptionLocalBufferCopy))
|
if (manualRolloff && !_SoundDriver->getOption(ISoundDriver::OptionManualRolloff))
|
||||||
{
|
{
|
||||||
nlwarning("AM: OptionManualRolloff not available, manualRolloff = false");
|
nlwarning("AM: OptionManualRolloff not available, manualRolloff = false");
|
||||||
manualRolloff = false; // not really needed, but set anyway in case this is still used later in this function
|
manualRolloff = false; // not really needed, but set anyway in case this is still used later in this function
|
||||||
|
@ -970,10 +971,14 @@ void CAudioMixerUser::buildSampleBankList()
|
||||||
/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file.
|
/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file.
|
||||||
std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir)
|
std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir)
|
||||||
{
|
{
|
||||||
|
CGroupControllerRoot *tempRoot = NULL;
|
||||||
|
if (!CGroupControllerRoot::isInitialized())
|
||||||
|
tempRoot = new CGroupControllerRoot();
|
||||||
std::string dir = CPath::standardizePath(packedSheetDir, true);
|
std::string dir = CPath::standardizePath(packedSheetDir, true);
|
||||||
CSoundBank *soundBank = new CSoundBank();
|
CSoundBank *soundBank = new CSoundBank();
|
||||||
soundBank->load(dir, true);
|
soundBank->load(dir, true);
|
||||||
delete soundBank;
|
delete soundBank;
|
||||||
|
delete tempRoot;
|
||||||
return dir + "sounds.packed_sheets";
|
return dir + "sounds.packed_sheets";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1049,9 +1054,8 @@ public:
|
||||||
for (uint i=0; i<size; ++i)
|
for (uint i=0; i<size; ++i)
|
||||||
{
|
{
|
||||||
items->getArrayValue(soundName, i);
|
items->getArrayValue(soundName, i);
|
||||||
soundName = soundName.substr(0, soundName.find(".sound"));
|
nlassert(soundName.find(".sound") != std::string::npos);
|
||||||
|
cs.SoundNames.push_back(CSheetId(soundName));
|
||||||
cs.SoundNames.push_back(CStringMapper::map(soundName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cs.SoundNames.empty())
|
if (!cs.SoundNames.empty())
|
||||||
|
@ -1101,7 +1105,7 @@ void CAudioMixerUser::initUserVar()
|
||||||
TUserVarControlsContainer::iterator first(_UserVarControls.begin()), last(_UserVarControls.end());
|
TUserVarControlsContainer::iterator first(_UserVarControls.begin()), last(_UserVarControls.end());
|
||||||
for(; first != last; ++first)
|
for(; first != last; ++first)
|
||||||
{
|
{
|
||||||
std::vector<NLMISC::TStringId>::iterator first2(first->second.SoundNames.begin()), last2(first->second.SoundNames.end());
|
std::vector<NLMISC::CSheetId>::iterator first2(first->second.SoundNames.begin()), last2(first->second.SoundNames.end());
|
||||||
for (; first2 != last2; ++first2)
|
for (; first2 != last2; ++first2)
|
||||||
{
|
{
|
||||||
CSound *sound = getSoundId(*first2);
|
CSound *sound = getSoundId(*first2);
|
||||||
|
@ -1132,7 +1136,7 @@ void CAudioMixerUser::CControledSources::serial(NLMISC::IStream &s)
|
||||||
for (uint i=0; i<size; ++i)
|
for (uint i=0; i<size; ++i)
|
||||||
{
|
{
|
||||||
s.serial(soundName);
|
s.serial(soundName);
|
||||||
SoundNames.push_back(CStringMapper::map(soundName));
|
SoundNames.push_back(CSheetId(soundName, "sound"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1146,7 +1150,7 @@ void CAudioMixerUser::CControledSources::serial(NLMISC::IStream &s)
|
||||||
|
|
||||||
for (uint i=0; i<size; ++i)
|
for (uint i=0; i<size; ++i)
|
||||||
{
|
{
|
||||||
soundName = CStringMapper::unmap(SoundNames[i]);
|
soundName = SoundNames[i].toString();;
|
||||||
s.serial(soundName);
|
s.serial(soundName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1780,7 +1784,7 @@ void CAudioMixerUser::update()
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
||||||
TSoundId CAudioMixerUser::getSoundId( const NLMISC::TStringId &name )
|
TSoundId CAudioMixerUser::getSoundId( const NLMISC::CSheetId &name )
|
||||||
{
|
{
|
||||||
return _SoundBank->getSound(name);
|
return _SoundBank->getSound(name);
|
||||||
}
|
}
|
||||||
|
@ -1894,7 +1898,7 @@ retrySound:
|
||||||
|
|
||||||
if (invalid)
|
if (invalid)
|
||||||
{
|
{
|
||||||
nlwarning("The sound %s contain an infinite recursion !", CStringMapper::unmap(id->getName()).c_str());
|
nlwarning("The sound %s contain an infinite recursion !", id->getName().toString().c_str()/*CStringMapper::unmap(id->getName()).c_str()*/);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2035,7 +2039,7 @@ retrySound:
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
||||||
USource *CAudioMixerUser::createSource( const NLMISC::TStringId &name, bool spawn, TSpawnEndCallback cb, void *userParam, NL3D::CCluster *cluster, CSoundContext *context, UGroupController *groupController)
|
USource *CAudioMixerUser::createSource( const NLMISC::CSheetId &name, bool spawn, TSpawnEndCallback cb, void *userParam, NL3D::CCluster *cluster, CSoundContext *context, UGroupController *groupController)
|
||||||
{
|
{
|
||||||
return createSource( getSoundId( name ), spawn, cb, userParam, cluster, context, groupController);
|
return createSource( getSoundId( name ), spawn, cb, userParam, cluster, context, groupController);
|
||||||
}
|
}
|
||||||
|
@ -2162,7 +2166,7 @@ bool CAudioMixerUser::unloadSampleBank(const std::string &name)
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
||||||
void CAudioMixerUser::getSoundNames( std::vector<NLMISC::TStringId> &names ) const
|
void CAudioMixerUser::getSoundNames( std::vector<NLMISC::CSheetId> &names ) const
|
||||||
{
|
{
|
||||||
_SoundBank->getNames(names);
|
_SoundBank->getNames(names);
|
||||||
}
|
}
|
||||||
|
@ -2312,7 +2316,6 @@ void CAudioMixerUser::getLoadedSampleBankInfo(std::vector<std::pair<std::strin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CAudioMixerUser::setListenerPos (const NLMISC::CVector &pos)
|
void CAudioMixerUser::setListenerPos (const NLMISC::CVector &pos)
|
||||||
{
|
{
|
||||||
_Listener.setPos(pos);
|
_Listener.setPos(pos);
|
||||||
|
|
|
@ -84,7 +84,8 @@ void CBackgroundSound::importForm(const std::string& filename, NLGEORGES::UFormE
|
||||||
// Read the sound name.
|
// Read the sound name.
|
||||||
std::string soundName;
|
std::string soundName;
|
||||||
psoundItem->getValueByName(soundName, "Sound");
|
psoundItem->getValueByName(soundName, "Sound");
|
||||||
sound.SoundName = CStringMapper::map(CFile::getFilenameWithoutExtension(soundName));
|
nlassert(soundName.find(".sound") != std::string::npos);
|
||||||
|
sound.SoundName = NLMISC::CSheetId(soundName);
|
||||||
|
|
||||||
|
|
||||||
// Read the environnement flag.
|
// Read the environnement flag.
|
||||||
|
@ -133,7 +134,7 @@ void CBackgroundSound::getSubSoundList(std::vector<std::pair<std::string, CSound
|
||||||
for (; first != last; ++first)
|
for (; first != last; ++first)
|
||||||
{
|
{
|
||||||
CSound *sound = mixer->getSoundId(first->SoundName);
|
CSound *sound = mixer->getSoundId(first->SoundName);
|
||||||
subsounds.push_back(make_pair(CStringMapper::unmap(first->SoundName), sound));
|
subsounds.push_back(make_pair(first->SoundName.toString()/*CStringMapper::unmap(first->SoundName)*/, sound));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ void CBackgroundSoundManager::addSound(const std::string &soundName, uint layerI
|
||||||
CAudioMixerUser *mixer = CAudioMixerUser::instance();
|
CAudioMixerUser *mixer = CAudioMixerUser::instance();
|
||||||
TSoundData sd;
|
TSoundData sd;
|
||||||
|
|
||||||
sd.SoundName = CStringMapper::map(soundName);
|
sd.SoundName = NLMISC::CSheetId(soundName, "sound"); // note: loaded from .primitive
|
||||||
sd.Sound = mixer->getSoundId(sd.SoundName);
|
sd.Sound = mixer->getSoundId(sd.SoundName);
|
||||||
sd.Source = 0;
|
sd.Source = 0;
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ void CBackgroundSoundManager::addSound(const std::string &soundName, uint layerI
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlwarning ("The sound '%s' can't be loaded", CStringMapper::unmap(sd.SoundName).c_str());
|
nlwarning ("The sound '%s' can't be loaded", sd.SoundName.toString().c_str()/*CStringMapper::unmap(sd.SoundName).c_str()*/);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1431,21 +1431,15 @@ void CBackgroundSoundManager::TBanksData::serial(NLMISC::IStream &s)
|
||||||
|
|
||||||
void CBackgroundSoundManager::TSoundData::serial(NLMISC::IStream &s)
|
void CBackgroundSoundManager::TSoundData::serial(NLMISC::IStream &s)
|
||||||
{
|
{
|
||||||
std::string str;
|
//std::string str;
|
||||||
|
SoundName.serialString(s, "sound");
|
||||||
if (s.isReading())
|
if (s.isReading())
|
||||||
{
|
{
|
||||||
CAudioMixerUser *mixer = CAudioMixerUser::instance();
|
CAudioMixerUser *mixer = CAudioMixerUser::instance();
|
||||||
s.serial(str);
|
|
||||||
SoundName = NLMISC::CStringMapper::map(str);
|
|
||||||
Sound = mixer->getSoundId(SoundName);
|
Sound = mixer->getSoundId(SoundName);
|
||||||
Source = NULL;
|
Source = NULL;
|
||||||
Selected = false;
|
Selected = false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
s.serial(const_cast<std::string&>(NLMISC::CStringMapper::unmap(SoundName)));
|
|
||||||
}
|
|
||||||
s.serial(MinBox);
|
s.serial(MinBox);
|
||||||
s.serial(MaxBox);
|
s.serial(MaxBox);
|
||||||
s.serial(Surface);
|
s.serial(Surface);
|
||||||
|
|
|
@ -70,7 +70,7 @@ float EAX_MATERIAL_PARAM[] =
|
||||||
class CSoundGroupSerializer
|
class CSoundGroupSerializer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::vector<std::pair<NLMISC::TStringId, NLMISC::TStringId> > _SoundGroupAssoc;
|
std::vector<std::pair<NLMISC::TStringId, NLMISC::CSheetId> > _SoundGroupAssoc;
|
||||||
|
|
||||||
// load the values using the george sheet (called by GEORGE::loadForm)
|
// load the values using the george sheet (called by GEORGE::loadForm)
|
||||||
void readGeorges (const NLMISC::CSmartPtr<NLGEORGES::UForm> &form, const std::string &/* name */)
|
void readGeorges (const NLMISC::CSmartPtr<NLGEORGES::UForm> &form, const std::string &/* name */)
|
||||||
|
@ -95,15 +95,9 @@ public:
|
||||||
item->getValueByName(soundGroup, ".SoundGroup");
|
item->getValueByName(soundGroup, ".SoundGroup");
|
||||||
item->getValueByName(sound, ".Sound");
|
item->getValueByName(sound, ".Sound");
|
||||||
|
|
||||||
string::size_type n = sound.rfind(".sound");
|
nlassert(sound.find(".sound") != std::string::npos);
|
||||||
|
|
||||||
if (n != string::npos)
|
_SoundGroupAssoc.push_back(make_pair(CStringMapper::map(soundGroup), CSheetId(sound)));
|
||||||
{
|
|
||||||
// remove the tailing .sound
|
|
||||||
sound = sound.substr(0, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
_SoundGroupAssoc.push_back(make_pair(CStringMapper::map(soundGroup), CStringMapper::map(sound)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
|
@ -125,24 +119,18 @@ public:
|
||||||
{
|
{
|
||||||
if (s.isReading())
|
if (s.isReading())
|
||||||
{
|
{
|
||||||
std::string soundGroup;
|
TStringId soundGroup;
|
||||||
std::string sound;
|
CSheetId sound;
|
||||||
|
|
||||||
s.serial(soundGroup);
|
CStringMapper::serialString(s, soundGroup);
|
||||||
s.serial(sound);
|
sound.serialString(s, "sound");
|
||||||
|
|
||||||
_SoundGroupAssoc.push_back(make_pair(CStringMapper::map(soundGroup), CStringMapper::map(sound)));
|
_SoundGroupAssoc.push_back(make_pair(soundGroup, sound));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string soundGroup;
|
CStringMapper::serialString(s, _SoundGroupAssoc[i].first);
|
||||||
std::string sound;
|
_SoundGroupAssoc[i].second.serialString(s, "sound");
|
||||||
|
|
||||||
soundGroup = CStringMapper::unmap(_SoundGroupAssoc[i].first);
|
|
||||||
sound = CStringMapper::unmap(_SoundGroupAssoc[i].second);
|
|
||||||
|
|
||||||
s.serial(soundGroup);
|
|
||||||
s.serial(sound);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -289,10 +277,10 @@ void CClusteredSound::update(const CVector &listenerPos, const CVector &/* view
|
||||||
|
|
||||||
// nldebug("Searching sound assoc for group [%s]", CStringMapper::unmap(soundGroup).c_str());
|
// nldebug("Searching sound assoc for group [%s]", CStringMapper::unmap(soundGroup).c_str());
|
||||||
|
|
||||||
TStringStringMap::iterator it2(_SoundGroupToSound.find(soundGroup));
|
TStringSheetMap::iterator it2(_SoundGroupToSound.find(soundGroup));
|
||||||
if (it2 != _SoundGroupToSound.end())
|
if (it2 != _SoundGroupToSound.end())
|
||||||
{
|
{
|
||||||
NLMISC::TStringId soundName = it2->second;
|
NLMISC::CSheetId soundName = it2->second;
|
||||||
CClusterSound cs;
|
CClusterSound cs;
|
||||||
|
|
||||||
// nldebug("Found the sound [%s] for sound group [%s]", CStringMapper::unmap(soundName).c_str(), CStringMapper::unmap(soundGroup).c_str());
|
// nldebug("Found the sound [%s] for sound group [%s]", CStringMapper::unmap(soundName).c_str(), CStringMapper::unmap(soundGroup).c_str());
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "nel/misc/path.h"
|
#include "nel/misc/path.h"
|
||||||
#include "nel/misc/common.h"
|
#include "nel/misc/common.h"
|
||||||
#include "nel/sound/audio_mixer_user.h"
|
#include "nel/sound/audio_mixer_user.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
@ -63,11 +64,11 @@ void CComplexSound::parseSequence(const std::string &str, std::vector<uint32> &s
|
||||||
void CComplexSound::getSubSoundList(std::vector<std::pair<std::string, CSound*> > &subsounds) const
|
void CComplexSound::getSubSoundList(std::vector<std::pair<std::string, CSound*> > &subsounds) const
|
||||||
{
|
{
|
||||||
CAudioMixerUser *mixer = CAudioMixerUser::instance();
|
CAudioMixerUser *mixer = CAudioMixerUser::instance();
|
||||||
std::vector<NLMISC::TStringId>::const_iterator first(_Sounds.begin()), last(_Sounds.end());
|
std::vector<NLMISC::CSheetId>::const_iterator first(_Sounds.begin()), last(_Sounds.end());
|
||||||
for (; first != last; ++first)
|
for (; first != last; ++first)
|
||||||
{
|
{
|
||||||
CSound *sound = mixer->getSoundId(*first);
|
CSound *sound = mixer->getSoundId(*first);
|
||||||
subsounds.push_back(make_pair(CStringMapper::unmap(*first), sound));
|
subsounds.push_back(make_pair((*first).toString()/*CStringMapper::unmap(*first)*/, sound));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +84,7 @@ uint32 CComplexSound::getDuration()
|
||||||
CAudioMixerUser *mixer = CAudioMixerUser::instance();
|
CAudioMixerUser *mixer = CAudioMixerUser::instance();
|
||||||
|
|
||||||
vector<sint32> durations;
|
vector<sint32> durations;
|
||||||
std::vector<NLMISC::TStringId>::iterator first(_Sounds.begin()), last(_Sounds.end());
|
std::vector<NLMISC::CSheetId>::iterator first(_Sounds.begin()), last(_Sounds.end());
|
||||||
for (; first != last; ++first)
|
for (; first != last; ++first)
|
||||||
{
|
{
|
||||||
CSound *sound = mixer->getSoundId(*first);
|
CSound *sound = mixer->getSoundId(*first);
|
||||||
|
@ -204,7 +205,7 @@ float CComplexSound::getMaxDistance() const
|
||||||
CComplexSound *This = const_cast<CComplexSound*>(this);
|
CComplexSound *This = const_cast<CComplexSound*>(this);
|
||||||
|
|
||||||
This->_MaxDist = 0.0f;
|
This->_MaxDist = 0.0f;
|
||||||
std::vector<NLMISC::TStringId>::const_iterator first(_Sounds.begin()), last(_Sounds.end());
|
std::vector<NLMISC::CSheetId>::const_iterator first(_Sounds.begin()), last(_Sounds.end());
|
||||||
|
|
||||||
for (; first != last; ++first)
|
for (; first != last; ++first)
|
||||||
{
|
{
|
||||||
|
@ -236,7 +237,7 @@ void CComplexSound::serial(NLMISC::IStream &s)
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
s.serial(name);
|
s.serial(name);
|
||||||
_Sounds.push_back(CStringMapper::map(name));
|
_Sounds.push_back(NLMISC::CSheetId(name, "sound"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -245,7 +246,7 @@ void CComplexSound::serial(NLMISC::IStream &s)
|
||||||
s.serial(nb);
|
s.serial(nb);
|
||||||
for (uint i=0; i<nb; ++i)
|
for (uint i=0; i<nb; ++i)
|
||||||
{
|
{
|
||||||
std::string name = CStringMapper::unmap(_Sounds[i]);
|
std::string name = _Sounds[i].toString();
|
||||||
s.serial(name);
|
s.serial(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -300,8 +301,8 @@ void CComplexSound::importForm(const std::string& filename, NLGEORGES::UFormElm&
|
||||||
string soundname;
|
string soundname;
|
||||||
if (psoundsArray->getArrayValue(soundname, i))
|
if (psoundsArray->getArrayValue(soundname, i))
|
||||||
{
|
{
|
||||||
soundname = CFile::getFilenameWithoutExtension(soundname);
|
nlassert(soundname.find(".sound") != std::string::npos);
|
||||||
_Sounds.push_back(CStringMapper::map(soundname));
|
_Sounds.push_back(NLMISC::CSheetId(soundname));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,9 +190,9 @@ void CComplexSource::playStuf()
|
||||||
case CComplexSound::MODE_ALL_IN_ONE:
|
case CComplexSound::MODE_ALL_IN_ONE:
|
||||||
{
|
{
|
||||||
// just spanw all the listed source.
|
// just spanw all the listed source.
|
||||||
const std::vector<NLMISC::TStringId> &sounds = _PatternSound->getSounds();
|
const std::vector<NLMISC::CSheetId> &sounds = _PatternSound->getSounds();
|
||||||
|
|
||||||
std::vector<NLMISC::TStringId>::const_iterator first(sounds.begin()), last(sounds.end());
|
std::vector<NLMISC::CSheetId>::const_iterator first(sounds.begin()), last(sounds.end());
|
||||||
|
|
||||||
if (_AllSources.empty())
|
if (_AllSources.empty())
|
||||||
{
|
{
|
||||||
|
@ -524,7 +524,7 @@ void CComplexSource::onUpdate()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no sound after, just set an event at end of current sound to stop the complex sound.
|
// no sound after, just set an event at end of current sound to stop the complex sound.
|
||||||
nldebug("Setting last event for sound %s in %u millisec.", CStringMapper::unmap(_Source1->getSound()->getName()).c_str(), _Source1->getSound()->getDuration());
|
nldebug("Setting last event for sound %s in %u millisec.", _Source1->getSound()->getName().toString().c_str()/*CStringMapper::unmap(_Source1->getSound()->getName()).c_str()*/, _Source1->getSound()->getDuration());
|
||||||
if (_PatternSound->doFadeOut())
|
if (_PatternSound->doFadeOut())
|
||||||
{
|
{
|
||||||
// set the event to begin fade out.
|
// set the event to begin fade out.
|
||||||
|
|
|
@ -187,7 +187,7 @@ void CContextSound::init()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", CStringMapper::unmap(_Name).c_str()));
|
nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/));
|
||||||
fromString(index, contextArgIndex[nbJoker++]);
|
fromString(index, contextArgIndex[nbJoker++]);
|
||||||
parseArg = false;
|
parseArg = false;
|
||||||
index = "";
|
index = "";
|
||||||
|
@ -195,13 +195,13 @@ void CContextSound::init()
|
||||||
}
|
}
|
||||||
else if (*first == 'r')
|
else if (*first == 'r')
|
||||||
{
|
{
|
||||||
nlassertex(useRandom == false, ("Error will trying to play ContextSound '%s'", CStringMapper::unmap(_Name).c_str()));
|
nlassertex(useRandom == false, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/));
|
||||||
useRandom = true;
|
useRandom = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*first == '%')
|
else if (*first == '%')
|
||||||
{
|
{
|
||||||
nlassertex(useRandom == false, ("Error will trying to play ContextSound '%s'", CStringMapper::unmap(_Name).c_str()));
|
nlassertex(useRandom == false, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/));
|
||||||
parseArg = true;
|
parseArg = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ void CContextSound::init()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", CStringMapper::unmap(_Name).c_str()));
|
nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/));
|
||||||
fromString(index, contextArgIndex[nbJoker++]);
|
fromString(index, contextArgIndex[nbJoker++]);
|
||||||
parseArg = false;
|
parseArg = false;
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ void CContextSound::init()
|
||||||
LM_CASE_CONTAINER_CREATOR(9)
|
LM_CASE_CONTAINER_CREATOR(9)
|
||||||
LM_CASE_CONTAINER_CREATOR(10)
|
LM_CASE_CONTAINER_CREATOR(10)
|
||||||
default:
|
default:
|
||||||
nlwarning("Unsuported number of context argument in context sound '%s'!", CStringMapper::unmap(_Name).c_str());
|
nlwarning("Unsuported number of context argument in context sound '%s'!", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// cleanup macro
|
// cleanup macro
|
||||||
|
@ -257,14 +257,14 @@ void CContextSound::init()
|
||||||
|
|
||||||
// ok, we have the container, now fill it with the sound
|
// ok, we have the container, now fill it with the sound
|
||||||
{
|
{
|
||||||
std::vector<NLMISC::TStringId> allSounds;
|
std::vector<NLMISC::CSheetId> allSounds;
|
||||||
// CSoundBank::getSoundNames(allSounds);
|
// CSoundBank::getSoundNames(allSounds);
|
||||||
CAudioMixerUser::instance()->getSoundNames(allSounds);
|
CAudioMixerUser::instance()->getSoundNames(allSounds);
|
||||||
|
|
||||||
std::vector<NLMISC::TStringId>::iterator first(allSounds.begin()), last(allSounds.end());
|
std::vector<NLMISC::CSheetId>::iterator first(allSounds.begin()), last(allSounds.end());
|
||||||
for (; first != last; ++first)
|
for (; first != last; ++first)
|
||||||
{
|
{
|
||||||
const std::string &soundName = CStringMapper::unmap(*first);
|
const std::string &soundName = first->toString()/*CStringMapper::unmap(*first)*/;
|
||||||
if (soundName.size() > _BaseName.size())
|
if (soundName.size() > _BaseName.size())
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
|
|
|
@ -65,12 +65,68 @@ sint32 ISource::computeManualRollOff(sint32 volumeMB, sint32 mbMin, sint32 mbMax
|
||||||
// common method used only with OptionManualRolloff. return the rolloff in amplitude ratio (gain)
|
// common method used only with OptionManualRolloff. return the rolloff in amplitude ratio (gain)
|
||||||
float ISource::computeManualRolloff(double alpha, float sqrdist, float distMin, float distMax)
|
float ISource::computeManualRolloff(double alpha, float sqrdist, float distMin, float distMax)
|
||||||
{
|
{
|
||||||
static const sint32 mbMin = -10000;
|
/*static const sint mbMin = -10000;
|
||||||
static const sint32 mbMax = 0;
|
static const sint mbMax = 0;
|
||||||
sint32 rolloffMb = ISource::computeManualRollOff(mbMax, mbMin, mbMax, alpha, sqrdist, distMin, distMax);
|
sint32 rolloffMb = ISource::computeManualRollOff(mbMax, mbMin, mbMax, alpha, sqrdist, distMin, distMax);
|
||||||
float rolloffGain = (float)pow(10.0, (double)rolloffMb / 2000.0);
|
float rolloffGain = (float)pow(10.0, (double)rolloffMb / 2000.0);
|
||||||
clamp(rolloffGain, 0.0f, 1.0f);
|
clamp(rolloffGain, 0.0f, 1.0f);
|
||||||
return rolloffGain;
|
return rolloffGain;*/
|
||||||
|
|
||||||
|
static const double mbMin = -10000;
|
||||||
|
static const double mbMax = 0;
|
||||||
|
|
||||||
|
if (sqrdist < distMin * distMin)
|
||||||
|
{
|
||||||
|
// no attenuation
|
||||||
|
return 1.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (alpha < 0.0f)
|
||||||
|
{
|
||||||
|
double dist = (double)sqrt(sqrdist);
|
||||||
|
// inverse distance rolloff
|
||||||
|
float rolloff = distMin / dist;
|
||||||
|
if (alpha <= -1.0f) return rolloff;
|
||||||
|
|
||||||
|
if (dist > distMax)
|
||||||
|
{
|
||||||
|
// full attenuation of mbrolloff
|
||||||
|
return (-alpha * rolloff);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double mb = mbMin * (dist - distMin) / (distMax - distMin);
|
||||||
|
float mbrolloff = (float)pow(10.0, (double)mb / 2000.0);
|
||||||
|
return ((1.0 + alpha) * mbrolloff - alpha * rolloff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (sqrdist > distMax * distMax)
|
||||||
|
{
|
||||||
|
// full attenuation
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
double dist = (double)sqrt(sqrdist);
|
||||||
|
if (alpha == 0.0f)
|
||||||
|
{
|
||||||
|
// linearly descending volume on a dB scale
|
||||||
|
double mb = mbMin * (dist - distMin) / (distMax - distMin);
|
||||||
|
return (float)pow(10.0, (double)mb / 2000.0);
|
||||||
|
}
|
||||||
|
else // if (alpha > 0.0f)
|
||||||
|
{
|
||||||
|
// linear distance rolloff
|
||||||
|
float rolloff = (distMax - dist) / (distMax - distMin);
|
||||||
|
if (alpha >= 1.0f) return rolloff;
|
||||||
|
|
||||||
|
double mb = mbMin * (dist - distMin) / (distMax - distMin);
|
||||||
|
float mbrolloff = (float)pow(10.0, (double)mb / 2000.0);
|
||||||
|
return ((1.0 - alpha) * mbrolloff + alpha * rolloff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // NLSOUND
|
} // NLSOUND
|
||||||
|
|
|
@ -43,7 +43,7 @@ using namespace std;
|
||||||
|
|
||||||
namespace NLSOUND {
|
namespace NLSOUND {
|
||||||
|
|
||||||
CGroupControllerRoot::CGroupControllerRoot() : CGroupController(NULL)
|
CGroupControllerRoot::CGroupControllerRoot() : CGroupController(NULL), NLMISC::CManualSingleton<CGroupControllerRoot>()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,27 +133,18 @@ void CSound::serial(NLMISC::IStream &s)
|
||||||
s.serial(_Direction);
|
s.serial(_Direction);
|
||||||
s.serial(_Looping);
|
s.serial(_Looping);
|
||||||
s.serial(_MaxDist);
|
s.serial(_MaxDist);
|
||||||
if (s.isReading())
|
|
||||||
{
|
|
||||||
std::string name;
|
|
||||||
s.serial(name);
|
|
||||||
_Name = CStringMapper::map(name);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::string name = CStringMapper::unmap(_Name);
|
|
||||||
s.serial(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
nlassert(CGroupControllerRoot::getInstance()); // not sure
|
_Name.serialString(s, "sound");
|
||||||
|
|
||||||
|
nlassert(CGroupControllerRoot::isInitialized()); // not sure
|
||||||
#if NLSOUND_SHEET_VERSION_BUILT < 2
|
#if NLSOUND_SHEET_VERSION_BUILT < 2
|
||||||
if (s.isReading()) _GroupController = static_cast<CGroupController *>(CAudioMixerUser::instance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_GROUP_CONTROLLER));
|
if (s.isReading()) _GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_GROUP_CONTROLLER);
|
||||||
#else
|
#else
|
||||||
if (s.isReading())
|
if (s.isReading())
|
||||||
{
|
{
|
||||||
std::string groupControllerPath;
|
std::string groupControllerPath;
|
||||||
s.serial(groupControllerPath);
|
s.serial(groupControllerPath);
|
||||||
_GroupController = static_cast<CGroupController *>(CAudioMixerUser::instance()->getGroupController(groupControllerPath));
|
_GroupController = CGroupControllerRoot::getInstance()->getGroupController(groupControllerPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -170,7 +161,8 @@ void CSound::serial(NLMISC::IStream &s)
|
||||||
void CSound::importForm(const std::string& filename, NLGEORGES::UFormElm& root)
|
void CSound::importForm(const std::string& filename, NLGEORGES::UFormElm& root)
|
||||||
{
|
{
|
||||||
// Name
|
// Name
|
||||||
_Name = CStringMapper::map(CFile::getFilenameWithoutExtension(filename));
|
nlassert(filename.find(".sound") != std::string::npos);
|
||||||
|
_Name = NLMISC::CSheetId(filename);
|
||||||
|
|
||||||
// InternalConeAngle
|
// InternalConeAngle
|
||||||
uint32 inner;
|
uint32 inner;
|
||||||
|
@ -253,7 +245,7 @@ void CSound::importForm(const std::string& filename, NLGEORGES::UFormElm& roo
|
||||||
_Priority = MidPri;
|
_Priority = MidPri;
|
||||||
}
|
}
|
||||||
|
|
||||||
nlassert(CGroupControllerRoot::getInstance()); // not sure
|
nlassert(CGroupControllerRoot::isInitialized()); // not sure
|
||||||
#if NLSOUND_SHEET_VERSION_BUILT < 2
|
#if NLSOUND_SHEET_VERSION_BUILT < 2
|
||||||
_GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_GROUP_CONTROLLER);
|
_GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_GROUP_CONTROLLER);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -53,19 +53,19 @@ void CSoundAnimMarker::play(UAudioMixer* mixer, NL3D::CCluster *cluster, CSoundC
|
||||||
|
|
||||||
// ********************************************************
|
// ********************************************************
|
||||||
|
|
||||||
void CSoundAnimMarker::addSound(const NLMISC::TStringId& soundName)
|
void CSoundAnimMarker::addSound(const NLMISC::CSheetId& soundName)
|
||||||
{
|
{
|
||||||
pair<TMarkerSoundSet::iterator, bool> inserted;
|
pair<TMarkerSoundSet::iterator, bool> inserted;
|
||||||
inserted = _Sounds.insert(soundName);
|
inserted = _Sounds.insert(soundName);
|
||||||
if (inserted.second == false)
|
if (inserted.second == false)
|
||||||
{
|
{
|
||||||
nlwarning("Duplicate sound (%s)", CStringMapper::unmap(soundName).c_str());
|
nlwarning("Duplicate sound (%s)",/* CStringMapper::unmap(soundName).c_str()*/soundName.toString().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ********************************************************
|
// ********************************************************
|
||||||
|
|
||||||
void CSoundAnimMarker::removeSound(const NLMISC::TStringId &soundName)
|
void CSoundAnimMarker::removeSound(const NLMISC::CSheetId &soundName)
|
||||||
{
|
{
|
||||||
TMarkerSoundSet::iterator iter = _Sounds.find(soundName);
|
TMarkerSoundSet::iterator iter = _Sounds.find(soundName);
|
||||||
if (iter != _Sounds.end())
|
if (iter != _Sounds.end())
|
||||||
|
@ -74,13 +74,13 @@ void CSoundAnimMarker::removeSound(const NLMISC::TStringId &soundName)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlwarning("No sound was removed (%s)", CStringMapper::unmap(soundName).c_str());
|
nlwarning("No sound was removed (%s)", soundName.toString().c_str()/*CStringMapper::unmap(soundName).c_str()*/);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ********************************************************
|
// ********************************************************
|
||||||
|
|
||||||
void CSoundAnimMarker::getSounds(vector<NLMISC::TStringId> &sounds)
|
void CSoundAnimMarker::getSounds(vector<NLMISC::CSheetId> &sounds)
|
||||||
{
|
{
|
||||||
sounds.insert(sounds.end(), _Sounds.begin(), _Sounds.end());
|
sounds.insert(sounds.end(), _Sounds.begin(), _Sounds.end());
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ void CSoundAnimation::save()
|
||||||
{
|
{
|
||||||
// File stream
|
// File stream
|
||||||
COFile file;
|
COFile file;
|
||||||
vector<NLMISC::TStringId> sounds;
|
vector<NLMISC::CSheetId> sounds;
|
||||||
|
|
||||||
// Open the file
|
// Open the file
|
||||||
if (!file.open(_Filename.c_str()))
|
if (!file.open(_Filename.c_str()))
|
||||||
|
@ -108,11 +108,11 @@ void CSoundAnimation::save()
|
||||||
|
|
||||||
marker->getSounds(sounds);
|
marker->getSounds(sounds);
|
||||||
|
|
||||||
vector<NLMISC::TStringId>::iterator iter2;
|
vector<NLMISC::CSheetId>::iterator iter2;
|
||||||
for (iter2 = sounds.begin(); iter2 != sounds.end(); iter2++)
|
for (iter2 = sounds.begin(); iter2 != sounds.end(); iter2++)
|
||||||
{
|
{
|
||||||
xmlNodePtr soundNode = xmlNewChild ( markerNode, NULL, (const xmlChar*)"SOUND", NULL );
|
xmlNodePtr soundNode = xmlNewChild ( markerNode, NULL, (const xmlChar*)"SOUND", NULL );
|
||||||
xmlSetProp (soundNode, (const xmlChar*)"name", (const xmlChar*) CStringMapper::unmap(*iter2).c_str());
|
xmlSetProp (soundNode, (const xmlChar*)"name", (const xmlChar*)iter2->toString().c_str() /*CStringMapper::unmap(*iter2).c_str()*/);
|
||||||
}
|
}
|
||||||
|
|
||||||
sounds.clear();
|
sounds.clear();
|
||||||
|
@ -190,7 +190,7 @@ void CSoundAnimation::load()
|
||||||
throw NLMISC::Exception("Invalid sound animation marker");
|
throw NLMISC::Exception("Invalid sound animation marker");
|
||||||
}
|
}
|
||||||
|
|
||||||
marker->addSound(CStringMapper::map(string(name)));
|
marker->addSound(NLMISC::CSheetId(string(name), "sound"));
|
||||||
|
|
||||||
xmlFree ((void*)name);
|
xmlFree ((void*)name);
|
||||||
|
|
||||||
|
|
|
@ -123,14 +123,16 @@ CSoundBank::~CSoundBank()
|
||||||
|
|
||||||
void CSoundBank::addSound(CSound *sound)
|
void CSoundBank::addSound(CSound *sound)
|
||||||
{
|
{
|
||||||
std::pair<TSoundTable::iterator, bool> ret;
|
// nlassert(_Sounds.size() > sound->getName().getShortId());
|
||||||
ret = _Sounds.insert(make_pair(sound->getName(), sound));
|
// nldebug("SOUNDBANK: Add %s", sound->getName().toString().c_str());
|
||||||
nlassert(ret.second);
|
if (_Sounds.size() <= sound->getName().getShortId())
|
||||||
|
_Sounds.resize(sound->getName().getShortId() + 1);
|
||||||
|
_Sounds[sound->getName().getShortId()] = sound;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSoundBank::removeSound(const NLMISC::TStringId &name)
|
void CSoundBank::removeSound(const NLMISC::CSheetId &sheetId)
|
||||||
{
|
{
|
||||||
_Sounds.erase(name);
|
_Sounds[sheetId.getShortId()] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -258,35 +260,59 @@ public:
|
||||||
void CSoundBank::load(const std::string &packedSheetDir, bool packedSheetUpdate)
|
void CSoundBank::load(const std::string &packedSheetDir, bool packedSheetUpdate)
|
||||||
{
|
{
|
||||||
// this structure is fill by the loadForm() function and will contain all you need
|
// this structure is fill by the loadForm() function and will contain all you need
|
||||||
std::map<std::string, CSoundSerializer> Container;
|
std::map<std::string, CSoundSerializer> container; // load the old way for compatibility
|
||||||
nlassert(!_Loaded);
|
nlassert(!_Loaded);
|
||||||
// Just call the GEORGE::loadFrom method to read all available sounds
|
// Just call the GEORGE::loadFrom method to read all available sounds
|
||||||
::loadForm("sound", packedSheetDir + "sounds.packed_sheets", Container, packedSheetUpdate, false);
|
::loadForm("sound", packedSheetDir + "sounds.packed_sheets", container, packedSheetUpdate, false);
|
||||||
_Loaded = true;
|
_Loaded = true;
|
||||||
|
|
||||||
// add all the loaded sound in the sound banks
|
// get the largest sheet id needed and init the sound bank
|
||||||
std::map<std::string, CSoundSerializer>::iterator first(Container.begin()), last(Container.end());
|
uint32 maxShortId = 0;
|
||||||
for (; first != last; ++first)
|
|
||||||
{
|
{
|
||||||
if (first->second.Sound != 0)
|
std::map<std::string, CSoundSerializer>::iterator first(container.begin()), last(container.end());
|
||||||
addSound(first->second.Sound);
|
for (; first != last; ++first)
|
||||||
|
{
|
||||||
|
if (first->second.Sound != 0)
|
||||||
|
if (first->second.Sound->getName().getShortId() > maxShortId)
|
||||||
|
maxShortId = first->second.Sound->getName().getShortId();
|
||||||
|
}
|
||||||
|
++maxShortId; // inc for size = last idx + 1
|
||||||
|
if (container.size() == 0)
|
||||||
|
{
|
||||||
|
nlwarning("NLSOUND: No sound sheets have been loaded, missing sound sheet directory or packed sound sheets file");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nlassert(maxShortId < (container.size() * 8)); // ensure no ridiculous sheet id values
|
||||||
|
if (maxShortId > _Sounds.size())
|
||||||
|
_Sounds.resize(maxShortId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Container.clear();
|
// add all the loaded sound in the sound banks
|
||||||
|
{
|
||||||
|
std::map<std::string, CSoundSerializer>::iterator first(container.begin()), last(container.end());
|
||||||
|
for (; first != last; ++first)
|
||||||
|
{
|
||||||
|
if (first->second.Sound != 0)
|
||||||
|
addSound(first->second.Sound);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
container.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unload all the sound samples in this bank.
|
* Unload all the sound samples in this bank.
|
||||||
*/
|
*/
|
||||||
void CSoundBank::unload()
|
void CSoundBank::unload()
|
||||||
{
|
{
|
||||||
nlassert(_Loaded);
|
nlassert(_Loaded);
|
||||||
|
|
||||||
TSoundTable::iterator first(_Sounds.begin()), last(_Sounds.end());
|
for (TSoundTable::size_type i = 0; i < _Sounds.size(); ++i)
|
||||||
for (; first != last; ++first)
|
|
||||||
{
|
{
|
||||||
delete first->second;
|
delete _Sounds[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
_Sounds.clear();
|
_Sounds.clear();
|
||||||
|
@ -320,7 +346,7 @@ void CSoundBank::unload()
|
||||||
/*
|
/*
|
||||||
* Returns true if the samples in this bank have been loaded.
|
* Returns true if the samples in this bank have been loaded.
|
||||||
*/
|
*/
|
||||||
bool CSoundBank::isLoaded()
|
bool CSoundBank::isLoaded()
|
||||||
{
|
{
|
||||||
return _Loaded;
|
return _Loaded;
|
||||||
}
|
}
|
||||||
|
@ -328,37 +354,38 @@ bool CSoundBank::isLoaded()
|
||||||
/*
|
/*
|
||||||
* Return a sound sample corresponding to a name.
|
* Return a sound sample corresponding to a name.
|
||||||
*/
|
*/
|
||||||
CSound* CSoundBank::getSound(const NLMISC::TStringId &name)
|
CSound* CSoundBank::getSound(const NLMISC::CSheetId &sheetId)
|
||||||
{
|
{
|
||||||
// Find sound
|
if (sheetId == NLMISC::CSheetId::Unknown)
|
||||||
TSoundTable::iterator iter = _Sounds.find(name);
|
return NULL;
|
||||||
if ( iter == _Sounds.end() )
|
|
||||||
|
// nlassert(sheetId.getShortId() < _Sounds.size());
|
||||||
|
if (sheetId.getShortId() >= _Sounds.size())
|
||||||
{
|
{
|
||||||
return 0;
|
std::string sheetName = sheetId.toString();
|
||||||
}
|
nlwarning("NLSOUND: Sound sheet id '%s' exceeds loaded sound sheets", sheetName.c_str());
|
||||||
else
|
return NULL;
|
||||||
{
|
|
||||||
return (*iter).second;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return _Sounds[sheetId.getShortId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the names of the sounds
|
* Return the names of the sounds
|
||||||
*/
|
*/
|
||||||
void CSoundBank::getNames( std::vector<NLMISC::TStringId> &names )
|
void CSoundBank::getNames( std::vector<NLMISC::CSheetId> &sheetIds )
|
||||||
{
|
{
|
||||||
TSoundTable::const_iterator iter;
|
for (TSoundTable::size_type i = 0; i < _Sounds.size(); ++i)
|
||||||
for (iter = _Sounds.begin(); iter != _Sounds.end(); ++iter)
|
|
||||||
{
|
{
|
||||||
names.push_back((*iter).first);
|
if (_Sounds[i])
|
||||||
//nlwarning("getting sound %s", (*iter).first);
|
sheetIds.push_back(_Sounds[i]->getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the number of buffers in this bank.
|
* Return the number of buffers in this bank.
|
||||||
*/
|
*/
|
||||||
uint CSoundBank::countSounds()
|
uint CSoundBank::countSounds()
|
||||||
{
|
{
|
||||||
return (uint)_Sounds.size();
|
return (uint)_Sounds.size();
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,11 +73,13 @@ void CStreamFileSound::serial(NLMISC::IStream &s)
|
||||||
|
|
||||||
void CStreamFileSound::setMusicFilePath(const std::string &filePath, bool async, bool loop)
|
void CStreamFileSound::setMusicFilePath(const std::string &filePath, bool async, bool loop)
|
||||||
{
|
{
|
||||||
#if !FINAL_VERSION
|
/*#if !FINAL_VERSION
|
||||||
_Name = NLMISC::CStringMapper::map(std::string("<MusicChannel:") + NLMISC::CFile::getFilenameWithoutExtension(filePath) + ">");
|
//_Name = NLMISC::CStringMapper::map(std::string("<MusicChannel:") + NLMISC::CFile::getFilenameWithoutExtension(filePath) + ">");
|
||||||
|
_Name = NLMISC::CSheetId(std::string("<MusicChannel:") + NLMISC::CFile::getFilenameWithoutExtension(filePath) + ">");
|
||||||
#else
|
#else
|
||||||
_Name = NLMISC::CStringMapper::map("<MusicChannel>");
|
//_Name = NLMISC::CStringMapper::map("<MusicChannel>");
|
||||||
#endif
|
#endif*/
|
||||||
|
_Name = NLMISC::CSheetId("music_channel.sound");
|
||||||
_ConeInnerAngle = NLMISC::Pi * 2;
|
_ConeInnerAngle = NLMISC::Pi * 2;
|
||||||
_ConeOuterAngle = NLMISC::Pi * 2;
|
_ConeOuterAngle = NLMISC::Pi * 2;
|
||||||
_Looping = loop;
|
_Looping = loop;
|
||||||
|
|
|
@ -86,7 +86,7 @@ void CSoundPage::setEditedItem(CWorkspaceNode *ownerNode, NL3D::CPSLocatedBindab
|
||||||
_ui.pitchWidget->setWorkspaceNode(_Node);
|
_ui.pitchWidget->setWorkspaceNode(_Node);
|
||||||
_ui.pitchWidget->updateUi();
|
_ui.pitchWidget->updateUi();
|
||||||
|
|
||||||
_ui.soundNameLineEdit->setText(QString(NLMISC::CStringMapper::unmap(_Sound->getSoundName()).c_str()));
|
_ui.soundNameLineEdit->setText(QString(_Sound->getSoundName().toString().c_str()));
|
||||||
|
|
||||||
_ui.spawnCheckBox->setChecked(_Sound->getSpawn());
|
_ui.spawnCheckBox->setChecked(_Sound->getSpawn());
|
||||||
_ui.muteCheckBox->setChecked(_Sound->getMute());
|
_ui.muteCheckBox->setChecked(_Sound->getMute());
|
||||||
|
@ -95,7 +95,7 @@ void CSoundPage::setEditedItem(CWorkspaceNode *ownerNode, NL3D::CPSLocatedBindab
|
||||||
|
|
||||||
void CSoundPage::browse()
|
void CSoundPage::browse()
|
||||||
{
|
{
|
||||||
std::vector<NLMISC::TStringId> names;
|
std::vector<NLMISC::CSheetId> names;
|
||||||
|
|
||||||
|
|
||||||
NLSOUND::UAudioMixer *audioMixer = Modules::sound().getAudioMixer();
|
NLSOUND::UAudioMixer *audioMixer = Modules::sound().getAudioMixer();
|
||||||
|
@ -108,7 +108,7 @@ void CSoundPage::browse()
|
||||||
QStringList items;
|
QStringList items;
|
||||||
items << tr("");
|
items << tr("");
|
||||||
for(size_t i = 0; i < names.size(); ++i)
|
for(size_t i = 0; i < names.size(); ++i)
|
||||||
items << QString(names[i]->c_str());
|
items << QString(names[i].toString().c_str());
|
||||||
|
|
||||||
bool ok;
|
bool ok;
|
||||||
QString item = QInputDialog::getItem(this, tr("Select your sound"),
|
QString item = QInputDialog::getItem(this, tr("Select your sound"),
|
||||||
|
@ -162,7 +162,7 @@ void CSoundPage::setKeepPitch(bool state)
|
||||||
|
|
||||||
void CSoundPage::setSoundName(const QString &text)
|
void CSoundPage::setSoundName(const QString &text)
|
||||||
{
|
{
|
||||||
_Sound->setSoundName(NLMISC::CStringMapper::map(text.toStdString()));
|
_Sound->setSoundName(NLMISC::CSheetId(text.toStdString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSoundPage::setEmissionPercent(float value)
|
void CSoundPage::setEmissionPercent(float value)
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#include <nel/sound/sound_animation.h>
|
#include <nel/sound/sound_animation.h>
|
||||||
#include <nel/3d/u_particle_system_sound.h>
|
#include <nel/3d/u_particle_system_sound.h>
|
||||||
#include <nel/misc/path.h>
|
#include <nel/misc/path.h>
|
||||||
|
#include <nel/misc/sheet_id.h>
|
||||||
|
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
|
@ -68,6 +70,9 @@ void CSoundSystem::init()
|
||||||
//H_AUTO2
|
//H_AUTO2
|
||||||
nldebug("CSoundSystem::init");
|
nldebug("CSoundSystem::init");
|
||||||
|
|
||||||
|
// require sheet id without sheet id bin
|
||||||
|
NLMISC::CSheetId::initWithoutSheet();
|
||||||
|
|
||||||
// create audiomixer
|
// create audiomixer
|
||||||
_AudioMixer = NULL;
|
_AudioMixer = NULL;
|
||||||
_AnimManager = NULL;
|
_AnimManager = NULL;
|
||||||
|
@ -153,9 +158,10 @@ void CSoundSystem::play(const std::string &soundName)
|
||||||
{
|
{
|
||||||
if (_AudioMixer)
|
if (_AudioMixer)
|
||||||
{
|
{
|
||||||
NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CStringMapper::map(soundName), true);
|
NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), true);
|
||||||
if (src)
|
if (src)
|
||||||
{
|
{
|
||||||
|
// FIXME: Use relative positioning, and set pos to 0,0,0
|
||||||
src->setLooping(false);
|
src->setLooping(false);
|
||||||
const NLMISC::CVector &pos = _AudioMixer->getListener()->getPos();
|
const NLMISC::CVector &pos = _AudioMixer->getListener()->getPos();
|
||||||
src->setPos(pos);
|
src->setPos(pos);
|
||||||
|
@ -172,9 +178,10 @@ NLSOUND::USource *CSoundSystem::create(const std::string &soundName)
|
||||||
{
|
{
|
||||||
if (_AudioMixer)
|
if (_AudioMixer)
|
||||||
{
|
{
|
||||||
NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CStringMapper::map(soundName), false);
|
NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), false);
|
||||||
if (src)
|
if (src)
|
||||||
{
|
{
|
||||||
|
// FIXME: Use relative positioning, and set pos to 0,0,0
|
||||||
src->setLooping(false);
|
src->setLooping(false);
|
||||||
const NLMISC::CVector &pos = _AudioMixer->getListener()->getPos();
|
const NLMISC::CVector &pos = _AudioMixer->getListener()->getPos();
|
||||||
src->setPos(pos);
|
src->setPos(pos);
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <nel/misc/log.h>
|
#include <nel/misc/log.h>
|
||||||
#include <nel/misc/path.h>
|
#include <nel/misc/path.h>
|
||||||
#include <nel/sound/u_audio_mixer.h>
|
#include <nel/sound/u_audio_mixer.h>
|
||||||
|
#include <nel/misc/sheet_id.h>
|
||||||
|
|
||||||
// Project includes
|
// Project includes
|
||||||
// ...
|
// ...
|
||||||
|
@ -76,6 +77,9 @@ int main(int nNbArg, char **ppArgs)
|
||||||
CPath::addSearchPath(leveldesignDir, true, false);
|
CPath::addSearchPath(leveldesignDir, true, false);
|
||||||
CPath::addSearchPath(dfnDir, true, false);
|
CPath::addSearchPath(dfnDir, true, false);
|
||||||
|
|
||||||
|
// init sheet_id.bin
|
||||||
|
NLMISC::CSheetId::initWithoutSheet();
|
||||||
|
|
||||||
// build the sound bank
|
// build the sound bank
|
||||||
UAudioMixer::buildSoundBank(exportDir);
|
UAudioMixer::buildSoundBank(exportDir);
|
||||||
|
|
||||||
|
|
|
@ -5055,14 +5055,14 @@ NLMISC_COMMAND(reloadFogMaps, "Force to reload all the fog maps", "<>")
|
||||||
NLMISC_COMMAND(dumpSounds, "Dump names of all loaded sound", "<>")
|
NLMISC_COMMAND(dumpSounds, "Dump names of all loaded sound", "<>")
|
||||||
{
|
{
|
||||||
if (!args.empty()) return false;
|
if (!args.empty()) return false;
|
||||||
std::vector<NLMISC::TStringId> sounds;
|
std::vector<NLMISC::CSheetId> sounds;
|
||||||
extern CSoundManager *SoundMngr;
|
extern CSoundManager *SoundMngr;
|
||||||
if (!SoundMngr) return false;
|
if (!SoundMngr) return false;
|
||||||
if (!SoundMngr->getMixer()) return false;
|
if (!SoundMngr->getMixer()) return false;
|
||||||
SoundMngr->getMixer()->getSoundNames(sounds);
|
SoundMngr->getMixer()->getSoundNames(sounds);
|
||||||
for(uint k = 0; k < sounds.size(); ++k)
|
for(uint k = 0; k < sounds.size(); ++k)
|
||||||
{
|
{
|
||||||
nlinfo(NLMISC::CStringMapper::unmap(sounds[k]).c_str());
|
nlinfo(sounds[k].toString()/*NLMISC::CStringMapper::unmap(sounds[k])*/.c_str());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2006,7 +2006,7 @@ public:
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
string sName = getParam(Params, "name");
|
string sName = getParam(Params, "name");
|
||||||
TStringId id = CStringMapper::map(sName);
|
CSheetId id = CSheetId(sName, "sound");
|
||||||
if (SoundMngr != NULL)
|
if (SoundMngr != NULL)
|
||||||
SoundMngr->spawnSource(id,CVector(0,0,0));
|
SoundMngr->spawnSource(id,CVector(0,0,0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1265,6 +1265,19 @@ void postlogInit()
|
||||||
// set the primitive context
|
// set the primitive context
|
||||||
CPrimitiveContext::instance().CurrentLigoConfig = &LigoConfig;
|
CPrimitiveContext::instance().CurrentLigoConfig = &LigoConfig;
|
||||||
|
|
||||||
|
{
|
||||||
|
H_AUTO(InitRZShIdI)
|
||||||
|
|
||||||
|
nmsg = "Initializing sheets...";
|
||||||
|
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
|
||||||
|
|
||||||
|
// Initialize Sheet IDs.
|
||||||
|
CSheetId::init (ClientCfg.UpdatePackedSheet);
|
||||||
|
|
||||||
|
initLast = initCurrent;
|
||||||
|
initCurrent = ryzomGetLocalTime();
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
H_AUTO(InitRZSound)
|
H_AUTO(InitRZSound)
|
||||||
|
|
||||||
|
@ -1275,12 +1288,13 @@ void postlogInit()
|
||||||
{
|
{
|
||||||
// tmp fix : it seems that, at this point, if the bg downloader window has focus and
|
// tmp fix : it seems that, at this point, if the bg downloader window has focus and
|
||||||
// not the Ryzom one, then sound init fails
|
// not the Ryzom one, then sound init fails
|
||||||
#ifdef NL_OS_WINDOWS
|
/*#ifdef NL_OS_WINDOWS
|
||||||
HWND hWnd = Driver->getDisplay ();
|
HWND hWnd = Driver->getDisplay ();
|
||||||
nlassert (hWnd);
|
nlassert (hWnd);
|
||||||
ShowWindow(hWnd, SW_RESTORE);
|
ShowWindow(hWnd, SW_RESTORE);
|
||||||
SetForegroundWindow(hWnd);
|
SetForegroundWindow(hWnd);
|
||||||
#endif
|
#endif*/
|
||||||
|
// bg downloader not used anymore anyways
|
||||||
SoundMngr = new CSoundManager(&ProgressBar);
|
SoundMngr = new CSoundManager(&ProgressBar);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1323,13 +1337,7 @@ void postlogInit()
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
H_AUTO(InitRZShIdI)
|
H_AUTO(InitRZSheetL)
|
||||||
|
|
||||||
nmsg = "Initializing sheets...";
|
|
||||||
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
|
|
||||||
|
|
||||||
// Initialize Sheet IDs.
|
|
||||||
CSheetId::init (ClientCfg.UpdatePackedSheet);
|
|
||||||
|
|
||||||
// load packed sheets
|
// load packed sheets
|
||||||
nmsg = "Loading sheets...";
|
nmsg = "Loading sheets...";
|
||||||
|
|
|
@ -624,7 +624,7 @@ void CSoundManager::init(IProgressCallback *progressCallBack)
|
||||||
// add a new source to the world, attached to the specified entity
|
// add a new source to the world, attached to the specified entity
|
||||||
// return 0 if creation failed, sound id if creation was successful
|
// return 0 if creation failed, sound id if creation was successful
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
CSoundManager::TSourceId CSoundManager::addSource( const NLMISC::TStringId &soundName, const NLMISC::CVector &position, bool play, bool loop, const CEntityId &id)
|
CSoundManager::TSourceId CSoundManager::addSource( const NLMISC::CSheetId &soundName, const NLMISC::CVector &position, bool play, bool loop, const CEntityId &id)
|
||||||
{
|
{
|
||||||
uint32 retValue = 0;
|
uint32 retValue = 0;
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ CSoundManager::TSourceId CSoundManager::addSource( const NLMISC::TStringId &soun
|
||||||
// If the source is valid.
|
// If the source is valid.
|
||||||
if(pSource == 0)
|
if(pSource == 0)
|
||||||
{
|
{
|
||||||
nlwarning("Sound '%s' not found !", CStringMapper::unmap(soundName).c_str());
|
nlwarning("Sound '%s' not found !", /*CStringMapper::unmap(soundName).c_str()*/soundName.toString().c_str());
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,7 +672,7 @@ CSoundManager::TSourceId CSoundManager::addSource( const NLMISC::TStringId &soun
|
||||||
// spawn a new source to the world
|
// spawn a new source to the world
|
||||||
// return false if creation failed, true if creation was successful
|
// return false if creation failed, true if creation was successful
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
bool CSoundManager::spawnSource(const NLMISC::TStringId &soundName, CSoundContext &context)
|
bool CSoundManager::spawnSource(const NLMISC::CSheetId &soundName, CSoundContext &context)
|
||||||
{
|
{
|
||||||
if (!_PlaySound) return false;
|
if (!_PlaySound) return false;
|
||||||
|
|
||||||
|
@ -683,7 +683,7 @@ bool CSoundManager::spawnSource(const NLMISC::TStringId &soundName, CSoundContex
|
||||||
// If the source is valid.
|
// If the source is valid.
|
||||||
if(pSource == 0)
|
if(pSource == 0)
|
||||||
{
|
{
|
||||||
nlwarning("Sound '%s' not found !", soundName);
|
nlwarning("Sound '%s' not found !", soundName.toString().c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,7 +702,7 @@ bool CSoundManager::spawnSource(const NLMISC::TStringId &soundName, CSoundContex
|
||||||
// spawn a new source to the world
|
// spawn a new source to the world
|
||||||
// return false if creation failed, true if creation was successful
|
// return false if creation failed, true if creation was successful
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
bool CSoundManager::spawnSource(const NLMISC::TStringId &soundName, const NLMISC::CVector &position)
|
bool CSoundManager::spawnSource(const NLMISC::CSheetId &soundName, const NLMISC::CVector &position)
|
||||||
{
|
{
|
||||||
if (!_PlaySound) return false;
|
if (!_PlaySound) return false;
|
||||||
|
|
||||||
|
@ -712,7 +712,7 @@ bool CSoundManager::spawnSource(const NLMISC::TStringId &soundName, const NLMISC
|
||||||
// If the source is valid.
|
// If the source is valid.
|
||||||
if(pSource == 0)
|
if(pSource == 0)
|
||||||
{
|
{
|
||||||
nlwarning("Sound '%s' not found !", CStringMapper::unmap(soundName).c_str ());
|
nlwarning("Sound '%s' not found !", /*CStringMapper::unmap(soundName).c_str ()*/soundName.toString().c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
// sound
|
// sound
|
||||||
#include "nel/sound/u_audio_mixer.h"
|
#include "nel/sound/u_audio_mixer.h"
|
||||||
#include "nel/sound/u_listener.h"
|
#include "nel/sound/u_listener.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
|
|
||||||
extern class CSoundManager *SoundMngr;
|
extern class CSoundManager *SoundMngr;
|
||||||
|
|
||||||
|
@ -88,13 +89,13 @@ public:
|
||||||
/// Return the audio mixer instance pointer.
|
/// Return the audio mixer instance pointer.
|
||||||
NLSOUND::UAudioMixer *getMixer();
|
NLSOUND::UAudioMixer *getMixer();
|
||||||
|
|
||||||
TSourceId addSource( const NLMISC::TStringId &soundName, const NLMISC::CVector &position, bool play = true , bool loop = false, const NLMISC::CEntityId &id = NLMISC::CEntityId::Unknown );
|
TSourceId addSource( const NLMISC::CSheetId &soundName, const NLMISC::CVector &position, bool play = true , bool loop = false, const NLMISC::CEntityId &id = NLMISC::CEntityId::Unknown );
|
||||||
|
|
||||||
/// spawn a new source to the world but sound manager don't keep any link and the sound will be automatically deleted when finnished
|
/// spawn a new source to the world but sound manager don't keep any link and the sound will be automatically deleted when finnished
|
||||||
bool spawnSource (const NLMISC::TStringId &soundName, NLSOUND::CSoundContext &context);
|
bool spawnSource (const NLMISC::CSheetId &soundName, NLSOUND::CSoundContext &context);
|
||||||
|
|
||||||
/// spawn a new source to the world but sound manager don't keep any link and the sound will be automatically deleted when finnished
|
/// spawn a new source to the world but sound manager don't keep any link and the sound will be automatically deleted when finnished
|
||||||
bool spawnSource( const NLMISC::TStringId &soundName, const NLMISC::CVector &position );
|
bool spawnSource( const NLMISC::CSheetId &soundName, const NLMISC::CVector &position );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* remove a source
|
* remove a source
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<PRIMITIVES VERSION="1">
|
<PRIMITIVES VERSION="1">
|
||||||
<ROOT_PRIMITIVE TYPE="CPrimNode">
|
<ROOT_PRIMITIVE TYPE="CPrimNode">
|
||||||
<ALIAS LAST_GENERATED="1256"/>
|
<ALIAS LAST_GENERATED="1269"/>
|
||||||
<CHILD TYPE="CPrimZone">
|
<CHILD TYPE="CPrimZone">
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
<NAME>class</NAME>
|
<NAME>class</NAME>
|
||||||
|
@ -126,6 +126,10 @@
|
||||||
<STRING>#mission tags and pre-requisites</STRING>
|
<STRING>#mission tags and pre-requisites</STRING>
|
||||||
<STRING>replayable</STRING>
|
<STRING>replayable</STRING>
|
||||||
<STRING>solo</STRING>
|
<STRING>solo</STRING>
|
||||||
|
<STRING>mission_category : Killing</STRING>
|
||||||
|
<STRING>player_replay_timer : 10</STRING>
|
||||||
|
<STRING>global_replay_timer : 10</STRING>
|
||||||
|
<STRING>mission_icon : tets</STRING>
|
||||||
<STRING></STRING>
|
<STRING></STRING>
|
||||||
<STRING>#Variables declaration</STRING>
|
<STRING>#Variables declaration</STRING>
|
||||||
<STRING>decl : bot : giver</STRING>
|
<STRING>decl : bot : giver</STRING>
|
||||||
|
@ -138,7 +142,7 @@
|
||||||
<STRING>mission_title : WELCOME_RYZOM_CORE_TITLE</STRING>
|
<STRING>mission_title : WELCOME_RYZOM_CORE_TITLE</STRING>
|
||||||
<STRING>mission_desc : WELCOME_RYZOM_CORE_DESC</STRING>
|
<STRING>mission_desc : WELCOME_RYZOM_CORE_DESC</STRING>
|
||||||
<STRING># step_4</STRING>
|
<STRING># step_4</STRING>
|
||||||
<STRING>kill_fauna : chdfa1 3</STRING>
|
<STRING>kill_fauna : chdfa1 1</STRING>
|
||||||
<STRING>recv_money : 10000</STRING>
|
<STRING>recv_money : 10000</STRING>
|
||||||
<STRING></STRING>
|
<STRING></STRING>
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
|
@ -154,6 +158,157 @@
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>mission</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>HUNTING_GROUNDS</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>script</NAME>
|
||||||
|
<STRING># script generated from 'urban_newbieland.primitive'</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#mission tags and pre-requisites</STRING>
|
||||||
|
<STRING>replayable</STRING>
|
||||||
|
<STRING>guild</STRING>
|
||||||
|
<STRING>mission_category : Killing</STRING>
|
||||||
|
<STRING>player_replay_timer : 10</STRING>
|
||||||
|
<STRING>global_replay_timer : 10</STRING>
|
||||||
|
<STRING>mission_icon : test</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#Variables declaration</STRING>
|
||||||
|
<STRING>decl : bot : giver</STRING>
|
||||||
|
<STRING>decl : bot : player</STRING>
|
||||||
|
<STRING>decl : bot : chiang_the_strong</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#pre-requisites</STRING>
|
||||||
|
<STRING>req_guild</STRING>
|
||||||
|
<STRING>req_grade : Leader</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#script</STRING>
|
||||||
|
<STRING>mission_title : WELCOME_RYZOM_CORE_DESC</STRING>
|
||||||
|
<STRING>mission_desc : WELCOME_RYZOM_CORE_TITLE</STRING>
|
||||||
|
<STRING># step_4</STRING>
|
||||||
|
<STRING>spawn_mission : WELCOME_RYZOM_CORE : chiang_the_strong : guild</STRING>
|
||||||
|
<STRING>set_obj : MIS_DO_MISSION</STRING>
|
||||||
|
<STRING>mission : WELCOME_RYZOM_CORE 2</STRING>
|
||||||
|
<STRING>kill_fauna : chdfa1 2</STRING>
|
||||||
|
<STRING>recv_money : 100000</STRING>
|
||||||
|
<STRING>recv_money : 20: guild</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimAlias">
|
||||||
|
<ALIAS VALUE="1262"/>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>mission</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>GUILD_MISSION</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>script</NAME>
|
||||||
|
<STRING># script generated from 'guild_missions.primitive'</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#mission tags and pre-requisites</STRING>
|
||||||
|
<STRING>replayable</STRING>
|
||||||
|
<STRING>guild</STRING>
|
||||||
|
<STRING>mission_category : Killing</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#Variables declaration</STRING>
|
||||||
|
<STRING>decl : bot : giver</STRING>
|
||||||
|
<STRING>decl : bot : player</STRING>
|
||||||
|
<STRING>decl : bot : chiang_the_strong</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#pre-requisites</STRING>
|
||||||
|
<STRING>req_guild</STRING>
|
||||||
|
<STRING>req_grade : Leader</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#script</STRING>
|
||||||
|
<STRING>mission_title : GUILD_MISSION_TITLE</STRING>
|
||||||
|
<STRING>mission_desc : GUILD_MISSION_DESC</STRING>
|
||||||
|
<STRING># step</STRING>
|
||||||
|
<STRING>spawn_mission : SOLO_GUILD_MISSION : chiang_the_strong : guild</STRING>
|
||||||
|
<STRING>set_obj : MIS_DO_MISSION</STRING>
|
||||||
|
<STRING>mission : SOLO_GUILD_MISSION 2</STRING>
|
||||||
|
<STRING>kill_fauna : chdfa1 2</STRING>
|
||||||
|
<STRING>recv_money : 100: guild</STRING>
|
||||||
|
<STRING>recv_money : 50</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimAlias">
|
||||||
|
<ALIAS VALUE="1268"/>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>mission</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>SOLO_GUILD_MISSION</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>script</NAME>
|
||||||
|
<STRING># script generated from 'guild_missions.primitive'</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#mission tags and pre-requisites</STRING>
|
||||||
|
<STRING>replayable</STRING>
|
||||||
|
<STRING>solo</STRING>
|
||||||
|
<STRING>mission_category : Killing</STRING>
|
||||||
|
<STRING>not_proposed</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#Variables declaration</STRING>
|
||||||
|
<STRING>decl : bot : giver</STRING>
|
||||||
|
<STRING>decl : bot : player</STRING>
|
||||||
|
<STRING>decl : bot : chiang_the_strong</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#pre-requisites</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
<STRING>#script</STRING>
|
||||||
|
<STRING>mission_title : SOLO_GUILD_MISSION_TITLE</STRING>
|
||||||
|
<STRING>mission_desc : SOLO_GUILD_MISSION_DESC</STRING>
|
||||||
|
<STRING># step</STRING>
|
||||||
|
<STRING>kill_fauna : chdfa1 1</STRING>
|
||||||
|
<STRING>recv_money : 20</STRING>
|
||||||
|
<STRING></STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimAlias">
|
||||||
|
<ALIAS VALUE="1269"/>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
<CHILD TYPE="CPrimNode">
|
<CHILD TYPE="CPrimNode">
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
|
@ -317,6 +472,46 @@
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimPoint">
|
||||||
|
<PT X="10213.500977" Y="-11784.600586" Z="0.000000"/>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>chat_parameters</NAME>
|
||||||
|
<STRING>shop:guild_creator</STRING>
|
||||||
|
<STRING>menu: MENU_WHOAMI WHOAMI_GUILD_CLERK</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>npc_bot</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>equipment</NAME>
|
||||||
|
<STRING>CU: 4</STRING>
|
||||||
|
<STRING>CL: 4</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>is_stuck</NAME>
|
||||||
|
<STRING>true</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>creator</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>sheet_client</NAME>
|
||||||
|
<STRING>fyhc3old</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimAlias">
|
||||||
|
<ALIAS VALUE="1257"/>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
<CHILD TYPE="CPrimNode">
|
<CHILD TYPE="CPrimNode">
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
|
@ -396,19 +591,8 @@
|
||||||
<ANGLE VALUE="3.504839"/>
|
<ANGLE VALUE="3.504839"/>
|
||||||
<PROPERTY TYPE="string_array">
|
<PROPERTY TYPE="string_array">
|
||||||
<NAME>chat_parameters</NAME>
|
<NAME>chat_parameters</NAME>
|
||||||
<STRING>shop : NEWBIELAND_LARMOR_ALL</STRING>
|
<STRING>shop:guild_creator</STRING>
|
||||||
<STRING>item : icmalb.sitem 10</STRING>
|
<STRING>menu: MENU_WHOAMI WHOAMI_GUILD_CLERK</STRING>
|
||||||
<STRING>item : icmalb.sitem 20</STRING>
|
|
||||||
<STRING>item : icmalb.sitem 50</STRING>
|
|
||||||
<STRING>item : icfalb.sitem 10</STRING>
|
|
||||||
<STRING>item : icfalb.sitem 20</STRING>
|
|
||||||
<STRING>item : icfalb.sitem 50</STRING>
|
|
||||||
<STRING>item : ictalb.sitem 10</STRING>
|
|
||||||
<STRING>item : ictalb.sitem 20</STRING>
|
|
||||||
<STRING>item : ictalb.sitem 50</STRING>
|
|
||||||
<STRING>item : iczalb.sitem 10</STRING>
|
|
||||||
<STRING>item : iczalb.sitem 20</STRING>
|
|
||||||
<STRING>item : iczalb.sitem 50</STRING>
|
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
<NAME>class</NAME>
|
<NAME>class</NAME>
|
||||||
|
@ -444,6 +628,119 @@
|
||||||
</CHILD>
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>npc_folder</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>Guild creator</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimAlias">
|
||||||
|
<ALIAS VALUE="1264"/>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimZone">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>npc_zone</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>Npc Zone</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimAlias">
|
||||||
|
<ALIAS VALUE="1265"/>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>bot_sheet_client</NAME>
|
||||||
|
<STRING>maha2</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>npc_group</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>Group</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>npc_group_parameters</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>parameters</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimAlias">
|
||||||
|
<ALIAS VALUE="1266"/>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimPoint">
|
||||||
|
<PT X="10315.800781" Y="-11736.200195" Z="0.000000"/>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>chat_parameters</NAME>
|
||||||
|
<STRING>shop:guild_creator</STRING>
|
||||||
|
<STRING>menu: MENU_WHOAMI WHOAMI_GUILD_CLERK</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>npc_bot</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>equipment</NAME>
|
||||||
|
<STRING>CU: 4</STRING>
|
||||||
|
<STRING>CL: 4</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>guild_creator</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>sheet_client</NAME>
|
||||||
|
<STRING>fyhc3old</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimAlias">
|
||||||
|
<ALIAS VALUE="1267"/>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
<CHILD TYPE="CPrimNode">
|
<CHILD TYPE="CPrimNode">
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
|
@ -455,14 +752,38 @@
|
||||||
<STRING>missions_editor</STRING>
|
<STRING>missions_editor</STRING>
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
<CHILD TYPE="CPrimNode">
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>audience</NAME>
|
||||||
|
<STRING>solo</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>auto_remove_from_journal</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>automatic</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
<NAME>class</NAME>
|
<NAME>class</NAME>
|
||||||
<STRING>mission_tree</STRING>
|
<STRING>mission_tree</STRING>
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>fail_if_inventory_is_full</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
<NAME>giver_primitive</NAME>
|
<NAME>giver_primitive</NAME>
|
||||||
<STRING>urban_newbieland.primitive</STRING>
|
<STRING>urban_newbieland.primitive</STRING>
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>global_replay_timer</NAME>
|
||||||
|
<STRING>10</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>mission_category</NAME>
|
||||||
|
<STRING>Killing</STRING>
|
||||||
|
</PROPERTY>
|
||||||
<PROPERTY TYPE="string_array">
|
<PROPERTY TYPE="string_array">
|
||||||
<NAME>mission_description</NAME>
|
<NAME>mission_description</NAME>
|
||||||
<STRING>WELCOME_RYZOM_CORE_DESC</STRING>
|
<STRING>WELCOME_RYZOM_CORE_DESC</STRING>
|
||||||
|
@ -471,10 +792,18 @@
|
||||||
<NAME>mission_giver</NAME>
|
<NAME>mission_giver</NAME>
|
||||||
<STRING>$givervar@fullname$</STRING>
|
<STRING>$givervar@fullname$</STRING>
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>mission_icon</NAME>
|
||||||
|
<STRING>tets</STRING>
|
||||||
|
</PROPERTY>
|
||||||
<PROPERTY TYPE="string_array">
|
<PROPERTY TYPE="string_array">
|
||||||
<NAME>mission_title</NAME>
|
<NAME>mission_title</NAME>
|
||||||
<STRING>WELCOME_RYZOM_CORE_TITLE</STRING>
|
<STRING>WELCOME_RYZOM_CORE_TITLE</STRING>
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>mono_instance</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
<NAME>name</NAME>
|
<NAME>name</NAME>
|
||||||
<STRING>WELCOME_RYZOM_CORE</STRING>
|
<STRING>WELCOME_RYZOM_CORE</STRING>
|
||||||
|
@ -483,10 +812,34 @@
|
||||||
<NAME>need_validation</NAME>
|
<NAME>need_validation</NAME>
|
||||||
<STRING>false</STRING>
|
<STRING>false</STRING>
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>non_abandonnable</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>not_in_journal</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>not_proposed</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>phrase_auto_menu</NAME>
|
||||||
|
<STRING>TEST</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>player_replay_timer</NAME>
|
||||||
|
<STRING>10</STRING>
|
||||||
|
</PROPERTY>
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
<NAME>replayable</NAME>
|
<NAME>replayable</NAME>
|
||||||
<STRING>true</STRING>
|
<STRING>true</STRING>
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>run_only_once</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
<CHILD TYPE="CPrimNode">
|
<CHILD TYPE="CPrimNode">
|
||||||
<PROPERTY TYPE="string">
|
<PROPERTY TYPE="string">
|
||||||
<NAME>class</NAME>
|
<NAME>class</NAME>
|
||||||
|
@ -571,7 +924,7 @@
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
<PROPERTY TYPE="string_array">
|
<PROPERTY TYPE="string_array">
|
||||||
<NAME>fauna/quantity</NAME>
|
<NAME>fauna/quantity</NAME>
|
||||||
<STRING>chdfa1 3</STRING>
|
<STRING>chdfa1 1</STRING>
|
||||||
</PROPERTY>
|
</PROPERTY>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
|
@ -597,6 +950,263 @@
|
||||||
</CHILD>
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>audience</NAME>
|
||||||
|
<STRING>guild</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>auto_remove_from_journal</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>automatic</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>mission_tree</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>fail_if_inventory_is_full</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>giver_primitive</NAME>
|
||||||
|
<STRING>urban_newbieland.primitive</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>global_replay_timer</NAME>
|
||||||
|
<STRING>10</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>mission_category</NAME>
|
||||||
|
<STRING>Killing</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>mission_description</NAME>
|
||||||
|
<STRING>WELCOME_RYZOM_CORE_TITLE</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>mission_giver</NAME>
|
||||||
|
<STRING>$givervar@fullname$</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>mission_icon</NAME>
|
||||||
|
<STRING>test</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>mission_title</NAME>
|
||||||
|
<STRING>WELCOME_RYZOM_CORE_DESC</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>mono_instance</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>HUNTING_GROUNDS</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>need_validation</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>non_abandonnable</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>not_in_journal</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>not_proposed</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>phrase_auto_menu</NAME>
|
||||||
|
<STRING>TEST</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>player_replay_timer</NAME>
|
||||||
|
<STRING>10</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>replayable</NAME>
|
||||||
|
<STRING>true</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>run_only_once</NAME>
|
||||||
|
<STRING>false</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>variables</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>variables</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>var_npc</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>npc_function</NAME>
|
||||||
|
<STRING>fct_ranger_leader</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>npc_name</NAME>
|
||||||
|
<STRING>chiang_the_strong</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>var_name</NAME>
|
||||||
|
<STRING>givervar</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>pre_requisite</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>pre_requisite</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>require_guild_grade</NAME>
|
||||||
|
<STRING>Leader</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>require_guild_membership</NAME>
|
||||||
|
<STRING>true</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimAlias">
|
||||||
|
<ALIAS VALUE="1258"/>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>alias</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>step</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>step_4</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>actions</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>pre_actions</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>spawn_mission</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>giver_name</NAME>
|
||||||
|
<STRING>chiang_the_strong</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>guild</NAME>
|
||||||
|
<STRING>true</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>mission_name</NAME>
|
||||||
|
<STRING>WELCOME_RYZOM_CORE</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>mission_objectives</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>objectives</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>do_mission</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>mission_names</NAME>
|
||||||
|
<STRING>WELCOME_RYZOM_CORE 2</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>overload_objective</NAME>
|
||||||
|
<STRING>MIS_DO_MISSION</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>kill</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string_array">
|
||||||
|
<NAME>fauna/quantity</NAME>
|
||||||
|
<STRING>chdfa1 2</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>kill chdfa1 2</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>actions</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<STRING>post_actions</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>amount</NAME>
|
||||||
|
<STRING>100000</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>recv_money</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
<CHILD TYPE="CPrimNode">
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>amount</NAME>
|
||||||
|
<STRING>20</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>class</NAME>
|
||||||
|
<STRING>recv_money</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
<PROPERTY TYPE="string">
|
||||||
|
<NAME>guild</NAME>
|
||||||
|
<STRING>true</STRING>
|
||||||
|
</PROPERTY>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
|
</CHILD>
|
||||||
</CHILD>
|
</CHILD>
|
||||||
</ROOT_PRIMITIVE>
|
</ROOT_PRIMITIVE>
|
||||||
</PRIMITIVES>
|
</PRIMITIVES>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
BandwidthRatio = 1;
|
BandwidthRatio = 1;
|
||||||
|
|
||||||
FSUDPPort = 47851;
|
FSUDPPort = 47851;
|
||||||
FSListenHost = "open.ryzom.com";
|
FSListenHost = "192.168.1.112";
|
||||||
|
|
||||||
#include "frontend_service_default.cfg"
|
#include "frontend_service_default.cfg"
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
REM This script will start all the services with good parameters
|
REM This script will start all the services with good parameters
|
||||||
|
|
||||||
REM set MODE=Debug
|
REM set MODE=Debug
|
||||||
set MODE=..\..\build\bin\Release
|
set MODE=..\..\build\bin\Debug
|
||||||
|
|
||||||
rem AS
|
rem AS
|
||||||
start %MODE%\ryzom_admin_service.exe --fulladminname=admin_executor_service --shortadminname=AES
|
start %MODE%\ryzom_admin_service.exe --fulladminname=admin_executor_service --shortadminname=AES
|
||||||
|
|
Loading…
Reference in a new issue