Optimize minimap save/load

This commit is contained in:
Eduardo Bart
2012-06-23 18:30:54 -03:00
parent fcd6d3cfe9
commit 79532cd612
15 changed files with 220 additions and 99 deletions

View File

@@ -209,7 +209,7 @@ FileStreamPtr ResourceManager::openFile(const std::string& fileName)
g_logger.error(stdext::format("unable to open file '%s': %s", fullPath, PHYSFS_getLastError()));
return nullptr;
}
return FileStreamPtr(new FileStream(fullPath, file));
return FileStreamPtr(new FileStream(fullPath, file, false));
}
FileStreamPtr ResourceManager::appendFile(const std::string& fileName)
@@ -219,7 +219,7 @@ FileStreamPtr ResourceManager::appendFile(const std::string& fileName)
g_logger.error(stdext::format("failed to append file '%s': %s", fileName, PHYSFS_getLastError()));
return nullptr;
}
return FileStreamPtr(new FileStream(fileName, file));
return FileStreamPtr(new FileStream(fileName, file, true));
}
FileStreamPtr ResourceManager::createFile(const std::string& fileName)
@@ -229,7 +229,7 @@ FileStreamPtr ResourceManager::createFile(const std::string& fileName)
g_logger.error(stdext::format("failed to create file '%s': %s", fileName, PHYSFS_getLastError()));
return nullptr;
}
return FileStreamPtr(new FileStream(fileName, file));
return FileStreamPtr(new FileStream(fileName, file, true));
}
bool ResourceManager::deleteFile(const std::string& fileName)