16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 15:49:19 +02:00

build 171030: binary serialization for region terrain

This commit is contained in:
tmj-fstate
2017-10-30 23:41:22 +01:00
parent 9edf912405
commit 071a156527
12 changed files with 531 additions and 44 deletions

View File

@@ -94,10 +94,10 @@ material_manager::create( std::string const &Filename, bool const Loadnow ) {
}
filename += ".mat";
for( char &c : filename ) {
// change forward slashes to windows ones. NOTE: probably not strictly necessary, but eh
c = ( c == '/' ? '\\' : c );
}
// change forward slashes to windows ones. NOTE: probably not strictly necessary, but eh
std::replace(
std::begin( filename ), std::end( filename ),
'/', '\\' );
if( filename.find( '\\' ) == std::string::npos ) {
// jeśli bieżaca ścieżka do tekstur nie została dodana to dodajemy domyślną
filename = szTexturePath + filename;