Merge from Git repository

--HG--
branch : develop
hg/develop
NO-BREAK SPACE OÜ 5 years ago
commit 5c872ad06e

@ -189,7 +189,7 @@ public:
const std::vector<std::pair<NLMISC::CVector, NLMISC::CVector> > &getAudioPath() { return _AudioPath;}
static void buildSheets(const std::string &packedSheetPath);
private:

@ -169,6 +169,10 @@ public:
static std::string buildSampleBank(const std::vector<std::string> &sampleList, const std::string &bankDir, const std::string &bankName);
/// 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.
static std::string buildSoundBank(const std::string &packedSheetDir);
/// Build the cluster sound_group sheets.
static std::string buildClusteredSoundGroupSheets(const std::string &packedSheetDir);
/// Build the user var binding sheets.
static std::string buildUserVarBindingSheets(const std::string &packedSheetDir);
/** Set the global path to the sample banks
* If you have specified some sample bank to load in the
* mixer config file, you MUST set the sample path

@ -898,9 +898,9 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want
if (isdirectory(de))
{
// skip CVS, .svn and .hg directory
if ((!showEverything) && (fn == "CVS" || fn == ".svn" || fn == ".hg"))
if ((!showEverything) && (fn == "CVS" || fn == ".svn" || fn == ".hg" || fn == ".git"))
{
NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip CVS, .svn and .hg directory", path.c_str(), recurse, wantDir, wantFile);
NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip '%s' directory", path.c_str(), recurse, wantDir, wantFile, fn.c_str());
continue;
}

@ -988,6 +988,23 @@ std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir)
return dir + "sounds.packed_sheets";
}
/// Build the cluster sound_group sheets.
std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir)
{
std::string dir = CPath::standardizePath(packedSheetDir, true);
CClusteredSound::buildSheets(dir);
return dir + "sound_groups.packed_sheets";
}
/// Build the user var binding sheets.
std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir)
{
std::string dir = CPath::standardizePath(packedSheetDir, true);
std::map<std::string, CUserVarSerializer> container;
::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false);
return dir + "user_var_binding.packed_sheets";
}
void CAudioMixerUser::setBackgroundFlagName(uint flagIndex, const std::string &flagName)
{
if (flagIndex < TBackgroundFlags::NB_BACKGROUND_FLAGS)

@ -160,10 +160,6 @@ public:
};
// this structure is fill by the loadForm() function and will contain all you need
std::map<std::string, CSoundGroupSerializer> Container;
CClusteredSound::CClusteredSound()
: _Scene(0),
_RootCluster(0),
@ -173,21 +169,27 @@ CClusteredSound::CClusteredSound()
}
void CClusteredSound::buildSheets(const std::string &packedSheetPath)
{
std::map<std::string, CSoundGroupSerializer> container;
::loadForm("sound_group", packedSheetPath + "sound_groups.packed_sheets", container, true, false);
}
void CClusteredSound::init(NL3D::CScene *scene, float portalInterpolate, float maxEarDist, float minGain)
{
// load the sound_group sheets
::loadForm("sound_group", CAudioMixerUser::instance()->getPackedSheetPath()+"sound_groups.packed_sheets", Container, CAudioMixerUser::instance()->getPackedSheetUpdate(), false);
std::map<std::string, CSoundGroupSerializer> container;
::loadForm("sound_group", CAudioMixerUser::instance()->getPackedSheetPath()+"sound_groups.packed_sheets", container, CAudioMixerUser::instance()->getPackedSheetUpdate(), false);
// copy the container data into internal structure
std::map<std::string, CSoundGroupSerializer>::iterator first(Container.begin()), last(Container.end());
std::map<std::string, CSoundGroupSerializer>::iterator first(container.begin()), last(container.end());
for (; first != last; ++first)
{
_SoundGroupToSound.insert(first->second._SoundGroupAssoc.begin(), first->second._SoundGroupAssoc.end());
}
// and clear the temporary Container
Container.clear();
container.clear();
_Scene = scene;

@ -88,6 +88,8 @@ int main(int nNbArg, char **ppArgs)
// build the sound bank
UAudioMixer::buildSoundBank(exportDir);
UAudioMixer::buildClusteredSoundGroupSheets(exportDir);
UAudioMixer::buildUserVarBindingSheets(exportDir);
// and that's all folks
return EXIT_SUCCESS;

@ -457,7 +457,9 @@ bool CFileTreeCtrl::enumObjects(HTREEITEM hParentItem,IShellFolder* pParentFolde
string ext5 = pItemInfo->displayName.substr(displayNameSize-5);
bool cvs = ext3 == "CVS" || ext4 == "CVS\\" || ext4 == "CVS/" ||
ext4 == ".svn" || ext5 == ".svn\\" || ext5 == ".svn/";
ext4 == ".svn" || ext5 == ".svn\\" || ext5 == ".svn/" ||
ext4 == ".hg" || ext5 == ".hg\\" || ext5 == ".hg/" ||
ext4 == ".git" || ext5 == ".git\\" || ext5 == ".git/";
/* bool cvs = ( pItemInfo->displayName[displayNameSize-3] == 'C') &&
(pItemInfo->displayName[displayNameSize-2] == 'V') &&

Loading…
Cancel
Save