static bool MapResource_loadFile (const MapFormat& format, scene::Node& root, const std::string& filename) { TextFileInputStream file(filename); if (!file.failed()) { format.readGraph(root, file, *g_entityCreator); return true; } else { globalErrorStream() << "ERROR: Could not load file: " << filename << "\n"; return false; } }
bool MapResource_loadFile(const MapFormat& format, scene::Node& root, const char* filename) { globalOutputStream() << "Open file " << filename << " for read..."; TextFileInputStream file(filename); if(!file.failed()) { globalOutputStream() << "success\n"; ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(filename), "Loading Map"); ASSERT_NOTNULL(g_entityCreator); format.readGraph(root, file, *g_entityCreator); return true; } else { globalErrorStream() << "failure\n"; return false; } }