From 255c6956c754fda2b3f9fff824d209905c9e6cf7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 14 Nov 2019 19:06:23 +0800 Subject: [PATCH 1/2] Skip git directory --- code/nel/src/misc/path.cpp | 4 ++-- code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 0c650918f..961a907b4 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -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; } diff --git a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp index d44e5a155..c0a74297b 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp @@ -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') && From c15e75ecc8c68d3eca5aa3e3b4fefcbc6eaafa52 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 15 Nov 2019 11:02:20 +0800 Subject: [PATCH 2/2] Build rest of sound sheets --- code/nel/include/nel/sound/clustered_sound.h | 2 +- code/nel/include/nel/sound/u_audio_mixer.h | 4 ++++ code/nel/src/sound/audio_mixer_user.cpp | 17 +++++++++++++++++ code/nel/src/sound/clustered_sound.cpp | 16 +++++++++------- .../sound/build_soundbank/build_soundbank.cpp | 2 ++ 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/code/nel/include/nel/sound/clustered_sound.h b/code/nel/include/nel/sound/clustered_sound.h index 4b28a71ec..e37762b20 100644 --- a/code/nel/include/nel/sound/clustered_sound.h +++ b/code/nel/include/nel/sound/clustered_sound.h @@ -189,7 +189,7 @@ public: const std::vector > &getAudioPath() { return _AudioPath;} - + static void buildSheets(const std::string &packedSheetPath); private: diff --git a/code/nel/include/nel/sound/u_audio_mixer.h b/code/nel/include/nel/sound/u_audio_mixer.h index 089013797..a1fb2b3cc 100644 --- a/code/nel/include/nel/sound/u_audio_mixer.h +++ b/code/nel/include/nel/sound/u_audio_mixer.h @@ -169,6 +169,10 @@ public: static std::string buildSampleBank(const std::vector &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 diff --git a/code/nel/src/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index fdc6f6e11..0f3ff1110 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -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 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) diff --git a/code/nel/src/sound/clustered_sound.cpp b/code/nel/src/sound/clustered_sound.cpp index 6e62f3176..52a9848da 100644 --- a/code/nel/src/sound/clustered_sound.cpp +++ b/code/nel/src/sound/clustered_sound.cpp @@ -160,10 +160,6 @@ public: }; -// this structure is fill by the loadForm() function and will contain all you need -std::map Container; - - CClusteredSound::CClusteredSound() : _Scene(0), _RootCluster(0), @@ -173,21 +169,27 @@ CClusteredSound::CClusteredSound() } +void CClusteredSound::buildSheets(const std::string &packedSheetPath) +{ + std::map 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 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::iterator first(Container.begin()), last(Container.end()); + std::map::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; diff --git a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp index 082b08e90..9829a1898 100644 --- a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp +++ b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp @@ -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;