mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 00:49:19 +02:00
refactor: create paths namespace instead of global variables
This commit is contained in:
@@ -135,11 +135,11 @@ buffer_manager::create( std::string const &Filename ) {
|
||||
}
|
||||
}
|
||||
// if dynamic-specific and/or direct lookups find nothing, try the default sound folder
|
||||
lookup = find_buffer( szSoundPath + filename );
|
||||
lookup = find_buffer( paths::sounds + filename );
|
||||
if( lookup != null_handle ) {
|
||||
return lookup;
|
||||
}
|
||||
filelookup = find_file( szSoundPath + filename );
|
||||
filelookup = find_file( paths::sounds + filename );
|
||||
if( false == filelookup.empty() ) {
|
||||
return emplace( filelookup );
|
||||
}
|
||||
|
||||
@@ -319,9 +319,9 @@ sound_source::export_as_text( std::ostream &Output ) const {
|
||||
<< m_offset.z << ' ';
|
||||
// sound data
|
||||
auto soundfile { audio::renderer.buffer( sound( sound_id::main ).buffer ).name };
|
||||
if( soundfile.find( szSoundPath ) == 0 ) {
|
||||
if( soundfile.find( paths::sounds ) == 0 ) {
|
||||
// don't include 'sounds/' in the path
|
||||
soundfile.erase( 0, std::string{ szSoundPath }.size() );
|
||||
soundfile.erase( 0, std::string{ paths::sounds }.size() );
|
||||
}
|
||||
Output
|
||||
<< soundfile << ' ';
|
||||
|
||||
Reference in New Issue
Block a user