|
|
|
@ -180,9 +180,7 @@ const void SaveFile::SaveGame(){ |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const void SaveFile::LoadGame(){ |
|
|
|
|
std::filesystem::create_directories("save_file_path"_S); |
|
|
|
|
auto LoadFile=[&](){ |
|
|
|
|
void SaveFile::LoadFile(){ |
|
|
|
|
utils::datafile loadFile; |
|
|
|
|
|
|
|
|
|
std::string loadFilename="save_file_path"_S+std::format("save.{:04}",saveFileID); |
|
|
|
@ -237,7 +235,10 @@ const void SaveFile::LoadGame(){ |
|
|
|
|
}else{ |
|
|
|
|
std::cout<<std::format("WARNING! File {} does not exist for loading!","save_file_path"_S+std::format("save.{:04}",saveFileID))<<std::endl; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const void SaveFile::LoadGame(){ |
|
|
|
|
std::filesystem::create_directories("save_file_path"_S); |
|
|
|
|
|
|
|
|
|
#ifdef __EMSCRIPTEN__ |
|
|
|
|
if(onlineMode){ |
|
|
|
@ -261,7 +262,7 @@ const void SaveFile::LoadGame(){ |
|
|
|
|
file<<rawMetadata[i]; |
|
|
|
|
} |
|
|
|
|
file.close(); |
|
|
|
|
LoadGame(); |
|
|
|
|
LoadFile(); |
|
|
|
|
},[](void*arg){ |
|
|
|
|
std::cout<<"Failed to load Save File "<<saveFileID<<"!"<<std::endl; |
|
|
|
|
}); |
|
|
|
|