@ -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()*/));
sintrandomValue=0;
sintrandomValue=0;
if(UseRandom)
if(UseRandom)
@ -187,7 +187,7 @@ class CContextSoundContainer : public IContextSoundContainer
}
}
elseif(!arg.empty())
elseif(!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
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
// Don't use this function without defaultType, use the one above.
nlassert(defaultType.size()!=0);
if(sheetName.rfind('.')==std::string::npos)
{
std::stringwithType=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());
/// 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.
// 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());
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()
}
}
elseif(*first=='r')
elseif(*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;
}
}
}
}
elseif(*first=='%')
elseif(*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